Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2022-10-28 22:36:10 +0300
committerLynne <dev@lynne.ee>2022-11-06 16:39:33 +0300
commit469cd8d7fa55ebd07be31e4c5bd0ed4b45c551dc (patch)
tree39a6426364b9fdd54468fc16b0bc6137c42927c7 /libavcodec/aac_defines.h
parent4cee7ebd75205bca06ca8010711ae2f83a55caa6 (diff)
aacdec: convert to lavu/tx and support fixed-point 960-sample decoding
This patch replaces the transform used in AAC with lavu/tx and removes the limitation on only being able to decode 960-sample files with the float decoder. This commit also removes a whole bunch of unnecessary and slow lifting steps the decoder did to compensate for the poor accuracy of the old integer transformation code. Overall float decoder speedup on Zen 3 for 64kbps: 32%
Diffstat (limited to 'libavcodec/aac_defines.h')
-rw-r--r--libavcodec/aac_defines.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h
index a3c680b65c..bd0d93275a 100644
--- a/libavcodec/aac_defines.h
+++ b/libavcodec/aac_defines.h
@@ -29,8 +29,6 @@
#include "libavutil/softfloat.h"
-#define FFT_FLOAT 0
-
#define AAC_RENAME(x) x ## _fixed
#define AAC_RENAME_32(x) x ## _fixed_32
#define AAC_RENAME2(x) x ## _fixed
@@ -45,7 +43,7 @@ typedef int AAC_SIGNE;
#define Q23(a) (int)((a) * 8388608.0 + 0.5)
#define Q30(x) (int)((x)*1073741824.0 + 0.5)
#define Q31(x) (int)((x)*2147483648.0 + 0.5)
-#define RANGE15(x) x
+#define TX_SCALE(x) ((x) * 128.0f)
#define GET_GAIN(x, y) (-(y) * (1 << (x))) + 1024
#define AAC_MUL16(x, y) (int)(((int64_t)(x) * (y) + 0x8000) >> 16)
#define AAC_MUL26(x, y) (int)(((int64_t)(x) * (y) + 0x2000000) >> 26)
@@ -78,8 +76,6 @@ typedef int AAC_SIGNE;
#else
-#define FFT_FLOAT 1
-
#define AAC_RENAME(x) x
#define AAC_RENAME_32(x) x
#define AAC_RENAME2(x) ff_ ## x
@@ -94,7 +90,7 @@ typedef unsigned AAC_SIGNE;
#define Q23(x) ((float)(x))
#define Q30(x) ((float)(x))
#define Q31(x) ((float)(x))
-#define RANGE15(x) (32768.0 * (x))
+#define TX_SCALE(x) ((x) / 32768.0f)
#define GET_GAIN(x, y) powf((x), -(y))
#define AAC_MUL16(x, y) ((x) * (y))
#define AAC_MUL26(x, y) ((x) * (y))