summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4audio_sample_rates.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-02-10 19:37:37 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 13:16:50 +0100
commit49bf94536f059340eacd5430592e4216b29d0d20 (patch)
treeb1a59398a83aa4c2a8bdd01af8498dda08a48a34 /libavcodec/mpeg4audio_sample_rates.c
parentd82c91ba2f889bc5e0ee7c976219f91e62dc9f8b (diff)
downloadffmpeg-49bf94536f059340eacd5430592e4216b29d0d20.tar.gz
avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_rates
avpriv_mpeg4audio_sample_rates has a size of 64B and it is currently avpriv; a clone of it exists in aacenctab.h and from there it is inlined in aacenc.c (which also uses the avpriv version) and in the FLV muxer. This means that despite it being avpriv both libavformat as well as libavcodec have copies already. This situation is clearly suboptimal. Given the overhead of exporting symbols (for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn, 8B .got, 4B hash + twice the size of the name (here 31B)) the object is unavprived, i.e. duplicated into libavformat when creating a shared build; but the duplicates in the AAC encoder and FLV muxer are removed. This involves splitting of the sample rate table into a file of its own; this allowed to break some spurious dependencies (e.g. both the AAC encoder as well as the Matroska demuxer actually don't need the mpeg4audio_get_config stuff). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg4audio_sample_rates.c')
-rw-r--r--libavcodec/mpeg4audio_sample_rates.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/mpeg4audio_sample_rates.c b/libavcodec/mpeg4audio_sample_rates.c
new file mode 100644
index 0000000000..b5ceb59c6e
--- /dev/null
+++ b/libavcodec/mpeg4audio_sample_rates.c
@@ -0,0 +1,23 @@
+/*
+ * MPEG-4 Audio sample rates
+ * Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier@free.fr>
+ * Copyright (c) 2009 Alex Converse <alex.converse@gmail.com>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "mpeg4audio_sample_rates.h"