diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-30 11:43:06 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-08 17:51:45 +0100 |
commit | 83ff99adc4bf04c4ba2e3436ce2d18a5098132d1 (patch) | |
tree | aa845dd3a473ea191692f4c9998a12b9ca21b8e9 /LICENSE.md | |
parent | 6c8e85c66074cdd687c0c63754c15911e46abc9b (diff) | |
download | ffmpeg-83ff99adc4bf04c4ba2e3436ce2d18a5098132d1.tar.gz |
avcodec/mpc8: Avoid code duplication when initializing VLCs
Up until now, VLCs that were part of an array of VLCs were often not
initialized in a loop, but separately. The probable reason for this
was that these VLCs differed slightly in the parameters to be used for
them (i.e. the number of codes or the number of bits to be used
differs), so that one would have to provide these parameters e.g. via
arrays.
Yet these problems have actually largely been solved by now: The length
information is contained in a run-length encoded form that is the same
for all VLCs and both the number of codes as well as the number of bits
to use for each VLC can be easily derived from them.
There is just one problem to be solved: When the underlying tables have
a different number of elements, putting them into an array of arrays
would be wasteful; using an array of pointers to the arrays would
also be wasteful. Therefore this commit combines the tables into bigger
tables. (Given that all the length tables have the same layout this
applies only to the symbols tables.)
Finally, the array containing the offset of the VLC's buffer in the big
buffer has also been removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'LICENSE.md')
0 files changed, 0 insertions, 0 deletions