aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-29 22:11:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-29 22:11:05 +0000
commit13c2469d7fc6d10acfcb651c2cadf482f43cc4eb (patch)
tree89beeaed08aec21a974563eed2c45057c9286ab1 /libavcodec
parent6d1feb028f5e245477da71848e702388dca91ce0 (diff)
downloadffmpeg-13c2469d7fc6d10acfcb651c2cadf482f43cc4eb.tar.gz
Vorbis sse fix by (Balatoni Denes: dbalatoni, programozo hu)
Originally committed as revision 4317 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vorbis.c8
-rw-r--r--libavcodec/vorbis.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index bda54f26a3..d9a705a14c 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -155,6 +155,8 @@ static void vorbis_free(vorbis_context *vc) {
av_freep(&vc->channel_floors);
av_freep(&vc->saved);
av_freep(&vc->ret);
+ av_freep(&vc->buf);
+ av_freep(&vc->buf_tmp);
av_freep(&vc->residues);
av_freep(&vc->modes);
@@ -759,6 +761,8 @@ static int vorbis_parse_id_hdr(vorbis_context *vc){
vc->channel_floors=(float *)av_malloc((vc->blocksize_1/2)*vc->audio_channels * sizeof(float));
vc->saved=(float *)av_malloc((vc->blocksize_1/2)*vc->audio_channels * sizeof(float));
vc->ret=(float *)av_malloc((vc->blocksize_1/2)*vc->audio_channels * sizeof(float));
+ vc->buf=(float *)av_malloc(vc->blocksize_1 * sizeof(float));
+ vc->buf_tmp=(float *)av_malloc(vc->blocksize_1 * sizeof(float));
vc->saved_start=0;
ff_mdct_init(&vc->mdct0, bl0, 1);
@@ -1327,8 +1331,8 @@ static int vorbis_parse_audio_packet(vorbis_context *vc) {
float *ret=vc->ret;
const float *lwin=vc->lwin;
const float *swin=vc->swin;
- float buf[blocksize];
- float buf_tmp[blocksize];
+ float *buf=vc->buf;
+ float *buf_tmp=vc->buf_tmp;
ch_floor_ptr=vc->channel_floors+j*blocksize/2;
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index 8e946c8b75..a9e88cbd65 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -88,6 +88,8 @@ typedef struct {
float *saved;
uint_fast16_t saved_start;
float *ret;
+ float *buf;
+ float *buf_tmp;
} vorbis_context;