diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-30 15:06:46 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-04 03:08:09 +0100 |
commit | fe2ff6d24745f0739bfde9061092c1268557310b (patch) | |
tree | 9cbcf8b2472dd7612dd84c8b6b237d9d02b4daf9 /libavcodec/binkaudio.c | |
parent | a35d782d28ef0497f2b65eb300c2e6a6028fc165 (diff) | |
download | ffmpeg-fe2ff6d24745f0739bfde9061092c1268557310b.tar.gz |
Separate format conversion DSP functions from DSPContext.
This will be beneficial for use with the audio conversion API without
requiring it to depend on all of dsputil.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit c73d99e672329c8f2df290736ffc474c360ac4ae)
Diffstat (limited to 'libavcodec/binkaudio.c')
-rw-r--r-- | libavcodec/binkaudio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index ae2f6c88b0..53484654db 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -33,6 +33,7 @@ #include "get_bits.h" #include "dsputil.h" #include "fft.h" +#include "fmtconvert.h" extern const uint16_t ff_wma_critical_freqs[25]; @@ -43,6 +44,7 @@ typedef struct { AVCodecContext *avctx; GetBitContext gb; DSPContext dsp; + FmtConvertContext fmt_conv; int first; int channels; int frame_len; ///< transform size (samples) @@ -71,6 +73,7 @@ static av_cold int decode_init(AVCodecContext *avctx) s->avctx = avctx; dsputil_init(&s->dsp, avctx); + ff_fmt_convert_init(&s->fmt_conv, avctx); /* determine frame length */ if (avctx->sample_rate < 22050) { @@ -222,7 +225,8 @@ static void decode_block(BinkAudioContext *s, short *out, int use_dct) ff_rdft_calc(&s->trans.rdft, coeffs); } - s->dsp.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, s->frame_len, s->channels); + s->fmt_conv.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, + s->frame_len, s->channels); if (!s->first) { int count = s->overlap_len * s->channels; |