Revision e36b639f

View differences:

libavcodec/ppc/h264_template_altivec.c
51 51
        dst += stride;\
52 52
        src += stride;
53 53

  
54
#define CHROMA_MC8_ALTIVEC_CORE_SIMPLE \
55
        vsrc2ssH = (vec_s16_t)vec_mergeh(zero_u8v,(vec_u8_t)vsrc2uc);\
56
\
57
        psum = vec_mladd(vA, vsrc0ssH, v32ss);\
58
        psum = vec_mladd(vB, vsrc1ssH, psum);\
59
        psum = vec_mladd(vC, vsrc2ssH, psum);\
60
        psum = vec_sr(psum, v6us);\
61
\
62
        vdst = vec_ld(0, dst);\
63
        ppsum = (vec_u8_t)vec_pack(psum, psum);\
64
        vfdst = vec_perm(vdst, ppsum, fperm);\
65
\
66
        OP_U8_ALTIVEC(fsum, vfdst, vdst);\
67
\
68
        vec_st(fsum, 0, dst);\
69
\
70
        vsrc0ssH = vsrc1ssH;\
71
        vsrc1ssH = vsrc2ssH;\
72
\
73
        dst += stride;\
74
        src += stride;
54 75

  
55 76
void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stride, int h, int x, int y) {
56 77
  POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1);
......
109 130
    vsrc0ssH = (vec_s16_t)vec_mergeh(zero_u8v,(vec_u8_t)vsrc0uc);
110 131
    vsrc1ssH = (vec_s16_t)vec_mergeh(zero_u8v,(vec_u8_t)vsrc1uc);
111 132

  
133
    if (ABCD[3]) {
112 134
    if (!loadSecond) {// -> !reallyBadAlign
113 135
        for (i = 0 ; i < h ; i++) {
114 136
            vsrcCuc = vec_ld(stride + 0, src);
......
131 153
            CHROMA_MC8_ALTIVEC_CORE
132 154
        }
133 155
    }
156
    } else {
157
    if (!loadSecond) {// -> !reallyBadAlign
158
        for (i = 0 ; i < h ; i++) {
159
            vsrcCuc = vec_ld(stride + 0, src);
160
            vsrc2uc = vec_perm(vsrcCuc, vsrcCuc, vsrcperm0);
161

  
162
            CHROMA_MC8_ALTIVEC_CORE_SIMPLE
163
        }
164
    } else {
165
        vec_u8_t vsrcDuc;
166
        for (i = 0 ; i < h ; i++) {
167
            vsrcCuc = vec_ld(stride + 0, src);
168
            vsrcDuc = vec_ld(stride + 16, src);
169
            vsrc2uc = vec_perm(vsrcCuc, vsrcDuc, vsrcperm0);
170

  
171
            CHROMA_MC8_ALTIVEC_CORE_SIMPLE
172
        }
173
    }
174

  
175
    }
134 176
    POWERPC_PERF_STOP_COUNT(PREFIX_h264_chroma_mc8_num, 1);
135 177
}
136 178

  

Also available in: Unified diff