diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index a7432fe3bc..9e174b85f1 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -7660,6 +7660,20 @@ Controls the decision performed by b_adapt. A higher b_bias produces more B-frames. (default: 0) . .TP +.B (no)b_pyramid +Allows B-frames to be used as references for predicting other frames. +For example, consider 3 consecutive B-frames: I0 B1 B2 B3 P4. +Without this option, B-frames follow the same pattern as MPEG-[124]. +So they are coded in the order I0 P4 B1 B2 B3, and all the B-frames +are predicted from I0 and P4. +With this option, they are coded as I0 P4 B2 B1 B3. +B2 is the same as above, but B1 is predicted from I0 and B2, and +B3 is predicted from B2 and P4. +This results in slightly improved compression, at no speed cost. +Requires bframes >= 2. +Disadvantage: increases decoding delay to 2 frames. +. +.TP .B (no)deblock Use deblocking filter (default: on). As it takes very little time compared to its quality gain, it's not diff --git a/configure b/configure index 40fa86efdb..86350ea421 100755 --- a/configure +++ b/configure @@ -5920,7 +5920,7 @@ cat > $TMPC << EOF #include #include #include -#if X264_BUILD < 0x0013 +#if X264_BUILD < 0x0014 #error We do not support old versions of x264. Get the latest from SVN. #endif int main(void) { x264_encoder_open((void*)0); return 0; } diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 06d5512fba..24c436f1e5 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -67,6 +67,7 @@ static int scenecut_threshold = 40; static int bframe = 0; static int bframe_adaptive = 1; static int bframe_bias = 0; +static int bframe_pyramid = 0; static int deblock = 1; static int deblockalpha = 0; static int deblockbeta = 0; @@ -106,6 +107,8 @@ m_option_t x264encopts_conf[] = { {"b_adapt", &bframe_adaptive, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"nob_adapt", &bframe_adaptive, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"b_bias", &bframe_bias, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL}, + {"b_pyramid", &bframe_pyramid, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nob_pyramid", &bframe_pyramid, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"deblock", &deblock, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"nodeblock", &deblock, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"deblockalpha", &deblockalpha, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL}, @@ -160,6 +163,7 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width, mod->param.i_bframe = bframe; mod->param.b_bframe_adaptive = bframe_adaptive; mod->param.i_bframe_bias = bframe_bias; + mod->param.b_bframe_pyramid = bframe_pyramid; mod->param.b_deblocking_filter = deblock; mod->param.i_deblocking_filter_alphac0 = deblockalpha; mod->param.i_deblocking_filter_beta = deblockbeta;