lavc: Simplify checking quant bias option
authorVittorio Giovara <vittorio.giovara@gmail.com>
Sat, 26 Sep 2015 21:00:57 +0000 (23:00 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 29 Sep 2015 12:33:01 +0000 (14:33 +0200)
libavcodec/dnxhdenc.c
libavcodec/mpegvideo_enc.c

index 228ee46..d2fbc16 100644 (file)
@@ -344,8 +344,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
 
 #if FF_API_QUANT_BIAS
 FF_DISABLE_DEPRECATION_WARNINGS
-    if (ctx->intra_quant_bias == FF_DEFAULT_QUANT_BIAS &&
-        avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
+    if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
         ctx->intra_quant_bias = avctx->intra_quant_bias;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
index c46bcf4..862d07f 100644 (file)
@@ -548,11 +548,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
 #if FF_API_QUANT_BIAS
 FF_DISABLE_DEPRECATION_WARNINGS
-    if (s->intra_quant_bias == FF_DEFAULT_QUANT_BIAS &&
-        avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
+    if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
         s->intra_quant_bias = avctx->intra_quant_bias;
-    if (s->inter_quant_bias == FF_DEFAULT_QUANT_BIAS &&
-        avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
+    if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
         s->inter_quant_bias = avctx->inter_quant_bias;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif