From: Sven Dueking <s...@nablet.com> --- libavcodec/qsvenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 57f5fe4..b56e4b4 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -118,10 +118,14 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) switch (q->param.mfx.RateControlMethod) { case MFX_RATECONTROL_CBR: + q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 1000; + q->param.mfx.TargetKbps = avctx->bit_rate / 1000; + q->param.mfx.MaxKbps = avctx->bit_rate / 1000; + break; case MFX_RATECONTROL_VBR: q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 1000; q->param.mfx.TargetKbps = avctx->bit_rate / 1000; - q->param.mfx.MaxKbps = avctx->bit_rate / 1000; + q->param.mfx.MaxKbps = avctx->rc_max_rate / 1000; break; case MFX_RATECONTROL_CQP: quant = avctx->global_quality / FF_QP2LAMBDA; -- 1.8.3.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel