diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-20 18:40:43 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-20 21:22:33 +0300 |
commit | 2a8198b32f27802c20cd11eedac9eb175d463496 (patch) | |
tree | e11ee7ef77cc9eb02d1d46253c2f27ab20a2b67d /libavcodec/libvpxenc.c | |
parent | d6dba15b97dcbb8987847f0406a95a0cc07d6a37 (diff) |
avcodec/libvpxenc: Set min/max quantizer to 0 for lossless mode
Fixes Ticket4246
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r-- | libavcodec/libvpxenc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 7f7d4aedaf..176c6b6bfc 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -330,10 +330,15 @@ static av_cold int vpx_init(AVCodecContext *avctx, } } - if (avctx->qmin >= 0) - enccfg.rc_min_quantizer = avctx->qmin; - if (avctx->qmax >= 0) - enccfg.rc_max_quantizer = avctx->qmax; + if (avctx->codec_id == AV_CODEC_ID_VP9 && ctx->lossless == 1) { + enccfg.rc_min_quantizer = + enccfg.rc_max_quantizer = 0; + } else { + if (avctx->qmin >= 0) + enccfg.rc_min_quantizer = avctx->qmin; + if (avctx->qmax >= 0) + enccfg.rc_max_quantizer = avctx->qmax; + } if (enccfg.rc_end_usage == VPX_CQ #if CONFIG_LIBVPX_VP9_ENCODER |