diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-16 17:30:19 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-22 06:20:15 -0700 |
commit | 9a9e2f1c8aa4539a261625145e5c1f46a8106ac2 (patch) | |
tree | 8df94d9ee621e07b5e5f9aad954cc68d92105e88 /libavcodec/cook.c | |
parent | ca1e36a8e4cd416142487071dbca734567bdaddf (diff) | |
download | ffmpeg-9a9e2f1c8aa4539a261625145e5c1f46a8106ac2.tar.gz |
dsputil: Split audio operations off into a separate context
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r-- | libavcodec/cook.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 190d28c340..2d77899c55 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -44,9 +44,10 @@ #include "libavutil/channel_layout.h" #include "libavutil/lfg.h" + +#include "audiodsp.h" #include "avcodec.h" #include "get_bits.h" -#include "dsputil.h" #include "bytestream.h" #include "fft.h" #include "internal.h" @@ -122,7 +123,7 @@ typedef struct cook { void (*saturate_output)(struct cook *q, float *out); AVCodecContext* avctx; - DSPContext dsp; + AudioDSPContext adsp; GetBitContext gb; /* stream data */ int num_vectors; @@ -865,8 +866,8 @@ static inline void decode_bytes_and_gain(COOKContext *q, COOKSubpacket *p, */ static void saturate_output_float(COOKContext *q, float *out) { - q->dsp.vector_clipf(out, q->mono_mdct_output + q->samples_per_channel, - -1.0f, 1.0f, FFALIGN(q->samples_per_channel, 8)); + q->adsp.vector_clipf(out, q->mono_mdct_output + q->samples_per_channel, + -1.0f, 1.0f, FFALIGN(q->samples_per_channel, 8)); } @@ -1065,7 +1066,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) /* Initialize RNG. */ av_lfg_init(&q->random_state, 0); - ff_dsputil_init(&q->dsp, avctx); + ff_audiodsp_init(&q->adsp); while (edata_ptr < edata_ptr_end) { /* 8 for mono, 16 for stereo, ? for multichannel |