提交 412df0a5 编写于 作者: M Michael Niedermayer

avcodec/libxvid: set lumi_aq for lumimasking

Simplifies check and should fix lumi+vari warning
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 1ca39027
......@@ -531,14 +531,17 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
xvid_enc_create.num_plugins++;
}
if ( avctx->lumi_masking != 0.0)
x->lumi_aq = 1;
/* Luminance Masking */
if( avctx->lumi_masking != 0.0 || x->lumi_aq ) {
if( x->lumi_aq ) {
masking_l.method = 0;
plugins[xvid_enc_create.num_plugins].func = xvid_plugin_lumimasking;
/* The old behavior is that when avctx->lumi_masking is specified,
* plugins[...].param = NULL. Trying to keep the old behavior here. */
plugins[xvid_enc_create.num_plugins].param = x->lumi_aq ? &masking_l : NULL ;
plugins[xvid_enc_create.num_plugins].param = avctx->lumi_masking ? NULL : &masking_l ;
xvid_enc_create.num_plugins++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册