diff options
author | hui su <huisu@google.com> | 2016-04-25 14:23:06 -0700 |
---|---|---|
committer | hui su <huisu@google.com> | 2016-04-26 10:17:38 -0700 |
commit | c3a9247e09bd74f65c36d12333f5061535158a93 (patch) | |
tree | 8c8ccb3aba2adc297efe6dd82d45b53c5e315a69 /vp9 | |
parent | c8f56d23039865b0bd03ea8c518b5691f2be02c7 (diff) | |
download | libvpx-c3a9247e09bd74f65c36d12333f5061535158a93.tar libvpx-c3a9247e09bd74f65c36d12333f5061535158a93.tar.gz libvpx-c3a9247e09bd74f65c36d12333f5061535158a93.tar.bz2 libvpx-c3a9247e09bd74f65c36d12333f5061535158a93.zip |
VP9: adjust trellis quant optimization RD parameters
Coding gain:
lowres 0.64%
midres 0.38%
hdres 0.58%
Change-Id: I233fa2a4b24bd1e15091a5f5ef6aff661f3f50ec
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodemb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index 50387d770..b6d66db72 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -62,8 +62,7 @@ typedef struct vp9_token_state { int16_t qc; } vp9_token_state; -// TODO(huisu): experiment to find optimal RD numbers. -static const int plane_rd_mult[PLANE_TYPES] = { 4, 2 }; +static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] ={ {10, 6}, {8, 7}, }; #define UPDATE_RD_COST()\ {\ @@ -110,7 +109,8 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, const int16_t *const scan = so->scan; const int16_t *const nb = so->neighbors; int next = eob, sz = 0; - int64_t rdmult = mb->rdmult * plane_rd_mult[type], rddiv = mb->rddiv; + const int64_t rdmult = (mb->rdmult * plane_rd_mult[ref][type]) >> 1; + const int64_t rddiv = mb->rddiv; int64_t rd_cost0, rd_cost1; int rate0, rate1, error0, error1; int16_t t0, t1; @@ -126,9 +126,6 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, assert(eob <= default_eob); /* Now set up a Viterbi trellis to evaluate alternative roundings. */ - if (!ref) - rdmult = (rdmult * 9) >> 4; - /* Initialize the sentinel node of the trellis. */ tokens[eob][0].rate = 0; tokens[eob][0].error = 0; |