diff options
author | Alex Converse <aconverse@google.com> | 2016-02-01 10:02:54 -0800 |
---|---|---|
committer | Alex Converse <aconverse@google.com> | 2016-02-09 13:20:25 -0800 |
commit | fac947df77e6ad974c4b121de1d1a5be64de1375 (patch) | |
tree | a694ee7b7b22c2169a049af7c8e1054f1189efe6 /vp9/encoder/vp9_rd.h | |
parent | ae98a61e2295be1f5ceb95554edcd9ab29fda6d8 (diff) | |
download | libvpx-fac947df77e6ad974c4b121de1d1a5be64de1375.tar libvpx-fac947df77e6ad974c4b121de1d1a5be64de1375.tar.gz libvpx-fac947df77e6ad974c4b121de1d1a5be64de1375.tar.bz2 libvpx-fac947df77e6ad974c4b121de1d1a5be64de1375.zip |
Restore previous motion search bit-error scale.
The bit to error transformation got doubled as a result of going from
8-bit to 9-bit costs (change d13385c).
Use defines to derive the scale numbers and comment some of the fields.
derf: -0.023 BDRATE
hevcmr: +0.067 BDRATE
stdhd: +0.098 BDRATE
(These are substantially smaller than than the original gains from 8 to
9 bit costing.)
Change-Id: I6a2b3b029b2f1415e4f90a05709b2333ec0eea9b
Diffstat (limited to 'vp9/encoder/vp9_rd.h')
-rw-r--r-- | vp9/encoder/vp9_rd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_rd.h b/vp9/encoder/vp9_rd.h index a92b14edf..9b8e2732c 100644 --- a/vp9/encoder/vp9_rd.h +++ b/vp9/encoder/vp9_rd.h @@ -24,6 +24,7 @@ extern "C" { #endif #define RDDIV_BITS 7 +#define RD_EPB_SHIFT 6 #define RDCOST(RM, DM, R, D) \ (ROUND_POWER_OF_TWO(((int64_t)R) * (RM), VP9_PROB_COST_SHIFT) + (D << DM)) @@ -168,6 +169,11 @@ static INLINE int rd_less_than_thresh(int64_t best_rd, int thresh, return best_rd < ((int64_t)thresh * thresh_fact >> 5) || thresh == INT_MAX; } +static INLINE void set_error_per_bit(MACROBLOCK *x, int rdmult) { + x->errorperbit = rdmult >> RD_EPB_SHIFT; + x->errorperbit += (x->errorperbit == 0); +} + void vp9_mv_pred(struct VP9_COMP *cpi, MACROBLOCK *x, uint8_t *ref_y_buffer, int ref_y_stride, int ref_frame, BLOCK_SIZE block_size); |