Mercurial > libavcodec.hg
comparison cook.c @ 5342:887509b42d3f libavcodec
moving automatic allocation of joint_decode/decode_buffer
to a statically allocated buffer decode_buffer_0 in cook instance.
author | mhoffman |
---|---|
date | Sun, 15 Jul 2007 22:06:08 +0000 |
parents | b42bcc94b97c |
children | 1aa26b974dc3 |
comparison
equal
deleted
inserted
replaced
5341:b42bcc94b97c | 5342:887509b42d3f |
---|---|
119 DECLARE_ALIGNED_16(float,mono_mdct_output[2048]); | 119 DECLARE_ALIGNED_16(float,mono_mdct_output[2048]); |
120 float mono_previous_buffer1[1024]; | 120 float mono_previous_buffer1[1024]; |
121 float mono_previous_buffer2[1024]; | 121 float mono_previous_buffer2[1024]; |
122 float decode_buffer_1[1024]; | 122 float decode_buffer_1[1024]; |
123 float decode_buffer_2[1024]; | 123 float decode_buffer_2[1024]; |
124 float decode_buffer_0[1060]; /* static allocation for joint decode */ | |
124 } COOKContext; | 125 } COOKContext; |
125 | 126 |
126 /* debug functions */ | 127 /* debug functions */ |
127 | 128 |
128 #ifdef COOKDEBUG | 129 #ifdef COOKDEBUG |
751 | 752 |
752 static void joint_decode(COOKContext *q, float* mlt_buffer1, | 753 static void joint_decode(COOKContext *q, float* mlt_buffer1, |
753 float* mlt_buffer2) { | 754 float* mlt_buffer2) { |
754 int i,j; | 755 int i,j; |
755 int decouple_tab[SUBBAND_SIZE]; | 756 int decouple_tab[SUBBAND_SIZE]; |
756 float decode_buffer[1060]; | 757 float *decode_buffer = q->decode_buffer_0; |
757 int idx, cpl_tmp,tmp_idx; | 758 int idx, cpl_tmp,tmp_idx; |
758 float f1,f2; | 759 float f1,f2; |
759 float* cplscale; | 760 float* cplscale; |
760 | 761 |
761 memset(decouple_tab, 0, sizeof(decouple_tab)); | 762 memset(decouple_tab, 0, sizeof(decouple_tab)); |