diff options
author | Yaowu Xu <yaowu@google.com> | 2012-02-22 17:13:04 +0000 |
---|---|---|
committer | On2 (Google) Code Review <on2-gerrit@google.com> | 2012-02-22 17:13:04 +0000 |
commit | 3c872b6c27a5f03156b973fb359c9293049d6e84 (patch) | |
tree | 6bc86c7caa0101ee276396b25a0a2fb75ecf55f1 | |
parent | 0f430084e061003a91d6bead7405ab7237ebd367 (diff) | |
parent | 2b4cd4cc015b35ae805cc14b5e1665263e3d8098 (diff) | |
download | libvpx-3c872b6c27a5f03156b973fb359c9293049d6e84.tar libvpx-3c872b6c27a5f03156b973fb359c9293049d6e84.tar.gz libvpx-3c872b6c27a5f03156b973fb359c9293049d6e84.tar.bz2 libvpx-3c872b6c27a5f03156b973fb359c9293049d6e84.zip |
Merge "Fixed skippable evaluation in mode decision" into experimental
-rw-r--r-- | vp8/encoder/rdopt.c | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 73cd21e2a..4f97e3c63 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -2270,6 +2270,11 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int int best_hybrid_rd = INT_MAX; int rate2, distortion2; int uv_intra_rate, uv_intra_distortion, uv_intra_rate_tokenonly; + int uv_intra_tteob = 0; +#if CONFIG_T8X8 + int uv_intra_rate_8x8, uv_intra_distortion_8x8, uv_intra_rate_tokenonly_8x8; + int uv_intra_tteob_8x8=0; +#endif int rate_y, UNINITIALIZED_IS_SAFE(rate_uv); int distortion_uv; int best_yrd = INT_MAX; @@ -2357,6 +2362,12 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int x->e_mbd.mode_info_context->mbmi.ref_frame = INTRA_FRAME; rd_pick_intra_mbuv_mode(cpi, x, &uv_intra_rate, &uv_intra_rate_tokenonly, &uv_intra_distortion); uv_intra_mode = x->e_mbd.mode_info_context->mbmi.uv_mode; + for(i=16; i<24; i++) + uv_intra_tteob += x->e_mbd.block[i].eob; + +#if CONFIG_T8X8 + uv_intra_tteob_8x8 = uv_intra_tteob; +#endif // Get estimates of reference frame costs for each reference frame // that depend on the current prediction etc. @@ -2953,12 +2964,43 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int if (cpi->common.mb_no_coeff_skip) { int tteob; - + int has_y2_block = ( this_mode!=SPLITMV + &&this_mode!=B_PRED + &&this_mode!=I8X8_PRED); tteob = 0; + if(has_y2_block) + tteob += x->e_mbd.block[24].eob; - for (i = 0; i <= 24; i++) +#if CONFIG_T8X8 + if(cpi->common.txfm_mode ==ALLOW_8X8 && has_y2_block) { - tteob += x->e_mbd.block[i].eob; + for (i = 0; i < 16; i+=4) + tteob += (x->e_mbd.block[i].eob > 1); + if(x->e_mbd.mode_info_context->mbmi.ref_frame!=INTRA_FRAME) + { + tteob += x->e_mbd.block[16].eob; + tteob += x->e_mbd.block[20].eob; + } + else + { + tteob += uv_intra_tteob_8x8; + } + } + else +#endif + { + for (i = 0; i < 16; i++) + tteob += (x->e_mbd.block[i].eob > has_y2_block); + + if(x->e_mbd.mode_info_context->mbmi.ref_frame!=INTRA_FRAME) + { + for (i = 16; i < 24; i++) + tteob += x->e_mbd.block[i].eob; + } + else + { + tteob += uv_intra_tteob; + } } if (tteob == 0) |