shithub: libvpx

Download patch

ref: 61c5e31ca16cf35fe6bb9bd73c15c5526ff4b4e4
parent: ad1216151d70776b74b189546d10e0f5c88cdb1e
parent: 84be08b07fde56e4608c63e0d0aed080245bb549
author: Yunqing Wang <yunqingwang@google.com>
date: Mon Feb 27 06:06:13 EST 2012

Merge "Fix skippable evaluation in mode decision"

--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -2214,22 +2214,22 @@
             if (cpi->common.mb_no_coeff_skip)
             {
                 int tteob;
+                int has_y2_block = (this_mode!=SPLITMV && this_mode!=B_PRED);
 
                 tteob = 0;
+                if(has_y2_block)
+                    tteob += x->e_mbd.eobs[24];
 
+                for (i = 0; i < 16; i++)
+                    tteob += (x->e_mbd.eobs[i] > has_y2_block);
+
                 if (x->e_mbd.mode_info_context->mbmi.ref_frame)
                 {
-                    for (i = 0; i <= 24; i++)
+                    for (i = 16; i < 24; i++)
                         tteob += x->e_mbd.eobs[i];
                 }
                 else
-                {
-                    for (i = 0; i < 16; i++)
-                        tteob += x->e_mbd.eobs[i];
-
                     tteob += uv_intra_tteob;
-                    tteob += x->e_mbd.eobs[24];
-                }
 
                 if (tteob == 0)
                 {