[FFmpeg-devel] [PATCH v3] lavc/libvpx: remove thread limit

James Zern jzern at google.com
Wed Jan 18 00:06:46 EET 2023


On Tue, Jan 10, 2023 at 5:23 PM James Zern <jzern at google.com> wrote:
>
> On Tue, Jan 10, 2023 at 2:47 AM mypopy at gmail.com <mypopy at gmail.com> wrote:
> >
> > On Thu, Jan 5, 2023 at 6:42 PM Dmitrii Ovchinnikov
> > <ovchinnikov.dmitrii at gmail.com> wrote:
> > [...]
> > > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> > > index 9aa5510c28..0627e13973 100644
> > > --- a/libavcodec/libvpxenc.c
> > > +++ b/libavcodec/libvpxenc.c
> > > @@ -942,7 +942,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
> > >      enccfg.g_timebase.num = avctx->time_base.num;
> > >      enccfg.g_timebase.den = avctx->time_base.den;
> > >      enccfg.g_threads      =
> > > -        FFMIN(avctx->thread_count ? avctx->thread_count : av_cpu_count(), 16);
> > > +        avctx->thread_count ? avctx->thread_count : av_cpu_count();
> > >      enccfg.g_lag_in_frames= ctx->lag_in_frames;
> > >
> > Do you check the change with the old version libvpx?  as I know, older
> > versions libvpx setting the number of threads higher than 16 will
> > cause a crash, so I think at least a version check needs to be added
> >
>
> Do you have a bug or version in mind? There were some performance
> regressions [1] over the releases and some issues with changing the
> number of tiles, but I don't remember a crash for a high thread count
> (though there have been plenty of crashes related to threads in
> general [2]). The range check predates 1.4.0, which is the minimum
> required by ffmpeg.
>

I merged the changes without a check. If there is a problem with a
specific version we can add a check.

> [1] https://crbug.com/webm/1574
> [2] https://crbug.com/webm/851


More information about the ffmpeg-devel mailing list