diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-07-13 15:12:11 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-07-13 16:55:28 -0400 |
commit | b5849f77095439e994b11c25e6063d443b36c228 (patch) | |
tree | 9728b5e7cda89d104e65ff8fed68155697a6c845 /libavcodec/ac3enc.h | |
parent | 82cea7cb6c38e251f88fbf090cd5361f5d0a49de (diff) | |
download | ffmpeg-b5849f77095439e994b11c25e6063d443b36c228.tar.gz |
ac3enc: merge AC3MDCTContext with AC3EncodeContext.
Since both the fixed-point and floating-point encoders use the FFTContext,
this no longer needs to be in a separate context. Also, when a short-transform
context is added, the same MDCT window will be used.
Diffstat (limited to 'libavcodec/ac3enc.h')
-rw-r--r-- | libavcodec/ac3enc.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index ccef7079e4..6caf4d80c4 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -66,11 +66,6 @@ typedef int64_t CoefSumType; #endif -typedef struct AC3MDCTContext { - const SampleType *window; ///< MDCT window function - FFTContext fft; ///< FFT context for MDCT calculation -} AC3MDCTContext; - /** * Encoding Options used by AVOption. */ @@ -143,7 +138,8 @@ typedef struct AC3EncodeContext { PutBitContext pb; ///< bitstream writer context DSPContext dsp; AC3DSPContext ac3dsp; ///< AC-3 optimized functions - AC3MDCTContext *mdct; ///< MDCT context + FFTContext mdct; ///< FFT context for MDCT calculation + const SampleType *mdct_window; ///< MDCT window function array AC3Block blocks[AC3_MAX_BLOCKS]; ///< per-block info @@ -226,8 +222,8 @@ typedef struct AC3EncodeContext { int ref_bap_set; ///< indicates if ref_bap pointers have been set /* fixed vs. float function pointers */ - void (*mdct_end)(AC3MDCTContext *mdct); - int (*mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits); + void (*mdct_end)(struct AC3EncodeContext *s); + int (*mdct_init)(struct AC3EncodeContext *s); /* fixed vs. float templated function pointers */ int (*allocate_sample_buffers)(struct AC3EncodeContext *s); @@ -262,13 +258,11 @@ void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame); /* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */ -void ff_ac3_fixed_mdct_end(AC3MDCTContext *mdct); -void ff_ac3_float_mdct_end(AC3MDCTContext *mdct); +void ff_ac3_fixed_mdct_end(AC3EncodeContext *s); +void ff_ac3_float_mdct_end(AC3EncodeContext *s); -int ff_ac3_fixed_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits); -int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits); +int ff_ac3_fixed_mdct_init(AC3EncodeContext *s); +int ff_ac3_float_mdct_init(AC3EncodeContext *s); /* prototypes for functions in ac3enc_template.c */ |