Check that same mbtree setting used between passes
authorAnton Mitrofanov <BugMaster@narod.ru>
Fri, 9 Nov 2018 15:13:34 +0000 (18:13 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Mon, 4 Feb 2019 19:22:04 +0000 (22:22 +0300)
Also check that CQP mode is not used with 2pass.

encoder/ratecontrol.c

index 2f81a24..e65b31d 100644 (file)
@@ -771,9 +771,9 @@ int x264_ratecontrol_new( x264_t *h )
     rc->last_non_b_pict_type = -1;
     rc->cbr_decay = 1.0;
 
-    if( h->param.rc.i_rc_method == X264_RC_CRF && h->param.rc.b_stat_read )
+    if( h->param.rc.i_rc_method != X264_RC_ABR && h->param.rc.b_stat_read )
     {
-        x264_log( h, X264_LOG_ERROR, "constant rate-factor is incompatible with 2pass.\n" );
+        x264_log( h, X264_LOG_ERROR, "rate control is incompatible with 2pass.\n" );
         return -1;
     }
 
@@ -941,6 +941,7 @@ int x264_ratecontrol_new( x264_t *h )
             CMP_OPT_FIRST_PASS( "intra_refresh", h->param.b_intra_refresh );
             CMP_OPT_FIRST_PASS( "open_gop", h->param.b_open_gop );
             CMP_OPT_FIRST_PASS( "bluray_compat", h->param.b_bluray_compat );
+            CMP_OPT_FIRST_PASS( "mbtree", h->param.rc.b_mb_tree );
 
             if( (p = strstr( opts, "interlaced=" )) )
             {