]> granicus.if.org Git - libx264/commitdiff
Warn if direct auto wasn't set on the first pass
authorFiona Glaser <fiona@x264.com>
Sat, 17 Jan 2009 20:16:37 +0000 (15:16 -0500)
committerFiona Glaser <fiona@x264.com>
Sun, 18 Jan 2009 08:09:18 +0000 (03:09 -0500)
And, if it wasn't, run direct auto as if it was the first pass, rather than simply forcing temporal direct mode on all frames.
Also a small tweak to coeff_level_run asm.

common/x86/quant-a.asm
encoder/ratecontrol.c

index f31861be9e7c2a54a1497525bde09c7855c12dc5..d1fd8693f1ebf80c608787e74ef0a565b963435c 100644 (file)
@@ -826,7 +826,7 @@ cglobal x264_coeff_level_run%2_%1,0,7
     mov    t4d, %2-1
     LZCOUNT t3d, t5d, 0x1f
     xor    t6d, t6d
-    shl    t5d, 1
+    add    t5d, t5d
     sub    t4d, t3d
     shl    t5d, t3b
     mov   [t1], t4d
index 2130071edc799c402433d19118ffa15a1b0a57a0..96b67de660121205f23b4e8e2d30a05143bb8c6a 100644 (file)
@@ -441,6 +441,12 @@ int x264_ratecontrol_new( x264_t *h )
             if( strstr( opts, "qp=0" ) && h->param.rc.i_rc_method == X264_RC_ABR )
                 x264_log( h, X264_LOG_WARNING, "1st pass was lossless, bitrate prediction will be inaccurate\n" );
 
+            if( !strstr( opts, "direct=3" ) && h->param.analyse.i_direct_mv_pred == X264_DIRECT_PRED_AUTO )
+            {
+                x264_log( h, X264_LOG_WARNING, "direct=auto not used on the first pass\n" );
+                h->mb.b_direct_auto_write = 1;
+            }
+
             if( ( p = strstr( opts, "b_adapt=" ) ) && sscanf( p, "b_adapt=%d", &i ) && i >= X264_B_ADAPT_NONE && i <= X264_B_ADAPT_TRELLIS )
                 h->param.i_bframe_adaptive = i;
             else if( h->param.i_bframe )