summaryrefslogtreecommitdiff
path: root/libavcodec/twinvq.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2009-08-27 14:49:36 +0000
committerVitor Sessak <vitor1001@gmail.com>2009-08-27 14:49:36 +0000
commit0a68cd876e14f76a00df7bb8edbfeb350f8ef617 (patch)
tree5563e4fb33e663dbbaf813bd83e2c010bd82c68d /libavcodec/twinvq.c
parent8fc9376c590d2998820bb27b4465636a3f3257a8 (diff)
SSE optimized vector_clipf(). 10% faster TwinVQ decoding.
Originally committed as revision 19728 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/twinvq.c')
-rw-r--r--libavcodec/twinvq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 1c05238efc..ba38ddcc78 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -825,7 +825,6 @@ static int twin_decode_frame(AVCodecContext * avctx, void *data,
float *out = data;
enum FrameType ftype;
int window_type;
- int i;
static const enum FrameType wtype_to_ftype_table[] = {
FT_LONG, FT_LONG, FT_SHORT, FT_LONG,
FT_MEDIUM, FT_LONG, FT_LONG, FT_MEDIUM, FT_MEDIUM
@@ -860,8 +859,8 @@ static int twin_decode_frame(AVCodecContext * avctx, void *data,
return buf_size;
}
- for (i=0; i < avctx->channels * mtab->size; i++)
- out[i] = av_clipf(out[i], -32700./(1<<15), 32700./(1<<15));
+ tctx->dsp.vector_clipf(out, out, -32700./(1<<15), 32700./(1<<15),
+ mtab->size);
*data_size = mtab->size*avctx->channels*4;