diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-30 15:06:46 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-02-02 02:44:53 +0000 |
commit | c73d99e672329c8f2df290736ffc474c360ac4ae (patch) | |
tree | 59e330229ee0746b5c466da278430e682fc0371b /libavcodec/vorbis_dec.c | |
parent | 770c410fbb8e1b87ce8ad7f3d7eddaa55e2b8295 (diff) | |
download | ffmpeg-c73d99e672329c8f2df290736ffc474c360ac4ae.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>
Diffstat (limited to 'libavcodec/vorbis_dec.c')
-rw-r--r-- | libavcodec/vorbis_dec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c index 9fef5eb26f..bca56ba663 100644 --- a/libavcodec/vorbis_dec.c +++ b/libavcodec/vorbis_dec.c @@ -31,6 +31,7 @@ #include "get_bits.h" #include "dsputil.h" #include "fft.h" +#include "fmtconvert.h" #include "vorbis.h" #include "xiph.h" @@ -127,6 +128,7 @@ typedef struct vorbis_context_s { AVCodecContext *avccontext; GetBitContext gb; DSPContext dsp; + FmtConvertContext fmt_conv; FFTContext mdct[2]; uint_fast8_t first_frame; @@ -961,6 +963,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext) vc->avccontext = avccontext; dsputil_init(&vc->dsp, avccontext); + ff_fmt_convert_init(&vc->fmt_conv, avccontext); vc->scale_bias = 32768.0f; @@ -1636,7 +1639,8 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, len * ff_vorbis_channel_layout_offsets[vc->audio_channels - 1][i]; } - vc->dsp.float_to_int16_interleave(data, channel_ptrs, len, vc->audio_channels); + vc->fmt_conv.float_to_int16_interleave(data, channel_ptrs, len, + vc->audio_channels); *data_size = len * 2 * vc->audio_channels; return buf_size ; |