aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbisdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-05-21 12:58:41 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-06-08 13:14:38 -0400
commitd5a7229ba4aabc2b6407c731d9175879ae54c5ea (patch)
tree0596aaae9622f0f7b7e5d689b20ab3dc82f59897 /libavcodec/vorbisdec.c
parent98db4e2a4e35ccc2406004216270ceaa1c6a7d00 (diff)
downloadffmpeg-d5a7229ba4aabc2b6407c731d9175879ae54c5ea.tar.gz
Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r--libavcodec/vorbisdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 3489b8f029..08198d732a 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -26,6 +26,7 @@
#include <math.h>
#define BITSTREAM_READER_LE
+#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
@@ -124,6 +125,7 @@ typedef struct vorbis_context_s {
AVFrame frame;
GetBitContext gb;
DSPContext dsp;
+ AVFloatDSPContext fdsp;
FmtConvertContext fmt_conv;
FFTContext mdct[2];
@@ -983,6 +985,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext)
vc->avccontext = avccontext;
ff_dsputil_init(&vc->dsp, avccontext);
+ avpriv_float_dsp_init(&vc->fdsp, avccontext->flags & CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&vc->fmt_conv, avccontext);
if (avccontext->request_sample_fmt == AV_SAMPLE_FMT_FLT) {
@@ -1605,7 +1608,7 @@ static int vorbis_parse_audio_packet(vorbis_context *vc)
for (j = vc->audio_channels-1;j >= 0; j--) {
ch_floor_ptr = vc->channel_floors + j * blocksize / 2;
ch_res_ptr = vc->channel_residues + res_chan[j] * blocksize / 2;
- vc->dsp.vector_fmul(ch_floor_ptr, ch_floor_ptr, ch_res_ptr, blocksize / 2);
+ vc->fdsp.vector_fmul(ch_floor_ptr, ch_floor_ptr, ch_res_ptr, blocksize / 2);
mdct->imdct_half(mdct, ch_res_ptr, ch_floor_ptr);
}