[FFmpeg-cvslog] aactab: add deemphasis tables for USAC

Lynne git at videolan.org
Sun Jun 2 19:45:03 EEST 2024


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Tue Apr 30 00:26:56 2024 +0200| [7cd8a3f509507ebcdd87c8d1d497134a80742981] | committer: Lynne

aactab: add deemphasis tables for USAC

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cd8a3f509507ebcdd87c8d1d497134a80742981
---

 libavcodec/aactab.c | 25 +++++++++++++++++++++++++
 libavcodec/aactab.h |  2 ++
 2 files changed, 27 insertions(+)

diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c
index 3718b81a07..8ce5e43974 100644
--- a/libavcodec/aactab.c
+++ b/libavcodec/aactab.c
@@ -3377,3 +3377,28 @@ const DECLARE_ALIGNED(32, int, ff_aac_eld_window_480_fixed)[1800] = {
     0xffecff1c, 0xffed391e, 0xffed740c, 0xffedafb1,
     0xffedebe1, 0xffee287d, 0xffee654e, 0xffeea23f,
 };
+
+/* As specified by ISO/IEC 23003 */
+#define USAC_EMPH_COEFF 0.68
+
+DECLARE_ALIGNED(16, const float, ff_aac_deemph_weights)[16] = {
+    USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+
+    0,
+    USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+
+    0,
+    0,
+    USAC_EMPH_COEFF,
+    USAC_EMPH_COEFF*USAC_EMPH_COEFF,
+
+    0,
+    0,
+    0,
+    USAC_EMPH_COEFF,
+};
diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h
index e1a2d8b9a1..91262380d4 100644
--- a/libavcodec/aactab.h
+++ b/libavcodec/aactab.h
@@ -64,6 +64,8 @@ DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_480)[1800];
 DECLARE_ALIGNED(32, extern const int,   ff_aac_eld_window_480_fixed)[1800];
 // @}
 
+extern const float ff_aac_deemph_weights[16];
+
 /* Initializes data shared between float decoder and encoder. */
 void ff_aac_float_common_init(void);
 



More information about the ffmpeg-cvslog mailing list