1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-13 18:36:09 +00:00

support libavcodec's new sc_factor parameter

Original idea from Michael; patch by me.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
corey 2006-01-22 21:02:14 +00:00
parent 65f186f4d0
commit 9e0acc3d2e
2 changed files with 13 additions and 0 deletions

View File

@ -6831,6 +6831,16 @@ You can specify the sensitivity of the detection with this option.
1000000000 means no scene changes are detected (default: 0).
.
.TP
.B sc_factor=<any positive integer>
Causes frames with higher quantizers to be more likely to trigger a
scene change detection and make libavcodec use an I-frame (default: 1).
1\-16 is a sane range.
Values between 2 and 6 may yield increasing PSNR (up to approximately
0.04 dB) and better placement of I-frames in high-motion scenes.
Higher values than 6 may give very slightly better PSNR (approximately
0.01 dB more than sc_factor=6), but noticably worse visual quality.
.
.TP
.B vb_strategy=<0\-2> (pass one only)
strategy to choose between I/\:P/\:B-frames:
.PD 0

View File

@ -158,6 +158,7 @@ static int lavc_param_threads= 1;
static int lavc_param_turbo = 0;
static int lavc_param_brd_scale = 0;
static int lavc_param_bidir_refine = 0;
static int lavc_param_sc_factor = 1;
char *lavc_param_acodec = "mp2";
@ -314,6 +315,7 @@ m_option_t lavcopts_conf[]={
{"turbo", &lavc_param_turbo, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"brd_scale", &lavc_param_brd_scale, CONF_TYPE_INT, CONF_RANGE, 0, 10, NULL},
{"bidir_refine", &lavc_param_bidir_refine, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL},
{"sc_factor", &lavc_param_sc_factor, CONF_TYPE_INT, CONF_RANGE, 1, INT_MAX, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
@ -628,6 +630,7 @@ static int config(struct vf_instance_s* vf,
lavc_venc_context->prediction_method= lavc_param_prediction_method;
lavc_venc_context->brd_scale = lavc_param_brd_scale;
lavc_venc_context->bidir_refine = lavc_param_bidir_refine;
lavc_venc_context->scenechange_factor = lavc_param_sc_factor;
switch(lavc_param_format)
{
case IMGFMT_YV12: