[FFmpeg-cvslog] avcodec/qsvenc: Set MaxKpbs to rc_max_rate for CBR and VBR ( bitrate is equal to rc_max_rate for CBR)

Sven Dueking git at videolan.org
Fri Aug 14 15:03:24 CEST 2015


ffmpeg | branch: master | Sven Dueking <sven at nablet.com> | Fri Aug 14 12:46:22 2015 +0200| [f3fbe790d9d4e93b2ec8c7476572f2d155e8b43e] | committer: Michael Niedermayer

avcodec/qsvenc: Set MaxKpbs to rc_max_rate for CBR and VBR (bitrate is equal to rc_max_rate for CBR)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 57f5fe4..e5d3fa6 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -121,7 +121,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