diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-28 02:29:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-28 02:30:04 +0200 |
commit | 7b7c47c8f70e51d3835a6153c3e467e59acf8a8b (patch) | |
tree | ecb00d3a1688c44780d275b2b3209c355f548e0a /libavcodec/ac3enc_float.c | |
parent | 65eae2a7a2a14926c9f9683544e99982ba565f93 (diff) | |
parent | 8683c6a638f2e323d11b520c5e130b46b1eb1eda (diff) | |
download | ffmpeg-7b7c47c8f70e51d3835a6153c3e467e59acf8a8b.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ac3enc: move ff_ac3_encode_frame() to ac3enc_template.c
ac3enc: merge log2_tab() into normalize_samples()
ac3enc: Remove bit allocation fallbacks.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r-- | libavcodec/ac3enc_float.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index 9e798106f3..7d01b18ed1 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_float_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}, |