summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-05 06:37:29 +0000
committercorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-05 06:37:29 +0000
commit5414825baccd2f78b8e18c5172390e83891d0a5d (patch)
treea9b75e631210f3f2f5d284e5ce0cc18b18d94e10
parent52d2a448f8b26ecd1ad0a7ca684bfe2942a4e8f9 (diff)
downloadmpv-5414825baccd2f78b8e18c5172390e83891d0a5d.tar.bz2
mpv-5414825baccd2f78b8e18c5172390e83891d0a5d.tar.xz
Support and document lavc b_sensitivity option.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18573 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.112
-rw-r--r--libmpcodecs/ve_lavc.c3
2 files changed, 15 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index ceff91994a..f491400585 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -7005,6 +7005,7 @@ strategy to choose between I/P/B-frames:
Always use the maximum number of B-frames (default).
.IPs 1
Avoid B-frames in high motion scenes.
+See the b_sensitivity option to tune this strategy.
.IPs 2
Places B-frames more or less optimally to yield maximum quality (slower).
You may want to reduce the speed impact of this option by tuning the
@@ -7013,6 +7014,17 @@ option brd_scale.
.PD 1
.
.TP
+.B b_sensitivity=<any integer greater than 0>
+Adjusts how sensitively vb_strategy=1 detects motion and avoids using
+B-frames (default: 40).
+Lower sensitivities will result in more B-frames.
+Using more B-frames usually improves PSNR, but too many B-frames can
+hurt quality in high-motion scenes.
+Unless there is an extremely high amount of motion, b_sensitivity can
+safely be lowered below the default; 10 is a reasonable value in most
+cases.
+.
+.TP
.B brd_scale=<0\-10>
Downscales frames for dynamic B-frame decision (default: 0).
Each time brd_scale is increased by one, the frame dimensions are
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index a6a1c9e28f..2eb23da516 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -162,6 +162,7 @@ static int lavc_param_sc_factor = 1;
static int lavc_param_video_global_header= 0;
static int lavc_param_mv0_threshold = 256;
static int lavc_param_refs = 1;
+static int lavc_param_b_sensitivity = 40;
char *lavc_param_acodec = "mp2";
int lavc_param_atag = 0;
@@ -323,6 +324,7 @@ m_option_t lavcopts_conf[]={
{"aglobal", &lavc_param_audio_global_header, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL},
{"mv0_threshold", &lavc_param_mv0_threshold, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL},
{"refs", &lavc_param_refs, CONF_TYPE_INT, CONF_RANGE, 1, 16, NULL},
+ {"b_sensitivity", &lavc_param_b_sensitivity, CONF_TYPE_INT, CONF_RANGE, 1, INT_MAX, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
@@ -655,6 +657,7 @@ static int config(struct vf_instance_s* vf,
}
lavc_venc_context->mv0_threshold = lavc_param_mv0_threshold;
lavc_venc_context->refs = lavc_param_refs;
+ lavc_venc_context->b_sensitivity = lavc_param_b_sensitivity;
switch(lavc_param_format)
{