aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-05 15:00:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-05 15:06:04 +0200
commit412df0a52f24d104131c17755212471818b5748b (patch)
treec179c79939f5342cd1743d0aafdea9f5778ed278
parent1ca3902726fb8c1398ab00d146ebe3e2f31b76e6 (diff)
downloadffmpeg-412df0a52f24d104131c17755212471818b5748b.tar.gz
avcodec/libxvid: set lumi_aq for lumimasking
Simplifies check and should fix lumi+vari warning Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/libxvid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index edf5f43da8..d1d4114249 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -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++;
}