# HG changeset patch # User lorenm # Date 1130128758 0 # Node ID cbd11ea4d4243633b802e260fdac3bb603b3a4c6 # Parent a8eba1cbc6820eca6c823086627e194fd109c4c7 sync to x264 r334 (crf) diff -r a8eba1cbc682 -r cbd11ea4d424 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Sun Oct 23 21:21:45 2005 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Oct 24 04:39:18 2005 +0000 @@ -8303,6 +8303,13 @@ 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 -r a8eba1cbc682 -r cbd11ea4d424 configure --- a/configure Sun Oct 23 21:21:45 2005 +0000 +++ b/configure Mon Oct 24 04:39:18 2005 +0000 @@ -6138,7 +6138,7 @@ cat > $TMPC << EOF #include #include -#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 -r a8eba1cbc682 -r cbd11ea4d424 libmpcodecs/ve_x264.c --- a/libmpcodecs/ve_x264.c Sun Oct 23 21:21:45 2005 +0000 +++ b/libmpcodecs/ve_x264.c Mon Oct 24 04:39:18 2005 +0000 @@ -60,6 +60,7 @@ 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 @@ 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 @@ 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)