diff options
author | Jingning Han <jingning@google.com> | 2015-02-11 14:36:48 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2015-02-11 14:36:48 -0800 |
commit | 532cb435f835c3f355547d95913997c64994ea87 (patch) | |
tree | e21bb40a620353eae2cc1e165e60ec633fb108ea /vp9/encoder | |
parent | fc99636f1bc09603434a16181c2eb9307a844ec6 (diff) | |
parent | 4ce70e8847f73e70ad3e2ffa5ce3773b06addac0 (diff) | |
download | libvpx-532cb435f835c3f355547d95913997c64994ea87.tar libvpx-532cb435f835c3f355547d95913997c64994ea87.tar.gz libvpx-532cb435f835c3f355547d95913997c64994ea87.tar.bz2 libvpx-532cb435f835c3f355547d95913997c64994ea87.zip |
Merge "Add ref frame rate cost to non-RD mode decision"
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_pickmode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 70e90b6e7..d24e4c7e6 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -577,6 +577,9 @@ static const PREDICTION_MODE inter_mode_set[INTER_MODES] = { ZEROMV, NEARESTMV, NEARMV, NEWMV, }; +static const int ref_frame_cost[MAX_REF_FRAMES] = { + 1235, 229, 530, 615, +}; // TODO(jingning) placeholder for inter-frame non-RD mode decision. // this needs various further optimizations. to be continued.. void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, @@ -865,6 +868,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, this_rdc.rate += rate_mv; this_rdc.rate += cpi->inter_mode_cost[mbmi->mode_context[ref_frame]] [INTER_OFFSET(this_mode)]; + this_rdc.rate += ref_frame_cost[ref_frame]; this_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, this_rdc.rate, this_rdc.dist); @@ -971,6 +975,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, this_rdc.rate = args.rate; this_rdc.dist = args.dist; this_rdc.rate += cpi->mbmode_cost[this_mode]; + this_rdc.rate += ref_frame_cost[INTRA_FRAME]; this_rdc.rate += intra_cost_penalty; this_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, this_rdc.rate, this_rdc.dist); |