OSDN Git Service

libvpxenc: allow qmax of 0
authorJames Zern <jzern@google.com>
Sat, 2 Nov 2013 23:28:56 +0000 (00:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 Nov 2013 00:00:16 +0000 (01:00 +0100)
this is valid for both vp8 & vp9 and necessary for lossless in the
latter

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libvpxenc.c

index 23736ea..0c112e8 100644 (file)
@@ -320,7 +320,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
 
     if (avctx->qmin >= 0)
         enccfg.rc_min_quantizer = avctx->qmin;
-    if (avctx->qmax > 0)
+    if (avctx->qmax >= 0)
         enccfg.rc_max_quantizer = avctx->qmax;
 
     if (enccfg.rc_end_usage == VPX_CQ) {