aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-14 17:44:42 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-18 14:52:26 +0200
commit3b93b1af139dbf3e498a9e66bbfe17500e25e53d (patch)
tree0148c386b5d03afb6f2252c07e11b829581c9720 /libavcodec/ac3enc.h
parent35ae44c6156216b8c745e4bc65f309840101d21a (diff)
downloadffmpeg-3b93b1af139dbf3e498a9e66bbfe17500e25e53d.tar.gz
avcodec/ac3enc: Avoid allocation for windowed_samples
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ac3enc.h')
-rw-r--r--libavcodec/ac3enc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index 227744d27f..618c952a18 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -30,6 +30,7 @@
#include <stdint.h>
+#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
@@ -232,7 +233,6 @@ typedef struct AC3EncodeContext {
int frame_bits; ///< all frame bits except exponents and mantissas
int exponent_bits; ///< number of bits used for exponents
- void *windowed_samples;
uint8_t **planar_samples;
uint8_t *bap_buffer;
uint8_t *bap1_buffer;
@@ -259,6 +259,11 @@ typedef struct AC3EncodeContext {
/* AC-3 vs. E-AC-3 function pointers */
void (*output_frame_header)(struct AC3EncodeContext *s);
+
+ union {
+ DECLARE_ALIGNED(32, float, windowed_samples_float)[AC3_WINDOW_SIZE];
+ DECLARE_ALIGNED(32, int32_t, windowed_samples_fixed)[AC3_WINDOW_SIZE];
+ };
} AC3EncodeContext;
extern const AVChannelLayout ff_ac3_ch_layouts[19];