Revision ed040f35

View differences:

libavcodec/ppc/h264_altivec.c
32 32

  
33 33
#define OP_U8_ALTIVEC                          PUT_OP_U8_ALTIVEC
34 34
#define PREFIX_h264_chroma_mc8_altivec         put_h264_chroma_mc8_altivec
35
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   put_no_rnd_vc1_chroma_mc8_altivec
36 35
#define PREFIX_h264_chroma_mc8_num             altivec_put_h264_chroma_mc8_num
37 36
#define PREFIX_h264_qpel16_h_lowpass_altivec   put_h264_qpel16_h_lowpass_altivec
38 37
#define PREFIX_h264_qpel16_h_lowpass_num       altivec_put_h264_qpel16_h_lowpass_num
......
43 42
#include "h264_template_altivec.c"
44 43
#undef OP_U8_ALTIVEC
45 44
#undef PREFIX_h264_chroma_mc8_altivec
46
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
47 45
#undef PREFIX_h264_chroma_mc8_num
48 46
#undef PREFIX_h264_qpel16_h_lowpass_altivec
49 47
#undef PREFIX_h264_qpel16_h_lowpass_num
......
54 52

  
55 53
#define OP_U8_ALTIVEC                          AVG_OP_U8_ALTIVEC
56 54
#define PREFIX_h264_chroma_mc8_altivec         avg_h264_chroma_mc8_altivec
57
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   avg_no_rnd_vc1_chroma_mc8_altivec
58 55
#define PREFIX_h264_chroma_mc8_num             altivec_avg_h264_chroma_mc8_num
59 56
#define PREFIX_h264_qpel16_h_lowpass_altivec   avg_h264_qpel16_h_lowpass_altivec
60 57
#define PREFIX_h264_qpel16_h_lowpass_num       altivec_avg_h264_qpel16_h_lowpass_num
......
65 62
#include "h264_template_altivec.c"
66 63
#undef OP_U8_ALTIVEC
67 64
#undef PREFIX_h264_chroma_mc8_altivec
68
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
69 65
#undef PREFIX_h264_chroma_mc8_num
70 66
#undef PREFIX_h264_qpel16_h_lowpass_altivec
71 67
#undef PREFIX_h264_qpel16_h_lowpass_num
......
973 969
    if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
974 970
        c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec;
975 971
        c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec;
976
        c->put_no_rnd_vc1_chroma_pixels_tab[0] = put_no_rnd_vc1_chroma_mc8_altivec;
977
        c->avg_no_rnd_vc1_chroma_pixels_tab[0] = avg_no_rnd_vc1_chroma_mc8_altivec;
978 972

  
979 973
#define dspfunc(PFX, IDX, NUM) \
980 974
        c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_altivec; \
libavcodec/ppc/h264_template_altivec.c
75 75
#define noop(a) a
76 76
#define add28(a) vec_add(v28ss, a)
77 77

  
78
#ifdef PREFIX_h264_chroma_mc8_altivec
78 79
static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
79 80
                                    int stride, int h, int x, int y) {
80 81
    DECLARE_ALIGNED(16, signed int, ABCD)[4] =
......
201 202
        }
202 203
    }
203 204
}
205
#endif
204 206

  
205 207
/* this code assume that stride % 16 == 0 */
208
#ifdef PREFIX_no_rnd_vc1_chroma_mc8_altivec
206 209
static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stride, int h, int x, int y) {
207 210
   DECLARE_ALIGNED(16, signed int, ABCD)[4] =
208 211
                        {((8 - x) * (8 - y)),
......
284 287
        }
285 288
    }
286 289
}
290
#endif
287 291

  
288 292
#undef noop
289 293
#undef add28
290 294
#undef CHROMA_MC8_ALTIVEC_CORE
291 295

  
292 296
/* this code assume stride % 16 == 0 */
297
#ifdef PREFIX_h264_qpel16_h_lowpass_altivec
293 298
static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, int dstStride, int srcStride) {
294 299
    register int i;
295 300

  
......
427 432
        dst += dstStride;
428 433
    }
429 434
}
435
#endif
430 436

  
431 437
/* this code assume stride % 16 == 0 */
438
#ifdef PREFIX_h264_qpel16_v_lowpass_altivec
432 439
static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, int dstStride, int srcStride) {
433 440
    register int i;
434 441

  
......
533 540
        dst += dstStride;
534 541
    }
535 542
}
543
#endif
536 544

  
537 545
/* this code assume stride % 16 == 0 *and* tmp is properly aligned */
546
#ifdef PREFIX_h264_qpel16_hv_lowpass_altivec
538 547
static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp, uint8_t * src, int dstStride, int tmpStride, int srcStride) {
539 548
    register int i;
540 549
    LOAD_ZERO;
......
765 774
        dst += dstStride;
766 775
    }
767 776
}
777
#endif
libavcodec/ppc/vc1dsp_altivec.c
20 20
 */
21 21

  
22 22
#include "libavcodec/dsputil.h"
23
#include "libavcodec/vc1dsp.h"
23 24

  
24 25
#include "util_altivec.h"
25 26
#include "dsputil_altivec.h"
......
321 322
    ADD (dest, src3, perm1)
322 323
}
323 324

  
325
#define PUT_OP_U8_ALTIVEC(d, s, dst) d = s
326
#define AVG_OP_U8_ALTIVEC(d, s, dst) d = vec_avg(dst, s)
327

  
328
#define OP_U8_ALTIVEC                          PUT_OP_U8_ALTIVEC
329
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   put_no_rnd_vc1_chroma_mc8_altivec
330
#include "h264_template_altivec.c"
331
#undef OP_U8_ALTIVEC
332
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
333

  
334
#define OP_U8_ALTIVEC                          AVG_OP_U8_ALTIVEC
335
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   avg_no_rnd_vc1_chroma_mc8_altivec
336
#include "h264_template_altivec.c"
337
#undef OP_U8_ALTIVEC
338
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
324 339

  
325 340
void ff_vc1dsp_init_altivec(VC1DSPContext* dsp)
326 341
{
......
329 344

  
330 345
    dsp->vc1_inv_trans_8x8 = vc1_inv_trans_8x8_altivec;
331 346
    dsp->vc1_inv_trans_8x4 = vc1_inv_trans_8x4_altivec;
347
    dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = put_no_rnd_vc1_chroma_mc8_altivec;
348
    dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = avg_no_rnd_vc1_chroma_mc8_altivec;
332 349
}

Also available in: Unified diff