[x265] [PATCH] asm: idct16 sse2 28900->25000 improvement over intrinsic

dtyx265 at gmail.com dtyx265 at gmail.com
Fri Jan 16 20:10:39 CET 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1421435329 28800
# Node ID 592f6cd42f7ff15c9002db32b39b411d0adcd616
# Parent  f9a54da187139a7331f8048365673787cbf14711
asm: idct16 sse2 28900->25000 improvement over intrinsic

This is based on the gcc assembler generated from a tweaked version of the idct16 intrinsic.
I can submit a patch of the intrinsic if anyone wants it.

diff -r f9a54da18713 -r 592f6cd42f7f source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Jan 15 11:49:26 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Fri Jan 16 11:08:49 2015 -0800
@@ -1337,6 +1337,7 @@
         p.cu[BLOCK_4x4].idct = x265_idct4_sse2;
 #if X86_64
         p.cu[BLOCK_8x8].idct = x265_idct8_sse2;
+        p.cu[BLOCK_16x16].idct = x265_idct16_sse2;
 #endif
         p.idst4x4 = x265_idst4_sse2;
 
@@ -1555,6 +1556,7 @@
         p.cu[BLOCK_4x4].idct = x265_idct4_sse2;
 #if X86_64
         p.cu[BLOCK_8x8].idct = x265_idct8_sse2;
+        p.cu[BLOCK_16x16].idct = x265_idct16_sse2;
 #endif
         p.idst4x4 = x265_idst4_sse2;
 
diff -r f9a54da18713 -r 592f6cd42f7f source/common/x86/dct8.asm
--- a/source/common/x86/dct8.asm	Thu Jan 15 11:49:26 2015 +0530
+++ b/source/common/x86/dct8.asm	Fri Jan 16 11:08:49 2015 -0800
@@ -179,6 +179,46 @@
                 dw 64, -75, 36, 18, -64, 89, -83, 50
                 dw 64, -89, 83, -75, 64, -50, 36, -18
 
+sse2_idct16_0:  times 4 dw 90, 87
+                times 4 dw 80, 70
+                times 4 dw 57, 43
+                times 4 dw 25, 9
+
+sse2_idct16_1:  times 4 dw 87, 57
+                times 4 dw 9, -43
+                times 4 dw -80, -90
+                times 4 dw -70, -25
+
+sse2_idct16_2:  times 4 dw 80, 9
+                times 4 dw -70, -87
+                times 4 dw -25, 57
+                times 4 dw 90, 43
+
+sse2_idct16_3:  times 4 dw 70, -43
+                times 4 dw -87, 9
+                times 4 dw 90, 25
+                times 4 dw -80, -57
+
+sse2_idct16_4:  times 4 dw 57, -80
+                times 4 dw -25, 90
+                times 4 dw -9, -87
+                times 4 dw 43, 70
+
+sse2_idct16_5:  times 4 dw 43, -90
+                times 4 dw 57, 25
+                times 4 dw -87, 70
+                times 4 dw 9, -80
+
+sse2_idct16_6:  times 4 dw 25, -70
+                times 4 dw 90, -80
+                times 4 dw 43, 9
+                times 4 dw -57, 87
+
+sse2_idct16_7:  times 4 dw 9, -25
+                times 4 dw 43, -57
+                times 4 dw 70, -80
+                times 4 dw 87, -90
+
 idct16_shuff:   dd 0, 4, 2, 6, 1, 5, 3, 7
 
 idct16_shuff1:  dd 2, 6, 0, 4, 3, 7, 1, 5
@@ -1350,6 +1390,2577 @@
 %endif
 
 ;-------------------------------------------------------
+; void idct16(const int16_t* src, int16_t* dst, intptr_t dstStride)
+;-------------------------------------------------------
+%if ARCH_X86_64
+INIT_XMM sse2
+cglobal idct16, 3, 9, 16, 0-912
+%define IDCT_SHIFT1     7
+%if BIT_DEPTH == 10
+    %define     IDCT_SHIFT2     10
+    %define     IDCT_ADD        pd_512
+%elif BIT_DEPTH == 8
+    %define     IDCT_SHIFT2     12
+    %define     IDCT_ADD        pd_2048
+%else
+    %error Unsupported BIT_DEPTH!
+%endif
+
+    mova        m9, [r0 + 2 * mmsize]
+    mova        m0, [r0 + 6 * mmsize]
+    mova        m14, m9
+    mova        m11, [r0 + 10 * mmsize]
+    punpckhwd   m9, m0
+    punpcklwd   m14, m0
+    mova        m7, [r0 + 18 * mmsize]
+    mova        m15, m11
+    mova        m0, [r0 + 14 * mmsize]
+    mova        m12, m7
+    punpcklwd   m15, m0
+    mova        m8, [r0 + 26 * mmsize]
+    punpckhwd   m11, m0
+    mova        m0, [r0 + 22 * mmsize]
+    mova        m13, m8
+    punpcklwd   m12, m0
+    punpckhwd   m7, m0
+    mova        m0, [r0 + 30 * mmsize]
+    mova        m6, [r0 + 8 * mmsize]
+    punpcklwd   m13, m0
+    punpckhwd   m8, m0
+    mova        m0, [r0 + 4 * mmsize]
+    mova        m2, m6
+    mova        m1, [r0 + 12 * mmsize]
+    mova        m4, m0
+    mova        m10, [r0 + 24 * mmsize]
+    punpcklwd   m4, m1
+    mova        m3, [r0 + 20 * mmsize]
+    punpckhwd   m0, m1
+    punpckhwd   m6, m10
+    mova        m1, [r0 + 28 * mmsize]
+    punpcklwd   m2, m10
+    mova        m5, m3
+    mova        m10, [r0 + 0 * mmsize]
+    punpckhwd   m3, m1
+    punpcklwd   m5, m1
+    mova        m1, m10
+    punpckhwd   m10, [r0 + 16 * mmsize]
+    punpcklwd   m1, [r0 + 16 * mmsize]
+    mova        [rsp + 12 * mmsize], m10
+    mova        [rsp + 11 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 0 * mmsize]
+    mova        m1, [sse2_idct16_0 + 1 * mmsize]
+    pmaddwd     m10, m14
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 7 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 3 * mmsize]
+    mova        m1, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m1, [rsp + 7 * mmsize]
+    mova        [rsp + 7 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 6 * mmsize], m1
+    mova        m10, [sse2_idct16_1 + 3 * mmsize]
+    mova        m1, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    paddd       m1, [rsp + 6 * mmsize]
+    mova        [rsp + 6 * mmsize], m1
+    mova        m1, [sse2_idct16_2 + 1 * mmsize]
+    mova        m10, [sse2_idct16_2 + 0 * mmsize]
+    pmaddwd     m1, m15
+    pmaddwd     m10, m14
+    paddd       m1, m10
+    mova        [rsp + 5 * mmsize], m1
+    mova        m10, [sse2_idct16_2 + 3 * mmsize]
+    mova        m1, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m1, [rsp + 5 * mmsize]
+    mova        [rsp + 5 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 4 * mmsize], m1
+    mova        m10, [sse2_idct16_3 + 3 * mmsize]
+    mova        m1, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_4 + 0 * mmsize]
+    paddd       m1, [rsp + 4 * mmsize]
+    mova        [rsp + 4 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_4 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 2 * mmsize], m1
+    mova        m10, [sse2_idct16_4 + 3 * mmsize]
+    mova        m1, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m1, [rsp + 2 * mmsize]
+    mova        [rsp + 2 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 1 * mmsize], m1
+    mova        m10, [sse2_idct16_5 + 3 * mmsize]
+    mova        m1, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m1, [rsp + 1 * mmsize]
+    mova        [rsp + 1 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 0 * mmsize], m1
+    mova        m10, [sse2_idct16_6 + 3 * mmsize]
+    mova        m1, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    paddd       m1, [rsp + 0 * mmsize]
+    mova        [rsp + 0 * mmsize], m1
+    pmaddwd     m14, [sse2_idct16_7 + 0 * mmsize]
+    pmaddwd     m15, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m15, m14
+    pmaddwd     m13, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m12, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m12, m13
+    paddd       m12, m15
+    mova        [rsp + 8 * mmsize], m12
+    mova        m1, [sse2_idct16_0 + 1 * mmsize]
+    mova        m14, [sse2_idct16_0 + 0 * mmsize]
+    pmaddwd     m1, m11
+    pmaddwd     m14, m9
+    paddd       m1, m14
+    mova        [rsp + 13 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 3 * mmsize]
+    mova        m1, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    mova        m15, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 13 * mmsize]
+    mova        [rsp + 13 * mmsize], m1
+    pmaddwd     m15, m9
+    mova        m1, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m15
+    mova        [rsp + 14 * mmsize], m1
+    mova        m10, [sse2_idct16_1 + 3 * mmsize]
+    mova        m1, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_2 + 0 * mmsize]
+    paddd       m1, [rsp + 14 * mmsize]
+    mova        [rsp + 14 * mmsize], m1
+    pmaddwd     m10, m9
+    mova        m1, [sse2_idct16_2 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m10
+    mova        [rsp + 15 * mmsize], m1
+    mova        m10, [sse2_idct16_2 + 3 * mmsize]
+    mova        m1, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    mova        m14, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 15 * mmsize]
+    mova        [rsp + 15 * mmsize], m1
+    pmaddwd     m14, m9
+    mova        m1, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m14
+    mova        [rsp + 16 * mmsize], m1
+    mova        m10, [sse2_idct16_3 + 3 * mmsize]
+    mova        m1, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    paddd       m1, m10
+    paddd       m1, [rsp + 16 * mmsize]
+    mova        [rsp + 16 * mmsize], m1
+    mova        m1, [sse2_idct16_4 + 1 * mmsize]
+    mova        m15, [sse2_idct16_4 + 0 * mmsize]
+    pmaddwd     m1, m11
+    pmaddwd     m15, m9
+    paddd       m1, m15
+    mova        [rsp + 17 * mmsize], m1
+    mova        m10, [sse2_idct16_4 + 3 * mmsize]
+    mova        m1, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m1, [rsp + 17 * mmsize]
+    mova        [rsp + 17 * mmsize], m1
+    pmaddwd     m10, m9
+    mova        m1, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m10
+    mova        [rsp + 18 * mmsize], m1
+    mova        m10, [sse2_idct16_5 + 3 * mmsize]
+    mova        m1, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m1, m7
+    mova        m14, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 18 * mmsize]
+    mova        [rsp + 18 * mmsize], m1
+    pmaddwd     m14, m9
+    pmaddwd     m9, [sse2_idct16_7 + 0 * mmsize]
+    mova        m1, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m14
+    mova        [rsp + 19 * mmsize], m1
+    pmaddwd     m11, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m11, m9
+    mova        m10, [sse2_idct16_6 + 3 * mmsize]
+    mova        m1, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m10, m8
+    pmaddwd     m8, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m1, m7
+    mova        m15, [tab_idct8_3 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 19 * mmsize]
+    pmaddwd     m7, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m7, m8
+    mova        [rsp + 19 * mmsize], m1
+    pmaddwd     m15, m4
+    paddd       m7, m11
+    mova        [rsp + 20 * mmsize], m7
+    mova        m1, [tab_idct8_3 + 1 * mmsize]
+    mova        m14, [tab_idct8_3 + 0 * mmsize]
+    pmaddwd     m1, m5
+    paddd       m15, m1
+    mova        m1, [tab_idct8_3 + 1 * mmsize]
+    pmaddwd     m14, m0
+    pmaddwd     m1, m3
+    mova        m13, [tab_idct8_3 + 2 * mmsize]
+    paddd       m14, m1
+    mova        m1, [tab_idct8_3 + 3 * mmsize]
+    pmaddwd     m13, m4
+    pmaddwd     m1, m5
+    mova        m12, [tab_idct8_3 + 2 * mmsize]
+    paddd       m13, m1
+    mova        m1, [tab_idct8_3 + 3 * mmsize]
+    pmaddwd     m12, m0
+    pmaddwd     m1, m3
+    mova        m7, [tab_idct8_3 + 4 * mmsize]
+    paddd       m12, m1
+    mova        m1, [tab_idct8_3 + 5 * mmsize]
+    pmaddwd     m7, m4
+    pmaddwd     m1, m5
+    paddd       m1, m7
+    mova        [rsp + 24 * mmsize], m1
+    pmaddwd     m4, [tab_idct8_3 + 6 * mmsize]
+    pmaddwd     m5, [tab_idct8_3 + 7 * mmsize]
+    paddd       m5, m4
+    mova        [rsp + 26 * mmsize], m5
+    mova        m9, [rsp + 11 * mmsize]
+    mova        m1, [tab_idct8_3 + 5 * mmsize]
+    pmaddwd     m9, [tab_dct4 + 0 * mmsize]
+    mova        m5, m9
+    mova        m8, [tab_idct8_3 + 4 * mmsize]
+    pmaddwd     m1, m3
+    pmaddwd     m3, [tab_idct8_3 + 7 * mmsize]
+    mova        m11, [rsp + 11 * mmsize]
+    pmaddwd     m8, m0
+    pmaddwd     m0, [tab_idct8_3 + 6 * mmsize]
+    paddd       m1, m8
+    paddd       m0, m3
+    mova        m8, [rsp + 12 * mmsize]
+    pmaddwd     m11, [tab_dct4 + 2 * mmsize]
+    mova        m7, m11
+    mova        m10, [rsp + 12 * mmsize]
+    pmaddwd     m8, [tab_dct4 + 0 * mmsize]
+    mova        [rsp + 25 * mmsize], m1
+    pmaddwd     m10, [tab_dct4 + 2 * mmsize]
+    mova        m4, [tab_dct4 + 1 * mmsize]
+    mova        m3, [tab_dct4 + 1 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m5, m4
+    pmaddwd     m2, [tab_dct4 + 3 * mmsize]
+    paddd       m7, m2
+    psubd       m9, m4
+    mova        m1, [tab_dct4 + 3 * mmsize]
+    pmaddwd     m3, m6
+    psubd       m11, m2
+    pmaddwd     m1, m6
+    mova        [rsp + 11 * mmsize], m5
+    mova        m6, m8
+    psubd       m8, m3
+    mova        m5, m10
+    psubd       m10, m1
+    paddd       m6, m3
+    mova        [rsp + 28 * mmsize], m7
+    paddd       m5, m1
+    mova        [rsp + 12 * mmsize], m6
+    paddd       m6, m14
+    mova        [rsp + 31 * mmsize], m5
+    mova        [rsp + 3 * mmsize], m8
+    paddd       m8, m0
+    mova        [rsp + 27 * mmsize], m8
+    mova        m7, [rsp + 11 * mmsize]
+    mova        m8, [rsp + 11 * mmsize]
+    paddd       m7, m15
+    psubd       m8, m15
+    mova        m15, m8
+    mova        m8, [rsp + 12 * mmsize]
+    mova        m4, [rsp + 31 * mmsize]
+    psubd       m8, m14
+    mova        [rsp + 33 * mmsize], m8
+    paddd       m4, m12
+    mova        m8, [rsp + 31 * mmsize]
+    mova        m5, [rsp + 28 * mmsize]
+    psubd       m8, m12
+    mova        m12, m8
+    mova        m14, [rsp + 28 * mmsize]
+    paddd       m5, m13
+    mova        m8, [rsp + 3 * mmsize]
+    psubd       m14, m13
+    mova        m13, m14
+    psubd       m8, m0
+    mova        m14, [rsp + 27 * mmsize]
+    mova        m0, [pd_64]
+    paddd       m14, m0
+    mova        [rsp + 27 * mmsize], m14
+    paddd       m7, m0
+    paddd       m6, m0
+    paddd       m5, m0
+    paddd       m4, m0
+    paddd       m8, m0
+    paddd       m13, m0
+    paddd       m12, m0
+    paddd       m15, m0
+    mova        m14, [rsp + 33 * mmsize]
+    paddd       m14, m0
+    mova        [rsp + 33 * mmsize], m14
+    mova        m14, [rsp + 7 * mmsize]
+    paddd       m14, m7
+    mova        [rsp + 11 * mmsize], m14
+    mova        m14, [rsp + 13 * mmsize]
+    paddd       m14, m6
+    mova        [rsp + 29 * mmsize], m14
+    mova        m14, [rsp + 6 * mmsize]
+    paddd       m14, m5
+    mova        [rsp + 12 * mmsize], m14
+    mova        m14, [rsp + 14 * mmsize]
+    mova        m3, [rsp + 24 * mmsize]
+    paddd       m14, m4
+    mova        [rsp + 21 * mmsize], m14
+    paddd       m3, m11
+    psubd       m11, [rsp + 24 * mmsize]
+    paddd       m3, m0
+    paddd       m11, m0
+    mova        m14, [rsp + 5 * mmsize]
+    mova        m2, [rsp + 25 * mmsize]
+    paddd       m14, m3
+    mova        [rsp + 24 * mmsize], m14
+    paddd       m2, m10
+    paddd       m2, m0
+    psubd       m10, [rsp + 25 * mmsize]
+    paddd       m10, m0
+    mova        m14, [rsp + 15 * mmsize]
+    mova        m1, [rsp + 26 * mmsize]
+    paddd       m14, m2
+    mova        [rsp + 23 * mmsize], m14
+    paddd       m1, m9
+    psubd       m9, [rsp + 26 * mmsize]
+    paddd       m1, m0
+    paddd       m9, m0
+    mova        m14, [rsp + 4 * mmsize]
+    paddd       m14, m1
+    mova        [rsp + 25 * mmsize], m14
+    psubd       m7, [rsp + 7 * mmsize]
+    psubd       m6, [rsp + 13 * mmsize]
+    psubd       m5, [rsp + 6 * mmsize]
+    psubd       m4, [rsp + 14 * mmsize]
+    mova        [rsp + 7 * mmsize], m6
+    psubd       m3, [rsp + 5 * mmsize]
+    psubd       m2, [rsp + 15 * mmsize]
+    psubd       m1, [rsp + 4 * mmsize]
+    psrad       m5, IDCT_SHIFT1
+    psrad       m7, IDCT_SHIFT1
+    mova        [rsp + 6 * mmsize], m4
+    psrad       m2, IDCT_SHIFT1
+    psrad       m1, IDCT_SHIFT1
+    psrad       m3, IDCT_SHIFT1
+    packssdw    m3, m2
+    mova        m14, [rsp + 27 * mmsize]
+    paddd       m14, [rsp + 16 * mmsize]
+    mova        [rsp + 3 * mmsize], m14
+    mova        m14, [rsp + 2 * mmsize]
+    paddd       m14, m9
+    mova        [rsp + 26 * mmsize], m14
+    psubd       m9, [rsp + 2 * mmsize]
+    psrad       m9, IDCT_SHIFT1
+    mova        m14, [rsp + 17 * mmsize]
+    paddd       m14, m8
+    mova        [rsp + 9 * mmsize], m14
+    psubd       m8, [rsp + 17 * mmsize]
+    psrad       m8, IDCT_SHIFT1
+    packssdw    m9, m8
+    mova        m14, [rsp + 1 * mmsize]
+    paddd       m14, m11
+    mova        [rsp + 28 * mmsize], m14
+    psubd       m11, [rsp + 1 * mmsize]
+    psrad       m11, IDCT_SHIFT1
+    mova        m14, [rsp + 18 * mmsize]
+    paddd       m14, m10
+    mova        [rsp + 10 * mmsize], m14
+    psubd       m10, [rsp + 18 * mmsize]
+    psrad       m10, IDCT_SHIFT1
+    packssdw    m11, m10
+    mova        m14, [rsp + 0 * mmsize]
+    paddd       m14, m13
+    mova        [rsp + 31 * mmsize], m14
+    psubd       m13, [rsp + 0 * mmsize]
+    psrad       m13, IDCT_SHIFT1
+    mova        m14, [rsp + 19 * mmsize]
+    paddd       m14, m12
+    mova        [rsp + 22 * mmsize], m14
+    psubd       m12, [rsp + 19 * mmsize]
+    psrad       m12, IDCT_SHIFT1
+    packssdw    m13, m12
+    mova        m14, [rsp + 8 * mmsize]
+    paddd       m14, m15
+    mova        [rsp + 32 * mmsize], m14
+    psubd       m15, [rsp + 8 * mmsize]
+    psrad       m15, IDCT_SHIFT1
+    mova        m14, [rsp + 20 * mmsize]
+    mova        m6, [rsp + 27 * mmsize]
+    paddd       m14, [rsp + 33 * mmsize]
+    mova        m4, [rsp + 11 * mmsize]
+    psubd       m6, [rsp + 16 * mmsize]
+    psrad       m6, IDCT_SHIFT1
+    packssdw    m1, m6
+    mova        [rsp + 30 * mmsize], m14
+    psrad       m4, IDCT_SHIFT1
+    mova        m14, [rsp + 33 * mmsize]
+    psubd       m14, [rsp + 20 * mmsize]
+    mova        [rsp + 11 * mmsize], m4
+    psrad       m14, IDCT_SHIFT1
+    packssdw    m15, m14
+    mova        m4, [rsp + 29 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 29 * mmsize], m4
+    mova        m4, [rsp + 12 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 12 * mmsize], m4
+    mova        m4, [rsp + 21 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 21 * mmsize], m4
+    mova        m4, [rsp + 24 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 24 * mmsize], m4
+    mova        m4, [rsp + 23 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 23 * mmsize], m4
+    mova        m4, [rsp + 25 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 25 * mmsize], m4
+    mova        m4, [rsp + 3 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 3 * mmsize], m4
+    mova        m4, [rsp + 26 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 26 * mmsize], m4
+    mova        m4, [rsp + 9 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 9 * mmsize], m4
+    mova        m4, [rsp + 28 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 28 * mmsize], m4
+    mova        m4, [rsp + 10 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 10 * mmsize], m4
+    mova        m4, [rsp + 31 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 31 * mmsize], m4
+    mova        m4, [rsp + 22 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 22 * mmsize], m4
+    mova        m4, [rsp + 32 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 32 * mmsize], m4
+    mova        m4, [rsp + 30 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 30 * mmsize], m4
+    mova        m4, [rsp + 6 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 6 * mmsize], m4
+    mova        m4, [rsp + 7 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 7 * mmsize], m4
+    packssdw    m5, [rsp + 6 * mmsize]
+    mova        [rsp + 41 * mmsize], m15
+    mova        [rsp + 42 * mmsize], m13
+    mova        [rsp + 43 * mmsize], m11
+    mova        [rsp + 44 * mmsize], m9
+    mova        [rsp + 45 * mmsize], m1
+    mova        [rsp + 46 * mmsize], m3
+    mova        [rsp + 47 * mmsize], m5
+    mova        m4, [rsp + 11 * mmsize]
+    packssdw    m7, [rsp + 7 * mmsize]
+    packssdw    m4, [rsp + 29 * mmsize]
+    mova        [rsp + 11 * mmsize], m4
+    mova        m4, [rsp + 12 * mmsize]
+    packssdw    m4, [rsp + 21 * mmsize]
+    mova        [rsp + 12 * mmsize], m4
+    mova        m4, [rsp + 24 * mmsize]
+    packssdw    m4, [rsp + 23 * mmsize]
+    mova        [rsp + 24 * mmsize], m4
+    mova        m4, [rsp + 25 * mmsize]
+    packssdw    m4, [rsp + 3 * mmsize]
+    mova        [rsp + 25 * mmsize], m4
+    mova        m4, [rsp + 26 * mmsize]
+    packssdw    m4, [rsp + 9 * mmsize]
+    mova        [rsp + 26 * mmsize], m4
+    mova        m4, [rsp + 28 * mmsize]
+    packssdw    m4, [rsp + 10 * mmsize]
+    mova        [rsp + 28 * mmsize], m4
+    mova        m4, [rsp + 31 * mmsize]
+    packssdw    m4, [rsp + 22 * mmsize]
+    mova        [rsp + 31 * mmsize], m4
+    mova        m4, [rsp + 32 * mmsize]
+    packssdw    m4, [rsp + 30 * mmsize]
+    mova        [rsp + 32 * mmsize], m4
+    mova        [rsp + 48 * mmsize], m7
+    mova        m7, [r0 + 3 * mmsize]
+    mova        m1, [r0 + 7 * mmsize]
+    mova        m14, m7
+    mova        m11, [r0 + 11 * mmsize]
+    punpckhwd   m7, m1
+    punpcklwd   m14, m1
+    mova        m3, [r0 + 19 * mmsize]
+    mova        m15, m11
+    mova        m1, [r0 + 15 * mmsize]
+    mova        m12, m3
+    punpcklwd   m15, m1
+    mova        m4, [r0 + 27 * mmsize]
+    punpckhwd   m11, m1
+    mova        m1, [r0 + 23 * mmsize]
+    mova        m13, m4
+    punpcklwd   m12, m1
+    punpckhwd   m3, m1
+    mova        m5, [r0 + 5 * mmsize]
+    mova        m1, [r0 + 31 * mmsize]
+    mova        m6, m5
+    punpcklwd   m13, m1
+    mova        m8, [r0 + 21 * mmsize]
+    punpckhwd   m4, m1
+    mova        m1, [r0 + 13 * mmsize]
+    mova        m9, m8
+    punpcklwd   m6, m1
+    punpckhwd   m5, m1
+    mova        m1, [r0 + 29 * mmsize]
+    punpcklwd   m9, m1
+    punpckhwd   m8, m1
+    mova        m1, [r0 + 9 * mmsize]
+    mova        m10, [r0 + 25 * mmsize]
+    mova        m2, m1
+    punpckhwd   m1, m10
+    punpcklwd   m2, m10
+    mova        m10, [r0 + 17 * mmsize]
+    mova        [rsp + 5 * mmsize], m10
+    mova        [rsp + 7 * mmsize], m1
+    mova        m10, [r0 + 1 * mmsize]
+    mova        m1, m10
+    punpckhwd   m10, [rsp + 5 * mmsize]
+    punpcklwd   m1, [rsp + 5 * mmsize]
+    mova        [rsp + 21 * mmsize], m10
+    mova        [rsp + 6 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 0 * mmsize]
+    mova        m1, [sse2_idct16_0 + 1 * mmsize]
+    pmaddwd     m10, m14
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 5 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 3 * mmsize]
+    mova        m1, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m1, [rsp + 5 * mmsize]
+    mova        [rsp + 5 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 4 * mmsize], m1
+    mova        m10, [sse2_idct16_1 + 3 * mmsize]
+    mova        m1, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    paddd       m1, [rsp + 4 * mmsize]
+    mova        [rsp + 4 * mmsize], m1
+    mova        m1, [sse2_idct16_2 + 1 * mmsize]
+    mova        m10, [sse2_idct16_2 + 0 * mmsize]
+    pmaddwd     m1, m15
+    pmaddwd     m10, m14
+    paddd       m1, m10
+    mova        [rsp + 2 * mmsize], m1
+    mova        m10, [sse2_idct16_2 + 3 * mmsize]
+    mova        m1, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m1, [rsp + 2 * mmsize]
+    mova        [rsp + 2 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 1 * mmsize], m1
+    mova        m10, [sse2_idct16_3 + 3 * mmsize]
+    mova        m1, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_4 + 0 * mmsize]
+    paddd       m1, [rsp + 1 * mmsize]
+    mova        [rsp + 1 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_4 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 0 * mmsize], m1
+    mova        m10, [sse2_idct16_4 + 3 * mmsize]
+    mova        m1, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m1, [rsp + 0 * mmsize]
+    mova        [rsp + 0 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 8 * mmsize], m1
+    mova        m10, [sse2_idct16_5 + 3 * mmsize]
+    mova        m1, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m1, [rsp + 8 * mmsize]
+    mova        [rsp + 8 * mmsize], m1
+    pmaddwd     m10, m14
+    mova        m1, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m1, m15
+    paddd       m1, m10
+    mova        [rsp + 13 * mmsize], m1
+    mova        m10, [sse2_idct16_6 + 3 * mmsize]
+    mova        m1, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m10, m13
+    pmaddwd     m1, m12
+    paddd       m1, m10
+    paddd       m1, [rsp + 13 * mmsize]
+    mova        [rsp + 13 * mmsize], m1
+    pmaddwd     m14, [sse2_idct16_7 + 0 * mmsize]
+    pmaddwd     m15, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m15, m14
+    pmaddwd     m13, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m12, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m12, m13
+    paddd       m12, m15
+    mova        [rsp + 14 * mmsize], m12
+    mova        m1, [sse2_idct16_0 + 1 * mmsize]
+    mova        m14, [sse2_idct16_0 + 0 * mmsize]
+    pmaddwd     m1, m11
+    pmaddwd     m14, m7
+    paddd       m1, m14
+    mova        [rsp + 15 * mmsize], m1
+    mova        m10, [sse2_idct16_0 + 3 * mmsize]
+    mova        m1, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    mova        m15, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 15 * mmsize]
+    mova        [rsp + 15 * mmsize], m1
+    pmaddwd     m15, m7
+    mova        m1, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m15
+    mova        [rsp + 16 * mmsize], m1
+    mova        m10, [sse2_idct16_1 + 3 * mmsize]
+    mova        m1, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_2 + 0 * mmsize]
+    paddd       m1, [rsp + 16 * mmsize]
+    mova        [rsp + 16 * mmsize], m1
+    pmaddwd     m10, m7
+    mova        m1, [sse2_idct16_2 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m10
+    mova        [rsp + 17 * mmsize], m1
+    mova        m10, [sse2_idct16_2 + 3 * mmsize]
+    mova        m1, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    mova        m14, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 17 * mmsize]
+    mova        [rsp + 17 * mmsize], m1
+    pmaddwd     m14, m7
+    mova        m1, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m14
+    mova        [rsp + 18 * mmsize], m1
+    mova        m10, [sse2_idct16_3 + 3 * mmsize]
+    mova        m1, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    paddd       m1, m10
+    paddd       m1, [rsp + 18 * mmsize]
+    mova        [rsp + 18 * mmsize], m1
+    mova        m1, [sse2_idct16_4 + 1 * mmsize]
+    mova        m15, [sse2_idct16_4 + 0 * mmsize]
+    pmaddwd     m1, m11
+    pmaddwd     m15, m7
+    paddd       m1, m15
+    mova        [rsp + 19 * mmsize], m1
+    mova        m10, [sse2_idct16_4 + 3 * mmsize]
+    mova        m1, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    paddd       m1, m10
+    mova        m10, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m1, [rsp + 19 * mmsize]
+    mova        [rsp + 19 * mmsize], m1
+    pmaddwd     m10, m7
+    mova        m1, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m10
+    mova        [rsp + 20 * mmsize], m1
+    mova        m10, [sse2_idct16_5 + 3 * mmsize]
+    mova        m1, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m1, m3
+    mova        m14, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 20 * mmsize]
+    mova        [rsp + 20 * mmsize], m1
+    pmaddwd     m14, m7
+    pmaddwd     m7, [sse2_idct16_7 + 0 * mmsize]
+    mova        m1, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m14
+    mova        [rsp + 27 * mmsize], m1
+    pmaddwd     m11, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m11, m7
+    mova        m10, [sse2_idct16_6 + 3 * mmsize]
+    mova        m1, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m10, m4
+    pmaddwd     m4, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m1, m3
+    mova        m15, [tab_idct8_3 + 0 * mmsize]
+    paddd       m1, m10
+    paddd       m1, [rsp + 27 * mmsize]
+    pmaddwd     m3, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m3, m4
+    mova        [rsp + 27 * mmsize], m1
+    pmaddwd     m15, m6
+    paddd       m3, m11
+    mova        [rsp + 29 * mmsize], m3
+    mova        m1, [tab_idct8_3 + 1 * mmsize]
+    mova        m14, [tab_idct8_3 + 0 * mmsize]
+    pmaddwd     m1, m9
+    paddd       m15, m1
+    mova        m1, [tab_idct8_3 + 1 * mmsize]
+    pmaddwd     m14, m5
+    pmaddwd     m1, m8
+    mova        m13, [tab_idct8_3 + 2 * mmsize]
+    paddd       m14, m1
+    mova        m1, [tab_idct8_3 + 3 * mmsize]
+    pmaddwd     m13, m6
+    pmaddwd     m1, m9
+    mova        m12, [tab_idct8_3 + 2 * mmsize]
+    paddd       m13, m1
+    mova        m1, [tab_idct8_3 + 3 * mmsize]
+    pmaddwd     m12, m5
+    pmaddwd     m1, m8
+    mova        m3, [tab_idct8_3 + 4 * mmsize]
+    paddd       m12, m1
+    mova        m1, [tab_idct8_3 + 5 * mmsize]
+    pmaddwd     m3, m6
+    pmaddwd     m1, m9
+    paddd       m1, m3
+    mova        [rsp + 23 * mmsize], m1
+    pmaddwd     m6, [tab_idct8_3 + 6 * mmsize]
+    pmaddwd     m9, [tab_idct8_3 + 7 * mmsize]
+    paddd       m9, m6
+    mova        [rsp + 3 * mmsize], m9
+    mova        m1, [tab_idct8_3 + 5 * mmsize]
+    mova        m9, [rsp + 6 * mmsize]
+    pmaddwd     m1, m8
+    pmaddwd     m8, [tab_idct8_3 + 7 * mmsize]
+    mova        m7, [tab_idct8_3 + 4 * mmsize]
+    pmaddwd     m9, [tab_dct4 + 0 * mmsize]
+    mova        m6, m9
+    pmaddwd     m7, m5
+    mova        m4, [tab_dct4 + 1 * mmsize]
+    pmaddwd     m5, [tab_idct8_3 + 6 * mmsize]
+    paddd       m5, m8
+    paddd       m7, m1
+    mova        m8, [rsp + 21 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m6, m4
+    pmaddwd     m2, [tab_dct4 + 3 * mmsize]
+    psubd       m9, m4
+    mova        m10, [rsp + 21 * mmsize]
+    pmaddwd     m8, [tab_dct4 + 0 * mmsize]
+    mova        m3, [rsp + 7 * mmsize]
+    pmaddwd     m10, [tab_dct4 + 2 * mmsize]
+    mova        m1, [rsp + 7 * mmsize]
+    pmaddwd     m3, [tab_dct4 + 1 * mmsize]
+    mova        m11, [rsp + 6 * mmsize]
+    pmaddwd     m1, [tab_dct4 + 3 * mmsize]
+    mova        [rsp + 21 * mmsize], m6
+    pmaddwd     m11, [tab_dct4 + 2 * mmsize]
+    mova        m6, m8
+    psubd       m8, m3
+    paddd       m6, m3
+    mova        [rsp + 9 * mmsize], m6
+    mova        m6, m11
+    psubd       m11, m2
+    mova        [rsp + 33 * mmsize], m8
+    paddd       m6, m2
+    mova        [rsp + 10 * mmsize], m6
+    mova        m6, m10
+    psubd       m10, m1
+    paddd       m6, m1
+    mova        [rsp + 22 * mmsize], m6
+    mova        m1, m6
+    mova        m6, m10
+    psubd       m10, m7
+    paddd       m10, m0
+    paddd       m1, m12
+    paddd       m1, m0
+    mova        m8, [rsp + 23 * mmsize]
+    paddd       m6, m7
+    paddd       m8, m11
+    mova        [rsp + 30 * mmsize], m8
+    psubd       m11, [rsp + 23 * mmsize]
+    paddd       m11, m0
+    mova        [rsp + 6 * mmsize], m6
+    mova        m8, [rsp + 33 * mmsize]
+    mova        m4, [rsp + 21 * mmsize]
+    paddd       m8, m5
+    mova        [rsp + 7 * mmsize], m8
+    paddd       m4, m15
+    paddd       m4, m0
+    mova        m8, [rsp + 21 * mmsize]
+    mova        m3, [rsp + 9 * mmsize]
+    psubd       m8, m15
+    mova        m15, m8
+    mova        m8, [rsp + 9 * mmsize]
+    paddd       m3, m14
+    paddd       m3, m0
+    paddd       m15, m0
+    mova        m2, [rsp + 10 * mmsize]
+    psubd       m8, m14
+    mova        m14, m8
+    mova        m8, [rsp + 10 * mmsize]
+    paddd       m2, m13
+    paddd       m2, m0
+    paddd       m14, m0
+    psubd       m8, m13
+    mova        m13, m8
+    mova        m8, [rsp + 22 * mmsize]
+    paddd       m13, m0
+    psubd       m8, m12
+    mova        m12, m8
+    mova        m8, [rsp + 33 * mmsize]
+    paddd       m12, m0
+    psubd       m8, m5
+    mova        m5, [rsp + 30 * mmsize]
+    paddd       m8, m0
+    mova        m7, [rsp + 6 * mmsize]
+    paddd       m5, m0
+    mova        m6, [rsp + 3 * mmsize]
+    paddd       m7, m0
+    mova        [rsp + 30 * mmsize], m5
+    paddd       m6, m9
+    psubd       m9, [rsp + 3 * mmsize]
+    paddd       m6, m0
+    paddd       m9, m0
+    mova        [rsp + 6 * mmsize], m7
+    mova        m5, [rsp + 7 * mmsize]
+    mova        m7, [rsp + 5 * mmsize]
+    paddd       m5, m0
+    mova        m0, [rsp + 15 * mmsize]
+    paddd       m7, m4
+    mova        [rsp + 7 * mmsize], m5
+    paddd       m0, m3
+    mova        [rsp + 21 * mmsize], m7
+    mova        [rsp + 33 * mmsize], m0
+    mova        m5, [rsp + 4 * mmsize]
+    mova        m7, [rsp + 16 * mmsize]
+    paddd       m5, m2
+    mova        m0, [rsp + 30 * mmsize]
+    paddd       m7, m1
+    mova        [rsp + 23 * mmsize], m5
+    paddd       m0, [rsp + 2 * mmsize]
+    mova        [rsp + 34 * mmsize], m7
+    mova        [rsp + 3 * mmsize], m0
+    psubd       m3, [rsp + 15 * mmsize]
+    psubd       m4, [rsp + 5 * mmsize]
+    psubd       m2, [rsp + 4 * mmsize]
+    psubd       m1, [rsp + 16 * mmsize]
+    psrad       m4, IDCT_SHIFT1
+    mova        [rsp + 15 * mmsize], m3
+    psrad       m2, IDCT_SHIFT1
+    psrad       m1, IDCT_SHIFT1
+    mova        m0, [rsp + 7 * mmsize]
+    paddd       m0, [rsp + 18 * mmsize]
+    mova        [rsp + 36 * mmsize], m0
+    mova        m0, [rsp + 8 * mmsize]
+    mova        m5, [rsp + 6 * mmsize]
+    paddd       m0, m11
+    mova        [rsp + 22 * mmsize], m0
+    paddd       m5, [rsp + 17 * mmsize]
+    mova        [rsp + 35 * mmsize], m5
+    mova        m0, [rsp + 27 * mmsize]
+    mova        m3, [rsp + 6 * mmsize]
+    paddd       m0, m12
+    mova        m7, [rsp + 1 * mmsize]
+    psubd       m3, [rsp + 17 * mmsize]
+    mova        m5, [rsp + 0 * mmsize]
+    paddd       m7, m6
+    psubd       m6, [rsp + 1 * mmsize]
+    psrad       m6, IDCT_SHIFT1
+    mova        [rsp + 39 * mmsize], m0
+    paddd       m5, m9
+    mova        [rsp + 9 * mmsize], m7
+    mova        [rsp + 10 * mmsize], m5
+    mova        [rsp + 6 * mmsize], m3
+    mova        m0, [rsp + 29 * mmsize]
+    mova        m7, [rsp + 19 * mmsize]
+    paddd       m0, m14
+    mova        m5, [rsp + 20 * mmsize]
+    paddd       m7, m8
+    mova        [rsp + 40 * mmsize], m0
+    paddd       m5, m10
+    mova        [rsp + 37 * mmsize], m7
+    mova        [rsp + 38 * mmsize], m5
+    mova        m0, [rsp + 30 * mmsize]
+    mova        m3, [rsp + 7 * mmsize]
+    psubd       m0, [rsp + 2 * mmsize]
+    psrad       m0, IDCT_SHIFT1
+    mova        m7, [rsp + 13 * mmsize]
+    psubd       m3, [rsp + 18 * mmsize]
+    mova        m5, [rsp + 14 * mmsize]
+    paddd       m7, m13
+    psrad       m7, IDCT_SHIFT1
+    mova        [rsp + 7 * mmsize], m3
+    paddd       m5, m15
+    psubd       m9, [rsp + 0 * mmsize]
+    psubd       m8, [rsp + 19 * mmsize]
+    psubd       m11, [rsp + 8 * mmsize]
+    psubd       m10, [rsp + 20 * mmsize]
+    psubd       m13, [rsp + 13 * mmsize]
+    psubd       m12, [rsp + 27 * mmsize]
+    psubd       m15, [rsp + 14 * mmsize]
+    psubd       m14, [rsp + 29 * mmsize]
+    psrad       m5, IDCT_SHIFT1
+    psrad       m14, IDCT_SHIFT1
+    mova        m3, [rsp + 21 * mmsize]
+    psrad       m12, IDCT_SHIFT1
+    psrad       m10, IDCT_SHIFT1
+    psrad       m8, IDCT_SHIFT1
+    psrad       m15, IDCT_SHIFT1
+    psrad       m13, IDCT_SHIFT1
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 21 * mmsize], m3
+    psrad       m11, IDCT_SHIFT1
+    packssdw    m15, m14
+    psrad       m9, IDCT_SHIFT1
+    packssdw    m13, m12
+    packssdw    m11, m10
+    mova        m10, m2
+    mova        m3, [rsp + 33 * mmsize]
+    packssdw    m9, m8
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 33 * mmsize], m3
+    packssdw    m10, m1
+    mova        m3, [rsp + 23 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 23 * mmsize], m3
+    mova        m3, [rsp + 34 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 34 * mmsize], m3
+    mova        m3, [rsp + 3 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 3 * mmsize], m3
+    mova        m3, [rsp + 35 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 35 * mmsize], m3
+    mova        m3, [rsp + 9 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 9 * mmsize], m3
+    mova        m3, [rsp + 36 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 36 * mmsize], m3
+    mova        m3, [rsp + 10 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 10 * mmsize], m3
+    mova        m3, [rsp + 37 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 37 * mmsize], m3
+    mova        m3, [rsp + 22 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 22 * mmsize], m3
+    mova        m3, [rsp + 38 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 38 * mmsize], m3
+    mova        m3, [rsp + 39 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 39 * mmsize], m3
+    packssdw    m7, [rsp + 39 * mmsize]
+    mova        [rsp + 2 * mmsize], m15
+    mova        [rsp + 1 * mmsize], m13
+    mova        [rsp + 5 * mmsize], m7
+    mova        [rsp + 0 * mmsize], m11
+    mova        m3, [rsp + 40 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 40 * mmsize], m3
+    mova        m3, [rsp + 7 * mmsize]
+    packssdw    m5, [rsp + 40 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 7 * mmsize], m3
+    mova        m3, [rsp + 6 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 6 * mmsize], m3
+    mova        [rsp + 4 * mmsize], m5
+    mova        m3, [rsp + 15 * mmsize]
+    psrad       m3, IDCT_SHIFT1
+    mova        [rsp + 15 * mmsize], m3
+    mova        m3, [rsp + 21 * mmsize]
+    packssdw    m3, [rsp + 33 * mmsize]
+    mova        [rsp + 21 * mmsize], m3
+    mova        m3, [rsp + 23 * mmsize]
+    packssdw    m3, [rsp + 34 * mmsize]
+    mova        [rsp + 23 * mmsize], m3
+    mova        m3, [rsp + 3 * mmsize]
+    packssdw    m3, [rsp + 35 * mmsize]
+    mova        [rsp + 3 * mmsize], m3
+    mova        m3, [rsp + 9 * mmsize]
+    packssdw    m3, [rsp + 36 * mmsize]
+    mova        [rsp + 9 * mmsize], m3
+    mova        m3, [rsp + 10 * mmsize]
+    packssdw    m3, [rsp + 37 * mmsize]
+    mova        [rsp + 10 * mmsize], m3
+    mova        m3, [rsp + 22 * mmsize]
+    packssdw    m3, [rsp + 38 * mmsize]
+    mova        [rsp + 22 * mmsize], m3
+    mova        [rsp + 8 * mmsize], m9
+    packssdw    m0, [rsp + 6 * mmsize]
+    mova        m1, [rsp + 24 * mmsize]
+    packssdw    m4, [rsp + 15 * mmsize]
+    mova        m7, [rsp + 26 * mmsize]
+    packssdw    m6, [rsp + 7 * mmsize]
+    mova        [rsp + 6 * mmsize], m0
+    punpckhwd   m1, [rsp + 25 * mmsize]
+    mova        [rsp + 13 * mmsize], m4
+    mova        [rsp + 7 * mmsize], m6
+    mova        m0, [rsp + 11 * mmsize]
+    punpckhwd   m7, [rsp + 28 * mmsize]
+    mova        m3, [rsp + 11 * mmsize]
+    punpckhwd   m0, [rsp + 12 * mmsize]
+    mova        m4, [rsp + 24 * mmsize]
+    punpcklwd   m3, [rsp + 12 * mmsize]
+    mova        m6, [rsp + 31 * mmsize]
+    punpcklwd   m4, [rsp + 25 * mmsize]
+    mova        m9, [rsp + 26 * mmsize]
+    mova        m2, m0
+    punpckhwd   m6, [rsp + 32 * mmsize]
+    mova        m8, [rsp + 31 * mmsize]
+    mova        m5, m3
+    punpcklwd   m9, [rsp + 28 * mmsize]
+    mova        m11, [rsp + 43 * mmsize]
+    punpcklwd   m8, [rsp + 32 * mmsize]
+    punpckldq   m2, m1
+    punpckhdq   m0, m1
+    mova        m1, m7
+    punpckhdq   m3, m4
+    punpckldq   m1, m6
+    mova        m14, m2
+    punpckldq   m5, m4
+    mova        m4, m9
+    punpckhdq   m7, m6
+    punpckhdq   m9, m8
+    punpckldq   m4, m8
+    mova        m8, m3
+    punpckhqdq  m2, m1
+    punpcklqdq  m8, m9
+    mova        m15, m0
+    punpckhqdq  m0, m7
+    mova        [rsp + 19 * mmsize], m2
+    punpcklqdq  m15, m7
+    mova        [rsp + 16 * mmsize], m8
+    mova        m6, m5
+    mova        [rsp + 11 * mmsize], m0
+    punpckhqdq  m5, m4
+    punpcklqdq  m14, m1
+    mova        [rsp + 20 * mmsize], m15
+    punpckhqdq  m3, m9
+    mova        [rsp + 15 * mmsize], m5
+    punpcklqdq  m6, m4
+    mova        [rsp + 17 * mmsize], m3
+    mova        [rsp + 14 * mmsize], m6
+    mova        [rsp + 18 * mmsize], m14
+    mova        m2, [rsp + 41 * mmsize]
+    punpckhwd   m11, [rsp + 44 * mmsize]
+    mova        m0, [rsp + 43 * mmsize]
+    punpcklwd   m2, [rsp + 42 * mmsize]
+    mova        m8, [rsp + 45 * mmsize]
+    punpcklwd   m0, [rsp + 44 * mmsize]
+    mova        m1, [rsp + 45 * mmsize]
+    punpcklwd   m8, [rsp + 46 * mmsize]
+    mova        m7, [rsp + 47 * mmsize]
+    mova        m4, m2
+    punpckhwd   m1, [rsp + 46 * mmsize]
+    mova        m15, [rsp + 41 * mmsize]
+    punpcklwd   m7, [rsp + 48 * mmsize]
+    mova        m5, [rsp + 47 * mmsize]
+    mova        m3, m8
+    punpckhwd   m15, [rsp + 42 * mmsize]
+    punpckhwd   m5, [rsp + 48 * mmsize]
+    punpckldq   m4, m0
+    punpckhdq   m2, m0
+    mova        m0, m1
+    punpckldq   m3, m7
+    punpckldq   m0, m5
+    mova        m6, m15
+    punpckhdq   m1, m5
+    mova        m5, m4
+    punpckhdq   m8, m7
+    punpckldq   m6, m11
+    punpckhdq   m15, m11
+    mova        m7, m2
+    punpcklqdq  m5, m3
+    punpckhqdq  m4, m3
+    punpckhqdq  m2, m8
+    mova        m14, m15
+    mova        [rsp + 33 * mmsize], m5
+    punpcklqdq  m7, m8
+    mova        m8, m6
+    punpcklqdq  m14, m1
+    mova        [rsp + 34 * mmsize], m4
+    punpcklqdq  m8, m0
+    mova        [rsp + 36 * mmsize], m2
+    punpckhqdq  m6, m0
+    punpckhqdq  m15, m1
+    mova        [rsp + 39 * mmsize], m14
+    mova        [rsp + 40 * mmsize], m15
+    mova        [rsp + 37 * mmsize], m8
+    mova        [rsp + 38 * mmsize], m6
+    mova        [rsp + 35 * mmsize], m7
+    mova        m7, m10
+    mova        m11, [rsp + 21 * mmsize]
+    punpcklwd   m7, [rsp + 13 * mmsize]
+    mova        m3, [rsp + 3 * mmsize]
+    punpcklwd   m11, [rsp + 23 * mmsize]
+    mova        m13, [rsp + 21 * mmsize]
+    punpcklwd   m3, [rsp + 9 * mmsize]
+    mova        m2, [rsp + 5 * mmsize]
+    punpckhwd   m13, [rsp + 23 * mmsize]
+    mova        m4, [rsp + 3 * mmsize]
+    mova        m14, m11
+    punpcklwd   m2, [rsp + 4 * mmsize]
+    mova        m1, [rsp + 10 * mmsize]
+    punpckhwd   m4, [rsp + 9 * mmsize]
+    mova        m0, [rsp + 10 * mmsize]
+    mova        m12, m13
+    punpcklwd   m1, [rsp + 22 * mmsize]
+    mova        m5, [rsp + 5 * mmsize]
+    punpckhwd   m0, [rsp + 22 * mmsize]
+    mova        m8, [rsp + 7 * mmsize]
+    punpckhwd   m5, [rsp + 4 * mmsize]
+    mova        m6, [rsp + 7 * mmsize]
+    punpckhdq   m11, m3
+    punpckldq   m14, m3
+    mova        m3, m0
+    punpckldq   m12, m4
+    punpckhdq   m13, m4
+    mova        m4, m1
+    punpckhdq   m1, m2
+    mova        m9, m11
+    punpckldq   m3, m5
+    punpckldq   m4, m2
+    punpckhqdq  m11, m1
+    mova        m15, m14
+    punpcklqdq  m9, m1
+    mova        m1, m12
+    punpckhdq   m0, m5
+    punpcklqdq  m15, m4
+    punpcklqdq  m1, m3
+    mova        m2, m13
+    punpckhqdq  m14, m4
+    mova        [rsp + 5 * mmsize], m15
+    punpcklqdq  m2, m0
+    mova        [rsp + 4 * mmsize], m1
+    punpckhqdq  m13, m0
+    mova        [rsp + 12 * mmsize], m2
+    mova        m2, m10
+    punpckhqdq  m12, m3
+    mova        m1, [rsp + 2 * mmsize]
+    punpcklwd   m8, [rsp + 6 * mmsize]
+    mova        m15, [rsp + 2 * mmsize]
+    punpcklwd   m1, [rsp + 1 * mmsize]
+    mova        m4, [rsp + 0 * mmsize]
+    punpckhwd   m15, [rsp + 1 * mmsize]
+    mova        m0, [rsp + 0 * mmsize]
+    punpcklwd   m4, [rsp + 8 * mmsize]
+    mova        m5, m1
+    punpckhwd   m0, [rsp + 8 * mmsize]
+    mova        m3, m15
+    punpckhwd   m6, [rsp + 6 * mmsize]
+    punpckhwd   m2, [rsp + 13 * mmsize]
+    punpckldq   m5, m4
+    punpckhdq   m1, m4
+    mova        m4, m8
+    punpckhdq   m15, m0
+    punpckldq   m3, m0
+    mova        m0, m6
+    punpckldq   m4, m7
+    punpckhdq   m8, m7
+    mova        m7, m5
+    punpckhdq   m6, m2
+    punpckldq   m0, m2
+    mova        m2, m15
+    punpcklqdq  m7, m4
+    punpcklqdq  m2, m6
+    mova        m10, m1
+    punpckhqdq  m1, m8
+    punpckhqdq  m5, m4
+    mova        [rsp + 49 * mmsize], m7
+    punpcklqdq  m10, m8
+    mova        [rsp + 52 * mmsize], m1
+    mova        m1, m3
+    mova        [rsp + 55 * mmsize], m2
+    punpckhqdq  m3, m0
+    mova        [rsp + 50 * mmsize], m5
+    punpcklqdq  m1, m0
+    mova        [rsp + 54 * mmsize], m3
+    mova        m8, m14
+    mova        [rsp + 53 * mmsize], m1
+    punpcklwd   m8, m11
+    punpckhwd   m14, m11
+    mova        m11, m12
+    mova        [rsp + 51 * mmsize], m10
+    punpckhqdq  m15, m6
+    mova        m6, m9
+    punpcklwd   m11, m13
+    punpckhwd   m12, m13
+    mova        m2, [rsp + 19 * mmsize]
+    mova        m0, [rsp + 11 * mmsize]
+    mova        m7, m2
+    mova        m5, [rsp + 15 * mmsize]
+    punpckhwd   m2, m0
+    punpcklwd   m7, m0
+    mova        m3, [rsp + 17 * mmsize]
+    mova        m4, m5
+    mova        m0, [rsp + 16 * mmsize]
+    punpcklwd   m4, m3
+    punpckhwd   m5, m3
+    mova        m1, [rsp + 20 * mmsize]
+    mova        m3, m0
+    mova        m10, [rsp + 12 * mmsize]
+    punpckhwd   m0, m1
+    punpcklwd   m3, m1
+    mova        m1, [rsp + 18 * mmsize]
+    punpcklwd   m6, m10
+    punpckhwd   m9, m10
+    mova        m13, m1
+    mova        m10, [rsp + 4 * mmsize]
+    punpcklwd   m13, m10
+    punpckhwd   m1, m10
+    mova        m10, [rsp + 14 * mmsize]
+    mova        [rsp + 56 * mmsize], m15
+    mova        m15, m10
+    punpckhwd   m10, [rsp + 5 * mmsize]
+    punpcklwd   m15, [rsp + 5 * mmsize]
+    mova        [rsp + 12 * mmsize], m10
+    mova        [rsp + 11 * mmsize], m15
+    mova        m10, [sse2_idct16_0 + 1 * mmsize]
+    mova        m15, [sse2_idct16_0 + 0 * mmsize]
+    pmaddwd     m10, m7
+    pmaddwd     m15, m4
+    paddd       m10, m15
+    mova        [rsp + 7 * mmsize], m10
+    mova        m15, [sse2_idct16_0 + 3 * mmsize]
+    mova        m10, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    mova        m15, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m10, [rsp + 7 * mmsize]
+    mova        [rsp + 7 * mmsize], m10
+    pmaddwd     m15, m4
+    mova        m10, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m10, m7
+    paddd       m10, m15
+    mova        [rsp + 6 * mmsize], m10
+    mova        m15, [sse2_idct16_1 + 3 * mmsize]
+    mova        m10, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    paddd       m10, [rsp + 6 * mmsize]
+    mova        [rsp + 6 * mmsize], m10
+    mova        m10, [sse2_idct16_2 + 1 * mmsize]
+    mova        m15, [sse2_idct16_2 + 0 * mmsize]
+    pmaddwd     m10, m7
+    pmaddwd     m15, m4
+    paddd       m10, m15
+    mova        [rsp + 5 * mmsize], m10
+    mova        m15, [sse2_idct16_2 + 3 * mmsize]
+    mova        m10, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    mova        m15, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m10, [rsp + 5 * mmsize]
+    mova        [rsp + 5 * mmsize], m10
+    pmaddwd     m15, m4
+    mova        m10, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m10, m7
+    paddd       m10, m15
+    mova        [rsp + 4 * mmsize], m10
+    mova        m15, [sse2_idct16_3 + 3 * mmsize]
+    mova        m10, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    mova        m15, [sse2_idct16_4 + 0 * mmsize]
+    paddd       m10, [rsp + 4 * mmsize]
+    mova        [rsp + 4 * mmsize], m10
+    pmaddwd     m15, m4
+    mova        m10, [sse2_idct16_4 + 1 * mmsize]
+    pmaddwd     m10, m7
+    paddd       m10, m15
+    mova        [rsp + 2 * mmsize], m10
+    mova        m15, [sse2_idct16_4 + 3 * mmsize]
+    mova        m10, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    mova        m15, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m10, [rsp + 2 * mmsize]
+    mova        [rsp + 2 * mmsize], m10
+    pmaddwd     m15, m4
+    mova        m10, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m10, m7
+    paddd       m10, m15
+    mova        [rsp + 1 * mmsize], m10
+    mova        m15, [sse2_idct16_5 + 3 * mmsize]
+    mova        m10, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    mova        m15, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m10, [rsp + 1 * mmsize]
+    mova        [rsp + 1 * mmsize], m10
+    pmaddwd     m15, m4
+    mova        m10, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m10, m7
+    paddd       m10, m15
+    mova        [rsp + 0 * mmsize], m10
+    mova        m15, [sse2_idct16_6 + 3 * mmsize]
+    mova        m10, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m15, m11
+    pmaddwd     m10, m8
+    paddd       m10, m15
+    paddd       m10, [rsp + 0 * mmsize]
+    mova        [rsp + 0 * mmsize], m10
+    pmaddwd     m4, [sse2_idct16_7 + 0 * mmsize]
+    pmaddwd     m11, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m7, [sse2_idct16_7 + 1 * mmsize]
+    pmaddwd     m8, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m7, m4
+    paddd       m8, m11
+    paddd       m8, m7
+    mova        [rsp + 8 * mmsize], m8
+    mova        m4, [sse2_idct16_0 + 1 * mmsize]
+    mova        m7, [sse2_idct16_0 + 0 * mmsize]
+    pmaddwd     m4, m2
+    pmaddwd     m7, m5
+    paddd       m4, m7
+    mova        [rsp + 13 * mmsize], m4
+    mova        m7, [sse2_idct16_0 + 3 * mmsize]
+    mova        m4, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    mova        m8, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m4, m7
+    paddd       m4, [rsp + 13 * mmsize]
+    mova        [rsp + 13 * mmsize], m4
+    pmaddwd     m8, m5
+    mova        m4, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m4, m8
+    mova        [rsp + 14 * mmsize], m4
+    mova        m7, [sse2_idct16_1 + 3 * mmsize]
+    mova        m4, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    mova        m10, [sse2_idct16_2 + 0 * mmsize]
+    paddd       m4, m7
+    paddd       m4, [rsp + 14 * mmsize]
+    mova        [rsp + 14 * mmsize], m4
+    pmaddwd     m10, m5
+    mova        m4, [sse2_idct16_2 + 1 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m4, m10
+    mova        [rsp + 15 * mmsize], m4
+    mova        m7, [sse2_idct16_2 + 3 * mmsize]
+    mova        m4, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    mova        m15, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m4, m7
+    paddd       m4, [rsp + 15 * mmsize]
+    mova        [rsp + 15 * mmsize], m4
+    pmaddwd     m15, m5
+    mova        m4, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m4, m15
+    mova        [rsp + 16 * mmsize], m4
+    mova        m7, [sse2_idct16_3 + 3 * mmsize]
+    mova        m4, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    paddd       m4, m7
+    paddd       m4, [rsp + 16 * mmsize]
+    mova        [rsp + 16 * mmsize], m4
+    mova        m4, [sse2_idct16_4 + 1 * mmsize]
+    mova        m7, [sse2_idct16_4 + 0 * mmsize]
+    pmaddwd     m4, m2
+    pmaddwd     m7, m5
+    paddd       m4, m7
+    mova        [rsp + 17 * mmsize], m4
+    mova        m7, [sse2_idct16_4 + 3 * mmsize]
+    mova        m4, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    mova        m8, [sse2_idct16_5 + 0 * mmsize]
+    paddd       m4, m7
+    paddd       m4, [rsp + 17 * mmsize]
+    mova        [rsp + 17 * mmsize], m4
+    pmaddwd     m8, m5
+    mova        m4, [sse2_idct16_5 + 1 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m4, m8
+    mova        [rsp + 18 * mmsize], m4
+    mova        m7, [sse2_idct16_5 + 3 * mmsize]
+    mova        m4, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m7, m12
+    pmaddwd     m4, m14
+    mova        m10, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m4, m7
+    paddd       m4, [rsp + 18 * mmsize]
+    mova        [rsp + 18 * mmsize], m4
+    pmaddwd     m10, m5
+    pmaddwd     m5, [sse2_idct16_7 + 0 * mmsize]
+    mova        m4, [sse2_idct16_6 + 1 * mmsize]
+    mova        m7, [sse2_idct16_6 + 3 * mmsize]
+    pmaddwd     m4, m2
+    paddd       m4, m10
+    pmaddwd     m2, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m2, m5
+    mova        [rsp + 19 * mmsize], m4
+    pmaddwd     m7, m12
+    pmaddwd     m12, [sse2_idct16_7 + 3 * mmsize]
+    mova        m4, [sse2_idct16_6 + 2 * mmsize]
+    mova        m15, [tab_idct8_3 + 0 * mmsize]
+    pmaddwd     m4, m14
+    pmaddwd     m14, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m14, m12
+    paddd       m14, m2
+    paddd       m4, m7
+    mova        m2, [tab_idct8_3 + 1 * mmsize]
+    pmaddwd     m15, m3
+    paddd       m4, [rsp + 19 * mmsize]
+    mova        [rsp + 20 * mmsize], m14
+    pmaddwd     m2, m6
+    paddd       m15, m2
+    mova        [rsp + 19 * mmsize], m4
+    mova        m2, [tab_idct8_3 + 1 * mmsize]
+    mova        m14, [tab_idct8_3 + 0 * mmsize]
+    pmaddwd     m2, m9
+    pmaddwd     m14, m0
+    mova        m4, [tab_idct8_3 + 2 * mmsize]
+    paddd       m14, m2
+    mova        m2, [tab_idct8_3 + 3 * mmsize]
+    pmaddwd     m4, m3
+    pmaddwd     m2, m6
+    paddd       m2, m4
+    mova        [rsp + 24 * mmsize], m2
+    mova        m2, [tab_idct8_3 + 3 * mmsize]
+    mova        m12, [tab_idct8_3 + 2 * mmsize]
+    pmaddwd     m2, m9
+    pmaddwd     m12, m0
+    mova        m5, [tab_idct8_3 + 4 * mmsize]
+    paddd       m12, m2
+    mova        m2, [tab_idct8_3 + 5 * mmsize]
+    pmaddwd     m5, m3
+    pmaddwd     m3, [tab_idct8_3 + 6 * mmsize]
+    pmaddwd     m2, m6
+    mova        m7, [tab_idct8_3 + 4 * mmsize]
+    paddd       m2, m5
+    pmaddwd     m6, [tab_idct8_3 + 7 * mmsize]
+    paddd       m6, m3
+    mova        [rsp + 25 * mmsize], m2
+    pmaddwd     m7, m0
+    pmaddwd     m0, [tab_idct8_3 + 6 * mmsize]
+    mova        [rsp + 28 * mmsize], m6
+    mova        m2, [tab_idct8_3 + 5 * mmsize]
+    mova        m8, [rsp + 12 * mmsize]
+    pmaddwd     m2, m9
+    pmaddwd     m9, [tab_idct8_3 + 7 * mmsize]
+    paddd       m0, m9
+    paddd       m2, m7
+    mova        m9, [rsp + 11 * mmsize]
+    pmaddwd     m8, [tab_dct4 + 0 * mmsize]
+    mova        m6, m8
+    mova        m10, [rsp + 12 * mmsize]
+    pmaddwd     m9, [tab_dct4 + 0 * mmsize]
+    mova        m5, m9
+    mova        m11, [rsp + 11 * mmsize]
+    pmaddwd     m10, [tab_dct4 + 2 * mmsize]
+    mova        m7, m10
+    mova        m4, [tab_dct4 + 1 * mmsize]
+    pmaddwd     m11, [tab_dct4 + 2 * mmsize]
+    mova        m3, [tab_dct4 + 1 * mmsize]
+    pmaddwd     m4, m13
+    paddd       m5, m4
+    psubd       m9, m4
+    pmaddwd     m3, m1
+    mova        [rsp + 26 * mmsize], m2
+    pmaddwd     m1, [tab_dct4 + 3 * mmsize]
+    paddd       m6, m3
+    paddd       m7, m1
+    psubd       m8, m3
+    psubd       m10, m1
+    mova        m2, [tab_dct4 + 3 * mmsize]
+    mova        [rsp + 11 * mmsize], m5
+    pmaddwd     m2, m13
+    mova        m13, m11
+    psubd       m11, m2
+    mova        [rsp + 12 * mmsize], m6
+    paddd       m6, m14
+    paddd       m13, m2
+    mova        [rsp + 31 * mmsize], m7
+    mova        m7, m5
+    mova        [rsp + 3 * mmsize], m8
+    paddd       m8, m0
+    paddd       m7, m15
+    mova        [rsp + 27 * mmsize], m8
+    mova        m8, [rsp + 11 * mmsize]
+    psubd       m8, m15
+    mova        m15, m8
+    mova        m8, [rsp + 12 * mmsize]
+    mova        m4, [rsp + 31 * mmsize]
+    psubd       m8, m14
+    mova        m14, [rsp + 31 * mmsize]
+    paddd       m4, m12
+    mova        [rsp + 41 * mmsize], m8
+    psubd       m14, m12
+    mova        m12, m14
+    mova        m8, [rsp + 3 * mmsize]
+    mova        m14, [rsp + 27 * mmsize]
+    psubd       m8, m0
+    mova        m0, [IDCT_ADD]
+    paddd       m14, m0
+    mova        [rsp + 27 * mmsize], m14
+    paddd       m7, m0
+    paddd       m6, m0
+    paddd       m4, m0
+    paddd       m8, m0
+    paddd       m12, m0
+    paddd       m15, m0
+    mova        m14, [rsp + 41 * mmsize]
+    paddd       m14, m0
+    mova        [rsp + 41 * mmsize], m14
+    mova        m14, [rsp + 7 * mmsize]
+    paddd       m14, m7
+    mova        [rsp + 11 * mmsize], m14
+    mova        m14, [rsp + 13 * mmsize]
+    mova        m5, [rsp + 24 * mmsize]
+    paddd       m14, m6
+    mova        [rsp + 29 * mmsize], m14
+    paddd       m5, m13
+    paddd       m5, m0
+    psubd       m13, [rsp + 24 * mmsize]
+    paddd       m13, m0
+    mova        m14, [rsp + 6 * mmsize]
+    paddd       m14, m5
+    mova        [rsp + 12 * mmsize], m14
+    mova        m14, [rsp + 14 * mmsize]
+    mova        m3, [rsp + 25 * mmsize]
+    paddd       m14, m4
+    mova        [rsp + 21 * mmsize], m14
+    paddd       m3, m11
+    paddd       m3, m0
+    psubd       m11, [rsp + 25 * mmsize]
+    paddd       m11, m0
+    mova        m14, [rsp + 5 * mmsize]
+    mova        m2, [rsp + 26 * mmsize]
+    paddd       m14, m3
+    mova        m1, [rsp + 28 * mmsize]
+    paddd       m2, m10
+    psubd       m10, [rsp + 26 * mmsize]
+    paddd       m2, m0
+    paddd       m10, m0
+    mova        [rsp + 24 * mmsize], m14
+    paddd       m1, m9
+    psubd       m9, [rsp + 28 * mmsize]
+    paddd       m1, m0
+    paddd       m9, m0
+    mova        m14, [rsp + 15 * mmsize]
+    paddd       m14, m2
+    mova        [rsp + 23 * mmsize], m14
+    psubd       m7, [rsp + 7 * mmsize]
+    psubd       m6, [rsp + 13 * mmsize]
+    psubd       m5, [rsp + 6 * mmsize]
+    psubd       m4, [rsp + 14 * mmsize]
+    mova        [rsp + 7 * mmsize], m6
+    psubd       m3, [rsp + 5 * mmsize]
+    psubd       m2, [rsp + 15 * mmsize]
+    psrad       m5, IDCT_SHIFT2
+    psrad       m7, IDCT_SHIFT2
+    psrad       m2, IDCT_SHIFT2
+    mova        [rsp + 6 * mmsize], m4
+    psrad       m3, IDCT_SHIFT2
+    packssdw    m3, m2
+    mova        m14, [rsp + 4 * mmsize]
+    paddd       m14, m1
+    mova        [rsp + 25 * mmsize], m14
+    psubd       m1, [rsp + 4 * mmsize]
+    psrad       m1, IDCT_SHIFT2
+    mova        m14, [rsp + 27 * mmsize]
+    paddd       m14, [rsp + 16 * mmsize]
+    mova        [rsp + 3 * mmsize], m14
+    mova        m14, [rsp + 2 * mmsize]
+    paddd       m14, m9
+    mova        [rsp + 26 * mmsize], m14
+    psubd       m9, [rsp + 2 * mmsize]
+    psrad       m9, IDCT_SHIFT2
+    mova        m14, [rsp + 17 * mmsize]
+    paddd       m14, m8
+    mova        [rsp + 9 * mmsize], m14
+    psubd       m8, [rsp + 17 * mmsize]
+    psrad       m8, IDCT_SHIFT2
+    packssdw    m9, m8
+    mova        m14, [rsp + 1 * mmsize]
+    paddd       m14, m11
+    mova        [rsp + 28 * mmsize], m14
+    psubd       m11, [rsp + 1 * mmsize]
+    psrad       m11, IDCT_SHIFT2
+    mova        m14, [rsp + 18 * mmsize]
+    paddd       m14, m10
+    mova        [rsp + 10 * mmsize], m14
+    psubd       m10, [rsp + 18 * mmsize]
+    psrad       m10, IDCT_SHIFT2
+    packssdw    m11, m10
+    mova        m14, [rsp + 0 * mmsize]
+    paddd       m14, m13
+    mova        [rsp + 31 * mmsize], m14
+    psubd       m13, [rsp + 0 * mmsize]
+    psrad       m13, IDCT_SHIFT2
+    mova        m14, [rsp + 19 * mmsize]
+    paddd       m14, m12
+    mova        [rsp + 22 * mmsize], m14
+    psubd       m12, [rsp + 19 * mmsize]
+    psrad       m12, IDCT_SHIFT2
+    packssdw    m13, m12
+    mova        m14, [rsp + 8 * mmsize]
+    paddd       m14, m15
+    mova        [rsp + 32 * mmsize], m14
+    psubd       m15, [rsp + 8 * mmsize]
+    psrad       m15, IDCT_SHIFT2
+    mova        m14, [rsp + 20 * mmsize]
+    mova        m6, [rsp + 27 * mmsize]
+    paddd       m14, [rsp + 41 * mmsize]
+    mova        m4, [rsp + 11 * mmsize]
+    psubd       m6, [rsp + 16 * mmsize]
+    psrad       m6, IDCT_SHIFT2
+    packssdw    m1, m6
+    mova        [rsp + 30 * mmsize], m14
+    psrad       m4, IDCT_SHIFT2
+    mova        m14, [rsp + 41 * mmsize]
+    psubd       m14, [rsp + 20 * mmsize]
+    mova        [rsp + 11 * mmsize], m4
+    psrad       m14, IDCT_SHIFT2
+    packssdw    m15, m14
+    mova        m4, [rsp + 29 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 29 * mmsize], m4
+    mova        m4, [rsp + 12 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 12 * mmsize], m4
+    mova        m4, [rsp + 21 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 21 * mmsize], m4
+    mova        m4, [rsp + 24 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 24 * mmsize], m4
+    mova        m4, [rsp + 23 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 23 * mmsize], m4
+    mova        m4, [rsp + 25 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 25 * mmsize], m4
+    mova        m4, [rsp + 3 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 3 * mmsize], m4
+    mova        m4, [rsp + 26 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 26 * mmsize], m4
+    mova        m4, [rsp + 9 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 9 * mmsize], m4
+    mova        m4, [rsp + 28 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 28 * mmsize], m4
+    mova        m4, [rsp + 10 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 10 * mmsize], m4
+    mova        m4, [rsp + 31 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 31 * mmsize], m4
+    mova        m4, [rsp + 22 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 22 * mmsize], m4
+    mova        m4, [rsp + 32 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 32 * mmsize], m4
+    mova        m4, [rsp + 30 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 30 * mmsize], m4
+    mova        m4, [rsp + 6 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 6 * mmsize], m4
+    mova        m4, [rsp + 7 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 7 * mmsize], m4
+    packssdw    m5, [rsp + 6 * mmsize]
+    mova        [rsp + 41 * mmsize], m15
+    mova        [rsp + 42 * mmsize], m13
+    mova        [rsp + 43 * mmsize], m11
+    mova        [rsp + 44 * mmsize], m9
+    mova        [rsp + 45 * mmsize], m1
+    mova        [rsp + 46 * mmsize], m3
+    mova        [rsp + 47 * mmsize], m5
+    mova        m4, [rsp + 11 * mmsize]
+    packssdw    m7, [rsp + 7 * mmsize]
+    packssdw    m4, [rsp + 29 * mmsize]
+    mova        [rsp + 11 * mmsize], m4
+    mova        m4, [rsp + 12 * mmsize]
+    packssdw    m4, [rsp + 21 * mmsize]
+    mova        [rsp + 12 * mmsize], m4
+    mova        m4, [rsp + 24 * mmsize]
+    packssdw    m4, [rsp + 23 * mmsize]
+    mova        [rsp + 24 * mmsize], m4
+    mova        m4, [rsp + 25 * mmsize]
+    packssdw    m4, [rsp + 3 * mmsize]
+    mova        [rsp + 25 * mmsize], m4
+    mova        m4, [rsp + 26 * mmsize]
+    packssdw    m4, [rsp + 9 * mmsize]
+    mova        [rsp + 26 * mmsize], m4
+    mova        m4, [rsp + 28 * mmsize]
+    packssdw    m4, [rsp + 10 * mmsize]
+    mova        [rsp + 28 * mmsize], m4
+    mova        m4, [rsp + 31 * mmsize]
+    packssdw    m4, [rsp + 22 * mmsize]
+    mova        [rsp + 31 * mmsize], m4
+    mova        m4, [rsp + 32 * mmsize]
+    packssdw    m4, [rsp + 30 * mmsize]
+    mova        [rsp + 32 * mmsize], m4
+    mova        [rsp + 48 * mmsize], m7
+    mova        m4, [rsp + 34 * mmsize]
+    mova        m2, [rsp + 36 * mmsize]
+    mova        m9, m4
+    punpckhwd   m4, m2
+    mova        m1, [rsp + 52 * mmsize]
+    punpcklwd   m9, m2
+    mova        m2, [rsp + 50 * mmsize]
+    mova        m7, m2
+    mova        m5, [rsp + 35 * mmsize]
+    punpckhwd   m2, m1
+    punpcklwd   m7, m1
+    mova        m1, [rsp + 39 * mmsize]
+    mova        m10, m5
+    punpckhwd   m5, m1
+    punpcklwd   m10, m1
+    mova        m1, [rsp + 55 * mmsize]
+    mova        [rsp + 6 * mmsize], m5
+    mova        [rsp + 7 * mmsize], m10
+    mova        m5, [rsp + 51 * mmsize]
+    mova        m6, [rsp + 38 * mmsize]
+    mova        m14, m5
+    punpckhwd   m5, m1
+    mova        m15, [rsp + 40 * mmsize]
+    mova        m11, m6
+    punpcklwd   m14, m1
+    mova        m3, [rsp + 54 * mmsize]
+    punpcklwd   m11, m15
+    punpckhwd   m6, m15
+    mova        m1, [rsp + 37 * mmsize]
+    mova        m8, m3
+    mova        m15, [rsp + 56 * mmsize]
+    mova        [rsp + 4 * mmsize], m5
+    punpcklwd   m8, m15
+    punpckhwd   m3, m15
+    mova        m15, m1
+    mova        [rsp + 5 * mmsize], m14
+    mova        m5, [rsp + 53 * mmsize]
+    punpckhwd   m1, m5
+    mova        m10, [rsp + 33 * mmsize]
+    punpcklwd   m15, m5
+    mova        [rsp + 9 * mmsize], m1
+    mova        m5, m10
+    mova        [rsp + 3 * mmsize], m15
+    mova        m1, [rsp + 49 * mmsize]
+    punpckhwd   m10, m1
+    punpcklwd   m5, m1
+    mova        m1, [sse2_idct16_0 + 1 * mmsize]
+    mova        [rsp + 22 * mmsize], m10
+    pmaddwd     m1, m11
+    mova        [rsp + 10 * mmsize], m5
+    mova        m10, [sse2_idct16_0 + 0 * mmsize]
+    pmaddwd     m10, m9
+    paddd       m1, m10
+    mova        [rsp + 2 * mmsize], m1
+    mova        m10, m9
+    mova        m5, [sse2_idct16_0 + 3 * mmsize]
+    mova        m1, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m5, m8
+    pmaddwd     m1, m7
+    mova        m14, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m1, m5
+    paddd       m1, [rsp + 2 * mmsize]
+    mova        [rsp + 2 * mmsize], m1
+    pmaddwd     m14, m9
+    mova        m1, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m14
+    mova        [rsp + 1 * mmsize], m1
+    mova        m14, m11
+    mova        m5, [sse2_idct16_1 + 3 * mmsize]
+    mova        m1, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m5, m8
+    pmaddwd     m1, m7
+    mova        m15, [sse2_idct16_2 + 0 * mmsize]
+    paddd       m1, m5
+    paddd       m1, [rsp + 1 * mmsize]
+    mova        [rsp + 1 * mmsize], m1
+    pmaddwd     m15, m9
+    mova        m1, [sse2_idct16_2 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m15
+    mova        [rsp + 0 * mmsize], m1
+    mova        m15, m9
+    mova        m5, [sse2_idct16_2 + 3 * mmsize]
+    mova        m1, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m5, m8
+    pmaddwd     m1, m7
+    paddd       m1, m5
+    mova        m5, [sse2_idct16_3 + 0 * mmsize]
+    paddd       m1, [rsp + 0 * mmsize]
+    mova        [rsp + 0 * mmsize], m1
+    pmaddwd     m5, m9
+    mova        m1, [sse2_idct16_3 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m5
+    mova        [rsp + 8 * mmsize], m1
+    mova        m5, [sse2_idct16_3 + 3 * mmsize]
+    mova        m1, [sse2_idct16_3 + 2 * mmsize]
+    pmaddwd     m5, m8
+    mova        m13, [sse2_idct16_4 + 0 * mmsize]
+    pmaddwd     m1, m7
+    paddd       m1, m5
+    paddd       m1, [rsp + 8 * mmsize]
+    mova        m5, m8
+    mova        [rsp + 8 * mmsize], m1
+    pmaddwd     m10, m13
+    pmaddwd     m13, m4
+    mova        m1, [sse2_idct16_4 + 1 * mmsize]
+    pmaddwd     m1, m11
+    paddd       m1, m10
+    mova        [rsp + 13 * mmsize], m1
+    mova        m1, m7
+    mova        m12, [sse2_idct16_4 + 3 * mmsize]
+    mova        m10, [sse2_idct16_4 + 2 * mmsize]
+    pmaddwd     m5, m12
+    pmaddwd     m12, m3
+    pmaddwd     m1, m10
+    paddd       m1, m5
+    mova        m5, [sse2_idct16_5 + 1 * mmsize]
+    paddd       m1, [rsp + 13 * mmsize]
+    pmaddwd     m10, m2
+    paddd       m10, m12
+    mova        [rsp + 13 * mmsize], m1
+    pmaddwd     m14, m5
+    pmaddwd     m5, m6
+    mova        m1, [sse2_idct16_5 + 0 * mmsize]
+    pmaddwd     m15, m1
+    paddd       m14, m15
+    mova        [rsp + 14 * mmsize], m14
+    pmaddwd     m1, m4
+    paddd       m5, m1
+    mova        m15, [sse2_idct16_5 + 3 * mmsize]
+    mova        m14, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m15, m8
+    pmaddwd     m14, m7
+    paddd       m14, m15
+    mova        m15, [sse2_idct16_6 + 0 * mmsize]
+    paddd       m14, [rsp + 14 * mmsize]
+    mova        [rsp + 14 * mmsize], m14
+    pmaddwd     m15, m9
+    mova        m14, [sse2_idct16_6 + 1 * mmsize]
+    pmaddwd     m14, m11
+    paddd       m14, m15
+    mova        [rsp + 15 * mmsize], m14
+    pmaddwd     m9, [sse2_idct16_7 + 0 * mmsize]
+    pmaddwd     m11, [sse2_idct16_7 + 1 * mmsize]
+    paddd       m11, m9
+    mova        m15, [sse2_idct16_6 + 3 * mmsize]
+    mova        m14, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m15, m8
+    pmaddwd     m8, [sse2_idct16_7 + 3 * mmsize]
+    pmaddwd     m14, m7
+    pmaddwd     m7, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m7, m8
+    mova        m8, [sse2_idct16_0 + 0 * mmsize]
+    paddd       m7, m11
+    paddd       m14, m15
+    paddd       m14, [rsp + 15 * mmsize]
+    mova        [rsp + 16 * mmsize], m7
+    pmaddwd     m8, m4
+    mova        [rsp + 15 * mmsize], m14
+    mova        m7, [sse2_idct16_0 + 1 * mmsize]
+    pmaddwd     m7, m6
+    paddd       m7, m8
+    mova        [rsp + 17 * mmsize], m7
+    mova        m8, [sse2_idct16_0 + 3 * mmsize]
+    mova        m7, [sse2_idct16_0 + 2 * mmsize]
+    pmaddwd     m8, m3
+    pmaddwd     m7, m2
+    mova        m14, [sse2_idct16_1 + 0 * mmsize]
+    paddd       m7, m8
+    paddd       m7, [rsp + 17 * mmsize]
+    mova        [rsp + 17 * mmsize], m7
+    pmaddwd     m14, m4
+    mova        m7, [sse2_idct16_1 + 1 * mmsize]
+    pmaddwd     m7, m6
+    paddd       m7, m14
+    mova        [rsp + 18 * mmsize], m7
+    mova        m8, [sse2_idct16_1 + 3 * mmsize]
+    mova        m7, [sse2_idct16_1 + 2 * mmsize]
+    pmaddwd     m8, m3
+    pmaddwd     m7, m2
+    mova        m15, [sse2_idct16_2 + 0 * mmsize]
+    paddd       m7, m8
+    paddd       m7, [rsp + 18 * mmsize]
+    mova        [rsp + 18 * mmsize], m7
+    pmaddwd     m15, m4
+    mova        m7, [sse2_idct16_2 + 1 * mmsize]
+    pmaddwd     m7, m6
+    paddd       m7, m15
+    mova        [rsp + 19 * mmsize], m7
+    mova        m8, [sse2_idct16_2 + 3 * mmsize]
+    mova        m7, [sse2_idct16_2 + 2 * mmsize]
+    pmaddwd     m8, m3
+    pmaddwd     m7, m2
+    paddd       m7, m8
+    paddd       m7, [rsp + 19 * mmsize]
+    mova        [rsp + 19 * mmsize], m7
+    mova        [rsp + 29 * mmsize], m5
+    mova        m7, [sse2_idct16_3 + 1 * mmsize]
+    mova        m8, [sse2_idct16_3 + 0 * mmsize]
+    pmaddwd     m7, m6
+    pmaddwd     m8, m4
+    paddd       m7, m8
+    mova        m8, [sse2_idct16_3 + 2 * mmsize]
+    mova        [rsp + 20 * mmsize], m7
+    pmaddwd     m8, m2
+    mova        m7, [sse2_idct16_3 + 3 * mmsize]
+    mova        m5, [sse2_idct16_5 + 3 * mmsize]
+    pmaddwd     m7, m3
+    paddd       m8, m7
+    paddd       m8, [rsp + 20 * mmsize]
+    mova        m7, [sse2_idct16_4 + 1 * mmsize]
+    pmaddwd     m5, m3
+    mova        m1, [sse2_idct16_5 + 2 * mmsize]
+    pmaddwd     m7, m6
+    paddd       m7, m13
+    paddd       m10, m7
+    pmaddwd     m1, m2
+    mova        [rsp + 27 * mmsize], m10
+    paddd       m1, m5
+    paddd       m1, [rsp + 29 * mmsize]
+    mova        [rsp + 29 * mmsize], m1
+    mova        [rsp + 20 * mmsize], m8
+    mova        m1, [sse2_idct16_6 + 1 * mmsize]
+    mova        m10, [sse2_idct16_6 + 0 * mmsize]
+    pmaddwd     m1, m6
+    pmaddwd     m6, [sse2_idct16_7 + 1 * mmsize]
+    pmaddwd     m10, m4
+    paddd       m1, m10
+    mova        [rsp + 21 * mmsize], m1
+    pmaddwd     m4, [sse2_idct16_7 + 0 * mmsize]
+    paddd       m6, m4
+    mova        m5, [sse2_idct16_6 + 3 * mmsize]
+    mova        m1, [sse2_idct16_6 + 2 * mmsize]
+    pmaddwd     m5, m3
+    pmaddwd     m3, [sse2_idct16_7 + 3 * mmsize]
+    mova        m15, [rsp + 7 * mmsize]
+    pmaddwd     m1, m2
+    paddd       m1, m5
+    paddd       m1, [rsp + 21 * mmsize]
+    pmaddwd     m2, [sse2_idct16_7 + 2 * mmsize]
+    paddd       m2, m3
+    mova        [rsp + 21 * mmsize], m1
+    pmaddwd     m15, [tab_idct8_3 + 0 * mmsize]
+    paddd       m2, m6
+    mova        [rsp + 23 * mmsize], m2
+    mova        m1, [rsp + 5 * mmsize]
+    mova        m14, [rsp + 6 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 1 * mmsize]
+    paddd       m15, m1
+    mova        m1, [rsp + 4 * mmsize]
+    pmaddwd     m14, [tab_idct8_3 + 0 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 1 * mmsize]
+    mova        m13, [rsp + 7 * mmsize]
+    paddd       m14, m1
+    mova        m1, [rsp + 5 * mmsize]
+    pmaddwd     m13, [tab_idct8_3 + 2 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 3 * mmsize]
+    mova        m12, [rsp + 6 * mmsize]
+    paddd       m13, m1
+    mova        m1, [rsp + 4 * mmsize]
+    pmaddwd     m12, [tab_idct8_3 + 2 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 3 * mmsize]
+    mova        m2, [rsp + 7 * mmsize]
+    paddd       m12, m1
+    mova        m1, [rsp + 5 * mmsize]
+    pmaddwd     m2, [tab_idct8_3 + 4 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 5 * mmsize]
+    paddd       m1, m2
+    mova        [rsp + 30 * mmsize], m1
+    mova        m1, [rsp + 4 * mmsize]
+    mova        m7, [rsp + 6 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 5 * mmsize]
+    mova        m3, [rsp + 7 * mmsize]
+    pmaddwd     m7, [tab_idct8_3 + 4 * mmsize]
+    paddd       m7, m1
+    mova        m1, [rsp + 5 * mmsize]
+    pmaddwd     m3, [tab_idct8_3 + 6 * mmsize]
+    mova        m5, [rsp + 6 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 7 * mmsize]
+    paddd       m1, m3
+    mova        m9, [rsp + 10 * mmsize]
+    pmaddwd     m5, [tab_idct8_3 + 6 * mmsize]
+    mova        [rsp + 7 * mmsize], m1
+    pmaddwd     m9, [tab_dct4 + 0 * mmsize]
+    mova        m6, m9
+    mova        m1, [rsp + 4 * mmsize]
+    mova        m4, [rsp + 3 * mmsize]
+    pmaddwd     m1, [tab_idct8_3 + 7 * mmsize]
+    paddd       m5, m1
+    mova        m3, [rsp + 9 * mmsize]
+    pmaddwd     m4, [tab_dct4 + 1 * mmsize]
+    paddd       m6, m4
+    psubd       m9, m4
+    mova        m2, [rsp + 3 * mmsize]
+    pmaddwd     m3, [tab_dct4 + 1 * mmsize]
+    mova        m1, [rsp + 9 * mmsize]
+    pmaddwd     m2, [tab_dct4 + 3 * mmsize]
+    mova        m8, [rsp + 22 * mmsize]
+    pmaddwd     m1, [tab_dct4 + 3 * mmsize]
+    mova        m11, [rsp + 10 * mmsize]
+    pmaddwd     m8, [tab_dct4 + 0 * mmsize]
+    mova        m10, [rsp + 22 * mmsize]
+    pmaddwd     m11, [tab_dct4 + 2 * mmsize]
+    pmaddwd     m10, [tab_dct4 + 2 * mmsize]
+    mova        [rsp + 4 * mmsize], m6
+    mova        m6, m8
+    psubd       m8, m3
+    mova        [rsp + 22 * mmsize], m8
+    paddd       m6, m3
+    mova        [rsp + 3 * mmsize], m6
+    mova        m6, m11
+    psubd       m11, m2
+    paddd       m6, m2
+    mova        [rsp + 9 * mmsize], m6
+    mova        m6, m10
+    psubd       m10, m1
+    paddd       m6, m1
+    mova        [rsp + 10 * mmsize], m6
+    mova        m1, m6
+    mova        m6, m10
+    psubd       m10, m7
+    paddd       m10, m0
+    paddd       m1, m12
+    paddd       m1, m0
+    mova        m8, [rsp + 30 * mmsize]
+    paddd       m6, m7
+    paddd       m8, m11
+    mova        [rsp + 33 * mmsize], m8
+    psubd       m11, [rsp + 30 * mmsize]
+    paddd       m11, m0
+    mova        [rsp + 5 * mmsize], m6
+    mova        m8, [rsp + 22 * mmsize]
+    mova        m4, [rsp + 4 * mmsize]
+    paddd       m8, m5
+    mova        [rsp + 6 * mmsize], m8
+    paddd       m4, m15
+    paddd       m4, m0
+    mova        m8, [rsp + 4 * mmsize]
+    mova        m3, [rsp + 3 * mmsize]
+    psubd       m8, m15
+    mova        m15, m8
+    mova        m8, [rsp + 3 * mmsize]
+    paddd       m3, m14
+    paddd       m3, m0
+    paddd       m15, m0
+    mova        m2, [rsp + 9 * mmsize]
+    psubd       m8, m14
+    mova        m14, m8
+    mova        m8, [rsp + 9 * mmsize]
+    paddd       m2, m13
+    paddd       m2, m0
+    paddd       m14, m0
+    psubd       m8, m13
+    mova        m13, m8
+    mova        m8, [rsp + 10 * mmsize]
+    paddd       m13, m0
+    psubd       m8, m12
+    mova        m12, m8
+    mova        m8, [rsp + 22 * mmsize]
+    paddd       m12, m0
+    mova        m7, [rsp + 5 * mmsize]
+    psubd       m8, m5
+    paddd       m8, m0
+    mova        m5, [rsp + 33 * mmsize]
+    paddd       m7, m0
+    mova        m6, [rsp + 7 * mmsize]
+    paddd       m5, m0
+    mova        [rsp + 5 * mmsize], m7
+    paddd       m6, m9
+    psubd       m9, [rsp + 7 * mmsize]
+    paddd       m6, m0
+    paddd       m9, m0
+    mova        [rsp + 33 * mmsize], m5
+    mova        m7, [rsp + 2 * mmsize]
+    mova        m5, [rsp + 6 * mmsize]
+    paddd       m7, m4
+    paddd       m5, m0
+    mova        [rsp + 7 * mmsize], m7
+    mova        [rsp + 6 * mmsize], m5
+    mova        m0, [rsp + 17 * mmsize]
+    mova        m5, [rsp + 1 * mmsize]
+    paddd       m0, m3
+    mova        m7, [rsp + 18 * mmsize]
+    paddd       m5, m2
+    mova        [rsp + 30 * mmsize], m0
+    paddd       m7, m1
+    mova        [rsp + 4 * mmsize], m5
+    mova        [rsp + 34 * mmsize], m7
+    psubd       m3, [rsp + 17 * mmsize]
+    psubd       m4, [rsp + 2 * mmsize]
+    psubd       m2, [rsp + 1 * mmsize]
+    psubd       m1, [rsp + 18 * mmsize]
+    psrad       m4, IDCT_SHIFT2
+    mova        [rsp + 17 * mmsize], m3
+    psrad       m2, IDCT_SHIFT2
+    psrad       m1, IDCT_SHIFT2
+    mova        m0, [rsp + 33 * mmsize]
+    paddd       m0, [rsp + 0 * mmsize]
+    mova        [rsp + 3 * mmsize], m0
+    mova        m0, [rsp + 6 * mmsize]
+    paddd       m0, [rsp + 20 * mmsize]
+    mova        [rsp + 36 * mmsize], m0
+    mova        m0, [rsp + 14 * mmsize]
+    mova        m5, [rsp + 5 * mmsize]
+    paddd       m0, m11
+    mova        [rsp + 22 * mmsize], m0
+    paddd       m5, [rsp + 19 * mmsize]
+    mova        [rsp + 35 * mmsize], m5
+    mova        m0, [rsp + 21 * mmsize]
+    mova        m7, [rsp + 8 * mmsize]
+    paddd       m0, m12
+    mova        m5, [rsp + 13 * mmsize]
+    paddd       m7, m6
+    mova        [rsp + 39 * mmsize], m0
+    paddd       m5, m9
+    mova        [rsp + 9 * mmsize], m7
+    mova        [rsp + 10 * mmsize], m5
+    mova        m0, [rsp + 23 * mmsize]
+    mova        m7, [rsp + 27 * mmsize]
+    paddd       m0, m14
+    mova        m5, [rsp + 29 * mmsize]
+    paddd       m7, m8
+    mova        [rsp + 40 * mmsize], m0
+    paddd       m5, m10
+    mova        [rsp + 37 * mmsize], m7
+    mova        [rsp + 38 * mmsize], m5
+    mova        m0, [rsp + 33 * mmsize]
+    mova        m3, [rsp + 5 * mmsize]
+    psubd       m0, [rsp + 0 * mmsize]
+    psrad       m0, IDCT_SHIFT2
+    mova        m7, [rsp + 15 * mmsize]
+    psubd       m3, [rsp + 19 * mmsize]
+    mova        m5, [rsp + 16 * mmsize]
+    paddd       m7, m13
+    psrad       m7, IDCT_SHIFT2
+    mova        [rsp + 5 * mmsize], m3
+    paddd       m5, m15
+    psubd       m6, [rsp + 8 * mmsize]
+    psubd       m9, [rsp + 13 * mmsize]
+    psubd       m8, [rsp + 27 * mmsize]
+    psubd       m11, [rsp + 14 * mmsize]
+    psubd       m10, [rsp + 29 * mmsize]
+    psubd       m13, [rsp + 15 * mmsize]
+    psubd       m12, [rsp + 21 * mmsize]
+    psubd       m15, [rsp + 16 * mmsize]
+    psubd       m14, [rsp + 23 * mmsize]
+    psrad       m5, IDCT_SHIFT2
+    mova        m3, [rsp + 6 * mmsize]
+    psrad       m12, IDCT_SHIFT2
+    psrad       m13, IDCT_SHIFT2
+    packssdw    m13, m12
+    psrad       m11, IDCT_SHIFT2
+    psrad       m8, IDCT_SHIFT2
+    psubd       m3, [rsp + 20 * mmsize]
+    mova        [rsp + 6 * mmsize], m3
+    psrad       m6, IDCT_SHIFT2
+    psrad       m9, IDCT_SHIFT2
+    mova        m12, m6
+    psrad       m10, IDCT_SHIFT2
+    packssdw    m9, m8
+    psrad       m14, IDCT_SHIFT2
+    psrad       m15, IDCT_SHIFT2
+    packssdw    m15, m14
+    mova        m3, [rsp + 7 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 7 * mmsize], m3
+    mova        m14, m15
+    mova        m3, [rsp + 30 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 30 * mmsize], m3
+    mova        m3, [rsp + 4 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 4 * mmsize], m3
+    mova        m3, [rsp + 34 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 34 * mmsize], m3
+    mova        m3, [rsp + 3 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 3 * mmsize], m3
+    mova        m3, [rsp + 35 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 35 * mmsize], m3
+    mova        m3, [rsp + 9 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 9 * mmsize], m3
+    mova        m3, [rsp + 36 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 36 * mmsize], m3
+    mova        m3, [rsp + 10 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 10 * mmsize], m3
+    mova        m3, [rsp + 37 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 37 * mmsize], m3
+    mova        m3, [rsp + 22 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 22 * mmsize], m3
+    mova        m3, [rsp + 38 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 38 * mmsize], m3
+    mova        m3, [rsp + 39 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 39 * mmsize], m3
+    mova        m3, [rsp + 40 * mmsize]
+    packssdw    m7, [rsp + 39 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 40 * mmsize], m3
+    mova        m3, [rsp + 6 * mmsize]
+    packssdw    m5, [rsp + 40 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 6 * mmsize], m3
+    mova        [rsp + 2 * mmsize], m7
+    mova        m3, [rsp + 5 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 5 * mmsize], m3
+    mova        m3, [rsp + 17 * mmsize]
+    psrad       m3, IDCT_SHIFT2
+    mova        [rsp + 17 * mmsize], m3
+    mova        m3, [rsp + 7 * mmsize]
+    packssdw    m3, [rsp + 30 * mmsize]
+    mova        [rsp + 7 * mmsize], m3
+    mova        m3, [rsp + 4 * mmsize]
+    packssdw    m3, [rsp + 34 * mmsize]
+    mova        [rsp + 4 * mmsize], m3
+    mova        m3, [rsp + 3 * mmsize]
+    packssdw    m3, [rsp + 35 * mmsize]
+    mova        [rsp + 3 * mmsize], m3
+    mova        m3, [rsp + 9 * mmsize]
+    packssdw    m3, [rsp + 36 * mmsize]
+    mova        [rsp + 9 * mmsize], m3
+    mova        m3, [rsp + 10 * mmsize]
+    packssdw    m3, [rsp + 37 * mmsize]
+    mova        [rsp + 10 * mmsize], m3
+    mova        m3, [rsp + 22 * mmsize]
+    packssdw    m3, [rsp + 38 * mmsize]
+    mova        [rsp + 22 * mmsize], m3
+    mova        [rsp + 1 * mmsize], m5
+    mova        [rsp + 0 * mmsize], m13
+    mova        m13, m11
+    mova        [rsp + 8 * mmsize], m9
+    packssdw    m13, m10
+    mova        m10, m2
+    packssdw    m0, [rsp + 5 * mmsize]
+    mova        m3, [rsp + 11 * mmsize]
+    packssdw    m4, [rsp + 17 * mmsize]
+    mova        m9, [rsp + 26 * mmsize]
+    packssdw    m12, [rsp + 6 * mmsize]
+    mova        [rsp + 6 * mmsize], m0
+    punpcklwd   m3, [rsp + 12 * mmsize]
+    mova        [rsp + 5 * mmsize], m4
+    packssdw    m10, m1
+    mova        m0, [rsp + 11 * mmsize]
+    punpcklwd   m9, [rsp + 28 * mmsize]
+    mova        m5, m3
+    mova        m4, [rsp + 24 * mmsize]
+    punpckhwd   m0, [rsp + 12 * mmsize]
+    mova        m1, [rsp + 24 * mmsize]
+    punpcklwd   m4, [rsp + 25 * mmsize]
+    mova        m7, [rsp + 26 * mmsize]
+    punpckhwd   m1, [rsp + 25 * mmsize]
+    mova        m8, [rsp + 31 * mmsize]
+    mova        m2, m0
+    punpckhwd   m7, [rsp + 28 * mmsize]
+    mova        m6, [rsp + 31 * mmsize]
+    punpcklwd   m8, [rsp + 32 * mmsize]
+    mova        m15, [rsp + 41 * mmsize]
+    punpckhwd   m6, [rsp + 32 * mmsize]
+    mova        m11, [rsp + 43 * mmsize]
+    lea         r2, [r2 + r2]
+    lea         r4, [r2 + r2]
+    lea         r3, [r4 + r2]
+    lea         r4, [r4 + r3]
+    lea         r0, [r4 + r2 * 2]
+    punpckldq   m5, m4
+    punpckhdq   m3, m4
+    mova        m4, m9
+    punpckldq   m2, m1
+    punpckhdq   m0, m1
+    mova        m1, m7
+    punpckldq   m4, m8
+    punpckldq   m1, m6
+    punpckhdq   m7, m6
+    mova        m6, m5
+    punpckhdq   m9, m8
+    punpcklqdq  m6, m4
+    mova        m8, m2
+    punpckhqdq  m5, m4
+    mova        m4, m3
+    punpcklqdq  m8, m1
+    punpckhqdq  m3, m9
+    punpcklqdq  m4, m9
+    punpckhqdq  m2, m1
+    mova        m1, m0
+    punpckhqdq  m0, m7
+    punpcklqdq  m1, m7
+    mova        m7, [rsp + 47 * mmsize]
+    punpckhwd   m15, [rsp + 42 * mmsize]
+    mova        [r1], m6
+    punpckhwd   m11, [rsp + 44 * mmsize]
+    mova        [r1 + r2], m5
+    mova        [r1 + r2 * 2], m4
+    mova        [r1 + r3], m3
+    mova        [r1 + r2 * 4], m8
+    mova        [r1 + r4], m2
+    mova        m2, m15
+    mova        [r1 + r3 * 2], m1
+    punpckldq   m2, m11
+    mova        [r1 + r0], m0
+    punpckhdq   m15, m11
+    mova        m3, [rsp + 41 * mmsize]
+    punpcklwd   m7, [rsp + 48 * mmsize]
+    mova        m0, [rsp + 43 * mmsize]
+    punpcklwd   m3, [rsp + 42 * mmsize]
+    mova        m8, [rsp + 45 * mmsize]
+    punpcklwd   m0, [rsp + 44 * mmsize]
+    mova        m1, [rsp + 45 * mmsize]
+    punpcklwd   m8, [rsp + 46 * mmsize]
+    mova        m5, [rsp + 47 * mmsize]
+    mova        m6, m3
+    punpckhwd   m1, [rsp + 46 * mmsize]
+    punpckhwd   m5, [rsp + 48 * mmsize]
+    mova        m4, m8
+    punpckldq   m6, m0
+    punpckhdq   m3, m0
+    mova        m0, m1
+    punpckldq   m4, m7
+    punpckldq   m0, m5
+    punpckhdq   m8, m7
+    mova        m7, m2
+    punpckhdq   m1, m5
+    mova        m5, m6
+    punpcklqdq  m7, m0
+    punpckhqdq  m6, m4
+    punpcklqdq  m5, m4
+    mova        m4, m3
+    punpckhqdq  m2, m0
+    mova        m0, m15
+    punpcklqdq  m4, m8
+    punpckhqdq  m3, m8
+    punpcklqdq  m0, m1
+    mova        [r1 + 16], m5
+    punpckhqdq  m15, m1
+    mova        [r1 + r2 + 16], m6
+    mova        [r1 + r2 * 2 + 16], m4
+    mova        [r1 + r3 + 16], m3
+    mova        [r1 + r2 * 4 + 16], m7
+    mova        [r1 + r4 + 16], m2
+    mova        [r1 + r3 * 2 + 16], m0
+    mova        [r1 + r0 + 16], m15
+    mova        m1, [rsp + 7 * mmsize]
+    mova        m0, [rsp + 7 * mmsize]
+    punpcklwd   m1, [rsp + 4 * mmsize]
+    mova        m2, [rsp + 3 * mmsize]
+    punpckhwd   m0, [rsp + 4 * mmsize]
+    mova        m5, [rsp + 3 * mmsize]
+    punpcklwd   m2, [rsp + 9 * mmsize]
+    mova        m3, [rsp + 10 * mmsize]
+    mova        m9, m1
+    punpckhwd   m5, [rsp + 9 * mmsize]
+    mova        m4, [rsp + 2 * mmsize]
+    mova        m7, m0
+    punpcklwd   m3, [rsp + 22 * mmsize]
+    mova        m6, [rsp + 10 * mmsize]
+    punpcklwd   m4, [rsp + 1 * mmsize]
+    mova        m8, [rsp + 2 * mmsize]
+    punpckhwd   m6, [rsp + 22 * mmsize]
+    punpckldq   m9, m2
+    punpckldq   m7, m5
+    punpckhdq   m0, m5
+    mova        m5, m3
+    punpckhwd   m8, [rsp + 1 * mmsize]
+    lea         r5, [r2 + r2 * 8]
+    lea         r6, [r2 + r4 * 2]
+    lea         r7, [r2 + r3 * 4]
+    lea         r8, [r2 + r0 * 2]
+    punpckldq   m5, m4
+    punpckhdq   m1, m2
+    mova        m2, m6
+    punpckhdq   m3, m4
+    mova        m4, m9
+    punpckhqdq  m9, m5
+    punpckldq   m2, m8
+    punpcklqdq  m4, m5
+    mova        m5, m1
+    punpckhqdq  m1, m3
+    punpcklqdq  m5, m3
+    mova        m3, m7
+    punpckhdq   m6, m8
+    punpcklqdq  m3, m2
+    mova        m8, m10
+    punpckhqdq  m7, m2
+    mova        m2, m0
+    punpckhqdq  m0, m6
+    mova        [r1 + r2 * 8], m4
+    punpcklqdq  m2, m6
+    mova        m4, m14
+    mova        [r1 + r5], m9
+    punpcklwd   m4, [rsp + 0 * mmsize]
+    mova        [r1 + r4 * 2], m5
+    mova        [r1 + r6], m1
+    mova        [r1 + r3 * 4], m3
+    mova        m3, m12
+    mova        [r1 + r7], m7
+    mova        m7, m4
+    mova        [r1 + r0 * 2], m2
+    mova        [r1 + r8], m0
+    mova        m0, m13
+    punpckhwd   m14, [rsp + 0 * mmsize]
+    punpcklwd   m0, [rsp + 8 * mmsize]
+    punpckhwd   m13, [rsp + 8 * mmsize]
+    mova        m1, m14
+    punpcklwd   m3, [rsp + 6 * mmsize]
+    punpckhwd   m12, [rsp + 6 * mmsize]
+    punpcklwd   m8, [rsp + 5 * mmsize]
+    mova        m5, m3
+    punpckhwd   m10, [rsp + 5 * mmsize]
+    punpckldq   m7, m0
+    punpckhdq   m4, m0
+    mova        m0, m12
+    punpckldq   m1, m13
+    punpckldq   m5, m8
+    mova        m6, m7
+    punpckldq   m0, m10
+    punpckhdq   m14, m13
+    mova        m2, m1
+    punpckhdq   m3, m8
+    punpckhdq   m12, m10
+    punpcklqdq  m6, m5
+    punpckhqdq  m7, m5
+    mova        m5, m4
+    punpcklqdq  m2, m0
+    punpckhqdq  m1, m0
+    mova        m0, m14
+    punpcklqdq  m5, m3
+    punpckhqdq  m4, m3
+    punpcklqdq  m0, m12
+    punpckhqdq  m14, m12
+    mova        [r1 + r2 * 8 + 16], m6
+    mova        [r1 + r5 + 16], m7
+    mova        [r1 + r4 * 2 + 16], m5
+    mova        [r1 + r6 + 16], m4
+    mova        [r1 + r3 * 4 + 16], m2
+    mova        [r1 + r7 + 16], m1
+    mova        [r1 + r0 * 2 + 16], m0
+    mova        [r1 + r8 + 16], m14
+    RET
+
+%undef IDCT_SHIFT1
+%undef IDCT_SHIFT2
+%undef IDCT_ADD
+%endif
+
+;-------------------------------------------------------
 ; void idct8(const int16_t* src, int16_t* dst, intptr_t dstStride)
 ;-------------------------------------------------------
 INIT_XMM ssse3
diff -r f9a54da18713 -r 592f6cd42f7f source/common/x86/dct8.h
--- a/source/common/x86/dct8.h	Thu Jan 15 11:49:26 2015 +0530
+++ b/source/common/x86/dct8.h	Fri Jan 16 11:08:49 2015 -0800
@@ -37,6 +37,7 @@
 void x265_idct8_sse2(const int16_t* src, int16_t* dst, intptr_t dstStride);
 void x265_idct8_ssse3(const int16_t* src, int16_t* dst, intptr_t dstStride);
 void x265_idct8_avx2(const int16_t* src, int16_t* dst, intptr_t dstStride);
+void x265_idct16_sse2(const int16_t* src, int16_t* dst, intptr_t dstStride);
 void x265_idct16_avx2(const int16_t* src, int16_t* dst, intptr_t dstStride);
 void x265_idct32_avx2(const int16_t* src, int16_t* dst, intptr_t dstStride);
 



More information about the x265-devel mailing list