summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_float.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-06-26 23:58:19 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-06-27 12:59:39 -0400
commit8683c6a638f2e323d11b520c5e130b46b1eb1eda (patch)
treefa28e7001bd355e58abd2bbbe3af8b43530a0758 /libavcodec/ac3enc_float.c
parent668afae438ec8502517abb1c001b984c649e5e95 (diff)
ac3enc: move ff_ac3_encode_frame() to ac3enc_template.c
This avoids using function pointers for quite a few small functions, most of which just call DSP functions.
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r--libavcodec/ac3enc_float.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 43fbb954d6..12d6b19241 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -82,18 +82,27 @@ av_cold int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct,
/**
* Apply KBD window to input samples prior to MDCT.
*/
-void ff_ac3_float_apply_window(DSPContext *dsp, float *output,
- const float *input, const float *window,
- unsigned int len)
+static void apply_window(DSPContext *dsp, float *output, const float *input,
+ const float *window, unsigned int len)
{
dsp->vector_fmul(output, input, window, len);
}
/**
+ * Normalize the input samples.
+ * Not needed for the floating-point encoder.
+ */
+static int normalize_samples(AC3EncodeContext *s)
+{
+ return 0;
+}
+
+
+/**
* Scale MDCT coefficients from float to 24-bit fixed-point.
*/
-void ff_ac3_float_scale_coefficients(AC3EncodeContext *s)
+static void scale_coefficients(AC3EncodeContext *s)
{
int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS;
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
@@ -109,7 +118,7 @@ AVCodec ff_ac3_encoder = {
CODEC_ID_AC3,
sizeof(AC3EncodeContext),
ff_ac3_encode_init,
- ff_ac3_encode_frame,
+ ff_ac3_float_encode_frame,
ff_ac3_encode_close,
NULL,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},