Mercurial > libavcodec.hg
comparison jrevdct.c @ 36:23723a0ebd24 libavcodec
permuted coefs in normal IDCT to avoid having different cases there
author | glantau |
---|---|
date | Tue, 07 Aug 2001 22:45:35 +0000 |
parents | 986e461dc072 |
children | 000aeeac27a2 |
comparison
equal
deleted
inserted
replaced
35:c77207dc78f4 | 36:23723a0ebd24 |
---|---|
195 * row DCT calculations can be simplified this way. | 195 * row DCT calculations can be simplified this way. |
196 */ | 196 */ |
197 | 197 |
198 register int *idataptr = (int*)dataptr; | 198 register int *idataptr = (int*)dataptr; |
199 | 199 |
200 /* WARNING: we do the same permutation as MMX idct to simplify the | |
201 video core */ | |
200 d0 = dataptr[0]; | 202 d0 = dataptr[0]; |
201 d1 = dataptr[1]; | 203 d2 = dataptr[1]; |
202 d2 = dataptr[2]; | 204 d4 = dataptr[2]; |
203 d3 = dataptr[3]; | 205 d6 = dataptr[3]; |
204 d4 = dataptr[4]; | 206 d1 = dataptr[4]; |
205 d5 = dataptr[5]; | 207 d3 = dataptr[5]; |
206 d6 = dataptr[6]; | 208 d5 = dataptr[6]; |
207 d7 = dataptr[7]; | 209 d7 = dataptr[7]; |
208 | 210 |
209 if ((d1 == 0) && (idataptr[1] | idataptr[2] | idataptr[3]) == 0) { | 211 if ((d1 | d2 | d3 | d4 | d5 | d6 | d7) == 0) { |
210 /* AC terms all zero */ | 212 /* AC terms all zero */ |
211 if (d0) { | 213 if (d0) { |
212 /* Compute a 32 bit value to assign. */ | 214 /* Compute a 32 bit value to assign. */ |
213 DCTELEM dcval = (DCTELEM) (d0 << PASS1_BITS); | 215 DCTELEM dcval = (DCTELEM) (d0 << PASS1_BITS); |
214 register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000); | 216 register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000); |