mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-31 13:36:39 +02:00
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>
This commit is contained in:
parent
d6dba15b97
commit
2a8198b32f
@ -330,10 +330,15 @@ static av_cold int vpx_init(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->qmin >= 0)
|
if (avctx->codec_id == AV_CODEC_ID_VP9 && ctx->lossless == 1) {
|
||||||
enccfg.rc_min_quantizer = avctx->qmin;
|
enccfg.rc_min_quantizer =
|
||||||
if (avctx->qmax >= 0)
|
enccfg.rc_max_quantizer = 0;
|
||||||
enccfg.rc_max_quantizer = avctx->qmax;
|
} 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 (enccfg.rc_end_usage == VPX_CQ
|
||||||
#if CONFIG_LIBVPX_VP9_ENCODER
|
#if CONFIG_LIBVPX_VP9_ENCODER
|
||||||
|
Loading…
Reference in New Issue
Block a user