comparison ppc/dsputil_altivec.c @ 1277:f3152eb76f1a libavcodec

altivec gcc-3 fixes by (Magnus Damm <damm at opensource dot se>)
author michaelni
date Wed, 21 May 2003 17:50:57 +0000
parents b32afefe7d33
children 09b8fe0f0139
comparison
equal deleted inserted replaced
1276:d5719a953ee0 1277:f3152eb76f1a
17 * License along with this library; if not, write to the Free Software 17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21 #include "../dsputil.h" 21 #include "../dsputil.h"
22
23 #include "gcc_fixes.h"
24
22 #include "dsputil_altivec.h" 25 #include "dsputil_altivec.h"
23 26
24 #ifdef CONFIG_DARWIN 27 #ifdef CONFIG_DARWIN
25 #include <sys/sysctl.h> 28 #include <sys/sysctl.h>
26 #else /* CONFIG_DARWIN */ 29 #else /* CONFIG_DARWIN */
301 vector unsigned char t1, t2, t3,t4, t5; 304 vector unsigned char t1, t2, t3,t4, t5;
302 vector unsigned int sad; 305 vector unsigned int sad;
303 vector signed int sumdiffs; 306 vector signed int sumdiffs;
304 307
305 sad = (vector unsigned int)vec_splat_u32(0); 308 sad = (vector unsigned int)vec_splat_u32(0);
306 #ifdef CONFIG_DARWIN 309
307 permclear = (vector unsigned char)(255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0); 310 permclear = (vector unsigned char)AVV(255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0);
308 #else
309 permclear = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
310 #endif
311 311
312 for(i=0;i<8;i++) { 312 for(i=0;i<8;i++) {
313 /* Read potentially unaligned pixels into t1 and t2 313 /* Read potentially unaligned pixels into t1 and t2
314 Since we're reading 16 pixels, and actually only want 8, 314 Since we're reading 16 pixels, and actually only want 8,
315 mask out the last 8 pixels. The 0s don't change the sum. */ 315 mask out the last 8 pixels. The 0s don't change the sum. */
385 vector unsigned char t1, t2, t3,t4, t5; 385 vector unsigned char t1, t2, t3,t4, t5;
386 vector unsigned int sum; 386 vector unsigned int sum;
387 vector signed int sumsqr; 387 vector signed int sumsqr;
388 388
389 sum = (vector unsigned int)vec_splat_u32(0); 389 sum = (vector unsigned int)vec_splat_u32(0);
390 #ifdef CONFIG_DARWIN 390
391 permclear = (vector unsigned char)(255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0); 391 permclear = (vector unsigned char)AVV(255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0);
392 #else 392
393 permclear = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
394 #endif
395 393
396 for(i=0;i<8;i++) { 394 for(i=0;i<8;i++) {
397 /* Read potentially unaligned pixels into t1 and t2 395 /* Read potentially unaligned pixels into t1 and t2
398 Since we're reading 16 pixels, and actually only want 8, 396 Since we're reading 16 pixels, and actually only want 8,
399 mask out the last 8 pixels. The 0s don't change the sum. */ 397 mask out the last 8 pixels. The 0s don't change the sum. */