Revision 9655ffb5 libswscale/yuv2rgb_altivec.c

View differences:

libswscale/yuv2rgb_altivec.c
154 154

  
155 155
#define vec_merge3(x2,x1,x0,y0,y1,y2)       \
156 156
do {                                        \
157
    typeof(x0) o0,o2,o3;                    \
157
    __typeof__(x0) o0,o2,o3;                \
158 158
        o0 = vec_mergeh (x0,x1);            \
159 159
        y0 = vec_perm (o0, x2, perm_rgb_0); \
160 160
        o2 = vec_perm (o0, x2, perm_rgb_1); \
......
165 165

  
166 166
#define vec_mstbgr24(x0,x1,x2,ptr)      \
167 167
do {                                    \
168
    typeof(x0) _0,_1,_2;                \
168
    __typeof__(x0) _0,_1,_2;            \
169 169
    vec_merge3 (x0,x1,x2,_0,_1,_2);     \
170 170
    vec_st (_0, 0, ptr++);              \
171 171
    vec_st (_1, 0, ptr++);              \
......
174 174

  
175 175
#define vec_mstrgb24(x0,x1,x2,ptr)      \
176 176
do {                                    \
177
    typeof(x0) _0,_1,_2;                \
177
    __typeof__(x0) _0,_1,_2;            \
178 178
    vec_merge3 (x2,x1,x0,_0,_1,_2);     \
179 179
    vec_st (_0, 0, ptr++);              \
180 180
    vec_st (_1, 0, ptr++);              \
......
222 222

  
223 223
#define vec_unh(x) \
224 224
    (vector signed short) \
225
        vec_perm(x,(typeof(x)){0}, \
225
        vec_perm(x,(__typeof__(x)){0}, \
226 226
                 ((vector unsigned char){0x10,0x00,0x10,0x01,0x10,0x02,0x10,0x03,\
227 227
                                         0x10,0x04,0x10,0x05,0x10,0x06,0x10,0x07}))
228 228
#define vec_unl(x) \
229 229
    (vector signed short) \
230
        vec_perm(x,(typeof(x)){0}, \
230
        vec_perm(x,(__typeof__(x)){0}, \
231 231
                 ((vector unsigned char){0x10,0x08,0x10,0x09,0x10,0x0A,0x10,0x0B,\
232 232
                                         0x10,0x0C,0x10,0x0D,0x10,0x0E,0x10,0x0F}))
233 233

  
......
240 240
        ((vector unsigned short)vec_max (x,((vector signed short) {0})), \
241 241
         (vector unsigned short)vec_max (y,((vector signed short) {0})))
242 242

  
243
//#define out_pixels(a,b,c,ptr) vec_mstrgb32(typeof(a),((typeof (a)){0}),a,a,a,ptr)
243
//#define out_pixels(a,b,c,ptr) vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),a,a,a,ptr)
244 244

  
245 245

  
246 246
static inline void cvtyuvtoRGB (SwsContext *c,
......
441 441
}
442 442

  
443 443

  
444
#define out_abgr(a,b,c,ptr)  vec_mstrgb32(typeof(a),((typeof (a)){0}),c,b,a,ptr)
445
#define out_bgra(a,b,c,ptr)  vec_mstrgb32(typeof(a),c,b,a,((typeof (a)){0}),ptr)
446
#define out_rgba(a,b,c,ptr)  vec_mstrgb32(typeof(a),a,b,c,((typeof (a)){0}),ptr)
447
#define out_argb(a,b,c,ptr)  vec_mstrgb32(typeof(a),((typeof (a)){0}),a,b,c,ptr)
444
#define out_abgr(a,b,c,ptr)  vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),c,b,a,ptr)
445
#define out_bgra(a,b,c,ptr)  vec_mstrgb32(__typeof__(a),c,b,a,((__typeof__ (a)){0}),ptr)
446
#define out_rgba(a,b,c,ptr)  vec_mstrgb32(__typeof__(a),a,b,c,((__typeof__ (a)){0}),ptr)
447
#define out_argb(a,b,c,ptr)  vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),a,b,c,ptr)
448 448
#define out_rgb24(a,b,c,ptr) vec_mstrgb24(a,b,c,ptr)
449 449
#define out_bgr24(a,b,c,ptr) vec_mstbgr24(a,b,c,ptr)
450 450

  

Also available in: Unified diff