From 1d94f305999864aaa1da79050da2f900f69b4365 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Sun, 21 Feb 2010 03:56:06 -0800 Subject: [PATCH] Make b-pyramid normal the default 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 | 9 ++++++++- x264.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/common.c b/common/common.c index a99b65bf..2faf139f 100644 --- a/common/common.c +++ b/common/common.c @@ -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 f317e985..dec296c3 100644 --- a/x264.h +++ b/x264.h @@ -35,7 +35,7 @@ #include -#define X264_BUILD 86 +#define X264_BUILD 87 /* x264_t: * opaque handler for encoder */ -- 2.47.3