]> git.videolan.org Git - x264.git/commitdiff
Reduce memory usage in 2-pass with b-adapt 2
authorLoren Merritt <pengvado@akuvian.org>
Mon, 17 May 2010 21:08:37 +0000 (14:08 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 17 May 2010 21:08:37 +0000 (14:08 -0700)
encoder/encoder.c

index 19cb79d0c0ba1eb8a0aaacdc2e15e4becc317d23..90c15d0380e569438dd6c33df723d771a91ef737 100644 (file)
@@ -928,7 +928,7 @@ x264_t *x264_encoder_open( x264_param_t *param )
     h->mb.i_mb_count = h->sps->i_mb_width * h->sps->i_mb_height;
 
     /* Init frames. */
-    if( h->param.i_bframe_adaptive == X264_B_ADAPT_TRELLIS )
+    if( h->param.i_bframe_adaptive == X264_B_ADAPT_TRELLIS && !h->param.rc.b_stat_read )
         h->frames.i_delay = X264_MAX(h->param.i_bframe,3)*4;
     else
         h->frames.i_delay = h->param.i_bframe;