[FFmpeg-cvslog] qsvenc: fix setting maxrate for VBR

Anton Khirnov git at videolan.org
Sun Nov 22 19:01:08 CET 2015


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Nov  6 13:29:34 2015 +0100| [3edac01f79a08635d8d2c08e9410651d9a330d61] | committer: Anton Khirnov

qsvenc: fix setting maxrate for VBR

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3edac01f79a08635d8d2c08e9410651d9a330d61
---

 libavcodec/qsvenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 11c862c..7e5c11e 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -338,7 +338,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
     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;



More information about the ffmpeg-cvslog mailing list