[FFmpeg-devel] [PATCH 2/2] WMA: use vector_fmul_step_scalar
Mans Rullgard
mans
Thu Oct 1 00:16:22 CEST 2009
---
libavcodec/wma.h | 2 +-
libavcodec/wmadec.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index b6c2943..390cdd2 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -113,7 +113,7 @@ typedef struct WMACodecContext {
int exponents_bsize[MAX_CHANNELS]; ///< log2 ratio frame/exp. length
DECLARE_ALIGNED_16(float, exponents[MAX_CHANNELS][BLOCK_MAX_SIZE]);
float max_exponent[MAX_CHANNELS];
- WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
+ DECLARE_ALIGNED_16(WMACoef, coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]);
DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]);
DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
FFTContext mdct_ctx[BLOCK_NB_SIZES];
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 5a31963..d3651ed 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -680,9 +680,9 @@ static int wma_decode_block(WMACodecContext *s)
for(i = 0;i < s->coefs_start; i++)
*coefs++ = 0.0;
n = nb_coefs[ch];
- for(i = 0;i < n; i++) {
- *coefs++ = coefs1[i] * exponents[i<<bsize>>esize] * mult;
- }
+ s->dsp.vector_fmul_step_scalar(coefs, coefs1, exponents,
+ mult, bsize-esize, n);
+ coefs += n;
n = s->block_len - s->coefs_end[bsize];
for(i = 0;i < n; i++)
*coefs++ = 0.0;
--
1.6.4.4
More information about the ffmpeg-devel
mailing list