summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-08 20:51:38 +0000
committergpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-08 20:51:38 +0000
commit1a88eb42f89d0a955a8b01f1f868f680dd86838e (patch)
tree29f347f000f7669f647f20f3f26958257a591819
parent1f48888099322bdec68f7bd10c3c370a42f48744 (diff)
downloadmpv-1a88eb42f89d0a955a8b01f1f868f680dd86838e.tar.bz2
mpv-1a88eb42f89d0a955a8b01f1f868f680dd86838e.tar.xz
Add border masking support for lavc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15369 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.17
-rw-r--r--libmpcodecs/ve_lavc.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 8c35a4b29e..b75d3ce576 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -6772,6 +6772,13 @@ whole video sequence (default: 0.0 (disabled)).
p_mask=1.0 doubles the bits allocated to each intra block.
.
.TP
+border_mask=<0.0\-1.0>
+border-processing for MPEG-style encoders.
+Border processing increases the quantizer for macroblocks which are less
+than 1/5th far from the border of the frame, since they are visually
+less important.
+.
+.TP
.B naq\ \ \ \
Normalize adaptive quantization (experimental).
When using adaptive quantization (*_mask), the average per-MB quantizer may no
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 15901e94ab..941d866897 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -103,6 +103,7 @@ static float lavc_param_dark_masking= 0.0;
static float lavc_param_temporal_cplx_masking= 0.0;
static float lavc_param_spatial_cplx_masking= 0.0;
static float lavc_param_p_masking= 0.0;
+static float lavc_param_border_masking= 0.0;
static int lavc_param_normalize_aqp= 0;
static int lavc_param_interlaced_dct= 0;
static int lavc_param_prediction_method= FF_PRED_LEFT;
@@ -297,6 +298,9 @@ m_option_t lavcopts_conf[]={
#if LIBAVCODEC_BUILD >= 4711
{"dc", &lavc_param_dc_precision, CONF_TYPE_INT, CONF_RANGE, 8, 11, NULL},
#endif
+#if LIBAVCODEC_BUILD >= 4741
+ {"border_mask", &lavc_param_border_masking, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
+#endif
{"inter_threshold", &lavc_param_inter_threshold, CONF_TYPE_INT, CONF_RANGE, -1000000, 1000000, NULL},
{"sc_threshold", &lavc_param_sc_threshold, CONF_TYPE_INT, CONF_RANGE, -1000000, 1000000, NULL},
{"top", &lavc_param_top, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
@@ -513,6 +517,9 @@ static int config(struct vf_instance_s* vf,
lavc_venc_context->spatial_cplx_masking= lavc_param_spatial_cplx_masking;
lavc_venc_context->p_masking= lavc_param_p_masking;
lavc_venc_context->dark_masking= lavc_param_dark_masking;
+#if LIBAVCODEC_BUILD >= 4741
+ lavc_venc_context->border_masking = lavc_param_border_masking;
+#endif
if (lavc_param_aspect != NULL)
{