aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-20 22:22:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-20 22:30:48 +0100
commit9018bd11979fb775a76b8ed86abd9b6f266d0043 (patch)
tree3987cdae24617ccfa8fc903f3d3bef31b1e2aed9
parent8bce5c8e74b5664c0aca1cc2b1c45cce0a55909c (diff)
downloadandroid_external_ffmpeg-9018bd11979fb775a76b8ed86abd9b6f266d0043.tar.gz
android_external_ffmpeg-9018bd11979fb775a76b8ed86abd9b6f266d0043.tar.bz2
android_external_ffmpeg-9018bd11979fb775a76b8ed86abd9b6f266d0043.zip
avcodec/atrac1: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/atrac1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index d059d7539e..aeb068c8fe 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -80,7 +80,7 @@ typedef struct {
DECLARE_ALIGNED(32, float, high)[512];
float* bands[3];
FFTContext mdct_ctx[3];
- AVFloatDSPContext fdsp;
+ AVFloatDSPContext *fdsp;
} AT1Ctx;
/** size of the transform in samples in the long mode for each QMF band */
@@ -140,7 +140,7 @@ static int at1_imdct_block(AT1SUCtx* su, AT1Ctx *q)
at1_imdct(q, &q->spec[pos], &su->spectrum[0][ref_pos + start_pos], nbits, band_num);
/* overlap and window */
- q->fdsp.vector_fmul_window(&q->bands[band_num][start_pos], prev_buf,
+ q->fdsp->vector_fmul_window(&q->bands[band_num][start_pos], prev_buf,
&su->spectrum[0][ref_pos + start_pos], ff_sine_32, 16);
prev_buf = &su->spectrum[0][ref_pos+start_pos + 16];
@@ -324,6 +324,8 @@ static av_cold int atrac1_decode_end(AVCodecContext * avctx)
ff_mdct_end(&q->mdct_ctx[1]);
ff_mdct_end(&q->mdct_ctx[2]);
+ av_freep(&q->fdsp);
+
return 0;
}
@@ -359,7 +361,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
ff_atrac_generate_tables();
- avpriv_float_dsp_init(&q->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
q->bands[0] = q->low;
q->bands[1] = q->mid;