summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_fixed.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-07 00:14:52 -0300
committerJames Almer <jamrial@gmail.com>2017-04-07 00:19:32 -0300
commite7ec8c181fe4b78ba66cc37911e707a1fb4ec0df (patch)
tree079ff98dbd306ed413db84ba844abdc3331a2b83 /libavcodec/ac3enc_fixed.c
parentc37e8c0b7fd4a68604102eb4c9d9c9f347c57ad2 (diff)
parentf0d3e43bd77b3194a28d75884cf83083b188bf30 (diff)
Merge commit 'f0d3e43bd77b3194a28d75884cf83083b188bf30'
* commit 'f0d3e43bd77b3194a28d75884cf83083b188bf30': ac3enc: Reshuffle functions to avoid forward declarations Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/ac3enc_fixed.c')
-rw-r--r--libavcodec/ac3enc_fixed.c58
1 files changed, 28 insertions, 30 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index f10c3b5465..5e4250af3d 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -43,36 +43,6 @@ static const AVClass ac3enc_class = {
.version = 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.
@@ -137,6 +107,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;