annotate i386/simple_idct_mmx.c @ 209:c0d8ecae7ac5 libavcodec

(commit by michael) faster simple idct in MMX
author arpi_esp
date Thu, 17 Jan 2002 20:00:41 +0000
parents bd77d3cbb233
children e80ad397d30e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1 /*
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
2 Copyright (C) 2001-2002 Michael Niedermayer (michaelni@gmx.at)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
3
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
6 the Free Software Foundation; either version 2 of the License, or
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
7 (at your option) any later version.
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
8
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
12 GNU General Public License for more details.
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
13
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
15 along with this program; if not, write to the Free Software
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
17 */
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
18
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
19 #include <inttypes.h>
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
20 #include "../dsputil.h"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
21
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
22 #define C0 23170 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
23 #define C1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
24 #define C2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
25 #define C3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
26 #define C4 16384 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
27 #define C5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
28 #define C6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
29 #define C7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
30
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
31 #define ROW_SHIFT 11
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
32 #define COL_SHIFT 20 // 6
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
33
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
34 static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
35 static uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
36 static int16_t __attribute__((aligned(8))) temp[64];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
37 static int16_t __attribute__((aligned(8))) coeffs[]= {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
38 1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
39 // 1<<(COL_SHIFT-1), 0, 1<<(COL_SHIFT-1), 0,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
40 // 0, 1<<(COL_SHIFT-1-16), 0, 1<<(COL_SHIFT-1-16),
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
41 1<<(ROW_SHIFT-1), 1, 1<<(ROW_SHIFT-1), 0,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
42 // the 1 = ((1<<(COL_SHIFT-1))/C4)<<ROW_SHIFT :)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
43 // 0, 0, 0, 0,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
44 // 0, 0, 0, 0,
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
45
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
46 C4, C4, C4, C4,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
47 C4, -C4, C4, -C4,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
48
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
49 C2, C6, C2, C6,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
50 C6, -C2, C6, -C2,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
51
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
52 C1, C3, C1, C3,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
53 C5, C7, C5, C7,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
54
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
55 C3, -C7, C3, -C7,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
56 -C1, -C5, -C1, -C5,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
57
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
58 C5, -C1, C5, -C1,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
59 C7, C3, C7, C3,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
60
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
61 C7, -C5, C7, -C5,
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
62 C3, -C1, C3, -C1
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
63 };
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
64
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
65 static void unused_var_killer(){
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
66 int a= wm1010 + d40000;
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
67 temp[0]=a;
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
68 }
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
69
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
70 #if 0
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
71 static void inline idctCol (int16_t * col, int16_t *input)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
72 {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
73 #undef C0
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
74 #undef C1
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
75 #undef C2
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
76 #undef C3
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
77 #undef C4
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
78 #undef C5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
79 #undef C6
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
80 #undef C7
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
81 int a0, a1, a2, a3, b0, b1, b2, b3;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
82 const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
83 const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
84 const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
85 const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
86 const int C4 = 16384; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
87 const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
88 const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
89 const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
90 /*
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
91 if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | col[8*7])) {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
92 col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] =
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
93 col[8*5] = col[8*6] = col[8*7] = col[8*0]<<3;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
94 return;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
95 }*/
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
96
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
97 col[8*0] = input[8*0 + 0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
98 col[8*1] = input[8*2 + 0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
99 col[8*2] = input[8*0 + 1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
100 col[8*3] = input[8*2 + 1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
101 col[8*4] = input[8*4 + 0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
102 col[8*5] = input[8*6 + 0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
103 col[8*6] = input[8*4 + 1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
104 col[8*7] = input[8*6 + 1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
105
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
106 a0 = C4*col[8*0] + C2*col[8*2] + C4*col[8*4] + C6*col[8*6] + (1<<(COL_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
107 a1 = C4*col[8*0] + C6*col[8*2] - C4*col[8*4] - C2*col[8*6] + (1<<(COL_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
108 a2 = C4*col[8*0] - C6*col[8*2] - C4*col[8*4] + C2*col[8*6] + (1<<(COL_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
109 a3 = C4*col[8*0] - C2*col[8*2] + C4*col[8*4] - C6*col[8*6] + (1<<(COL_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
110
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
111 b0 = C1*col[8*1] + C3*col[8*3] + C5*col[8*5] + C7*col[8*7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
112 b1 = C3*col[8*1] - C7*col[8*3] - C1*col[8*5] - C5*col[8*7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
113 b2 = C5*col[8*1] - C1*col[8*3] + C7*col[8*5] + C3*col[8*7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
114 b3 = C7*col[8*1] - C5*col[8*3] + C3*col[8*5] - C1*col[8*7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
115
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
116 col[8*0] = (a0 + b0) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
117 col[8*1] = (a1 + b1) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
118 col[8*2] = (a2 + b2) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
119 col[8*3] = (a3 + b3) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
120 col[8*4] = (a3 - b3) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
121 col[8*5] = (a2 - b2) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
122 col[8*6] = (a1 - b1) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
123 col[8*7] = (a0 - b0) >> COL_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
124 }
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
125
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
126 static void inline idctRow (int16_t * output, int16_t * input)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
127 {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
128 int16_t row[8];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
129
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
130 int a0, a1, a2, a3, b0, b1, b2, b3;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
131 const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
132 const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
133 const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
134 const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
135 const int C4 = 16384; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
136 const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
137 const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
138 const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
139
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
140 row[0] = input[0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
141 row[2] = input[1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
142 row[4] = input[4];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
143 row[6] = input[5];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
144 row[1] = input[8];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
145 row[3] = input[9];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
146 row[5] = input[12];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
147 row[7] = input[13];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
148
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
149 if( !(row[1] | row[2] |row[3] |row[4] |row[5] |row[6] | row[7]) ) {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
150 row[0] = row[1] = row[2] = row[3] = row[4] =
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
151 row[5] = row[6] = row[7] = row[0]<<3;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
152 output[0] = row[0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
153 output[2] = row[1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
154 output[4] = row[2];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
155 output[6] = row[3];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
156 output[8] = row[4];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
157 output[10] = row[5];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
158 output[12] = row[6];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
159 output[14] = row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
160 return;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
161 }
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
162
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
163 a0 = C4*row[0] + C2*row[2] + C4*row[4] + C6*row[6] + (1<<(ROW_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
164 a1 = C4*row[0] + C6*row[2] - C4*row[4] - C2*row[6] + (1<<(ROW_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
165 a2 = C4*row[0] - C6*row[2] - C4*row[4] + C2*row[6] + (1<<(ROW_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
166 a3 = C4*row[0] - C2*row[2] + C4*row[4] - C6*row[6] + (1<<(ROW_SHIFT-1));
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
167
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
168 b0 = C1*row[1] + C3*row[3] + C5*row[5] + C7*row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
169 b1 = C3*row[1] - C7*row[3] - C1*row[5] - C5*row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
170 b2 = C5*row[1] - C1*row[3] + C7*row[5] + C3*row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
171 b3 = C7*row[1] - C5*row[3] + C3*row[5] - C1*row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
172
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
173 row[0] = (a0 + b0) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
174 row[1] = (a1 + b1) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
175 row[2] = (a2 + b2) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
176 row[3] = (a3 + b3) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
177 row[4] = (a3 - b3) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
178 row[5] = (a2 - b2) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
179 row[6] = (a1 - b1) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
180 row[7] = (a0 - b0) >> ROW_SHIFT;
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
181
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
182 output[0] = row[0];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
183 output[2] = row[1];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
184 output[4] = row[2];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
185 output[6] = row[3];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
186 output[8] = row[4];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
187 output[10] = row[5];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
188 output[12] = row[6];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
189 output[14] = row[7];
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
190 }
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
191 #endif
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
192
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
193 static inline void idct(int16_t *block)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
194 {
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
195 asm volatile(
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
196 #if 0 //Alternative, simpler variant
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
197
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
198 #define ROW_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
199 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
200 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
201 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
202 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
203 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
204 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
205 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
206 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
207 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
208 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
209 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
210 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
211 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
212 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
213 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
214 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
215 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
216 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
217 "movq 56(%2), %%mm5 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
218 "pmaddwd %%mm3, %%mm5 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
219 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
220 "paddd %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
221 "paddd %%mm0, %%mm0 \n\t" \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
222 "psubd %%mm1, %%mm0 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
223 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
224 "paddd %%mm5, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
225 "movq 72(%2), %%mm5 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
226 "pmaddwd %%mm3, %%mm5 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
227 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
228 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
229 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
230 "paddd %%mm2, %%mm5 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
231 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
232 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
233 "movq %%mm1, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
234 "paddd %%mm5, %%mm1 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
235 "psubd %%mm5, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
236 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
237 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
238 "packssdw %%mm1, %%mm7 \n\t" /* A1+B1 a1+b1 A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
239 "packssdw %%mm4, %%mm2 \n\t" /* A0-B0 a0-b0 A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
240 "movq %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
241 "movq " #src1 ", %%mm1 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
242 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
243 "movq %%mm2, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
244 "pmaddwd %%mm1, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
245 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
246 "pmaddwd 96(%2), %%mm1 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
247 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
248 "movq %%mm0, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
249 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
250 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
251 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
252 "psubd %%mm4, %%mm0 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
253 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
254 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
255 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
256 "paddd %%mm1, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
257 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
258 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
259 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
260 "packssdw %%mm6, %%mm2 \n\t" /* A3+B3 a3+b3 A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
261 "movq %%mm2, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
262 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
263 "packssdw %%mm0, %%mm4 \n\t" /* A2-B2 a2-b2 A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
264 "movq %%mm4, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
265
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
266 #define COL_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
267 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
268 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
269 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
270 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
271 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
272 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
273 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
274 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
275 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
276 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
277 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
278 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
279 #rounder ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
280 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
281 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
282 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
283 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
284 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
285 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
286 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
287 "paddd %%mm1, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
288 "psubd %%mm1, %%mm5 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
289 "movq 56(%2), %%mm1 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
290 "pmaddwd %%mm3, %%mm1 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
291 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
292 "paddd %%mm1, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
293 "movq 72(%2), %%mm1 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
294 "pmaddwd %%mm3, %%mm1 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
295 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
296 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
297 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
298 "paddd %%mm2, %%mm1 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
299 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
300 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
301 "movq %%mm0, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
302 "paddd %%mm1, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
303 "psubd %%mm1, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
304 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
305 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
306 "packssdw %%mm7, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
307 "movd %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
308 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
309 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
310 "packssdw %%mm2, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
311 "movd %%mm2, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
312 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
313 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
314 "movq " #src1 ", %%mm0 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
315 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
316 "pmaddwd %%mm0, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
317 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
318 "pmaddwd 96(%2), %%mm0 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
319 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
320 "movq %%mm5, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
321 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
322 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
323 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
324 "psubd %%mm4, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
325 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
326 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
327 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
328 "paddd %%mm0, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
329 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
330 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
331 "psrad $" #shift ", %%mm6 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
332 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
333 "packssdw %%mm2, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
334 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
335 "movd %%mm2, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
336 "packssdw %%mm4, %%mm4 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
337 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
338 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
339 "movd %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
340 "movd %%mm5, 80+" #dst " \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
341
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
342
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
343 #define DC_COND_ROW_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
344 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
345 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
346 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
347 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
348 "movq wm1010, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
349 "pand %%mm0, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
350 "por %%mm1, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
351 "por %%mm2, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
352 "por %%mm3, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
353 "packssdw %%mm4,%%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
354 "movd %%mm4, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
355 "orl %%eax, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
356 "jz 1f \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
357 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
358 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
359 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
360 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
361 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
362 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
363 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
364 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
365 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
366 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
367 #rounder ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
368 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
369 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
370 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
371 "movq 56(%2), %%mm5 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
372 "pmaddwd %%mm3, %%mm5 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
373 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
374 "paddd %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
375 "paddd %%mm0, %%mm0 \n\t" \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
376 "psubd %%mm1, %%mm0 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
377 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
378 "paddd %%mm5, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
379 "movq 72(%2), %%mm5 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
380 "pmaddwd %%mm3, %%mm5 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
381 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
382 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
383 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
384 "paddd %%mm2, %%mm5 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
385 "psrad $" #shift ", %%mm7 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
386 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
387 "movq %%mm1, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
388 "paddd %%mm5, %%mm1 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
389 "psubd %%mm5, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
390 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
391 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
392 "packssdw %%mm1, %%mm7 \n\t" /* A1+B1 a1+b1 A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
393 "packssdw %%mm4, %%mm2 \n\t" /* A0-B0 a0-b0 A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
394 "movq %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
395 "movq " #src1 ", %%mm1 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
396 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
397 "movq %%mm2, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
398 "pmaddwd %%mm1, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
399 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
400 "pmaddwd 96(%2), %%mm1 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
401 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
402 "movq %%mm0, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
403 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
404 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
405 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
406 "psubd %%mm4, %%mm0 \n\t" /* a2-B2 a2-b2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
407 "psrad $" #shift ", %%mm2 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
408 "psrad $" #shift ", %%mm0 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
409 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
410 "paddd %%mm1, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
411 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
412 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
413 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
414 "packssdw %%mm6, %%mm2 \n\t" /* A3+B3 a3+b3 A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
415 "movq %%mm2, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
416 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
417 "packssdw %%mm0, %%mm4 \n\t" /* A2-B2 a2-b2 A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
418 "movq %%mm4, 16+" #dst " \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
419 "jmp 2f \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
420 "1: \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
421 "pslld $16, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
422 "#paddd d40000, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
423 "psrad $13, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
424 "packssdw %%mm0, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
425 "movq %%mm0, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
426 "movq %%mm0, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
427 "movq %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
428 "movq %%mm0, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
429 "2: \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
430
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
431
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
432 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
433 ROW_IDCT( (%0), 8(%0), 16(%0), 24(%0), 0(%1),paddd 8(%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
434 /*ROW_IDCT( 32(%0), 40(%0), 48(%0), 56(%0), 32(%1), paddd (%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
435 ROW_IDCT( 64(%0), 72(%0), 80(%0), 88(%0), 64(%1), paddd (%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
436 ROW_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1), paddd (%2), 11)*/
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
437
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
438 DC_COND_ROW_IDCT( 32(%0), 40(%0), 48(%0), 56(%0), 32(%1),paddd (%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
439 DC_COND_ROW_IDCT( 64(%0), 72(%0), 80(%0), 88(%0), 64(%1),paddd (%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
440 DC_COND_ROW_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1),paddd (%2), 11)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
441
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
442
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
443 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
444 COL_IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
445 COL_IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
446 COL_IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
447 COL_IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
448
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
449 #else
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
450
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
451 #define DC_COND_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
452 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
453 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
454 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
455 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
456 "movq wm1010, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
457 "pand %%mm0, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
458 "por %%mm1, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
459 "por %%mm2, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
460 "por %%mm3, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
461 "packssdw %%mm4,%%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
462 "movd %%mm4, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
463 "orl %%eax, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
464 "jz 1f \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
465 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
466 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
467 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
468 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
469 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
470 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
471 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
472 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
473 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
474 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
475 #rounder ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
476 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
477 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
478 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
479 "movq 56(%2), %%mm5 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
480 "pmaddwd %%mm3, %%mm5 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
481 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
482 "paddd %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
483 "paddd %%mm0, %%mm0 \n\t" \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
484 "psubd %%mm1, %%mm0 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
485 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
486 "paddd %%mm5, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
487 "movq 72(%2), %%mm5 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
488 "pmaddwd %%mm3, %%mm5 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
489 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
490 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
491 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
492 "paddd %%mm2, %%mm5 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
493 "psrad $" #shift ", %%mm7 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
494 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
495 "movq %%mm1, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
496 "paddd %%mm5, %%mm1 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
497 "psubd %%mm5, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
498 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
499 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
500 "packssdw %%mm1, %%mm7 \n\t" /* A1+B1 a1+b1 A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
501 "packssdw %%mm4, %%mm2 \n\t" /* A0-B0 a0-b0 A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
502 "movq %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
503 "movq " #src1 ", %%mm1 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
504 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
505 "movq %%mm2, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
506 "pmaddwd %%mm1, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
507 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
508 "pmaddwd 96(%2), %%mm1 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
509 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
510 "movq %%mm0, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
511 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
512 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
513 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
514 "psubd %%mm4, %%mm0 \n\t" /* a2-B2 a2-b2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
515 "psrad $" #shift ", %%mm2 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
516 "psrad $" #shift ", %%mm0 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
517 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
518 "paddd %%mm1, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
519 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
520 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
521 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
522 "packssdw %%mm6, %%mm2 \n\t" /* A3+B3 a3+b3 A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
523 "movq %%mm2, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
524 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
525 "packssdw %%mm0, %%mm4 \n\t" /* A2-B2 a2-b2 A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
526 "movq %%mm4, 16+" #dst " \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
527 "jmp 2f \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
528 "1: \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
529 "pslld $16, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
530 "paddd d40000, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
531 "psrad $13, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
532 "packssdw %%mm0, %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
533 "movq %%mm0, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
534 "movq %%mm0, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
535 "movq %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
536 "movq %%mm0, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
537 "2: \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
538
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
539 #define Z_COND_IDCT(src0, src4, src1, src5, dst, rounder, shift, bt) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
540 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
541 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
542 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
543 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
544 "movq %%mm0, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
545 "por %%mm1, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
546 "por %%mm2, %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
547 "por %%mm3, %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
548 "packssdw %%mm4,%%mm4 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
549 "movd %%mm4, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
550 "orl %%eax, %%eax \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
551 "jz " #bt " \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
552 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
553 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
554 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
555 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
556 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
557 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
558 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
559 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
560 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
561 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
562 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
563 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
564 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
565 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
566 "movq 56(%2), %%mm5 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
567 "pmaddwd %%mm3, %%mm5 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
568 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
569 "paddd %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
570 "paddd %%mm0, %%mm0 \n\t" \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
571 "psubd %%mm1, %%mm0 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
572 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
573 "paddd %%mm5, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
574 "movq 72(%2), %%mm5 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
575 "pmaddwd %%mm3, %%mm5 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
576 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
577 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
578 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
579 "paddd %%mm2, %%mm5 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
580 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
581 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
582 "movq %%mm1, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
583 "paddd %%mm5, %%mm1 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
584 "psubd %%mm5, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
585 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
586 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
587 "packssdw %%mm1, %%mm7 \n\t" /* A1+B1 a1+b1 A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
588 "packssdw %%mm4, %%mm2 \n\t" /* A0-B0 a0-b0 A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
589 "movq %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
590 "movq " #src1 ", %%mm1 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
591 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
592 "movq %%mm2, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
593 "pmaddwd %%mm1, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
594 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
595 "pmaddwd 96(%2), %%mm1 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
596 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
597 "movq %%mm0, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
598 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
599 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
600 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
601 "psubd %%mm4, %%mm0 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
602 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
603 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
604 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
605 "paddd %%mm1, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
606 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
607 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
608 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
609 "packssdw %%mm6, %%mm2 \n\t" /* A3+B3 a3+b3 A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
610 "movq %%mm2, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
611 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
612 "packssdw %%mm0, %%mm4 \n\t" /* A2-B2 a2-b2 A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
613 "movq %%mm4, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
614
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
615 #define ROW_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
616 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
617 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
618 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
619 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
620 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
621 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
622 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
623 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
624 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
625 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
626 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
627 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
628 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
629 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
630 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
631 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
632 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
633 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
634 "movq 56(%2), %%mm5 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
635 "pmaddwd %%mm3, %%mm5 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
636 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
637 "paddd %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
638 "paddd %%mm0, %%mm0 \n\t" \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
639 "psubd %%mm1, %%mm0 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
640 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
641 "paddd %%mm5, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
642 "movq 72(%2), %%mm5 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
643 "pmaddwd %%mm3, %%mm5 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
644 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
645 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
646 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
647 "paddd %%mm2, %%mm5 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
648 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
649 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
650 "movq %%mm1, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
651 "paddd %%mm5, %%mm1 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
652 "psubd %%mm5, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
653 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
654 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
655 "packssdw %%mm1, %%mm7 \n\t" /* A1+B1 a1+b1 A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
656 "packssdw %%mm4, %%mm2 \n\t" /* A0-B0 a0-b0 A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
657 "movq %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
658 "movq " #src1 ", %%mm1 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
659 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
660 "movq %%mm2, 24+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
661 "pmaddwd %%mm1, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
662 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
663 "pmaddwd 96(%2), %%mm1 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
664 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
665 "movq %%mm0, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
666 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
667 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
668 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
669 "psubd %%mm4, %%mm0 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
670 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
671 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
672 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
673 "paddd %%mm1, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
674 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
675 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
676 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
677 "packssdw %%mm6, %%mm2 \n\t" /* A3+B3 a3+b3 A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
678 "movq %%mm2, 8+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
679 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
680 "packssdw %%mm0, %%mm4 \n\t" /* A2-B2 a2-b2 A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
681 "movq %%mm4, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
682
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
683 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
684 DC_COND_IDCT( 0(%0), 8(%0), 16(%0), 24(%0), 0(%1),paddd 8(%2), 11)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
685 Z_COND_IDCT( 32(%0), 40(%0), 48(%0), 56(%0), 32(%1),paddd (%2), 11, 4f)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
686 Z_COND_IDCT( 64(%0), 72(%0), 80(%0), 88(%0), 64(%1),paddd (%2), 11, 2f)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
687 Z_COND_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1),paddd (%2), 11, 1f)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
688
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
689 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
690 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
691 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
692 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
693 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
694 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
695 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
696 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
697 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
698 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
699 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
700 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
701 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
702 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
703 #rounder ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
704 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
705 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
706 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
707 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
708 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
709 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
710 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
711 "paddd %%mm1, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
712 "psubd %%mm1, %%mm5 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
713 "movq 56(%2), %%mm1 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
714 "pmaddwd %%mm3, %%mm1 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
715 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
716 "paddd %%mm1, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
717 "movq 72(%2), %%mm1 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
718 "pmaddwd %%mm3, %%mm1 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
719 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
720 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
721 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
722 "paddd %%mm2, %%mm1 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
723 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
724 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
725 "movq %%mm0, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
726 "paddd %%mm1, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
727 "psubd %%mm1, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
728 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
729 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
730 "packssdw %%mm7, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
731 "movd %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
732 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
733 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
734 "packssdw %%mm2, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
735 "movd %%mm2, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
736 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
737 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
738 "movq " #src1 ", %%mm0 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
739 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
740 "pmaddwd %%mm0, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
741 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
742 "pmaddwd 96(%2), %%mm0 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
743 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
744 "movq %%mm5, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
745 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
746 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
747 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
748 "psubd %%mm4, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
749 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
750 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
751 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
752 "paddd %%mm0, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
753 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
754 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
755 "psrad $" #shift ", %%mm6 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
756 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
757 "packssdw %%mm2, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
758 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
759 "movd %%mm2, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
760 "packssdw %%mm4, %%mm4 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
761 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
762 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
763 "movd %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
764 "movd %%mm5, 80+" #dst " \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
765
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
766
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
767 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
768 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
769 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
770 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
771 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
772 "jmp 9f \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
773
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
774 "#.balign 16 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
775 "4: \n\t"
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
776 Z_COND_IDCT( 64(%0), 72(%0), 80(%0), 88(%0), 64(%1),paddd (%2), 11, 6f)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
777 Z_COND_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1),paddd (%2), 11, 5f)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
778
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
779 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
780 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
781 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
782 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
783 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
784 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
785 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
786 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
787 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
788 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
789 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
790 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
791 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
792 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
793 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
794 #rounder ", %%mm0 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
795 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
796 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
797 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
798 "paddd %%mm1, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
799 "psubd %%mm1, %%mm5 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
800 "movq 56(%2), %%mm1 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
801 "pmaddwd %%mm3, %%mm1 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
802 "movq 72(%2), %%mm7 \n\t" /* -C5 -C1 -C5 -C1 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
803 "pmaddwd %%mm3, %%mm7 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
804 "paddd %%mm4, %%mm1 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
805 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
806 "psubd %%mm1, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
807 "psrad $" #shift ", %%mm1 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
808 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
809 "movq %%mm0, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
810 "paddd %%mm7, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
811 "psubd %%mm7, %%mm2 \n\t" /* A1-B1 a1-b1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
812 "psrad $" #shift ", %%mm0 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
813 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
814 "packssdw %%mm1, %%mm1 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
815 "movd %%mm1, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
816 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
817 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
818 "packssdw %%mm2, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
819 "movd %%mm2, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
820 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
821 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
822 "movq 88(%2), %%mm1 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
823 "pmaddwd %%mm3, %%mm1 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
824 "movq %%mm5, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
825 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
826 "paddd %%mm1, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
827 "psubd %%mm1, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
828 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
829 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
830 "movq %%mm6, %%mm1 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
831 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
832 "psubd %%mm3, %%mm1 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
833 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
834 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
835 "packssdw %%mm2, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
836 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
837 "movd %%mm2, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
838 "packssdw %%mm1, %%mm1 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
839 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
840 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
841 "movd %%mm1, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
842 "movd %%mm5, 80+" #dst " \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
843
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
844 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
845 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
846 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
847 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
848 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
849 "jmp 9f \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
850
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
851 "#.balign 16 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
852 "6: \n\t"
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
853 Z_COND_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1),paddd (%2), 11, 7f)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
854
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
855 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
856 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
857 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
858 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
859 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
860 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
861 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
862 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
863 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
864 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
865 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
866 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
867 "movq 56(%2), %%mm1 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
868 "pmaddwd %%mm3, %%mm1 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
869 "movq 72(%2), %%mm7 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
870 "pmaddwd %%mm3, %%mm7 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
871 "paddd %%mm4, %%mm1 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
872 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
873 "psubd %%mm1, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
874 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
875 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
876 "movq %%mm0, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
877 "paddd %%mm7, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
878 "psubd %%mm7, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
879 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
880 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
881 "packssdw %%mm1, %%mm1 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
882 "movd %%mm1, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
883 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
884 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
885 "packssdw %%mm2, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
886 "movd %%mm2, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
887 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
888 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
889 "movq 88(%2), %%mm1 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
890 "pmaddwd %%mm3, %%mm1 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
891 "movq %%mm5, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
892 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
893 "paddd %%mm1, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
894 "psubd %%mm1, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
895 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
896 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
897 "movq %%mm6, %%mm1 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
898 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
899 "psubd %%mm3, %%mm1 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
900 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
901 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
902 "packssdw %%mm2, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
903 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
904 "movd %%mm2, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
905 "packssdw %%mm1, %%mm1 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
906 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
907 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
908 "movd %%mm1, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
909 "movd %%mm5, 80+" #dst " \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
910
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
911
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
912 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
913 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
914 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
915 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
916 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
917 "jmp 9f \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
918
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
919 "#.balign 16 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
920 "2: \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
921 Z_COND_IDCT( 96(%0),104(%0),112(%0),120(%0), 96(%1),paddd (%2), 11, 3f)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
922
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
923 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
924 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
925 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
926 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
927 "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
928 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
929 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
930 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
931 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
932 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
933 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
934 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
935 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
936 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
937 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
938 "movq 56(%2), %%mm1 \n\t" /* C7 C5 C7 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
939 "pmaddwd %%mm3, %%mm1 \n\t" /* C7R7+C5R5 C7r7+C5r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
940 "pmaddwd 64(%2), %%mm2 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
941 "paddd %%mm1, %%mm7 \n\t" /* B0 b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
942 "movq 72(%2), %%mm1 \n\t" /* -C5 -C1 -C5 -C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
943 "pmaddwd %%mm3, %%mm1 \n\t" /* -C5R7-C1R5 -C5r7-C1r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
944 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
945 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
946 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
947 "paddd %%mm2, %%mm1 \n\t" /* B1 b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
948 "psrad $" #shift ", %%mm7 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
949 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
950 "movq %%mm0, %%mm2 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
951 "paddd %%mm1, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
952 "psubd %%mm1, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
953 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
954 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
955 "packssdw %%mm7, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
956 "movd %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
957 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
958 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
959 "packssdw %%mm2, %%mm2 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
960 "movd %%mm2, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
961 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
962 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
963 "movq " #src1 ", %%mm0 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
964 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
965 "pmaddwd %%mm0, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
966 "movq 88(%2), %%mm7 \n\t" /* C3 C7 C3 C7 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
967 "pmaddwd 96(%2), %%mm0 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
968 "pmaddwd %%mm3, %%mm7 \n\t" /* C3R7+C7R5 C3r7+C7r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
969 "movq %%mm5, %%mm2 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
970 "pmaddwd 104(%2), %%mm3 \n\t" /* -C1R7+C3R5 -C1r7+C3r5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
971 "paddd %%mm7, %%mm4 \n\t" /* B2 b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
972 "paddd %%mm4, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
973 "psubd %%mm4, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
974 "psrad $" #shift ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
975 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
976 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
977 "paddd %%mm0, %%mm3 \n\t" /* B3 b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
978 "paddd %%mm3, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
979 "psubd %%mm3, %%mm4 \n\t" /* a3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
980 "psrad $" #shift ", %%mm6 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
981 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
982 "packssdw %%mm2, %%mm2 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
983 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
984 "movd %%mm2, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
985 "packssdw %%mm4, %%mm4 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
986 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
987 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
988 "movd %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
989 "movd %%mm5, 80+" #dst " \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
990
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
991 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
992 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
993 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
994 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
995 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
996 "jmp 9f \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
997
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
998 "#.balign 16 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
999 "3: \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1000 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1001 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1002 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1003 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1004 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1005 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1006 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1007 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1008 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1009 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1010 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1011 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1012 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1013 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1014 "movq 64(%2), %%mm3 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1015 "pmaddwd %%mm2, %%mm3 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1016 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1017 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1018 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1019 "psrad $" #shift ", %%mm7 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1020 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1021 "movq %%mm0, %%mm1 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1022 "paddd %%mm3, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1023 "psubd %%mm3, %%mm1 \n\t" /* A1-B1 a1-b1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1024 "psrad $" #shift ", %%mm0 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1025 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1026 "packssdw %%mm7, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1027 "movd %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1028 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1029 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1030 "packssdw %%mm1, %%mm1 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1031 "movd %%mm1, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1032 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1033 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1034 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1035 "pmaddwd %%mm2, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1036 "pmaddwd 96(%2), %%mm2 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1037 "movq %%mm5, %%mm1 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1038 "paddd %%mm4, %%mm1 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1039 "psubd %%mm4, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1040 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1041 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1042 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1043 "paddd %%mm2, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1044 "psubd %%mm2, %%mm4 \n\t" /* a3-B3 a3-b3 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1045 "psrad $" #shift ", %%mm6 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1046 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1047 "packssdw %%mm1, %%mm1 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1048 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1049 "movd %%mm1, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1050 "packssdw %%mm4, %%mm4 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1051 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1052 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1053 "movd %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1054 "movd %%mm5, 80+" #dst " \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1055
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1056
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1057 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1058 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1059 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1060 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1061 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1062 "jmp 9f \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1063
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1064 "#.balign 16 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1065 "5: \n\t"
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1066 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1067 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1068 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1069 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1070 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1071 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1072 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1073 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1074 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1075 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1076 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1077 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1078 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1079 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1080 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1081 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1082 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1083 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1084 "paddd %%mm1, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1085 "psubd %%mm1, %%mm5 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1086 "movq 8+" #src0 ", %%mm2 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1087 "movq 8+" #src4 ", %%mm3 \n\t" /* R6 R2 r6 r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1088 "movq 16(%2), %%mm1 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1089 "pmaddwd %%mm2, %%mm1 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1090 "movq 24(%2), %%mm7 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1091 "pmaddwd %%mm7, %%mm2 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1092 "movq 32(%2), %%mm7 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1093 "pmaddwd %%mm3, %%mm7 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1094 "pmaddwd 40(%2), %%mm3 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1095 #rounder ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1096 "paddd %%mm1, %%mm7 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1097 "paddd %%mm1, %%mm1 \n\t" /* 2C0 2c0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1098 #rounder ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1099 "psubd %%mm7, %%mm1 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1100 "paddd %%mm2, %%mm3 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1101 "paddd %%mm2, %%mm2 \n\t" /* 2C1 2c1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1102 "psubd %%mm3, %%mm2 \n\t" /* A2 a2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1103 "psrad $" #shift ", %%mm4 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1104 "psrad $" #shift ", %%mm7 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1105 "psrad $" #shift ", %%mm3 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1106 "packssdw %%mm7, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1107 "movq %%mm4, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1108 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1109 "packssdw %%mm3, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1110 "movq %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1111 "movq %%mm0, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1112 "movq %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1113 "psrad $" #shift ", %%mm5 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1114 "psrad $" #shift ", %%mm6 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1115 "psrad $" #shift ", %%mm2 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1116 "packssdw %%mm2, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1117 "movq %%mm5, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1118 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1119 "packssdw %%mm1, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1120 "movq %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1121 "movq %%mm6, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1122 "movq %%mm5, 80+" #dst " \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1123
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1124
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1125 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1126 IDCT( 0(%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1127 //IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1128 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1129 //IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1130 "jmp 9f \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1131
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1132
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1133 "#.balign 16 \n\t"\
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1134 "1: \n\t"
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1135 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1136 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1137 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1138 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1139 "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1140 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1141 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1142 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1143 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1144 "movq 32(%2), %%mm5 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1145 "pmaddwd %%mm1, %%mm5 \n\t" /* C6R6+C2R2 C6r6+C2r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1146 "movq 40(%2), %%mm6 \n\t" /* -C2 C6 -C2 C6 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1147 "pmaddwd %%mm6, %%mm1 \n\t" /* -C2R6+C6R2 -C2r6+C6r2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1148 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1149 "movq %%mm4, %%mm6 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1150 "movq 48(%2), %%mm7 \n\t" /* C3 C1 C3 C1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1151 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1152 "pmaddwd %%mm2, %%mm7 \n\t" /* C3R3+C1R1 C3r3+C1r1 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1153 "paddd %%mm5, %%mm4 \n\t" /* A0 a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1154 "psubd %%mm5, %%mm6 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1155 "movq %%mm0, %%mm5 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1156 "paddd %%mm1, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1157 "psubd %%mm1, %%mm5 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1158 "movq 64(%2), %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1159 "pmaddwd %%mm2, %%mm1 \n\t" /* -C7R3+C3R1 -C7r3+C3r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1160 "paddd %%mm4, %%mm7 \n\t" /* A0+B0 a0+b0 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1161 "paddd %%mm4, %%mm4 \n\t" /* 2A0 2a0 */\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1162 "psubd %%mm7, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1163 "psrad $" #shift ", %%mm7 \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1164 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1165 "movq %%mm0, %%mm3 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1166 "paddd %%mm1, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1167 "psubd %%mm1, %%mm3 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1168 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1169 "psrad $" #shift ", %%mm3 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1170 "packssdw %%mm7, %%mm7 \n\t" /* A0+B0 a0+b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1171 "movd %%mm7, " #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1172 "packssdw %%mm0, %%mm0 \n\t" /* A1+B1 a1+b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1173 "movd %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1174 "packssdw %%mm3, %%mm3 \n\t" /* A1-B1 a1-b1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1175 "movd %%mm3, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1176 "packssdw %%mm4, %%mm4 \n\t" /* A0-B0 a0-b0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1177 "movd %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1178 "movq 80(%2), %%mm4 \n\t" /* -C1 C5 -C1 C5 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1179 "pmaddwd %%mm2, %%mm4 \n\t" /* -C1R3+C5R1 -C1r3+C5r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1180 "pmaddwd 96(%2), %%mm2 \n\t" /* -C5R3+C7R1 -C5r3+C7r1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1181 "movq %%mm5, %%mm3 \n\t" /* A2 a2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1182 "paddd %%mm4, %%mm3 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1183 "psubd %%mm4, %%mm5 \n\t" /* a2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1184 "psrad $" #shift ", %%mm3 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1185 "psrad $" #shift ", %%mm5 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1186 "movq %%mm6, %%mm4 \n\t" /* A3 a3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1187 "paddd %%mm2, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1188 "psubd %%mm2, %%mm4 \n\t" /* a3-B3 a3-b3 */\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1189 "psrad $" #shift ", %%mm6 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1190 "packssdw %%mm3, %%mm3 \n\t" /* A2+B2 a2+b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1191 "movd %%mm3, 32+" #dst " \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1192 "psrad $" #shift ", %%mm4 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1193 "packssdw %%mm6, %%mm6 \n\t" /* A3+B3 a3+b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1194 "movd %%mm6, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1195 "packssdw %%mm4, %%mm4 \n\t" /* A3-B3 a3-b3 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1196 "packssdw %%mm5, %%mm5 \n\t" /* A2-B2 a2-b2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1197 "movd %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1198 "movd %%mm5, 80+" #dst " \n\t"
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1199
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1200
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1201 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1202 IDCT( (%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1203 IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1204 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1205 IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1206 "jmp 9f \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1207
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1208
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1209 "#.balign 16 \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1210 "7: \n\t"
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1211 #undef IDCT
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1212 #define IDCT(src0, src4, src1, src5, dst, rounder, shift) \
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1213 "movq " #src0 ", %%mm0 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1214 "movq 16(%2), %%mm4 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1215 "pmaddwd %%mm0, %%mm4 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1216 "movq 24(%2), %%mm5 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1217 "pmaddwd %%mm5, %%mm0 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1218 #rounder ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1219 #rounder ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1220 "psrad $" #shift ", %%mm4 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1221 "psrad $" #shift ", %%mm0 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1222 "movq 8+" #src0 ", %%mm2 \n\t" /* R4 R0 r4 r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1223 "movq 16(%2), %%mm1 \n\t" /* C4 C4 C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1224 "pmaddwd %%mm2, %%mm1 \n\t" /* C4R4+C4R0 C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1225 "movq 24(%2), %%mm7 \n\t" /* -C4 C4 -C4 C4 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1226 "pmaddwd %%mm7, %%mm2 \n\t" /* -C4R4+C4R0 -C4r4+C4r0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1227 "movq 32(%2), %%mm7 \n\t" /* C6 C2 C6 C2 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1228 #rounder ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1229 #rounder ", %%mm2 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1230 "psrad $" #shift ", %%mm1 \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1231 "packssdw %%mm1, %%mm4 \n\t" /* A0 a0 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1232 "movq %%mm4, " #dst " \n\t"\
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1233 "psrad $" #shift ", %%mm2 \n\t"\
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1234 "packssdw %%mm2, %%mm0 \n\t" /* A1 a1 */\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1235 "movq %%mm0, 16+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1236 "movq %%mm0, 96+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1237 "movq %%mm4, 112+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1238 "movq %%mm0, 32+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1239 "movq %%mm4, 48+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1240 "movq %%mm4, 64+" #dst " \n\t"\
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1241 "movq %%mm0, 80+" #dst " \n\t"
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1242
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1243 //IDCT( src0, src4, src1, src5, dst, rounder, shift)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1244 IDCT( 0(%1), 64(%1), 32(%1), 96(%1), 0(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1245 //IDCT( 8(%1), 72(%1), 40(%1), 104(%1), 4(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1246 IDCT( 16(%1), 80(%1), 48(%1), 112(%1), 8(%0),/nop, 20)
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1247 //IDCT( 24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1248
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1249
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1250 #endif
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1251
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1252 /*
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1253 Input
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1254 00 40 04 44 20 60 24 64
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1255 10 30 14 34 50 70 54 74
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1256 01 41 03 43 21 61 23 63
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1257 11 31 13 33 51 71 53 73
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1258 02 42 06 46 22 62 26 66
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1259 12 32 16 36 52 72 56 76
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1260 05 45 07 47 25 65 27 67
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1261 15 35 17 37 55 75 57 77
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1262
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1263 Temp
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1264 00 04 10 14 20 24 30 34
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1265 40 44 50 54 60 64 70 74
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1266 01 03 11 13 21 23 31 33
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1267 41 43 51 53 61 63 71 73
209
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1268 02 06 12 16 22 26 32 36
c0d8ecae7ac5 (commit by michael)
arpi_esp
parents: 175
diff changeset
1269 42 46 52 56 62 66 72 76
175
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1270 05 07 15 17 25 27 35 37
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1271 45 47 55 57 65 67 75 77
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1272 */
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1273
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1274 "9: \n\t"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1275 :: "r" (block), "r" (temp), "r" (coeffs)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1276 : "%eax"
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1277 );
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1278 }
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1279
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1280 void simple_idct_mmx(int16_t *block)
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1281 {
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1282 idct(block);
bd77d3cbb233 new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
diff changeset
1283 }