diff options
author | lorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-10-24 04:39:18 +0000 |
---|---|---|
committer | lorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-10-24 04:39:18 +0000 |
commit | ff48164f90ee4300ee22287262c82b69cfb91a83 (patch) | |
tree | fbd219aed706031c11cf4a41c9470a67022a1a72 | |
parent | bb5fb21443e03700e66591cdaf6322a18cb51cd6 (diff) | |
download | mpv-ff48164f90ee4300ee22287262c82b69cfb91a83.tar.bz2 mpv-ff48164f90ee4300ee22287262c82b69cfb91a83.tar.xz |
sync to x264 r334 (crf)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16847 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 7 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libmpcodecs/ve_x264.c | 4 |
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 @@ -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) |