[FFmpeg-devel] [PATCH] avcodec/libsvtav1: use larger of bit rate and max rate for buffer size

Jan Ekström jeebjp at gmail.com
Mon Mar 13 11:57:17 EET 2023


On Thu, Mar 9, 2023 at 8:57 PM Jan Ekström <jeebjp at gmail.com> wrote:
>
> Generally if maxrate is set, the calculation should be maxrate over
> bufsize. This additionally enables CRF + maxrate & bufsize usage.
>
> In order to keep negative values from enabling zero to be treated
> as larger and causing a division by zero, check that one of the
> variables is larger than zero.
> ---
>  libavcodec/libsvtav1.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

The idea and patch was OK'd by Christopher from SVT-AV1 and James
noted that it seemed OK on IRC.

Thus will be pulling this in in the evening unless there are concerns raised.

Jan


More information about the ffmpeg-devel mailing list