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; @@ -296,6 +297,9 @@ m_option_t lavcopts_conf[]={ #endif #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}, @@ -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) {