OSDN Git Service

Updates x264 to r1259-dd026f2, bringing with it a bunch of changes you can read about...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 15 Sep 2009 15:16:05 +0000 (15:16 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 15 Sep 2009 15:16:05 +0000 (15:16 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@2823 b64f7644-9d1e-0410-96f1-a4d463321fa5

contrib/x264/module.defs
libhb/encx264.c

index 382bff4..cd239f6 100644 (file)
@@ -1,7 +1,7 @@
 $(eval $(call import.MODULE.defs,X264,x264,PTHREADW32))
 $(eval $(call import.CONTRIB.defs,X264))
 
-X264.FETCH.url = http://download.m0k.org/handbrake/contrib/x264-r1195-5d75a9b.tar.gz
+X264.FETCH.url = http://download.m0k.org/handbrake/contrib/x264-r1259-dd026f2.tar.gz
 X264.EXTRACT.tarbase = x264
 
 X264.CONFIGURE.deps   =
index 249d42c..a68bbd4 100644 (file)
@@ -87,6 +87,51 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job )
 
     x264_param_default( &param );
     
+    /* Temporarily default mbtree to off for baseline,
+       overridable through x264 option strings. */
+    if( job->x264opts != NULL && *job->x264opts != '\0' )
+    {
+        char *x264opts, *x264opts_start;
+    
+        x264opts = x264opts_start = strdup(job->x264opts);
+    
+        while( x264opts_start && *x264opts )
+        {
+            char *name = x264opts;
+            char *value;
+            int ret;
+    
+            x264opts += strcspn( x264opts, ":" );
+            if( *x264opts )
+            {
+                *x264opts = 0;
+                x264opts++;
+            }
+    
+            value = strchr( name, '=' );
+            if( value )
+            {
+                *value = 0;
+                value++;
+            }
+    
+            /*
+               When B-frames are enabled, the max frame count increments
+               by 1 (regardless of the number of B-frames). If you don't
+               change the duration of the video track when you mux, libmp4
+               barfs.  So, check if the x264opts aren't using B-frames, and
+               when they aren't, set the boolean job->areBframes as false.
+             */
+            if( !( strcmp( name, "bframes" ) ) )
+            {
+                if( atoi( value ) == 0 )
+                {
+                    param.rc.b_mb_tree = 0;
+                }
+            }
+        }
+    }
+    
     /* Enable metrics */
     param.analyse.b_psnr = 1;
     param.analyse.b_ssim = 1;