diff options
author | Jingning Han <jingning@google.com> | 2014-07-21 12:04:08 -0700 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2014-07-21 12:11:31 -0700 |
commit | 9d9b70a36a8521225b2827cfdad2b55bfe7d5b32 (patch) | |
tree | 81cf72419db25a6ab2f6c5fd519ee703b9db82a6 | |
parent | 1e168d12d9cd3561e71fc339078a19c584a04928 (diff) | |
download | libvpx-sandbox/Jingning/transcode.tar.gz |
Allow backward prob update in external mode info coding flowsandbox/Jingning/transcode
This commit enables vpxenc to properly count the coded motion
vector related information for backward update. This allows the
coding flow using external mode info to use backward probability
update. In the short test clip, over 10% bit-rate saving is
observed at no distortion change.
Change-Id: Ie27e97114ab91c3d95ba7b5554d617d226db5e20
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 435aad157..600ebe85f 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -644,6 +644,15 @@ static void mode_info_conversion(VP9_COMP *cpi, const TileInfo *const tile, mbmi->mode = ZEROMV; } } + + if (is_inter_block(mbmi)) { + vp9_update_mv_count(cm, xd); + + if (cm->interp_filter == SWITCHABLE) { + const int ctx = vp9_get_pred_context_switchable_interp(xd); + ++cm->counts.switchable_interp[ctx][mbmi->interp_filter]; + } + } } #endif @@ -762,6 +771,7 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx, } #endif if (!frame_is_intra_only(cm)) { +#if !CONFIG_TRANSCODE if (is_inter_block(mbmi)) { vp9_update_mv_count(cm, xd); @@ -770,6 +780,7 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx, ++cm->counts.switchable_interp[ctx][mbmi->interp_filter]; } } +#endif rd_opt->comp_pred_diff[SINGLE_REFERENCE] += ctx->single_pred_diff; rd_opt->comp_pred_diff[COMPOUND_REFERENCE] += ctx->comp_pred_diff; |