]> git.videolan.org Git - x264.git/commitdiff
chroma-me: take shortcut in BI analysis
authorJason Garrett-Glaser <jason@x264.com>
Fri, 25 Oct 2013 00:19:00 +0000 (17:19 -0700)
committerJason Garrett-Glaser <jason@x264.com>
Fri, 25 Oct 2013 17:35:38 +0000 (10:35 -0700)
~100 cycles faster with subme>=9

encoder/analyse.c

index 9e1030d2298e7221dbc5f26342bb54cb90499fb2..2d92e6411201a8604d67fd83af52d2f866105292 100644 (file)
@@ -2121,7 +2121,7 @@ static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
         int cost00 = h->pixf.mbcmp[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, pix0, 16 )
                    + ref_costs + l0_mv_cost + l1_mv_cost;
 
-        if( h->mb.b_chroma_me )
+        if( h->mb.b_chroma_me && cost00 < a->i_cost16x16bi )
         {
             ALIGNED_ARRAY_16( pixel, bi, [16*FENC_STRIDE] );