[FFmpeg-devel] [PATCH 20/39] avcodec/h261dec: Don't initialize unused part of RLTable

Anton Khirnov anton at khirnov.net
Sat Jan 23 20:13:49 EET 2021


Quoting Andreas Rheinhardt (2021-01-21 21:20:52)
> Anton Khirnov:
> > Quoting Andreas Rheinhardt (2020-12-10 12:16:38)
> >> The H.261 decoder only uses an RLTable's VLC table, yet it also
> >> initializes its index_run, max_level and max_run. This commit stops
> >> doing so; it will also simplify making this decoder init-threadsafe,
> >> as the H.261 decoder and encoder now initialize disjoint parts of their
> >> common RLTable.
> > 
> > Does it then make sense to keep this RLTable common?
> > 
> I presume you want to know whether the RLTable structure should be split
> into smaller structures?

No, what I meant was whether we shouldn't use different RLTable
instances for encoder and decoder, since their use is disjoint. That
would make the code easier to reason about.

> 
> PS: It seems you overlooked patches 7-13.

It's more that I have next to zero experience with/insight into that
code. I don't think I can review on more than the most superficial level
without major effort.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list