Commit 09c7f59d authored by astrange's avatar astrange

Test idct_xvid_sse2() in dct-test.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12844 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0ca9e7b0
...@@ -72,7 +72,7 @@ struct algo { ...@@ -72,7 +72,7 @@ struct algo {
enum { FDCT, IDCT } is_idct; enum { FDCT, IDCT } is_idct;
void (* func) (DCTELEM *block); void (* func) (DCTELEM *block);
void (* ref) (DCTELEM *block); void (* ref) (DCTELEM *block);
enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM } format; enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM, SSE2_PERM } format;
int mm_support; int mm_support;
}; };
...@@ -105,6 +105,7 @@ struct algo algos[] = { ...@@ -105,6 +105,7 @@ struct algo algos[] = {
{"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM, MM_MMX}, {"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM, MM_MMX},
{"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM, MM_MMX}, {"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM, MM_MMX},
{"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM, MM_MMXEXT}, {"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM, MM_MMXEXT},
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, MM_SSE2},
#endif #endif
#ifdef HAVE_ALTIVEC #ifdef HAVE_ALTIVEC
...@@ -157,6 +158,8 @@ static short idct_simple_mmx_perm[64]={ ...@@ -157,6 +158,8 @@ static short idct_simple_mmx_perm[64]={
0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
}; };
static const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7};
void idct_mmx_init(void) void idct_mmx_init(void)
{ {
int i; int i;
...@@ -232,6 +235,9 @@ void dct_error(const char *name, int is_idct, ...@@ -232,6 +235,9 @@ void dct_error(const char *name, int is_idct,
for(i=0;i<64;i++) for(i=0;i<64;i++)
block[idct_simple_mmx_perm[i]] = block1[i]; block[idct_simple_mmx_perm[i]] = block1[i];
} else if (form == SSE2_PERM) {
for(i=0; i<64; i++)
block[(i&0x38) | idct_sse2_row_perm[i&7]] = block1[i];
} else { } else {
for(i=0; i<64; i++) for(i=0; i<64; i++)
block[i]= block1[i]; block[i]= block1[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment