[FFmpeg-devel] [PATCH] Changed max bitrate for VBV mode (according to Ivan Uskow)

Michael Niedermayer michael at niedermayer.cc
Thu Aug 13 17:40:55 CEST 2015


On Thu, Aug 13, 2015 at 11:30:45AM +0100, Sven Dueking wrote:
> From: Sven Dueking <sven at 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;

why is rc_max_rate not used for MFX_RATECONTROL_CBR ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150813/d3048654/attachment.sig>


More information about the ffmpeg-devel mailing list