comparison i386/fft_3dn2.c @ 6755:33896780c612 libavcodec

Do not misuse long as the size of a register in x86. typedef x86_reg as the appropriate size and use it instead.
author ramiro
date Thu, 08 May 2008 21:11:24 +0000
parents d5ba514e3f4a
children f7cbb7733146
comparison
equal deleted inserted replaced
6754:7094ae690809 6755:33896780c612
18 * You should have received a copy of the GNU Lesser General Public 18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software 19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 21 */
22 #include "dsputil.h" 22 #include "dsputil.h"
23 #include "x86_cpu.h"
23 24
24 static const int p1m1[2] __attribute__((aligned(8))) = 25 static const int p1m1[2] __attribute__((aligned(8))) =
25 { 0, 1 << 31 }; 26 { 0, 1 << 31 };
26 27
27 static const int m1p1[2] __attribute__((aligned(8))) = 28 static const int m1p1[2] __attribute__((aligned(8))) =
28 { 1 << 31, 0 }; 29 { 1 << 31, 0 };
29 30
30 void ff_fft_calc_3dn2(FFTContext *s, FFTComplex *z) 31 void ff_fft_calc_3dn2(FFTContext *s, FFTComplex *z)
31 { 32 {
32 int ln = s->nbits; 33 int ln = s->nbits;
33 long i, j; 34 long j;
35 x86_reg i;
34 long nblocks, nloops; 36 long nblocks, nloops;
35 FFTComplex *p, *cptr; 37 FFTComplex *p, *cptr;
36 38
37 asm volatile( 39 asm volatile(
38 /* FEMMS is not a must here but recommended by AMD */ 40 /* FEMMS is not a must here but recommended by AMD */
122 } 124 }
123 125
124 void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output, 126 void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output,
125 const FFTSample *input, FFTSample *tmp) 127 const FFTSample *input, FFTSample *tmp)
126 { 128 {
127 long k, n8, n4, n2, n; 129 long n8, n4, n2, n;
130 x86_reg k;
128 const uint16_t *revtab = s->fft.revtab; 131 const uint16_t *revtab = s->fft.revtab;
129 const FFTSample *tcos = s->tcos; 132 const FFTSample *tcos = s->tcos;
130 const FFTSample *tsin = s->tsin; 133 const FFTSample *tsin = s->tsin;
131 const FFTSample *in1, *in2; 134 const FFTSample *in1, *in2;
132 FFTComplex *z = (FFTComplex *)tmp; 135 FFTComplex *z = (FFTComplex *)tmp;