diff options
author | Paul Wilkins <paulwilkins@google.com> | 2012-03-27 13:01:34 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2012-04-11 13:13:28 +0100 |
commit | a3392d57180756bcc01b1c52b40afc1767bf1e52 (patch) | |
tree | b04debe82ddbafaf0c45ebb48f05b0a7640e7c54 /vp8/encoder/rdopt.c | |
parent | 9daf3154db8e5225ebc69fb120389ff9b2a9dd3f (diff) | |
download | libvpx-a3392d57180756bcc01b1c52b40afc1767bf1e52.tar libvpx-a3392d57180756bcc01b1c52b40afc1767bf1e52.tar.gz libvpx-a3392d57180756bcc01b1c52b40afc1767bf1e52.tar.bz2 libvpx-a3392d57180756bcc01b1c52b40afc1767bf1e52.zip |
T8x8 zbin and rate control changes.
Some adjustments to zbin for t8x8.
Changes to rules for sizing forced key frames.
Some extra stats output in tmp.stt.
Approximate gain on YT-hd set 0.5%
There are still issues in sizing key frames and gf/arf frames
when the image is largely static. These in part relate to
problems with cost estimates in the recode loop.
Change-Id: I6f0159dc8a8faeab4115a19c668d442491619a68
Diffstat (limited to 'vp8/encoder/rdopt.c')
-rw-r--r-- | vp8/encoder/rdopt.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index c46be62e5..2582c6410 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1510,10 +1510,12 @@ static void rd_pick_intra_mbuv_mode_8x8(VP8_COMP *cpi, x->e_mbd.mode_info_context->mbmi.uv_mode = mode_selected; } -int vp8_cost_mv_ref(VP8_COMMON *pc, +int vp8_cost_mv_ref(VP8_COMP *cpi, MB_PREDICTION_MODE m, const int near_mv_ref_ct[4]) { + VP8_COMMON *pc = &cpi->common; + vp8_prob p [VP8_MVREFS-1]; assert(NEARESTMV <= m && m <= SPLITMV); vp8_mv_ref_probs(pc, p, near_mv_ref_ct); @@ -1737,7 +1739,7 @@ static void rd_check_segment(VP8_COMP *cpi, MACROBLOCK *x, // Segmentation method overheads rate = vp8_cost_token(vp8_mbsplit_tree, vp8_mbsplit_probs, vp8_mbsplit_encodings + segmentation); - rate += vp8_cost_mv_ref(&cpi->common, SPLITMV, bsi->mdcounts); + rate += vp8_cost_mv_ref(cpi, SPLITMV, bsi->mdcounts); this_segment_rd += RDCOST(x->rdmult, x->rddiv, rate, 0); br += rate; @@ -3093,10 +3095,10 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int } } } - //intermodecost[mode_index] = vp8_cost_mv_ref(this_mode, mdcounts); // Experimental debug code + //intermodecost[mode_index] = vp8_cost_mv_ref(cpi, this_mode, mdcounts); // Experimental debug code // Add in the Mv/mode cost - rate2 += vp8_cost_mv_ref(&cpi->common, this_mode, mdcounts); + rate2 += vp8_cost_mv_ref(cpi, this_mode, mdcounts); // Y cost and distortion if(cpi->common.txfm_mode == ALLOW_8X8) @@ -3181,7 +3183,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int } /* Add in the Mv/mode cost */ - rate2 += vp8_cost_mv_ref(&cpi->common,this_mode, mdcounts); + rate2 += vp8_cost_mv_ref(cpi, this_mode, mdcounts); vp8_clamp_mv2(&x->e_mbd.mode_info_context->mbmi.mv, xd); vp8_clamp_mv2(&x->e_mbd.mode_info_context->mbmi.second_mv, xd); @@ -3368,7 +3370,8 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int x->e_mbd.mode_info_context->mbmi.mv.as_int = 0; } - other_cost += ref_costs[x->e_mbd.mode_info_context->mbmi.ref_frame]; + other_cost += + ref_costs[x->e_mbd.mode_info_context->mbmi.ref_frame]; /* Calculate the final y RD estimate for this mode */ best_yrd = RDCOST(x->rdmult, x->rddiv, (rate2-rate_uv-other_cost), |