Revision aab34ca0 libavcodec/ppc/dsputil_altivec.c

View differences:

libavcodec/ppc/dsputil_altivec.c
49 49
{
50 50
    int i;
51 51
    int s __attribute__((aligned(16)));
52
    const vector unsigned char zero = (const vector unsigned char)vec_splat_u8(0);
52
    const_vector unsigned char zero = (const_vector unsigned char)vec_splat_u8(0);
53 53
    vector unsigned char *tv;
54 54
    vector unsigned char pix1v, pix2v, pix2iv, avgv, t5;
55 55
    vector unsigned int sad;
......
96 96
{
97 97
    int i;
98 98
    int s __attribute__((aligned(16)));
99
    const vector unsigned char zero = (const vector unsigned char)vec_splat_u8(0);
99
    const_vector unsigned char zero = (const_vector unsigned char)vec_splat_u8(0);
100 100
    vector unsigned char *tv;
101 101
    vector unsigned char pix1v, pix2v, pix3v, avgv, t5;
102 102
    vector unsigned int sad;
......
157 157
    int i;
158 158
    int s __attribute__((aligned(16)));
159 159
    uint8_t *pix3 = pix2 + line_size;
160
    const vector unsigned char zero = (const vector unsigned char)vec_splat_u8(0);
161
    const vector unsigned short two = (const vector unsigned short)vec_splat_u16(2);
160
    const_vector unsigned char zero = (const_vector unsigned char)vec_splat_u8(0);
161
    const_vector unsigned short two = (const_vector unsigned short)vec_splat_u16(2);
162 162
    vector unsigned char *tv, avgv, t5;
163 163
    vector unsigned char pix1v, pix2v, pix3v, pix2iv, pix3iv;
164 164
    vector unsigned short pix2lv, pix2hv, pix2ilv, pix2ihv;
......
257 257
{
258 258
    int i;
259 259
    int s __attribute__((aligned(16)));
260
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
260
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
261 261
    vector unsigned char perm1, perm2, *pix1v, *pix2v;
262 262
    vector unsigned char t1, t2, t3,t4, t5;
263 263
    vector unsigned int sad;
......
299 299
{
300 300
    int i;
301 301
    int s __attribute__((aligned(16)));
302
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
302
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
303 303
    vector unsigned char perm1, perm2, permclear, *pix1v, *pix2v;
304 304
    vector unsigned char t1, t2, t3,t4, t5;
305 305
    vector unsigned int sad;
......
344 344
{
345 345
    int i;
346 346
    int s __attribute__((aligned(16)));
347
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
347
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
348 348
    vector unsigned char *tv;
349 349
    vector unsigned char pixv;
350 350
    vector unsigned int sv;
......
380 380
{
381 381
    int i;
382 382
    int s __attribute__((aligned(16)));
383
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
383
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
384 384
    vector unsigned char perm1, perm2, permclear, *pix1v, *pix2v;
385 385
    vector unsigned char t1, t2, t3,t4, t5;
386 386
    vector unsigned int sum;
......
436 436
{
437 437
    int i;
438 438
    int s __attribute__((aligned(16)));
439
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
439
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
440 440
    vector unsigned char perm1, perm2, *pix1v, *pix2v;
441 441
    vector unsigned char t1, t2, t3,t4, t5;
442 442
    vector unsigned int sum;
......
480 480

  
481 481
int pix_sum_altivec(uint8_t * pix, int line_size)
482 482
{
483
    const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
483
    const_vector unsigned int zero = (const_vector unsigned int)vec_splat_u32(0);
484 484
    vector unsigned char perm, *pixv;
485 485
    vector unsigned char t1;
486 486
    vector unsigned int sad;
......
515 515
{
516 516
    int i;
517 517
    vector unsigned char perm, bytes, *pixv;
518
    const vector unsigned char zero = (const vector unsigned char)vec_splat_u8(0);
518
    const_vector unsigned char zero = (const_vector unsigned char)vec_splat_u8(0);
519 519
    vector signed short shorts;
520 520

  
521 521
    for(i=0;i<8;i++)
......
542 542
{
543 543
    int i;
544 544
    vector unsigned char perm, bytes, *pixv;
545
    const vector unsigned char zero = (const vector unsigned char)vec_splat_u8(0);
545
    const_vector unsigned char zero = (const_vector unsigned char)vec_splat_u8(0);
546 546
    vector signed short shorts1, shorts2;
547 547

  
548 548
    for(i=0;i<4;i++)
......
654 654
POWERPC_PERF_START_COUNT(altivec_put_pixels16_num, 1);
655 655

  
656 656
    for(i=0; i<h; i++) {
657
      *((uint32_t*)(block )) = (((const struct unaligned_32 *) (pixels))->l);
658
      *((uint32_t*)(block+4)) = (((const struct unaligned_32 *) (pixels+4))->l);
659
      *((uint32_t*)(block+8)) = (((const struct unaligned_32 *) (pixels+8))->l);
660
      *((uint32_t*)(block+12)) = (((const struct unaligned_32 *) (pixels+12))->l);
657
      *((uint32_t*)(block)) = LD32(pixels);
658
      *((uint32_t*)(block+4)) = LD32(pixels+4);
659
      *((uint32_t*)(block+8)) = LD32(pixels+8);
660
      *((uint32_t*)(block+12)) = LD32(pixels+12);
661 661
      pixels+=line_size;
662 662
      block +=line_size;
663 663
    }
......
729 729
POWERPC_PERF_START_COUNT(altivec_avg_pixels16_num, 1);
730 730

  
731 731
    for(i=0; i<h; i++) {
732
      op_avg(*((uint32_t*)(block)),(((const struct unaligned_32 *)(pixels))->l));
733
      op_avg(*((uint32_t*)(block+4)),(((const struct unaligned_32 *)(pixels+4))->l));
734
      op_avg(*((uint32_t*)(block+8)),(((const struct unaligned_32 *)(pixels+8))->l));
735
      op_avg(*((uint32_t*)(block+12)),(((const struct unaligned_32 *)(pixels+12))->l));
732
      op_avg(*((uint32_t*)(block)),LD32(pixels));
733
      op_avg(*((uint32_t*)(block+4)),LD32(pixels+4));
734
      op_avg(*((uint32_t*)(block+8)),LD32(pixels+8));
735
      op_avg(*((uint32_t*)(block+12)),LD32(pixels+12));
736 736
      pixels+=line_size;
737 737
      block +=line_size;
738 738
    }
......
878 878
     blockv, temp1, temp2;
879 879
   register vector unsigned short
880 880
     pixelssum1, pixelssum2, temp3;
881
   register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
882
   register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
881
   register const_vector unsigned char vczero = (const_vector unsigned char)vec_splat_u8(0);
882
   register const_vector unsigned short vctwo = (const_vector unsigned short)vec_splat_u16(2);
883 883
   
884 884
   temp1 = vec_ld(0, pixels);
885 885
   temp2 = vec_ld(16, pixels);
......
993 993
     blockv, temp1, temp2;
994 994
   register vector unsigned short
995 995
     pixelssum1, pixelssum2, temp3;
996
   register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
997
   register const vector unsigned short vcone = (const vector unsigned short)vec_splat_u16(1);
998
   register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
996
   register const_vector unsigned char vczero = (const_vector unsigned char)vec_splat_u8(0);
997
   register const_vector unsigned short vcone = (const_vector unsigned short)vec_splat_u16(1);
998
   register const_vector unsigned short vctwo = (const_vector unsigned short)vec_splat_u16(2);
999 999
   
1000 1000
   temp1 = vec_ld(0, pixels);
1001 1001
   temp2 = vec_ld(16, pixels);
......
1109 1109
   register vector unsigned short
1110 1110
     pixelssum1, pixelssum2, temp3,
1111 1111
     pixelssum3, pixelssum4, temp4;
1112
   register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
1113
   register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
1112
   register const_vector unsigned char vczero = (const_vector unsigned char)vec_splat_u8(0);
1113
   register const_vector unsigned short vctwo = (const_vector unsigned short)vec_splat_u16(2);
1114 1114

  
1115 1115
POWERPC_PERF_START_COUNT(altivec_put_pixels16_xy2_num, 1);
1116 1116
 
......
1230 1230
   register vector unsigned short
1231 1231
     pixelssum1, pixelssum2, temp3,
1232 1232
     pixelssum3, pixelssum4, temp4;
1233
   register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
1234
   register const vector unsigned short vcone = (const vector unsigned short)vec_splat_u16(1);
1235
   register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
1233
   register const_vector unsigned char vczero = (const_vector unsigned char)vec_splat_u8(0);
1234
   register const_vector unsigned short vcone = (const_vector unsigned short)vec_splat_u16(1);
1235
   register const_vector unsigned short vctwo = (const_vector unsigned short)vec_splat_u16(2);
1236 1236

  
1237 1237
POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
1238 1238
 

Also available in: Unified diff