diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-07 02:51:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-12 06:00:14 +0200 |
commit | 65462185721e3686e27f22e952485ffc4ebd6f97 (patch) | |
tree | 30d7ae3583342821c963d626b5a49a7071ab3c93 /libavcodec/012v.c | |
parent | e1e59d738386e50591b5413dd26b44da9e2818ec (diff) | |
download | ffmpeg-65462185721e3686e27f22e952485ffc4ebd6f97.tar.gz |
avcodec/vorbisenc: Combine codebooks, avoid relocations
The Vorbis encoder has an array of a structure containing all
the ingredients for a codebook; this includes a pointer to
the actual codebook and some even have a pointer to an array
containing quant values. Each of these real codebooks is
an array of its own.
These pointers lead to relocations and therefore the array will
be placed in .data.rel.ro and not in .rodata.
This commit avoids the pointers altogether by combining all the actual
codebooks into one big array; the actual codebooks are now accessed
consecutively by incrementing the pointer used to access them by the
length of the actual codebook that has just been dealt with (said length
is contained in the structure describing the codebook). There is
no downside to this given that these codebooks are already only used
once during init.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/012v.c')
0 files changed, 0 insertions, 0 deletions