Revision 644b66cd

View differences:

libavcodec/ppc/vp8dsp_altivec.c
56 56
    vec_s8 filter_outerl = vec_sld(filter_outerh, filter_outerh, 2)
57 57

  
58 58
#define FILTER_H(dstv, off) \
59
    a = vec_ld((off)-2,    src); \
60
    b = vec_ld((off)-2+15, src); \
59
    a = vec_ld((off)-is6tap-1,    src); \
60
    b = vec_ld((off)-is6tap-1+15, src); \
61 61
\
62 62
    pixh  = vec_perm(a, b, permh##off); \
63 63
    pixl  = vec_perm(a, b, perml##off); \
......
86 86
    vec_s16 f16h, f16l;
87 87
    vec_s32 filth, filtl;
88 88

  
89
    vec_u8 perm_inner = { 1,2,3,4, 2,3,4,5, 3,4,5,6, 4,5,6,7 };
89
    vec_u8 perm_inner6 = { 1,2,3,4, 2,3,4,5, 3,4,5,6, 4,5,6,7 };
90
    vec_u8 perm_inner4 = { 0,1,2,3, 1,2,3,4, 2,3,4,5, 3,4,5,6 };
91
    vec_u8 perm_inner  = is6tap ? perm_inner6 : perm_inner4;
90 92
    vec_u8 perm_outer = { 4,9, 0,5, 5,10, 1,6, 6,11, 2,7, 7,12, 3,8 };
91 93
    vec_s32 c64 = vec_sl(vec_splat_s32(1), vec_splat_u32(6));
92 94
    vec_u16 c7  = vec_splat_u16(7);
93 95

  
94
    align_vec0 = vec_lvsl( -2, src);
95
    align_vec8 = vec_lvsl(8-2, src);
96
    align_vec0 = vec_lvsl( -is6tap-1, src);
97
    align_vec8 = vec_lvsl(8-is6tap-1, src);
96 98

  
97 99
    permh0     = vec_perm(align_vec0, align_vec0, perm_inner);
98 100
    permh8     = vec_perm(align_vec8, align_vec8, perm_inner);
......
239 241
static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, int stride, uint8_t *src, int s, int h, int mx, int my) \
240 242
{ \
241 243
    DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
242
    put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16,     src-2*stride, stride, h+5, mx, my); \
243
    put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+2*16,     16,     h,   mx, my); \
244
    if (VTAPS == 6) { \
245
        put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16,     src-2*stride, stride, h+5, mx, my); \
246
        put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+2*16,     16,     h,   mx, my); \
247
    } else { \
248
        put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16,     src-stride, stride, h+4, mx, my); \
249
        put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+16,     16,     h,   mx, my); \
250
    } \
244 251
}
245 252

  
246 253
EPEL_FUNCS(16,6)

Also available in: Unified diff