summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_onyx_if.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-03-20 17:29:04 -0700
committerYaowu Xu <yaowu@google.com>2014-03-20 19:22:27 -0700
commit98ed74d9420dbada72f36e0303a1c112fd5f28a8 (patch)
tree870ace3c7b3c8fd803d5c08bbdbd7d89ccfcc4d6 /vp9/encoder/vp9_onyx_if.c
parent0de216a9952e3671b50a1bbf3c16ef883805e61e (diff)
downloadlibvpx-98ed74d9420dbada72f36e0303a1c112fd5f28a8.tar
libvpx-98ed74d9420dbada72f36e0303a1c112fd5f28a8.tar.gz
libvpx-98ed74d9420dbada72f36e0303a1c112fd5f28a8.tar.bz2
libvpx-98ed74d9420dbada72f36e0303a1c112fd5f28a8.zip
Change the min/max q validation in lossless mode
This commit changed how q is validated in lossless mode. With this commit, when --lossless=1 is specificed at commandline, --min-q and --max-q are now ignored. This is to make the option non-ambiguious. Change-Id: I33e85690460537509d33be75d6a3597be4affc09
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r--vp9/encoder/vp9_onyx_if.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 7fd9febbd..a7788847b 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1328,10 +1328,16 @@ void vp9_change_config(struct VP9_COMP *cpi, VP9_CONFIG *oxcf) {
cpi->oxcf.cq_level = q_trans[cpi->oxcf.cq_level];
cpi->oxcf.lossless = oxcf->lossless;
- cpi->mb.e_mbd.itxm_add = cpi->oxcf.lossless ? vp9_iwht4x4_add
- : vp9_idct4x4_add;
+ if (cpi->oxcf.lossless) {
+ // In lossless mode, make sure right quantizer range and correct transform
+ // is set.
+ cpi->oxcf.worst_allowed_q = 0;
+ cpi->oxcf.best_allowed_q = 0;
+ cpi->mb.e_mbd.itxm_add = vp9_iwht4x4_add;
+ } else {
+ cpi->mb.e_mbd.itxm_add = vp9_idct4x4_add;
+ }
cpi->rc.baseline_gf_interval = DEFAULT_GF_INTERVAL;
-
cpi->ref_frame_flags = VP9_ALT_FLAG | VP9_GOLD_FLAG | VP9_LAST_FLAG;
cpi->refresh_golden_frame = 0;