comparison dct-test.c @ 8350:583f32e6f4b5 libavcodec

dct-test: add PARTTRANS permutation
author mru
date Tue, 16 Dec 2008 19:59:50 +0000
parents cf4d575b1982
children 91b681b7b6be
comparison
equal deleted inserted replaced
8349:920ded20b469 8350:583f32e6f4b5
67 struct algo { 67 struct algo {
68 const char *name; 68 const char *name;
69 enum { FDCT, IDCT } is_idct; 69 enum { FDCT, IDCT } is_idct;
70 void (* func) (DCTELEM *block); 70 void (* func) (DCTELEM *block);
71 void (* ref) (DCTELEM *block); 71 void (* ref) (DCTELEM *block);
72 enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM, SSE2_PERM } format; 72 enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM, SSE2_PERM, PARTTRANS_PERM } format;
73 int mm_support; 73 int mm_support;
74 }; 74 };
75 75
76 #ifndef FAAN_POSTSCALE 76 #ifndef FAAN_POSTSCALE
77 #define FAAN_SCALE SCALE_PERM 77 #define FAAN_SCALE SCALE_PERM
233 block[idct_simple_mmx_perm[i]] = block1[i]; 233 block[idct_simple_mmx_perm[i]] = block1[i];
234 234
235 } else if (form == SSE2_PERM) { 235 } else if (form == SSE2_PERM) {
236 for(i=0; i<64; i++) 236 for(i=0; i<64; i++)
237 block[(i&0x38) | idct_sse2_row_perm[i&7]] = block1[i]; 237 block[(i&0x38) | idct_sse2_row_perm[i&7]] = block1[i];
238 } else if (form == PARTTRANS_PERM) {
239 for(i=0; i<64; i++)
240 block[(i&0x24) | ((i&3)<<3) | ((i>>3)&3)] = block1[i];
238 } else { 241 } else {
239 for(i=0; i<64; i++) 242 for(i=0; i<64; i++)
240 block[i]= block1[i]; 243 block[i]= block1[i];
241 } 244 }
242 #if 0 // simulate mismatch control for tested IDCT but not the ref 245 #if 0 // simulate mismatch control for tested IDCT but not the ref