Mercurial > libavcodec.hg
annotate alpha/simple_idct_alpha.c @ 1829:7ae26b6e197f libavcodec
set AVFrame.pts based upon framerate if its 0
detect & warn if the user prvides pts only for some frames, and try to guess the missing ones
author | michael |
---|---|
date | Wed, 25 Feb 2004 02:05:50 +0000 |
parents | 296c7fc8358f |
children | e44ff53b1c85 |
rev | line source |
---|---|
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
1 /* |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
2 * Simple IDCT (Alpha optimized) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
3 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
4 * Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at> |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
5 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
6 * This library is free software; you can redistribute it and/or |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
9 * version 2 of the License, or (at your option) any later version. |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
10 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
15 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
17 * License along with this library; if not, write to the Free Software |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
19 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
20 * based upon some outcommented c code from mpeg2dec (idct_mmx.c |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
21 * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
22 * |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
23 * Alpha optimiziations by Mns Rullgrd <mru@users.sourceforge.net> |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
24 * and Falk Hueffner <falk@debian.org> |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
25 */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
26 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
27 #include "asm.h" |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
28 #include "../dsputil.h" |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
29 |
897 | 30 extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, |
31 int line_size); | |
32 extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, | |
33 int line_size); | |
34 | |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
35 // cos(i * M_PI / 16) * sqrt(2) * (1 << 14) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
36 // W4 is actually exactly 16384, but using 16383 works around |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
37 // accumulating rounding errors for some encoders |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
38 #define W1 ((int_fast32_t) 22725) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
39 #define W2 ((int_fast32_t) 21407) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
40 #define W3 ((int_fast32_t) 19266) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
41 #define W4 ((int_fast32_t) 16383) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
42 #define W5 ((int_fast32_t) 12873) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
43 #define W6 ((int_fast32_t) 8867) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
44 #define W7 ((int_fast32_t) 4520) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
45 #define ROW_SHIFT 11 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
46 #define COL_SHIFT 20 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
47 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
48 /* 0: all entries 0, 1: only first entry nonzero, 2: otherwise */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
49 static inline int idct_row(DCTELEM *row) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
50 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
51 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3, t; |
1077 | 52 uint64_t l, r, t2; |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
53 l = ldq(row); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
54 r = ldq(row + 4); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
55 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
56 if (l == 0 && r == 0) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
57 return 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
58 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
59 a0 = W4 * sextw(l) + (1 << (ROW_SHIFT - 1)); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
60 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
61 if (((l & ~0xffffUL) | r) == 0) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
62 a0 >>= ROW_SHIFT; |
1077 | 63 t2 = (uint16_t) a0; |
64 t2 |= t2 << 16; | |
65 t2 |= t2 << 32; | |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
66 |
1077 | 67 stq(t2, row); |
68 stq(t2, row + 4); | |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
69 return 1; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
70 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
71 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
72 a1 = a0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
73 a2 = a0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
74 a3 = a0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
75 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
76 t = extwl(l, 4); /* row[2] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
77 if (t != 0) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
78 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
79 a0 += W2 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
80 a1 += W6 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
81 a2 -= W6 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
82 a3 -= W2 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
83 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
84 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
85 t = extwl(r, 0); /* row[4] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
86 if (t != 0) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
87 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
88 a0 += W4 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
89 a1 -= W4 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
90 a2 -= W4 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
91 a3 += W4 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
92 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
93 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
94 t = extwl(r, 4); /* row[6] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
95 if (t != 0) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
96 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
97 a0 += W6 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
98 a1 -= W2 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
99 a2 += W2 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
100 a3 -= W6 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
101 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
102 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
103 t = extwl(l, 2); /* row[1] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
104 if (t != 0) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
105 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
106 b0 = W1 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
107 b1 = W3 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
108 b2 = W5 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
109 b3 = W7 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
110 } else { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
111 b0 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
112 b1 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
113 b2 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
114 b3 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
115 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
116 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
117 t = extwl(l, 6); /* row[3] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
118 if (t) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
119 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
120 b0 += W3 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
121 b1 -= W7 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
122 b2 -= W1 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
123 b3 -= W5 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
124 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
125 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
126 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
127 t = extwl(r, 2); /* row[5] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
128 if (t) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
129 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
130 b0 += W5 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
131 b1 -= W1 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
132 b2 += W7 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
133 b3 += W3 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
134 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
135 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
136 t = extwl(r, 6); /* row[7] */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
137 if (t) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
138 t = sextw(t); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
139 b0 += W7 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
140 b1 -= W5 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
141 b2 += W3 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
142 b3 -= W1 * t; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
143 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
144 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
145 row[0] = (a0 + b0) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
146 row[1] = (a1 + b1) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
147 row[2] = (a2 + b2) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
148 row[3] = (a3 + b3) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
149 row[4] = (a3 - b3) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
150 row[5] = (a2 - b2) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
151 row[6] = (a1 - b1) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
152 row[7] = (a0 - b0) >> ROW_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
153 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
154 return 2; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
155 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
156 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
157 static inline void idct_col(DCTELEM *col) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
158 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
159 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
160 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
161 col[0] += (1 << (COL_SHIFT - 1)) / W4; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
162 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
163 a0 = W4 * col[8 * 0]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
164 a1 = W4 * col[8 * 0]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
165 a2 = W4 * col[8 * 0]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
166 a3 = W4 * col[8 * 0]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
167 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
168 if (col[8 * 2]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
169 a0 += W2 * col[8 * 2]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
170 a1 += W6 * col[8 * 2]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
171 a2 -= W6 * col[8 * 2]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
172 a3 -= W2 * col[8 * 2]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
173 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
174 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
175 if (col[8 * 4]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
176 a0 += W4 * col[8 * 4]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
177 a1 -= W4 * col[8 * 4]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
178 a2 -= W4 * col[8 * 4]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
179 a3 += W4 * col[8 * 4]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
180 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
181 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
182 if (col[8 * 6]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
183 a0 += W6 * col[8 * 6]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
184 a1 -= W2 * col[8 * 6]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
185 a2 += W2 * col[8 * 6]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
186 a3 -= W6 * col[8 * 6]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
187 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
188 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
189 if (col[8 * 1]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
190 b0 = W1 * col[8 * 1]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
191 b1 = W3 * col[8 * 1]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
192 b2 = W5 * col[8 * 1]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
193 b3 = W7 * col[8 * 1]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
194 } else { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
195 b0 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
196 b1 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
197 b2 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
198 b3 = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
199 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
200 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
201 if (col[8 * 3]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
202 b0 += W3 * col[8 * 3]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
203 b1 -= W7 * col[8 * 3]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
204 b2 -= W1 * col[8 * 3]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
205 b3 -= W5 * col[8 * 3]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
206 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
207 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
208 if (col[8 * 5]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
209 b0 += W5 * col[8 * 5]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
210 b1 -= W1 * col[8 * 5]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
211 b2 += W7 * col[8 * 5]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
212 b3 += W3 * col[8 * 5]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
213 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
214 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
215 if (col[8 * 7]) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
216 b0 += W7 * col[8 * 7]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
217 b1 -= W5 * col[8 * 7]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
218 b2 += W3 * col[8 * 7]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
219 b3 -= W1 * col[8 * 7]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
220 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
221 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
222 col[8 * 0] = (a0 + b0) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
223 col[8 * 7] = (a0 - b0) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
224 col[8 * 1] = (a1 + b1) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
225 col[8 * 6] = (a1 - b1) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
226 col[8 * 2] = (a2 + b2) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
227 col[8 * 5] = (a2 - b2) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
228 col[8 * 3] = (a3 + b3) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
229 col[8 * 4] = (a3 - b3) >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
230 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
231 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
232 /* If all rows but the first one are zero after row transformation, |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
233 all rows will be identical after column transformation. */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
234 static inline void idct_col2(DCTELEM *col) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
235 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
236 int i; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
237 uint64_t l, r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
238 uint64_t *lcol = (uint64_t *) col; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
239 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
240 for (i = 0; i < 8; ++i) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
241 int_fast32_t a0 = col[0] + (1 << (COL_SHIFT - 1)) / W4; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
242 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
243 a0 *= W4; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
244 col[0] = a0 >> COL_SHIFT; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
245 ++col; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
246 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
247 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
248 l = lcol[0]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
249 r = lcol[1]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
250 lcol[ 2] = l; lcol[ 3] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
251 lcol[ 4] = l; lcol[ 5] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
252 lcol[ 6] = l; lcol[ 7] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
253 lcol[ 8] = l; lcol[ 9] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
254 lcol[10] = l; lcol[11] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
255 lcol[12] = l; lcol[13] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
256 lcol[14] = l; lcol[15] = r; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
257 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
258 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
259 void simple_idct_axp(DCTELEM *block) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
260 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
261 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
262 int i; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
263 int rowsZero = 1; /* all rows except row 0 zero */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
264 int rowsConstant = 1; /* all rows consist of a constant value */ |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
265 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
266 for (i = 0; i < 8; i++) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
267 int sparseness = idct_row(block + 8 * i); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
268 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
269 if (i > 0 && sparseness > 0) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
270 rowsZero = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
271 if (sparseness == 2) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
272 rowsConstant = 0; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
273 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
274 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
275 if (rowsZero) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
276 idct_col2(block); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
277 } else if (rowsConstant) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
278 uint64_t *lblock = (uint64_t *) block; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
279 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
280 idct_col(block); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
281 for (i = 0; i < 8; i += 2) { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
282 uint64_t v = (uint16_t) block[i * 8]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
283 uint64_t w = (uint16_t) block[i * 8 + 8]; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
284 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
285 v |= v << 16; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
286 w |= w << 16; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
287 v |= v << 32; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
288 w |= w << 32; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
289 lblock[0] = v; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
290 lblock[1] = v; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
291 lblock[2] = w; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
292 lblock[3] = w; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
293 lblock += 4; |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
294 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
295 } else { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
296 for (i = 0; i < 8; i++) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
297 idct_col(block + i); |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
298 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
299 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
300 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
301 void simple_idct_put_axp(uint8_t *dest, int line_size, DCTELEM *block) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
302 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
303 simple_idct_axp(block); |
897 | 304 put_pixels_clamped_axp_p(block, dest, line_size); |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
305 } |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
306 |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
307 void simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block) |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
308 { |
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
309 simple_idct_axp(block); |
897 | 310 add_pixels_clamped_axp_p(block, dest, line_size); |
744
2f7da29ede37
Move Alpha optimized IDCT to own file. Based on a patch by Mns
mellum
parents:
diff
changeset
|
311 } |