]> git.sesse.net Git - x264/commitdiff
Make b-pyramid normal the default
authorFiona Glaser <fiona@x264.com>
Sun, 21 Feb 2010 11:56:06 +0000 (03:56 -0800)
committerFiona Glaser <fiona@x264.com>
Tue, 23 Feb 2010 09:46:20 +0000 (01:46 -0800)
Now that b-pyramid works with MB-tree and is spec compliant, there's no real reason not to make it default.
Improves compression 0-5% depending on the video.
Also allow 0/1/2 to be used as aliases for none/strict/normal (for conciseness).

common/common.c
x264.h

index a99b65bfe1c65fa5d458139b7ad5db8cc2857036..2faf139f3289cbabc02c40aa41e9675f6d93e8d7 100644 (file)
@@ -75,7 +75,7 @@ void x264_param_default( x264_param_t *param )
     param->i_scenecut_threshold = 40;
     param->i_bframe_adaptive = X264_B_ADAPT_FAST;
     param->i_bframe_bias = 0;
-    param->i_bframe_pyramid = 0;
+    param->i_bframe_pyramid = X264_B_PYRAMID_NORMAL;
     param->b_interlaced = 0;
     param->b_constrained_intra = 0;
 
@@ -637,7 +637,14 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value )
     OPT("b-bias")
         p->i_bframe_bias = atoi(value);
     OPT("b-pyramid")
+    {
         b_error |= parse_enum( value, x264_b_pyramid_names, &p->i_bframe_pyramid );
+        if( b_error )
+        {
+            b_error = 0;
+            p->i_bframe_pyramid = atoi(value);
+        }
+    }
     OPT("nf")
         p->b_deblocking_filter = !atobool(value);
     OPT2("filter", "deblock")
diff --git a/x264.h b/x264.h
index f317e9859c67eabf406bbb62a33fa72bf49ffab1..dec296c3f0907a103522f0e62f136b61b4024423 100644 (file)
--- a/x264.h
+++ b/x264.h
@@ -35,7 +35,7 @@
 
 #include <stdarg.h>
 
-#define X264_BUILD 86
+#define X264_BUILD 87
 
 /* x264_t:
  *      opaque handler for encoder */