summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-22 21:02:14 +0000
committercorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-22 21:02:14 +0000
commit9e0acc3d2ed87bd8055607f4a0b4f7af688359c3 (patch)
treeb19282c11786120dc2281b636da2fda4e7268f1d
parent65f186f4d08b5543a809261c0e970c00e860b22f (diff)
downloadmpv-9e0acc3d2ed87bd8055607f4a0b4f7af688359c3.tar.bz2
mpv-9e0acc3d2ed87bd8055607f4a0b4f7af688359c3.tar.xz
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
-rw-r--r--DOCS/man/en/mplayer.110
-rw-r--r--libmpcodecs/ve_lavc.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index a57f1112e8..961f5b44dd 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -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
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 16a55756af..8a9f10c00a 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -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: