diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-01-04 13:58:21 +0300 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-11-28 19:19:30 +0300 |
commit | f0d3e43bd77b3194a28d75884cf83083b188bf30 (patch) | |
tree | 9cfa47c1a1136855a900dfa9c46500671f604aaf /libavcodec/ac3enc_fixed.c | |
parent | e22c63ac74b2968075be8bf0d2deb1ee63b28976 (diff) |
ac3enc: Reshuffle functions to avoid forward declarations
Diffstat (limited to 'libavcodec/ac3enc_fixed.c')
-rw-r--r-- | libavcodec/ac3enc_fixed.c | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index c26f9c05d4..c1cf8256b2 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -38,36 +38,6 @@ static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name, ac3_options, LIBAVUTIL_VERSION_INT }; -static int normalize_samples(AC3EncodeContext *s); - -#include "ac3enc_template.c" - - -/** - * Finalize MDCT and free allocated memory. - * - * @param s AC-3 encoder private context - */ -av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s) -{ - ff_mdct_end(&s->mdct); -} - - -/** - * Initialize MDCT tables. - * - * @param s AC-3 encoder private context - * @return 0 on success, negative error code on failure - */ -av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s) -{ - int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0); - s->mdct_window = ff_ac3_window; - return ret; -} - - /* * Normalize the input samples to use the maximum available precision. * This assumes signed 16-bit input samples. @@ -126,6 +96,34 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) } +#include "ac3enc_template.c" + + +/** + * Finalize MDCT and free allocated memory. + * + * @param s AC-3 encoder private context + */ +av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s) +{ + ff_mdct_end(&s->mdct); +} + + +/** + * Initialize MDCT tables. + * + * @param s AC-3 encoder private context + * @return 0 on success, negative error code on failure + */ +av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s) +{ + int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0); + s->mdct_window = ff_ac3_window; + return ret; +} + + static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) { AC3EncodeContext *s = avctx->priv_data; |