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

Jan Ekström jeebjp at gmail.com
Tue Mar 14 00:19:01 EET 2023


On Mon, Mar 13, 2023 at 11:57 AM Jan Ekström <jeebjp at gmail.com> wrote:
>
> 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.

Applied as fba9d9609fe00c8c4d04b76f9ecdd274aad318dd .

Jan


More information about the ffmpeg-devel mailing list