changeset 15368:f2109e48a3c1

Add border masking support for lavc
author gpoirier
date Sun, 08 May 2005 20:51:38 +0000
parents bdcd608b0e97
children 37861a573823
files DOCS/man/en/mplayer.1 libmpcodecs/ve_lavc.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sun May 08 14:38:35 2005 +0000
+++ b/DOCS/man/en/mplayer.1	Sun May 08 20:51:38 2005 +0000
@@ -6772,6 +6772,13 @@
 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
--- a/libmpcodecs/ve_lavc.c	Sun May 08 14:38:35 2005 +0000
+++ b/libmpcodecs/ve_lavc.c	Sun May 08 20:51:38 2005 +0000
@@ -103,6 +103,7 @@
 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 @@
 #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 @@
     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)
     {