comparison libswscale/ppc/yuv2rgb_altivec.c @ 29308:880c5d014d37

Use DECLARE_ALIGNED macro instead of __attribute__((aligned)) for ppc code.
author ramiro
date Thu, 04 Jun 2009 22:50:38 +0000
parents 882a1f5613e1
children c812ae703e3d
comparison
equal deleted inserted replaced
29307:5efc5acb0f7c 29308:880c5d014d37
751 } 751 }
752 752
753 void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], int brightness, int contrast, int saturation) 753 void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], int brightness, int contrast, int saturation)
754 { 754 {
755 union { 755 union {
756 signed short tmp[8] __attribute__ ((aligned(16))); 756 DECLARE_ALIGNED(16, signed short, tmp[8]);
757 vector signed short vec; 757 vector signed short vec;
758 } buf; 758 } buf;
759 759
760 buf.tmp[0] = ((0xffffLL) * contrast>>8)>>9; //cy 760 buf.tmp[0] = ((0xffffLL) * contrast>>8)>>9; //cy
761 buf.tmp[1] = -256*brightness; //oy 761 buf.tmp[1] = -256*brightness; //oy
798 vector unsigned char R,G,B; 798 vector unsigned char R,G,B;
799 vector unsigned char *out,*nout; 799 vector unsigned char *out,*nout;
800 800
801 vector signed short RND = vec_splat_s16(1<<3); 801 vector signed short RND = vec_splat_s16(1<<3);
802 vector unsigned short SCL = vec_splat_u16(4); 802 vector unsigned short SCL = vec_splat_u16(4);
803 unsigned long scratch[16] __attribute__ ((aligned (16))); 803 DECLARE_ALIGNED(16, unsigned long, scratch[16]);
804 804
805 vector signed short *YCoeffs, *CCoeffs; 805 vector signed short *YCoeffs, *CCoeffs;
806 806
807 YCoeffs = c->vYCoeffsBank+dstY*lumFilterSize; 807 YCoeffs = c->vYCoeffsBank+dstY*lumFilterSize;
808 CCoeffs = c->vCCoeffsBank+dstY*chrFilterSize; 808 CCoeffs = c->vCCoeffsBank+dstY*chrFilterSize;