]> git.videolan.org Git - x264.git/commitdiff
Fix glitches with slow-firstpass + weightb + multiref + 2pass
authorJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 13 Oct 2009 01:40:28 +0000 (18:40 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 13 Oct 2009 01:47:17 +0000 (18:47 -0700)
Bug in r1277

encoder/encoder.c

index c49ed2298eff18a9eb6a4bbeed48fe571d93838c..24aba6fe1c933bcf75db207bb73e5e7485d909d8 100644 (file)
@@ -1772,9 +1772,6 @@ int     x264_encoder_encode( x264_t *h,
     /* build ref list 0/1 */
     x264_reference_build_list( h, h->fdec->i_poc );
 
-    if( h->sh.i_type == SLICE_TYPE_B )
-        x264_macroblock_bipred_init( h );
-
     /* ---------------------- Write the bitstream -------------------------- */
     /* Init bitstream context */
     h->out.i_nal = 0;
@@ -1858,6 +1855,9 @@ int     x264_encoder_encode( x264_t *h,
             break;
         }
 
+    if( h->sh.i_type == SLICE_TYPE_B )
+        x264_macroblock_bipred_init( h );
+
     /* ------------------------ Create slice header  ----------------------- */
     x264_slice_init( h, i_nal_type, i_global_qp );