summaryrefslogtreecommitdiff
path: root/libavcodec/dct-test.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-12 22:01:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-12 22:08:14 +0200
commitdfeeb85b65188923b45e14fbac7963626fae2e48 (patch)
treed56499b13c14a2aa507175c5081c030dfd2155ab /libavcodec/dct-test.c
parent370d7ef2c7a9d00ee885da7ff5dec1b879b33650 (diff)
dct-test: add transpose permutation support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct-test.c')
-rw-r--r--libavcodec/dct-test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 3bd95fdf2d..9f17b06b67 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -71,7 +71,7 @@ struct algo {
const char *name;
void (*func)(DCTELEM *block);
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 nonspec;
};
@@ -243,6 +243,9 @@ static void permute(DCTELEM dst[64], const DCTELEM src[64], int perm)
} else if (perm == PARTTRANS_PERM) {
for (i = 0; i < 64; 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 {
for (i = 0; i < 64; i++)
dst[i] = src[i];