summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/mplayer.17
-rwxr-xr-xconfigure2
-rw-r--r--libmpcodecs/ve_x264.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index b695aa5d5d..71d7893ed4 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -8303,6 +8303,13 @@ The mapping is approximately H264QP = 12 + 6*log2(MPEGQP).
For example, MPEG at QP=2 is equivalent to H.264 at QP=18.
.
.TP
+.B crf=<1\-50>
+Enables constant quality mode, and selects the quality.
+The scale is similar to QP.
+Like the bitrate-based modes, this allows each frame to use a
+different QP based on the frame's complexity.
+.
+.TP
.B pass=<1\-3>
Enable 2 or 3-pass mode.
It is recommended to always encode in 2 or 3-pass mode as it leads to a
diff --git a/configure b/configure
index 52f174d07b..f54d4714c9 100755
--- a/configure
+++ b/configure
@@ -6138,7 +6138,7 @@ echocheck "x264"
cat > $TMPC << EOF
#include <inttypes.h>
#include <x264.h>
-#if X264_BUILD < 36
+#if X264_BUILD < 37
#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 5768898dea..79f6cabb8b 100644
--- a/libmpcodecs/ve_x264.c
+++ b/libmpcodecs/ve_x264.c
@@ -60,6 +60,7 @@ extern char* passtmpfile;
static int bitrate = -1;
static int qp_constant = 26;
+static int rf_constant = 0;
static int frame_ref = 1;
static int keyint_max = 250;
static int keyint_min = 25;
@@ -118,6 +119,8 @@ static char *cqm8py = NULL;
m_option_t x264encopts_conf[] = {
{"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
{"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 0, 51, NULL},
+ {"qp", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 0, 51, NULL},
+ {"crf", &rf_constant, CONF_TYPE_INT, CONF_RANGE, 1, 50, NULL},
{"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 16, NULL},
{"keyint", &keyint_max, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
{"keyint_min", &keyint_min, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
@@ -231,6 +234,7 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
mod->param.b_cabac = cabac;
mod->param.rc.i_qp_constant = qp_constant;
+ mod->param.rc.i_rf_constant = rf_constant;
if(qp_min > qp_constant)
qp_min = qp_constant;
if(qp_max < qp_constant)