summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-22 05:50:10 +0000
committerlorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-22 05:50:10 +0000
commit1db1d5ea389cc85f7cc4d4ea0b66749c68de38cc (patch)
treed1b0a1868f834a9982e446fa473fe54baf411577
parent66b1d8c94b5bcd33ab8c0857140e1eafe01011ee (diff)
downloadmpv-1db1d5ea389cc85f7cc4d4ea0b66749c68de38cc.tar.bz2
mpv-1db1d5ea389cc85f7cc4d4ea0b66749c68de38cc.tar.xz
Sync to x264 r134: weighted prediction for B-frames.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14760 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.19
-rwxr-xr-xconfigure2
-rw-r--r--libmpcodecs/ve_x264.c4
3 files changed, 14 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index b3356ba49d..285ace3de2 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -7463,6 +7463,15 @@ but temporal often looks better.
direct_pred=0 is usually both slower and lower quality.
.
.TP
+.B (no)weight_b
+Use weighted prediction in B-frames.
+Without this option, bidirectionally predicted macroblocks give
+equal weight to each reference frame.
+With this option, the weights are determined by the temporal position
+of the B-frame relative to the references.
+Requires bframes > 1.
+.
+.TP
.B (no)b8x8mv
Use additional macroblock types b16x8, b8x16, b8x8 (default: enabled).
Without this option, B-frames will use only types
diff --git a/configure b/configure
index 4e857eda89..1eb88b99e0 100755
--- a/configure
+++ b/configure
@@ -5906,7 +5906,7 @@ cat > $TMPC << EOF
#include <stdint.h>
#include <stdarg.h>
#include <x264.h>
-#if X264_BUILD < 0x0011
+#if X264_BUILD < 0x0012
#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 9677eca343..3afff76d8b 100644
--- a/libmpcodecs/ve_x264.c
+++ b/libmpcodecs/ve_x264.c
@@ -74,6 +74,7 @@ static int p4x4mv = 0;
static int p8x8mv = 1;
static int b8x8mv = 1;
static int direct_pred = X264_DIRECT_PRED_TEMPORAL;
+static int weight_b = 0;
static float ip_factor = 1.4;
static float pb_factor = 1.3;
static int rc_buffer_size = -1;
@@ -114,6 +115,8 @@ m_option_t x264encopts_conf[] = {
{"b8x8mv", &b8x8mv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nob8x8mv", &b8x8mv, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"direct_pred", &direct_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+ {"weight_b", &weight_b, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"noweight_b", &weight_b, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"ip_factor", &ip_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
{"pb_factor", &pb_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
{"rc_buffer_size", &rc_buffer_size, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
@@ -215,6 +218,7 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
if(b8x8mv)
mod->param.analyse.inter |= X264_ANALYSE_BSUB16x16;
mod->param.analyse.i_direct_mv_pred = direct_pred;
+ mod->param.analyse.b_weighted_bipred = weight_b;
mod->param.i_width = width;
mod->param.i_height = height;