Mercurial > libavcodec.hg
comparison ppc/dsputil_altivec.c @ 1981:1ba490d60bb9 libavcodec
disable hadamard for gcc below 3.3 - better fix awaited
author | alex |
---|---|
date | Mon, 26 Apr 2004 08:51:56 +0000 |
parents | a6972a4f90c8 |
children | 31bf68b1792b |
comparison
equal
deleted
inserted
replaced
1980:a6972a4f90c8 | 1981:1ba490d60bb9 |
---|---|
1300 | 1300 |
1301 POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1); | 1301 POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1); |
1302 #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ | 1302 #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ |
1303 } | 1303 } |
1304 | 1304 |
1305 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 330) | |
1305 int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){ | 1306 int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){ |
1306 POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1); | 1307 POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1); |
1307 int sum; | 1308 int sum; |
1308 POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1); | 1309 POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1); |
1309 register const_vector unsigned char vzero = (const_vector unsigned char)vec_splat_u8(0); | 1310 register const_vector unsigned char vzero = (const_vector unsigned char)vec_splat_u8(0); |
1609 score += hadamard8_diff16x8_altivec(s, dst, src, stride, 8); | 1610 score += hadamard8_diff16x8_altivec(s, dst, src, stride, 8); |
1610 } | 1611 } |
1611 POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff16_num, 1); | 1612 POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff16_num, 1); |
1612 return score; | 1613 return score; |
1613 } | 1614 } |
1615 #endif | |
1614 | 1616 |
1615 int has_altivec(void) | 1617 int has_altivec(void) |
1616 { | 1618 { |
1617 #ifdef CONFIG_DARWIN | 1619 #ifdef CONFIG_DARWIN |
1618 int sels[2] = {CTL_HW, HW_VECTORUNIT}; | 1620 int sels[2] = {CTL_HW, HW_VECTORUNIT}; |