Commit 2a8198b3 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libvpxenc: Set min/max quantizer to 0 for lossless mode

Fixes Ticket4246
Reviewed-by: 's avatarJames Zern <jzern@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d6dba15b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment