Commit be407e00 authored by hui su's avatar hui su

Adjust optimize_b RD parameters

Coding gain
lowres 0.51%
midres 0.36%

Change-Id: I1e9f2f9341bad12d9023f97c73d0e991ae5ec7f0
parent 5af70621
......@@ -110,8 +110,7 @@ typedef struct vp9_token_state {
tran_low_t qc;
} vp9_token_state;
// TODO(jimbankoski): 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}, {7, 5}, };
#define UPDATE_RD_COST()\
{\
......@@ -209,7 +208,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, t0, t1;
int best, band, pt, i, final_eob;
......@@ -231,9 +231,6 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block,
#endif // CONFIG_TX_SKIP && CONFIG_NEW_QUANT
/* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment