diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-05-30 16:28:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-05 20:31:59 +0200 |
commit | ccff45a0d3c981edc97078885e2a630e0436ce31 (patch) | |
tree | 978070bbff082597623c0c954e9890b6839e794d /libavcodec/apedec.c | |
parent | 151f88d507f18c0aae011f9e88f40c508c11640f (diff) | |
download | ffmpeg-ccff45a0d3c981edc97078885e2a630e0436ce31.tar.gz |
apedsp: move to llauddsp
APE is not the sole codec using scalarproduct_and_madd_int16.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r-- | libavcodec/apedec.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index a41ac265e7..a9cf2005ed 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -25,7 +25,7 @@ #include "libavutil/avassert.h" #include "libavutil/channel_layout.h" #include "libavutil/opt.h" -#include "apedsp.h" +#include "lossless_audiodsp.h" #include "avcodec.h" #include "dsputil.h" #include "bytestream.h" @@ -137,7 +137,7 @@ typedef struct APEContext { AVClass *class; ///< class for AVOptions AVCodecContext *avctx; DSPContext dsp; - APEDSPContext adsp; + LLAudDSPContext adsp; int channels; int samples; ///< samples left to decode in current frame int bps; @@ -212,19 +212,6 @@ static av_cold int ape_decode_close(AVCodecContext *avctx) return 0; } -static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2, - const int16_t *v3, - int order, int mul) -{ - int res = 0; - - while (order--) { - res += *v1 * *v2++; - *v1++ += mul * *v3++; - } - return res; -} - static av_cold int ape_decode_init(AVCodecContext *avctx) { APEContext *s = avctx->priv_data; @@ -306,16 +293,8 @@ static av_cold int ape_decode_init(AVCodecContext *avctx) s->predictor_decode_stereo = predictor_decode_stereo_3950; } - s->adsp.scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c; - - if (ARCH_ARM) - ff_apedsp_init_arm(&s->adsp); - if (ARCH_PPC) - ff_apedsp_init_ppc(&s->adsp); - if (ARCH_X86) - ff_apedsp_init_x86(&s->adsp); - ff_dsputil_init(&s->dsp, avctx); + ff_llauddsp_init(&s->adsp); avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; return 0; |