]> granicus.if.org Git - libx264/commitdiff
Disable B-frames in lossless mode
authorFiona Glaser <fiona@x264.com>
Tue, 6 Jan 2009 21:55:44 +0000 (16:55 -0500)
committerFiona Glaser <fiona@x264.com>
Tue, 6 Jan 2009 21:55:44 +0000 (16:55 -0500)
They hurt compression anyways, and direct auto was bugged with lossless.

encoder/analyse.c
encoder/encoder.c

index b0007b4db00f8f3da3d546277d6e9f6296d8286c..6d75fe5a8a68bbabaf804188b98906a004352fd0 100644 (file)
@@ -2464,11 +2464,7 @@ void x264_macroblock_analyse( x264_t *h )
         {
             if( !h->mb.b_direct_auto_write )
                 x264_mb_mc( h );
-            if( h->mb.b_lossless )
-            {
-                /* chance of skip is too small to bother */
-            }
-            else if( analysis.i_mbrd )
+            if( analysis.i_mbrd )
             {
                 i_bskip_cost = ssd_mb( h );
                 /* 6 = minimum cavlc cost of a non-skipped MB */
index abe4b92e7c58aa643bb97122a58605097c48107b..d682db729a6cef5f56e50d79350935f6354a2132 100644 (file)
@@ -411,6 +411,7 @@ static int x264_validate_parameters( x264_t *h )
         h->param.analyse.b_fast_pskip = 0;
         h->param.analyse.i_noise_reduction = 0;
         h->param.analyse.f_psy_rd = 0;
+        h->param.i_bframe = 0;
         /* 8x8dct is not useful at all in CAVLC lossless */
         if( !h->param.b_cabac )
             h->param.analyse.b_transform_8x8 = 0;