[FFmpeg-cvslog] avcodec/opus/tab: Deduplicate arrays
Andreas Rheinhardt
git at videolan.org
Mon Apr 14 00:18:20 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Apr 10 17:54:03 2025 +0200| [413905bff2ea23b3e6943f354460082e4d9aabfe] | committer: Andreas Rheinhardt
avcodec/opus/tab: Deduplicate arrays
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=413905bff2ea23b3e6943f354460082e4d9aabfe
---
libavcodec/opus/tab.c | 6 ------
libavcodec/opus/tab.h | 6 +++---
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/libavcodec/opus/tab.c b/libavcodec/opus/tab.c
index e7d20d1688..d1f2f8c8c2 100644
--- a/libavcodec/opus/tab.c
+++ b/libavcodec/opus/tab.c
@@ -110,12 +110,8 @@ const uint16_t ff_silk_model_pitch_highbits[] = {
216, 224, 231, 237, 241, 243, 245, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256
};
-const uint16_t ff_silk_model_pitch_lowbits_nb[] = { 256, 64, 128, 192, 256 };
-
const uint16_t ff_silk_model_pitch_lowbits_mb[] = { 256, 43, 85, 128, 171, 213, 256 };
-const uint16_t ff_silk_model_pitch_lowbits_wb[] = { 256, 32, 64, 96, 128, 160, 192, 224, 256 };
-
const uint16_t ff_silk_model_pitch_delta[] = {
256, 46, 48, 50, 53, 57, 63, 73, 88, 114, 152, 182, 204, 219, 229, 236,
242, 246, 250, 252, 254, 256
@@ -763,8 +759,6 @@ const uint16_t ff_celt_model_alloc_trim[] = {
128, 2, 4, 9, 19, 41, 87, 109, 119, 124, 126, 128
};
-const uint16_t ff_celt_model_energy_small[] = { 4, 2, 3, 4 };
-
const uint8_t ff_celt_freq_bands[] = { /* in steps of 200Hz */
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 34, 40, 48, 60, 78, 100
};
diff --git a/libavcodec/opus/tab.h b/libavcodec/opus/tab.h
index 109a422b9f..ac140d5868 100644
--- a/libavcodec/opus/tab.h
+++ b/libavcodec/opus/tab.h
@@ -53,9 +53,9 @@ extern const uint16_t ff_silk_model_lsf_s2_ext[];
extern const uint16_t ff_silk_model_lsf_interpolation_offset[];
extern const uint16_t ff_silk_model_pitch_highbits[];
-extern const uint16_t ff_silk_model_pitch_lowbits_nb[];
+#define ff_silk_model_pitch_lowbits_nb ff_silk_model_lcg_seed
extern const uint16_t ff_silk_model_pitch_lowbits_mb[];
-extern const uint16_t ff_silk_model_pitch_lowbits_wb[];
+#define ff_silk_model_pitch_lowbits_wb ff_silk_model_gain_lowbits
extern const uint16_t ff_silk_model_pitch_delta[];
extern const uint16_t ff_silk_model_pitch_contour_nb10ms[];
extern const uint16_t ff_silk_model_pitch_contour_nb20ms[];
@@ -124,7 +124,7 @@ extern const int ff_silk_stereo_interp_len[3];
extern const uint16_t ff_celt_model_tapset[];
extern const uint16_t ff_celt_model_spread[];
extern const uint16_t ff_celt_model_alloc_trim[];
-extern const uint16_t ff_celt_model_energy_small[];
+#define ff_celt_model_energy_small ff_celt_model_tapset
extern const uint8_t ff_celt_freq_bands[];
extern const uint8_t ff_celt_freq_range[];
More information about the ffmpeg-cvslog
mailing list