[FFmpeg-devel] [PATCH 22/39] lavc/hevc/cabac: do not infer WPP use based on HEVCContext.threads_number

Anton Khirnov anton at khirnov.net
Sat Jun 8 16:06:24 EEST 2024


Quoting Christophe Gisquet (2024-06-08 09:02:04)
> Le ven. 7 juin 2024, 15:07, Anton Khirnov <anton at khirnov.net> a écrit :
> 
> >          if (pps->tiles_enabled_flag &&
> >              pps->tile_id[ctb_addr_ts] != pps->tile_id[ctb_addr_ts - 1]) {
> >              int ret;
> > -            if (s->threads_number == 1)
> > +            if (!is_wpp)
> >                  ret = cabac_reinit(lc);
> >              else {
> >                  ret = ff_init_cabac_decoder(&lc->cc, data, size);
> >
> 
> I have 2 things to say about this. First is that IIRC, tiles and WPP are
> mutually exclusive, so I would have expected your change to introduce dead
> code. It might have been changed for a later profile, but I think ffmpeg's
> decoder doesn't support this or these profiles. Anyway, I wonder what the
> intent of that code was.
> 
> Which leads me to the second. FFmpeg decoder does not support tile
> threading (the one it's based off does/did) so maybe this code never
> mattered for FFmpeg.
> 
> Hesitant LGTM, as I find this fishy and wondering if I'm missing something

You are correct, tiles and WPP are mutually exclusive and we do not
support tile threading. However, I'm not _introducing_ dead code, as the
code in question is already there and already dead. I've considered
removing it, but decided against it
1) to keep it consistent with the similar branch below.
2) since I don't really understand how it works

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list