[FFmpeg-devel] From: Sven Dueking <sven at nablet.com>
Michael Niedermayer
michael at niedermayer.cc
Fri Aug 14 11:55:23 CEST 2015
On Fri, Aug 14, 2015 at 10:34:29AM +0100, Sven Dueking wrote:
> ---
> libavcodec/qsvenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 57f5fe4..af4b5af 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 = q->param.mfx.RateControlMethod == MFX_RATECONTROL_VBR ? avctx->rc_max_rate / 1000 : avctx->bit_rate / 1000;
thats still containing the unneeded CBR special case
you can either explain why this should be done or remove it
In the code currently MFX_RATECONTROL_CBR implies
avctx->rc_max_rate == avctx->bit_rate
if avctx->rc_max_rate == avctx->bit_rate then either
avctx->rc_max_rate or avctx->bit_rate can be used interchagable
q->param.mfx.MaxKbps = avctx->rc_max_rate
is the correct code for VBR and CBR
if rc_max_rate is unequal bit_rate then its not CBR and
MFX_RATECONTROL_CBR should not be set.
Is any of the statements above wrong, am i missing something ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20150814/6357b444/attachment.sig>
More information about the ffmpeg-devel
mailing list