Mercurial > libavcodec.hg
comparison ppc/h264_altivec.c @ 7373:266d4949aa15 libavcodec
Remove AltiVec vector declaration compiler compatibility macros.
The original problem was that FSF and Apple gcc used a different syntax
for vector declarations, i.e. {} vs. (). Nowadays Apple gcc versions support
the standard {} syntax and versions that support {} are available on all
relevant Mac OS X versions. Thus the greater compatibility is no longer
worth cluttering the code with macros.
author | diego |
---|---|
date | Thu, 24 Jul 2008 10:53:32 +0000 |
parents | a8a79f5385f6 |
children | 5f3b62eaf6e5 |
comparison
equal
deleted
inserted
replaced
7372:e97d0795ee70 | 7373:266d4949aa15 |
---|---|
206 vec_u8_t vsrcCuc, vsrc2uc, vsrc3uc; | 206 vec_u8_t vsrcCuc, vsrc2uc, vsrc3uc; |
207 vec_s16_t vsrc2ssH, vsrc3ssH, psum; | 207 vec_s16_t vsrc2ssH, vsrc3ssH, psum; |
208 vec_u8_t vdst, ppsum, fsum; | 208 vec_u8_t vdst, ppsum, fsum; |
209 | 209 |
210 if (((unsigned long)dst) % 16 == 0) { | 210 if (((unsigned long)dst) % 16 == 0) { |
211 fperm = (vec_u8_t)AVV(0x10, 0x11, 0x12, 0x13, | 211 fperm = (vec_u8_t){0x10, 0x11, 0x12, 0x13, |
212 0x14, 0x15, 0x16, 0x17, | 212 0x14, 0x15, 0x16, 0x17, |
213 0x08, 0x09, 0x0A, 0x0B, | 213 0x08, 0x09, 0x0A, 0x0B, |
214 0x0C, 0x0D, 0x0E, 0x0F); | 214 0x0C, 0x0D, 0x0E, 0x0F}; |
215 } else { | 215 } else { |
216 fperm = (vec_u8_t)AVV(0x00, 0x01, 0x02, 0x03, | 216 fperm = (vec_u8_t){0x00, 0x01, 0x02, 0x03, |
217 0x04, 0x05, 0x06, 0x07, | 217 0x04, 0x05, 0x06, 0x07, |
218 0x18, 0x19, 0x1A, 0x1B, | 218 0x18, 0x19, 0x1A, 0x1B, |
219 0x1C, 0x1D, 0x1E, 0x1F); | 219 0x1C, 0x1D, 0x1E, 0x1F}; |
220 } | 220 } |
221 | 221 |
222 vsrcAuc = vec_ld(0, src); | 222 vsrcAuc = vec_ld(0, src); |
223 | 223 |
224 if (loadSecond) | 224 if (loadSecond) |
561 | 561 |
562 const vec_u16_t onev = vec_splat_u16(1); | 562 const vec_u16_t onev = vec_splat_u16(1); |
563 const vec_u16_t twov = vec_splat_u16(2); | 563 const vec_u16_t twov = vec_splat_u16(2); |
564 const vec_u16_t sixv = vec_splat_u16(6); | 564 const vec_u16_t sixv = vec_splat_u16(6); |
565 | 565 |
566 const vec_u8_t sel = (vec_u8_t) AVV(0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1); | 566 const vec_u8_t sel = (vec_u8_t) {0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1}; |
567 LOAD_ZERO; | 567 LOAD_ZERO; |
568 | 568 |
569 dct[0] += 32; // rounding for the >>6 at the end | 569 dct[0] += 32; // rounding for the >>6 at the end |
570 | 570 |
571 s0 = vec_ld(0x00, (int16_t*)dct); | 571 s0 = vec_ld(0x00, (int16_t*)dct); |