sync to x264 r239 (zoned ratecontrol and UMHex ME)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15558 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
lorenm 2005-05-24 06:03:37 +00:00
parent 1c92db1cd3
commit d6a8698f57
3 changed files with 30 additions and 7 deletions

View File

@ -7957,6 +7957,23 @@ Lower values allow the quantizer value to jump around more,
higher values force it to vary more smoothly.
.
.TP
.B zones=<zone0>[/\:<zone1>[/\:...]]
User specified quality for specific parts (ending, credits, ...)
(ABR or two pass).
Each zone is <start-frame>,<end-frame>,<option> where option may be
.PD 0
.RSs
.IPs "q=<0\-51>"
quantizer
.IPs "b=<0.01\-100.0>"
bitrate multiplier
.RE
.PD 1
Note: The quantizer option is not strictly enforced.
It affects only the planning stage of ratecontrol, and is still subject
to overflow compensation and qp_min/qp_max.
.
.TP
.B direct_pred=<0\-2>
Determines the type of motion prediction used for direct macroblocks
in B-frames.
@ -8014,7 +8031,7 @@ small moving objects are better represented by smaller blocks.
4x4mv is recommended only with subq >= 3.
.
.TP
.B me=<1\-3>
.B me=<1\-4>
Select fullpixel motion estimation algorithm.
.PD 0
.RSs
@ -8023,7 +8040,9 @@ diamond search, radius 1 (fast)
.IPs 2
hexagon search, radius 2 (default)
.IPs 3
Exhaustive search, controlled by me_range (very slow).
uneven multi-hexagon search
.IPs 4
exhaustive search, controlled by me_range (very slow)
.RE
.PD 1
.

2
configure vendored
View File

@ -6052,7 +6052,7 @@ echocheck "x264"
cat > $TMPC << EOF
#include <inttypes.h>
#include <x264.h>
#if X264_BUILD < 24
#if X264_BUILD < 27
#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; }

View File

@ -93,6 +93,7 @@ static float qcomp = 0.6;
static float qblur = 0.5;
static float complexity_blur = 20;
static char *rc_eq = "blurCplx^(1-qComp)";
static char *zones = NULL;
static int subq = 5;
static int me_method = 2;
static int me_range = 16;
@ -145,8 +146,9 @@ m_option_t x264encopts_conf[] = {
{"qcomp", &qcomp, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL},
{"qblur", &qblur, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
{"cplx_blur", &complexity_blur, CONF_TYPE_FLOAT, CONF_RANGE, 0, 999, NULL},
{"zones", &zones, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"subq", &subq, CONF_TYPE_INT, CONF_RANGE, 1, 5, NULL},
{"me", &me_method, CONF_TYPE_INT, CONF_RANGE, 1, 3, NULL},
{"me", &me_method, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
{"me_range", &me_range, CONF_TYPE_INT, CONF_RANGE, 4, 64, NULL},
{"level_idc", &level_idc, CONF_TYPE_INT, CONF_RANGE, 10, 51, NULL},
{"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@ -191,7 +193,6 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
mod->param.rc.f_qblur = qblur;
mod->param.rc.f_complexity_blur = complexity_blur;
mod->param.analyse.i_subpel_refine = subq;
mod->param.analyse.i_me_method = subq==1 ? X264_ME_DIA : X264_ME_HEX;
mod->param.rc.psz_stat_out = passtmpfile;
mod->param.rc.psz_stat_in = passtmpfile;
if((pass & 2) && bitrate <= 0)
@ -233,12 +234,15 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
}
mod->param.rc.f_ip_factor = ip_factor;
mod->param.rc.f_pb_factor = pb_factor;
mod->param.rc.psz_zones = zones;
switch(me_method) {
case 1: mod->param.analyse.i_me_method = X264_ME_DIA; break;
case 2: mod->param.analyse.i_me_method = X264_ME_HEX; break;
case 3: mod->param.analyse.i_me_method = X264_ME_ESA;
mod->param.analyse.i_me_range = me_range; break;
case 3: mod->param.analyse.i_me_method = X264_ME_UMH; break;
case 4: mod->param.analyse.i_me_method = X264_ME_ESA; break;
}
if(me_method >= 3)
mod->param.analyse.i_me_range = me_range;
mod->param.analyse.inter = X264_ANALYSE_I4x4;
if(p4x4mv)
mod->param.analyse.inter |= X264_ANALYSE_PSUB8x8;