Mercurial > mplayer.hg
annotate mp3lib/decode_MMX.c @ 24687:ccad1608ed0a
Fix typo.
author | cehoyos |
---|---|
date | Fri, 05 Oct 2007 12:14:30 +0000 |
parents | d986b47f1451 |
children |
rev | line source |
---|---|
4142 | 1 /* |
2 * this code comes under GPL | |
3 * This code was taken from http://www.mpg123.org | |
4 * See ChangeLog of mpg123-0.59s-pre.1 for detail | |
5 * Applied to mplayer by Nick Kurshev <nickols_k@mail.ru> | |
6 * | |
7 * Local ChangeLog: | |
8 * - Partial loops unrolling and removing MOVW insn from loops | |
9 */ | |
16989 | 10 #include "config.h" |
11 #include "mangle.h" | |
4142 | 12 #define real float /* ugly - but only way */ |
13 | |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
14 extern void (*dct64_MMX_func)(short*, short*, real*); |
12292 | 15 static unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; |
16 static unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL; | |
23434
d986b47f1451
Use int and uint32_t instead of long and unsigned long, when appropriate.
zuxy
parents:
23365
diff
changeset
|
17 unsigned int __attribute__((aligned(16))) costab_mmx[] = |
4142 | 18 { |
19 1056974725, | |
20 1057056395, | |
21 1057223771, | |
22 1057485416, | |
23 1057855544, | |
24 1058356026, | |
25 1059019886, | |
26 1059897405, | |
27 1061067246, | |
28 1062657950, | |
29 1064892987, | |
30 1066774581, | |
31 1069414683, | |
32 1073984175, | |
33 1079645762, | |
34 1092815430, | |
35 1057005197, | |
36 1057342072, | |
37 1058087743, | |
38 1059427869, | |
39 1061799040, | |
40 1065862217, | |
41 1071413542, | |
42 1084439708, | |
43 1057128951, | |
44 1058664893, | |
45 1063675095, | |
46 1076102863, | |
47 1057655764, | |
48 1067924853, | |
49 1060439283, | |
50 }; | |
51 | |
23365
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
52 /** |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
53 This array of magic numbers were calculated by the pure function |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
54 make_decode_tables_MMX(32768), which had been implemented in (deleted since |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
55 r23383) tabinit_MMX.c. |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
56 */ |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
57 static short __attribute__((aligned(8))) mp3lib_decwins[] = |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
58 { |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
59 0, 7, 54, 114, 510, 1288, 1644, 9372, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
60 18760, -9373, 1644, -1289, 510, -115, 54, -8, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
61 0, 7, 54, 114, 510, 1288, 1644, 9372, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
62 18760, -9373, 1644, -1289, 510, -115, 54, -8, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
63 0, 7, 55, 129, 500, 1379, 1490, 9834, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
64 18748, -8910, 1784, -1197, 516, -101, 52, -7, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
65 0, 7, 55, 129, 500, 1379, 1490, 9834, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
66 18748, -8910, 1784, -1197, 516, -101, 52, -7, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
67 0, 8, 56, 145, 488, 1469, 1322, 10294, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
68 18714, -8448, 1910, -1107, 520, -87, 51, -6, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
69 0, 8, 56, 145, 488, 1469, 1322, 10294, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
70 18714, -8448, 1910, -1107, 520, -87, 51, -6, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
71 0, 9, 57, 161, 474, 1559, 1141, 10751, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
72 18658, -7987, 2023, -1016, 522, -74, 49, -6, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
73 0, 9, 57, 161, 474, 1559, 1141, 10751, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
74 18658, -7987, 2023, -1016, 522, -74, 49, -6, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
75 0, 10, 57, 177, 456, 1647, 944, 11205, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
76 18579, -7528, 2123, -927, 522, -61, 48, -5, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
77 0, 10, 57, 177, 456, 1647, 944, 11205, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
78 18579, -7528, 2123, -927, 522, -61, 48, -5, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
79 0, 11, 57, 194, 435, 1733, 734, 11654, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
80 18477, -7073, 2210, -838, 519, -50, 46, -5, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
81 0, 11, 57, 194, 435, 1733, 734, 11654, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
82 18477, -7073, 2210, -838, 519, -50, 46, -5, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
83 0, 12, 57, 212, 411, 1817, 510, 12097, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
84 18354, -6621, 2285, -751, 515, -39, 44, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
85 0, 12, 57, 212, 411, 1817, 510, 12097, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
86 18354, -6621, 2285, -751, 515, -39, 44, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
87 0, 13, 57, 229, 384, 1899, 271, 12534, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
88 18209, -6174, 2348, -666, 508, -28, 43, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
89 0, 13, 57, 229, 384, 1899, 271, 12534, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
90 18209, -6174, 2348, -666, 508, -28, 43, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
91 0, 14, 56, 247, 354, 1977, 18, 12963, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
92 18043, -5733, 2398, -583, 501, -18, 41, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
93 0, 14, 56, 247, 354, 1977, 18, 12963, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
94 18043, -5733, 2398, -583, 501, -18, 41, -4, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
95 0, 15, 56, 266, 320, 2052, -249, 13383, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
96 17855, -5298, 2438, -502, 491, -9, 39, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
97 0, 15, 56, 266, 320, 2052, -249, 13383, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
98 17855, -5298, 2438, -502, 491, -9, 39, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
99 0, 17, 54, 284, 283, 2122, -530, 13794, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
100 17648, -4870, 2466, -423, 480, -1, 37, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
101 0, 17, 54, 284, 283, 2122, -530, 13794, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
102 17648, -4870, 2466, -423, 480, -1, 37, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
103 0, 18, 52, 302, 243, 2188, -825, 14194, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
104 17420, -4450, 2484, -347, 468, 7, 35, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
105 0, 18, 52, 302, 243, 2188, -825, 14194, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
106 17420, -4450, 2484, -347, 468, 7, 35, -3, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
107 0, 19, 50, 320, 199, 2249, -1133, 14583, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
108 17173, -4039, 2492, -274, 455, 14, 33, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
109 0, 19, 50, 320, 199, 2249, -1133, 14583, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
110 17173, -4039, 2492, -274, 455, 14, 33, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
111 -1, 21, 48, 339, 152, 2304, -1454, 14959, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
112 16908, -3637, 2490, -204, 440, 20, 32, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
113 -1, 21, 48, 339, 152, 2304, -1454, 14959, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
114 16908, -3637, 2490, -204, 440, 20, 32, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
115 -1, 22, 45, 357, 101, 2354, -1788, 15322, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
116 16624, -3245, 2479, -137, 425, 26, 30, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
117 -1, 22, 45, 357, 101, 2354, -1788, 15322, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
118 16624, -3245, 2479, -137, 425, 26, 30, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
119 -1, 24, 41, 374, 47, 2396, -2135, 15671, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
120 16323, -2864, 2460, -72, 409, 31, 28, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
121 -1, 24, 41, 374, 47, 2396, -2135, 15671, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
122 16323, -2864, 2460, -72, 409, 31, 28, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
123 -1, 26, 37, 391, -11, 2431, -2493, 16004, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
124 16005, -2494, 2432, -12, 392, 36, 26, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
125 -1, 26, 37, 391, -11, 2431, -2493, 16004, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
126 16005, -2494, 2432, -12, 392, 36, 26, -2, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
127 -2, -28, 31, -409, -72, -2460, -2864, -16323, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
128 15671, 2135, 2396, -47, 374, -41, 24, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
129 -2, -28, 31, -409, -72, -2460, -2864, -16323, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
130 15671, 2135, 2396, -47, 374, -41, 24, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
131 -2, -30, 26, -425, -137, -2479, -3245, -16624, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
132 15322, 1788, 2354, -101, 357, -45, 22, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
133 -2, -30, 26, -425, -137, -2479, -3245, -16624, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
134 15322, 1788, 2354, -101, 357, -45, 22, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
135 -2, -32, 20, -440, -204, -2490, -3637, -16908, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
136 14959, 1454, 2304, -152, 339, -48, 21, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
137 -2, -32, 20, -440, -204, -2490, -3637, -16908, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
138 14959, 1454, 2304, -152, 339, -48, 21, 1, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
139 -2, -33, 14, -455, -274, -2492, -4039, -17173, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
140 14583, 1133, 2249, -199, 320, -50, 19, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
141 -2, -33, 14, -455, -274, -2492, -4039, -17173, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
142 14583, 1133, 2249, -199, 320, -50, 19, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
143 -3, -35, 7, -468, -347, -2484, -4450, -17420, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
144 14194, 825, 2188, -243, 302, -52, 18, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
145 -3, -35, 7, -468, -347, -2484, -4450, -17420, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
146 14194, 825, 2188, -243, 302, -52, 18, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
147 -3, -37, -1, -480, -423, -2466, -4870, -17648, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
148 13794, 530, 2122, -283, 284, -54, 17, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
149 -3, -37, -1, -480, -423, -2466, -4870, -17648, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
150 13794, 530, 2122, -283, 284, -54, 17, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
151 -3, -39, -9, -491, -502, -2438, -5298, -17855, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
152 13383, 249, 2052, -320, 266, -56, 15, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
153 -3, -39, -9, -491, -502, -2438, -5298, -17855, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
154 13383, 249, 2052, -320, 266, -56, 15, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
155 -4, -41, -18, -501, -583, -2398, -5733, -18043, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
156 12963, -18, 1977, -354, 247, -56, 14, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
157 -4, -41, -18, -501, -583, -2398, -5733, -18043, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
158 12963, -18, 1977, -354, 247, -56, 14, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
159 -4, -43, -28, -508, -666, -2348, -6174, -18209, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
160 12534, -271, 1899, -384, 229, -57, 13, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
161 -4, -43, -28, -508, -666, -2348, -6174, -18209, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
162 12534, -271, 1899, -384, 229, -57, 13, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
163 -4, -44, -39, -515, -751, -2285, -6621, -18354, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
164 12097, -510, 1817, -411, 212, -57, 12, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
165 -4, -44, -39, -515, -751, -2285, -6621, -18354, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
166 12097, -510, 1817, -411, 212, -57, 12, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
167 -5, -46, -50, -519, -838, -2210, -7073, -18477, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
168 11654, -734, 1733, -435, 194, -57, 11, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
169 -5, -46, -50, -519, -838, -2210, -7073, -18477, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
170 11654, -734, 1733, -435, 194, -57, 11, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
171 -5, -48, -61, -522, -927, -2123, -7528, -18579, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
172 11205, -944, 1647, -456, 177, -57, 10, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
173 -5, -48, -61, -522, -927, -2123, -7528, -18579, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
174 11205, -944, 1647, -456, 177, -57, 10, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
175 -6, -49, -74, -522, -1016, -2023, -7987, -18658, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
176 10751, -1141, 1559, -474, 161, -57, 9, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
177 -6, -49, -74, -522, -1016, -2023, -7987, -18658, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
178 10751, -1141, 1559, -474, 161, -57, 9, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
179 -6, -51, -87, -520, -1107, -1910, -8448, -18714, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
180 10294, -1322, 1469, -488, 145, -56, 8, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
181 -6, -51, -87, -520, -1107, -1910, -8448, -18714, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
182 10294, -1322, 1469, -488, 145, -56, 8, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
183 -7, -52, -101, -516, -1197, -1784, -8910, -18748, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
184 9834, -1490, 1379, -500, 129, -55, 7, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
185 -7, -52, -101, -516, -1197, -1784, -8910, -18748, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
186 9834, -1490, 1379, -500, 129, -55, 7, 0, |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
187 }; |
84eaacdc380d
Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents:
23360
diff
changeset
|
188 |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
189 int synth_1to1_MMX(real *bandPtr, int channel, short *samples) |
4142 | 190 { |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
191 static short buffs[2][2][0x110] __attribute__((aligned(8))); |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
192 static int bo = 1; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
193 short *b0, (*buf)[0x110], *a, *b; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
194 short* window; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
195 int bo1, i = 8; |
11244 | 196 |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
197 if (channel == 0) { |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
198 bo = (bo - 1) & 0xf; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
199 buf = buffs[1]; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
200 } else { |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
201 samples++; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
202 buf = buffs[0]; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
203 } |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
204 |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
205 if (bo & 1) { |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
206 b0 = buf[1]; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
207 bo1 = bo + 1; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
208 a = buf[0] + bo; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
209 b = buf[1] + ((bo + 1) & 0xf); |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
210 } else { |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
211 b0 = buf[0]; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
212 bo1 = bo; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
213 b = buf[0] + bo; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
214 a = buf[1] + ((bo + 1) & 0xf); |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
215 } |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
216 |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
217 dct64_MMX_func(a, b, bandPtr); |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
218 window = mp3lib_decwins + 16 - bo1; |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
219 //printf("DEBUG: channel %d, bo %d, off %d\n", channel, bo, 16 - bo1); |
4142 | 220 __asm __volatile( |
21046
ba5087cb0bd4
Use ASMALIGN macro for better compatibility and remove SYS_DARWIN
reimar
parents:
21040
diff
changeset
|
221 ASMALIGN(4) |
4608 | 222 ".L03:\n\t" |
23360 | 223 "movq (%1),%%mm0\n\t" |
224 "movq 64(%1),%%mm4\n\t" | |
225 "pmaddwd (%2),%%mm0\n\t" | |
226 "pmaddwd 32(%2),%%mm4\n\t" | |
227 "movq 8(%1),%%mm1\n\t" | |
228 "movq 72(%1),%%mm5\n\t" | |
229 "pmaddwd 8(%2),%%mm1\n\t" | |
230 "pmaddwd 40(%2),%%mm5\n\t" | |
231 "movq 16(%1),%%mm2\n\t" | |
232 "movq 80(%1),%%mm6\n\t" | |
233 "pmaddwd 16(%2),%%mm2\n\t" | |
234 "pmaddwd 48(%2),%%mm6\n\t" | |
235 "movq 24(%1),%%mm3\n\t" | |
236 "movq 88(%1),%%mm7\n\t" | |
237 "pmaddwd 24(%2),%%mm3\n\t" | |
238 "pmaddwd 56(%2),%%mm7\n\t" | |
4142 | 239 "paddd %%mm1,%%mm0\n\t" |
240 "paddd %%mm5,%%mm4\n\t" | |
241 "paddd %%mm2,%%mm0\n\t" | |
242 "paddd %%mm6,%%mm4\n\t" | |
243 "paddd %%mm3,%%mm0\n\t" | |
244 "paddd %%mm7,%%mm4\n\t" | |
245 "movq %%mm0,%%mm1\n\t" | |
246 "movq %%mm4,%%mm5\n\t" | |
247 "psrlq $32,%%mm1\n\t" | |
248 "psrlq $32,%%mm5\n\t" | |
249 "paddd %%mm1,%%mm0\n\t" | |
250 "paddd %%mm5,%%mm4\n\t" | |
251 "psrad $13,%%mm0\n\t" | |
252 "psrad $13,%%mm4\n\t" | |
253 "packssdw %%mm0,%%mm0\n\t" | |
254 "packssdw %%mm4,%%mm4\n\t" | |
255 | |
23360 | 256 "movq (%3), %%mm1\n\t" |
4142 | 257 "punpckldq %%mm4, %%mm0\n\t" |
4246
3f677202418b
mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents:
4142
diff
changeset
|
258 "pand "MANGLE(one_null)", %%mm1\n\t" |
3f677202418b
mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents:
4142
diff
changeset
|
259 "pand "MANGLE(null_one)", %%mm0\n\t" |
4142 | 260 "por %%mm0, %%mm1\n\t" |
23360 | 261 "movq %%mm1,(%3)\n\t" |
4142 | 262 |
23360 | 263 "add $64,%2\n\t" |
264 "add $128,%1\n\t" | |
265 "add $8,%3\n\t" | |
4142 | 266 |
23360 | 267 "decl %0\n\t" |
4608 | 268 "jnz .L03\n\t" |
4142 | 269 |
23360 | 270 "movq (%1),%%mm0\n\t" |
271 "pmaddwd (%2),%%mm0\n\t" | |
272 "movq 8(%1),%%mm1\n\t" | |
273 "pmaddwd 8(%2),%%mm1\n\t" | |
274 "movq 16(%1),%%mm2\n\t" | |
275 "pmaddwd 16(%2),%%mm2\n\t" | |
276 "movq 24(%1),%%mm3\n\t" | |
277 "pmaddwd 24(%2),%%mm3\n\t" | |
4142 | 278 "paddd %%mm1,%%mm0\n\t" |
279 "paddd %%mm2,%%mm0\n\t" | |
280 "paddd %%mm3,%%mm0\n\t" | |
281 "movq %%mm0,%%mm1\n\t" | |
282 "psrlq $32,%%mm1\n\t" | |
283 "paddd %%mm1,%%mm0\n\t" | |
284 "psrad $13,%%mm0\n\t" | |
285 "packssdw %%mm0,%%mm0\n\t" | |
286 "movd %%mm0,%%eax\n\t" | |
23360 | 287 "movw %%ax, (%3)\n\t" |
288 "sub $32,%2\n\t" | |
289 "add $64,%1\n\t" | |
290 "add $4,%3\n\t" | |
23358
ccb70d86d797
Replace hardcoded 32-bit leal with equivalent add/sub so pointer arithmetic will be 64-bit under AMD64
zuxy
parents:
23342
diff
changeset
|
291 |
23360 | 292 "movl $7,%0\n\t" |
21046
ba5087cb0bd4
Use ASMALIGN macro for better compatibility and remove SYS_DARWIN
reimar
parents:
21040
diff
changeset
|
293 ASMALIGN(4) |
4608 | 294 ".L04:\n\t" |
23360 | 295 "movq (%1),%%mm0\n\t" |
296 "movq 64(%1),%%mm4\n\t" | |
297 "pmaddwd (%2),%%mm0\n\t" | |
298 "pmaddwd -32(%2),%%mm4\n\t" | |
299 "movq 8(%1),%%mm1\n\t" | |
300 "movq 72(%1),%%mm5\n\t" | |
301 "pmaddwd 8(%2),%%mm1\n\t" | |
302 "pmaddwd -24(%2),%%mm5\n\t" | |
303 "movq 16(%1),%%mm2\n\t" | |
304 "movq 80(%1),%%mm6\n\t" | |
305 "pmaddwd 16(%2),%%mm2\n\t" | |
306 "pmaddwd -16(%2),%%mm6\n\t" | |
307 "movq 24(%1),%%mm3\n\t" | |
308 "movq 88(%1),%%mm7\n\t" | |
309 "pmaddwd 24(%2),%%mm3\n\t" | |
310 "pmaddwd -8(%2),%%mm7\n\t" | |
4142 | 311 "paddd %%mm1,%%mm0\n\t" |
312 "paddd %%mm5,%%mm4\n\t" | |
313 "paddd %%mm2,%%mm0\n\t" | |
314 "paddd %%mm6,%%mm4\n\t" | |
315 "paddd %%mm3,%%mm0\n\t" | |
316 "paddd %%mm7,%%mm4\n\t" | |
317 "movq %%mm0,%%mm1\n\t" | |
318 "movq %%mm4,%%mm5\n\t" | |
319 "psrlq $32,%%mm1\n\t" | |
320 "psrlq $32,%%mm5\n\t" | |
321 "paddd %%mm0,%%mm1\n\t" | |
322 "paddd %%mm4,%%mm5\n\t" | |
323 "psrad $13,%%mm1\n\t" | |
324 "psrad $13,%%mm5\n\t" | |
325 "packssdw %%mm1,%%mm1\n\t" | |
326 "packssdw %%mm5,%%mm5\n\t" | |
327 "psubd %%mm0,%%mm0\n\t" | |
328 "psubd %%mm4,%%mm4\n\t" | |
329 "psubsw %%mm1,%%mm0\n\t" | |
330 "psubsw %%mm5,%%mm4\n\t" | |
331 | |
23360 | 332 "movq (%3), %%mm1\n\t" |
4142 | 333 "punpckldq %%mm4, %%mm0\n\t" |
4246
3f677202418b
mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents:
4142
diff
changeset
|
334 "pand "MANGLE(one_null)", %%mm1\n\t" |
3f677202418b
mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents:
4142
diff
changeset
|
335 "pand "MANGLE(null_one)", %%mm0\n\t" |
4142 | 336 "por %%mm0, %%mm1\n\t" |
23360 | 337 "movq %%mm1,(%3)\n\t" |
4142 | 338 |
23360 | 339 "sub $64,%2\n\t" |
340 "add $128,%1\n\t" | |
341 "add $8,%3\n\t" | |
342 "decl %0\n\t" | |
4608 | 343 "jnz .L04\n\t" |
4142 | 344 |
23360 | 345 "movq (%1),%%mm0\n\t" |
346 "pmaddwd (%2),%%mm0\n\t" | |
347 "movq 8(%1),%%mm1\n\t" | |
348 "pmaddwd 8(%2),%%mm1\n\t" | |
349 "movq 16(%1),%%mm2\n\t" | |
350 "pmaddwd 16(%2),%%mm2\n\t" | |
351 "movq 24(%1),%%mm3\n\t" | |
352 "pmaddwd 24(%2),%%mm3\n\t" | |
4142 | 353 "paddd %%mm1,%%mm0\n\t" |
354 "paddd %%mm2,%%mm0\n\t" | |
355 "paddd %%mm3,%%mm0\n\t" | |
356 "movq %%mm0,%%mm1\n\t" | |
357 "psrlq $32,%%mm1\n\t" | |
358 "paddd %%mm0,%%mm1\n\t" | |
359 "psrad $13,%%mm1\n\t" | |
360 "packssdw %%mm1,%%mm1\n\t" | |
361 "psubd %%mm0,%%mm0\n\t" | |
362 "psubsw %%mm1,%%mm0\n\t" | |
363 "movd %%mm0,%%eax\n\t" | |
23360 | 364 "movw %%ax,(%3)\n\t" |
4142 | 365 "emms\n\t" |
23360 | 366 :"+r"(i), "+r"(window), "+r"(b0), "+r"(samples) |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
367 : |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
368 :"memory", "%eax"); |
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
369 return 0; |
4142 | 370 } |
23342
e070d7f61e9a
Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents:
22375
diff
changeset
|
371 |