[x264-devel] commit: Disable B-frames in lossless mode (Jason Garrett-Glaser )

git version control git at videolan.org
Tue Jan 6 23:01:19 CET 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Tue Jan  6 16:55:44 2009 -0500| [6a4a9beae060d69bbeaeb8c1c3056fb6ae6765f6] | committer: Jason Garrett-Glaser 

Disable B-frames in lossless mode
They hurt compression anyways, and direct auto was bugged with lossless.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=6a4a9beae060d69bbeaeb8c1c3056fb6ae6765f6
---

 encoder/analyse.c |    6 +-----
 encoder/encoder.c |    1 +
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/encoder/analyse.c b/encoder/analyse.c
index 8457c38..f9f5abb 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -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 */
diff --git a/encoder/encoder.c b/encoder/encoder.c
index fd86a18..3120e94 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -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;



More information about the x264-devel mailing list