Mercurial > mplayer.hg
annotate libmpeg2/idct_altivec.c @ 11864:ee76aa308c0a
use inttypes.h and std types, this fixes compilation problems on solaris 9 x86
author | alex |
---|---|
date | Wed, 28 Jan 2004 08:02:40 +0000 |
parents | aeea70a0e72c |
children | d0a8810e155c |
rev | line source |
---|---|
9857 | 1 /* |
2 * idct_altivec.c | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> |
9857 | 4 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> |
5 * | |
6 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. | |
7 * See http://libmpeg2.sourceforge.net/ for updates. | |
8 * | |
9 * mpeg2dec is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * mpeg2dec is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 | |
24 #include "config.h" | |
25 | |
26 #ifdef ARCH_PPC | |
27 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
28 #ifdef HAVE_ALTIVEC_H |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
29 #include <altivec.h> |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
30 #endif |
9857 | 31 #include <inttypes.h> |
32 | |
33 #include "mpeg2.h" | |
34 #include "mpeg2_internal.h" | |
35 #include "attributes.h" | |
36 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
37 typedef vector signed char vector_s8_t; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
38 typedef vector unsigned char vector_u8_t; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
39 typedef vector signed short vector_s16_t; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
40 typedef vector unsigned short vector_u16_t; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
41 typedef vector signed int vector_s32_t; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
42 typedef vector unsigned int vector_u32_t; |
9857 | 43 |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
44 #if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
45 /* work around gcc <3.3 vec_mergel bug */ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
46 static inline vector_s16_t my_vec_mergel (vector_s16_t const A, |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
47 vector_s16_t const B) |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
48 { |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
49 static const vector_u8_t mergel = { |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
50 0x08, 0x09, 0x18, 0x19, 0x0a, 0x0b, 0x1a, 0x1b, |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
51 0x0c, 0x0d, 0x1c, 0x1d, 0x0e, 0x0f, 0x1e, 0x1f |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
52 }; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
53 return vec_perm (A, B, mergel); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
54 } |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
55 #undef vec_mergel |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
56 #define vec_mergel my_vec_mergel |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
57 #endif |
9857 | 58 |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
59 #ifdef HAVE_ALTIVEC_H /* gnu */ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
60 #define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
61 #else /* apple */ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
62 #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
63 #endif |
9857 | 64 |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
65 static const vector_s16_t constants ATTR_ALIGN(16) = |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
66 VEC_S16 (23170, 13573, 6518, 21895, -23170, -21895, 32, 31); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
67 static const vector_s16_t constants_1 ATTR_ALIGN(16) = |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
68 VEC_S16 (16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
69 static const vector_s16_t constants_2 ATTR_ALIGN(16) = |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
70 VEC_S16 (22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
71 static const vector_s16_t constants_3 ATTR_ALIGN(16) = |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
72 VEC_S16 (21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
73 static const vector_s16_t constants_4 ATTR_ALIGN(16) = |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
74 VEC_S16 (19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722); |
9857 | 75 |
76 #define IDCT_HALF \ | |
77 /* 1st stage */ \ | |
78 t1 = vec_mradds (a1, vx7, vx1 ); \ | |
79 t8 = vec_mradds (a1, vx1, vec_subs (zero, vx7)); \ | |
80 t7 = vec_mradds (a2, vx5, vx3); \ | |
81 t3 = vec_mradds (ma2, vx3, vx5); \ | |
82 \ | |
83 /* 2nd stage */ \ | |
84 t5 = vec_adds (vx0, vx4); \ | |
85 t0 = vec_subs (vx0, vx4); \ | |
86 t2 = vec_mradds (a0, vx6, vx2); \ | |
87 t4 = vec_mradds (a0, vx2, vec_subs (zero, vx6)); \ | |
88 t6 = vec_adds (t8, t3); \ | |
89 t3 = vec_subs (t8, t3); \ | |
90 t8 = vec_subs (t1, t7); \ | |
91 t1 = vec_adds (t1, t7); \ | |
92 \ | |
93 /* 3rd stage */ \ | |
94 t7 = vec_adds (t5, t2); \ | |
95 t2 = vec_subs (t5, t2); \ | |
96 t5 = vec_adds (t0, t4); \ | |
97 t0 = vec_subs (t0, t4); \ | |
98 t4 = vec_subs (t8, t3); \ | |
99 t3 = vec_adds (t8, t3); \ | |
100 \ | |
101 /* 4th stage */ \ | |
102 vy0 = vec_adds (t7, t1); \ | |
103 vy7 = vec_subs (t7, t1); \ | |
104 vy1 = vec_mradds (c4, t3, t5); \ | |
105 vy6 = vec_mradds (mc4, t3, t5); \ | |
106 vy2 = vec_mradds (c4, t4, t0); \ | |
107 vy5 = vec_mradds (mc4, t4, t0); \ | |
108 vy3 = vec_adds (t2, t6); \ | |
109 vy4 = vec_subs (t2, t6); | |
110 | |
111 #define IDCT \ | |
112 vector_s16_t vx0, vx1, vx2, vx3, vx4, vx5, vx6, vx7; \ | |
113 vector_s16_t vy0, vy1, vy2, vy3, vy4, vy5, vy6, vy7; \ | |
114 vector_s16_t a0, a1, a2, ma2, c4, mc4, zero, bias; \ | |
115 vector_s16_t t0, t1, t2, t3, t4, t5, t6, t7, t8; \ | |
116 vector_u16_t shift; \ | |
117 \ | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
118 c4 = vec_splat (constants, 0); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
119 a0 = vec_splat (constants, 1); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
120 a1 = vec_splat (constants, 2); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
121 a2 = vec_splat (constants, 3); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
122 mc4 = vec_splat (constants, 4); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
123 ma2 = vec_splat (constants, 5); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
124 bias = (vector_s16_t)vec_splat ((vector_s32_t)constants, 3); \ |
9857 | 125 \ |
126 zero = vec_splat_s16 (0); \ | |
127 shift = vec_splat_u16 (4); \ | |
128 \ | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
129 vx0 = vec_mradds (vec_sl (block[0], shift), constants_1, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
130 vx1 = vec_mradds (vec_sl (block[1], shift), constants_2, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
131 vx2 = vec_mradds (vec_sl (block[2], shift), constants_3, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
132 vx3 = vec_mradds (vec_sl (block[3], shift), constants_4, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
133 vx4 = vec_mradds (vec_sl (block[4], shift), constants_1, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
134 vx5 = vec_mradds (vec_sl (block[5], shift), constants_4, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
135 vx6 = vec_mradds (vec_sl (block[6], shift), constants_3, zero); \ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
136 vx7 = vec_mradds (vec_sl (block[7], shift), constants_2, zero); \ |
9857 | 137 \ |
138 IDCT_HALF \ | |
139 \ | |
140 vx0 = vec_mergeh (vy0, vy4); \ | |
141 vx1 = vec_mergel (vy0, vy4); \ | |
142 vx2 = vec_mergeh (vy1, vy5); \ | |
143 vx3 = vec_mergel (vy1, vy5); \ | |
144 vx4 = vec_mergeh (vy2, vy6); \ | |
145 vx5 = vec_mergel (vy2, vy6); \ | |
146 vx6 = vec_mergeh (vy3, vy7); \ | |
147 vx7 = vec_mergel (vy3, vy7); \ | |
148 \ | |
149 vy0 = vec_mergeh (vx0, vx4); \ | |
150 vy1 = vec_mergel (vx0, vx4); \ | |
151 vy2 = vec_mergeh (vx1, vx5); \ | |
152 vy3 = vec_mergel (vx1, vx5); \ | |
153 vy4 = vec_mergeh (vx2, vx6); \ | |
154 vy5 = vec_mergel (vx2, vx6); \ | |
155 vy6 = vec_mergeh (vx3, vx7); \ | |
156 vy7 = vec_mergel (vx3, vx7); \ | |
157 \ | |
158 vx0 = vec_adds (vec_mergeh (vy0, vy4), bias); \ | |
159 vx1 = vec_mergel (vy0, vy4); \ | |
160 vx2 = vec_mergeh (vy1, vy5); \ | |
161 vx3 = vec_mergel (vy1, vy5); \ | |
162 vx4 = vec_mergeh (vy2, vy6); \ | |
163 vx5 = vec_mergel (vy2, vy6); \ | |
164 vx6 = vec_mergeh (vy3, vy7); \ | |
165 vx7 = vec_mergel (vy3, vy7); \ | |
166 \ | |
167 IDCT_HALF \ | |
168 \ | |
169 shift = vec_splat_u16 (6); \ | |
170 vx0 = vec_sra (vy0, shift); \ | |
171 vx1 = vec_sra (vy1, shift); \ | |
172 vx2 = vec_sra (vy2, shift); \ | |
173 vx3 = vec_sra (vy3, shift); \ | |
174 vx4 = vec_sra (vy4, shift); \ | |
175 vx5 = vec_sra (vy5, shift); \ | |
176 vx6 = vec_sra (vy6, shift); \ | |
177 vx7 = vec_sra (vy7, shift); | |
178 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
179 void mpeg2_idct_copy_altivec (int16_t * const _block, uint8_t * dest, |
9857 | 180 const int stride) |
181 { | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
182 vector_s16_t * const block = (vector_s16_t *)_block; |
9857 | 183 vector_u8_t tmp; |
184 | |
185 IDCT | |
186 | |
187 #define COPY(dest,src) \ | |
188 tmp = vec_packsu (src, src); \ | |
189 vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \ | |
190 vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); | |
191 | |
192 COPY (dest, vx0) dest += stride; | |
193 COPY (dest, vx1) dest += stride; | |
194 COPY (dest, vx2) dest += stride; | |
195 COPY (dest, vx3) dest += stride; | |
196 COPY (dest, vx4) dest += stride; | |
197 COPY (dest, vx5) dest += stride; | |
198 COPY (dest, vx6) dest += stride; | |
199 COPY (dest, vx7) | |
200 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
201 block[0] = block[1] = block[2] = block[3] = zero; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
202 block[4] = block[5] = block[6] = block[7] = zero; |
9857 | 203 } |
204 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
205 void mpeg2_idct_add_altivec (const int last, int16_t * const _block, |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
206 uint8_t * dest, const int stride) |
9857 | 207 { |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
208 vector_s16_t * const block = (vector_s16_t *)_block; |
9857 | 209 vector_u8_t tmp; |
210 vector_s16_t tmp2, tmp3; | |
211 vector_u8_t perm0; | |
212 vector_u8_t perm1; | |
213 vector_u8_t p0, p1, p; | |
214 | |
215 IDCT | |
216 | |
217 p0 = vec_lvsl (0, dest); | |
218 p1 = vec_lvsl (stride, dest); | |
219 p = vec_splat_u8 (-1); | |
220 perm0 = vec_mergeh (p, p0); | |
221 perm1 = vec_mergeh (p, p1); | |
222 | |
223 #define ADD(dest,src,perm) \ | |
224 /* *(uint64_t *)&tmp = *(uint64_t *)dest; */ \ | |
225 tmp = vec_ld (0, dest); \ | |
226 tmp2 = (vector_s16_t)vec_perm (tmp, (vector_u8_t)zero, perm); \ | |
227 tmp3 = vec_adds (tmp2, src); \ | |
228 tmp = vec_packsu (tmp3, tmp3); \ | |
229 vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \ | |
230 vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); | |
231 | |
232 ADD (dest, vx0, perm0) dest += stride; | |
233 ADD (dest, vx1, perm1) dest += stride; | |
234 ADD (dest, vx2, perm0) dest += stride; | |
235 ADD (dest, vx3, perm1) dest += stride; | |
236 ADD (dest, vx4, perm0) dest += stride; | |
237 ADD (dest, vx5, perm1) dest += stride; | |
238 ADD (dest, vx6, perm0) dest += stride; | |
239 ADD (dest, vx7, perm1) | |
240 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
241 block[0] = block[1] = block[2] = block[3] = zero; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
242 block[4] = block[5] = block[6] = block[7] = zero; |
9857 | 243 } |
244 | |
10270
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
245 void mpeg2_idct_altivec_init (void) |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
246 { |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
247 extern uint8_t mpeg2_scan_norm[64]; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
248 extern uint8_t mpeg2_scan_alt[64]; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
249 int i, j; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
250 |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
251 /* the altivec idct uses a transposed input, so we patch scan tables */ |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
252 for (i = 0; i < 64; i++) { |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
253 j = mpeg2_scan_norm[i]; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
254 mpeg2_scan_norm[i] = (j >> 3) | ((j & 7) << 3); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
255 j = mpeg2_scan_alt[i]; |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
256 mpeg2_scan_alt[i] = (j >> 3) | ((j & 7) << 3); |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
257 } |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
258 } |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
259 |
aeea70a0e72c
libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents:
9857
diff
changeset
|
260 #endif |