summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_fixed.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-07-13 15:12:11 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-07-13 16:55:28 -0400
commitb5849f77095439e994b11c25e6063d443b36c228 (patch)
tree9728b5e7cda89d104e65ff8fed68155697a6c845 /libavcodec/ac3enc_fixed.c
parent82cea7cb6c38e251f88fbf090cd5361f5d0a49de (diff)
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_fixed.c')
-rw-r--r--libavcodec/ac3enc_fixed.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index ea3a46cdfa..15c5a4bca7 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -41,9 +41,9 @@ static AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name
/**
* Finalize MDCT and free allocated memory.
*/
-av_cold void AC3_NAME(mdct_end)(AC3MDCTContext *mdct)
+av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s)
{
- ff_mdct_end(&mdct->fft);
+ ff_mdct_end(&s->mdct);
}
@@ -51,11 +51,10 @@ av_cold void AC3_NAME(mdct_end)(AC3MDCTContext *mdct)
* Initialize MDCT tables.
* @param nbits log2(MDCT size)
*/
-av_cold int AC3_NAME(mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct,
- int nbits)
+av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s)
{
- int ret = ff_mdct_init(&mdct->fft, nbits, 0, -1.0);
- mdct->window = ff_ac3_window;
+ int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
+ s->mdct_window = ff_ac3_window;
return ret;
}