diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-07 18:26:19 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-11 12:53:26 +0200 |
commit | 7311a9086eb12573f89a05e200f9c11a8d47ee26 (patch) | |
tree | e551549a51baf30880576edd4705f75d2414d723 /libavcodec/ac3enc.h | |
parent | 2fcc50d1f536a76978d39396afb43f885cc89667 (diff) | |
download | ffmpeg-7311a9086eb12573f89a05e200f9c11a8d47ee26.tar.gz |
avcodec/ac3enc: Deduplicate allocating buffers
These allocations only depend upon sizeof(SampleType)
(and this size is actually the same for both the fixed-point
and the floating-point encoders for most (all supported?)
systems).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ac3enc.h')
-rw-r--r-- | libavcodec/ac3enc.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index 3dc8acfd91..8d6cb3b3de 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -232,8 +232,8 @@ typedef struct AC3EncodeContext { int frame_bits; ///< all frame bits except exponents and mantissas int exponent_bits; ///< number of bits used for exponents - SampleType *windowed_samples; - SampleType **planar_samples; + void *windowed_samples; + uint8_t **planar_samples; uint8_t *bap_buffer; uint8_t *bap1_buffer; CoefType *mdct_coef_buffer; @@ -260,9 +260,6 @@ typedef struct AC3EncodeContext { /* fixed vs. float function pointers */ int (*mdct_init)(struct AC3EncodeContext *s); - /* fixed vs. float templated function pointers */ - int (*allocate_sample_buffers)(struct AC3EncodeContext *s); - /* AC-3 vs. E-AC-3 function pointers */ void (*output_frame_header)(struct AC3EncodeContext *s); } AC3EncodeContext; |