summaryrefslogtreecommitdiff
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-02-09 21:16:18 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 13:16:49 +0100
commit3afb41655e2afa8f4284f7fc19153cccf62afaa3 (patch)
tree6acbc799ea0a474023b53ca589f9b3454e6742a9 /libavcodec/dca.c
parentd7a75d21635eab4f4a1efea22945933059c2e36f (diff)
downloadffmpeg-3afb41655e2afa8f4284f7fc19153cccf62afaa3.tar.gz
avcodec/dca: Unavpriv dca_sample_rates
Said table is 64 bytes long and exported so that it can be used both in libavcodec and libavformat. This commit stops doing so and instead duplicates it for shared builds, because the overhead of exporting the symbol is bigger than 64 bytes. It consists of the length of the name of the symbol (2x24 bytes), two entries in .dynsym (2x24 bytes), two entries for symbol version (2x2 bytes), one hash value in the exporting library (4 bytes) in addition to one entry in the importing library's .got and .rela.dyn (8 + 24 bytes). (The above numbers are for a Linux/GNU/Elf system; the numbers for other platforms may be different.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index b2152524a5..fb359b2ff3 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -33,11 +33,6 @@
#include "get_bits.h"
#include "put_bits.h"
-const uint32_t avpriv_dca_sample_rates[16] = {
- 0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0,
- 12000, 24000, 48000, 96000, 192000
-};
-
const uint32_t ff_dca_sampling_freqs[16] = {
8000, 16000, 32000, 64000, 128000, 22050, 44100, 88200,
176400, 352800, 12000, 24000, 48000, 96000, 192000, 384000,
@@ -112,7 +107,7 @@ int ff_dca_parse_core_frame_header(DCACoreFrameHeader *h, GetBitContext *gb)
return DCA_PARSE_ERROR_AMODE;
h->sr_code = get_bits(gb, 4);
- if (!avpriv_dca_sample_rates[h->sr_code])
+ if (!ff_dca_sample_rates[h->sr_code])
return DCA_PARSE_ERROR_SAMPLE_RATE;
h->br_code = get_bits(gb, 5);