]> granicus.if.org Git - libx264/commitdiff
Avoid redundant MV prediction in duplicate refs
authorFiona Glaser <fiona@x264.com>
Thu, 25 Mar 2010 21:46:24 +0000 (14:46 -0700)
committerFiona Glaser <fiona@x264.com>
Sat, 27 Mar 2010 19:47:35 +0000 (12:47 -0700)
encoder/analyse.c

index cc5d04e7ea257a9e4e161c55b4a8484f49264f9b..efb5d738e2a1e37df79f2735a96c357e6cb0a05c 100644 (file)
@@ -1127,7 +1127,6 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
         LOAD_WPELS( &m, h->mb.pic.p_fref_w[i_ref], 0, i_ref, 0, 0 );
 
         x264_mb_predict_mv_16x16( h, 0, i_ref, m.mvp );
-        x264_mb_predict_mv_ref16x16( h, 0, i_ref, mvc, &i_mvc );
 
         if( h->mb.ref_blind_dupe == i_ref )
         {
@@ -1135,7 +1134,10 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
             x264_me_refine_qpel_refdupe( h, &m, p_halfpel_thresh );
         }
         else
+        {
+            x264_mb_predict_mv_ref16x16( h, 0, i_ref, mvc, &i_mvc );
             x264_me_search_ref( h, &m, mvc, i_mvc, p_halfpel_thresh );
+        }
 
         /* save mv for predicting neighbors */
         CP32( h->mb.mvr[0][i_ref][h->mb.i_mb_xy], m.mv );