aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-18 22:40:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-18 22:45:32 +0200
commit2897447ddf805edc0a7935ab633c28e29a89b7b3 (patch)
tree1a9d0c1f96b9da5b40815c41134811d68d5ced95
parent097bf834bacd3b9a4e8826f4df8e3130d5685926 (diff)
parent913fa85a2c1fcd71802f7decdef5f355e0d9c757 (diff)
downloadffmpeg-2897447ddf805edc0a7935ab633c28e29a89b7b3.tar.gz
Merge commit '913fa85a2c1fcd71802f7decdef5f355e0d9c757'
* commit '913fa85a2c1fcd71802f7decdef5f355e0d9c757': dct-test: Skip indirection for MMX IDCT permutation Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dct-test.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 451fc6c780..2aacf3e4a6 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -165,8 +165,6 @@ static const struct algo idct_tab[] = {
#define NB_ITS 20000
#define NB_ITS_SPEED 50000
-static short idct_mmx_perm[64];
-
static short idct_simple_mmx_perm[64] = {
0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D,
0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D,
@@ -180,16 +178,6 @@ static short idct_simple_mmx_perm[64] = {
static const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 };
-static void idct_mmx_init(void)
-{
- int i;
-
- /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */
- for (i = 0; i < 64; i++) {
- idct_mmx_perm[i] = (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2);
- }
-}
-
DECLARE_ALIGNED(16, static int16_t, block)[64];
DECLARE_ALIGNED(8, static int16_t, block1)[64];
@@ -229,7 +217,7 @@ static void permute(int16_t dst[64], const int16_t src[64], int perm)
if (perm == MMX_PERM) {
for (i = 0; i < 64; i++)
- dst[idct_mmx_perm[i]] = src[i];
+ dst[(i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2)] = src[i];
} else if (perm == MMX_SIMPLE_PERM) {
for (i = 0; i < 64; i++)
dst[idct_simple_mmx_perm[i]] = src[i];
@@ -537,7 +525,6 @@ int main(int argc, char **argv)
int bits=8;
ff_ref_dct_init();
- idct_mmx_init();
for (;;) {
c = getopt(argc, argv, "ih4t");