dct-test: add transpose permutation support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
370d7ef2c7
commit
dfeeb85b65
@ -71,7 +71,7 @@ struct algo {
|
|||||||
const char *name;
|
const char *name;
|
||||||
void (*func)(DCTELEM *block);
|
void (*func)(DCTELEM *block);
|
||||||
enum formattag { NO_PERM, MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM,
|
enum formattag { NO_PERM, MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM,
|
||||||
SSE2_PERM, PARTTRANS_PERM } format;
|
SSE2_PERM, PARTTRANS_PERM, TRANSPOSE_PERM } format;
|
||||||
int mm_support;
|
int mm_support;
|
||||||
int nonspec;
|
int nonspec;
|
||||||
};
|
};
|
||||||
@ -243,6 +243,9 @@ static void permute(DCTELEM dst[64], const DCTELEM src[64], int perm)
|
|||||||
} else if (perm == PARTTRANS_PERM) {
|
} else if (perm == PARTTRANS_PERM) {
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
dst[(i & 0x24) | ((i & 3) << 3) | ((i >> 3) & 3)] = src[i];
|
dst[(i & 0x24) | ((i & 3) << 3) | ((i >> 3) & 3)] = src[i];
|
||||||
|
} else if (perm == TRANSPOSE_PERM) {
|
||||||
|
for (i = 0; i < 64; i++)
|
||||||
|
dst[(i>>3) | ((i<<3)&0x38)] = src[i];
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
dst[i] = src[i];
|
dst[i] = src[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user