]> git.videolan.org Git - x264.git/commitdiff
Fix RD early-skip
authorJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 6 Sep 2009 01:56:18 +0000 (18:56 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 6 Sep 2009 17:28:37 +0000 (10:28 -0700)
Small quality improvement and speedup, was broken by r1214.

encoder/analyse.c

index dec1271a595429945e44fbc975232147e97e57fc..92b5ae51d205e20d72061f6bda16077a20d89a2e 100644 (file)
@@ -1229,6 +1229,8 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
             h->mb.i_partition = D_16x16;
             x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv );
             a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+            if( !(h->mb.i_cbp_luma|h->mb.i_cbp_chroma) )
+                h->mb.i_type = P_SKIP;
         }
     }
 }