1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-11 17:39:38 +00:00

sync to x264 r334 (crf)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16847 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
lorenm 2005-10-24 04:39:18 +00:00
parent bb5fb21443
commit ff48164f90
3 changed files with 12 additions and 1 deletions

View File

@ -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. For example, MPEG at QP=2 is equivalent to H.264 at QP=18.
. .
.TP .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> .B pass=<1\-3>
Enable 2 or 3-pass mode. Enable 2 or 3-pass mode.
It is recommended to always encode in 2 or 3-pass mode as it leads to a It is recommended to always encode in 2 or 3-pass mode as it leads to a

2
configure vendored
View File

@ -6138,7 +6138,7 @@ echocheck "x264"
cat > $TMPC << EOF cat > $TMPC << EOF
#include <inttypes.h> #include <inttypes.h>
#include <x264.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. #error We do not support old versions of x264. Get the latest from SVN.
#endif #endif
int main(void) { x264_encoder_open((void*)0); return 0; } int main(void) { x264_encoder_open((void*)0); return 0; }

View File

@ -60,6 +60,7 @@ extern char* passtmpfile;
static int bitrate = -1; static int bitrate = -1;
static int qp_constant = 26; static int qp_constant = 26;
static int rf_constant = 0;
static int frame_ref = 1; static int frame_ref = 1;
static int keyint_max = 250; static int keyint_max = 250;
static int keyint_min = 25; static int keyint_min = 25;
@ -118,6 +119,8 @@ static char *cqm8py = NULL;
m_option_t x264encopts_conf[] = { m_option_t x264encopts_conf[] = {
{"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL}, {"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
{"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 0, 51, 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}, {"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 16, NULL},
{"keyint", &keyint_max, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL}, {"keyint", &keyint_max, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
{"keyint_min", &keyint_min, 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.b_cabac = cabac;
mod->param.rc.i_qp_constant = qp_constant; mod->param.rc.i_qp_constant = qp_constant;
mod->param.rc.i_rf_constant = rf_constant;
if(qp_min > qp_constant) if(qp_min > qp_constant)
qp_min = qp_constant; qp_min = qp_constant;
if(qp_max < qp_constant) if(qp_max < qp_constant)