[FFmpeg-devel] [PATCH v2 6/6] avcodec/libsvtav1: support constant quality mode

Jan Ekström jeebjp at gmail.com
Sat Sep 25 15:35:53 EEST 2021


On Thu, Sep 23, 2021 at 6:08 PM <lance.lmwang at gmail.com> wrote:
>
> On Thu, Sep 23, 2021 at 05:11:49PM +0300, Jan Ekström wrote:
> > On Thu, Sep 23, 2021 at 4:46 PM Christopher Degawa <ccom at randomderp.com> wrote:
> > >
> > > On Sun, Sep 19, 2021 at 2:02 PM Christopher Degawa <ccom at randomderp.com>
> > > wrote:
> > >
> > > >
> > > >
> > > > On Fri, Sep 17, 2021 at 9:28 PM <lance.lmwang at gmail.com> wrote:
> > > >
> > > >> From: Limin Wang <lance.lmwang at gmail.com>
> > > >>
> > > >> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > > >>
> > > > As a note, I personally favor this patch over mine since I don't think
> > > > `enable_tpl_la` is worth exposing to the user if its main role is to switch
> > > > between crf and cqp
> > > >
> > >
> > > Ping on this patch, this has been requested on SVT-AV1's side as well
> >
> > I think my further comments on the previous version were mostly to
> > move off from the rc option for rate control, which has become more
> > and more seemingly unnecessary (and different from most other encoders
> > for no obvious reason).
> >
> > The only option that with a quick look doesn't match just setting
> > quantizer|bit rate|CRF is "cvbr", but it doesn't seem to be impossible
> > to either rework "rc" for it, or to utilize a separate option for it.
>
> Do you think it's OK to remove the rc option? to match other encoders,
> We can choose the rate control by the related parameters like:
>
> if (crf >= 0)
>     choose crf rate control;
> else if (bitrate > 0)
>     choose cvbr rate control;
> else if (cqp >=0 )
>     choose cqp rate control;
>

In general that is the idea, yes (except bit rate would mean either
vbr or cvbr). It would be nice to follow whatever is the default on
SVT-AV1's side by default, and then if the user specifies a rate
control mode that is not the default, his selection is honored. Not
sure what the best way for that is to be honest. Possibly the style of
setting AVCodecDefault a la libx265?

For the rc option, given how much SVT-AV1 itself is in flux, I would
be OK with removing the option, or making it an option that decides
between cvbr and vbr (essentially making it "VBR bit rate control
mode"). I wish cvbr would instead be something like VBV/HRD elsewhere,
so we could just utilize maxrate&bufsize for controlling it, instead
of having it as another discrete rate control mode.

As these things change, I also hope that SVT-AV1 will soon get a
key=value style of option API, that way the wrapper will not have to
be updated constantly according to the changes in the library :) . As
I feel SVT-AV1 will be changed quite a bit in the future (due to its
recent age).

Jan


More information about the ffmpeg-devel mailing list