23
23
#include "libavutil/cpu.h"
24
#include "libavutil/mem.h"
25
#include "libavutil/ppc/types_altivec.h"
26
#include "libavutil/ppc/util_altivec.h"
24
27
#include "libavcodec/vp8dsp.h"
25
28
#include "dsputil_altivec.h"
26
#include "types_altivec.h"
27
#include "util_altivec.h"
29
30
#define REPT4(...) { __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__ }
75
76
dstv = vec_sra(dstv, c7)
77
78
static av_always_inline
78
void put_vp8_epel_h_altivec_core(uint8_t *dst, int dst_stride,
79
uint8_t *src, int src_stride,
79
void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
80
uint8_t *src, ptrdiff_t src_stride,
80
81
int h, int mx, int w, int is6tap)
82
83
LOAD_H_SUBPEL_FILTER(mx-1);
161
162
dstv = vec_sra(dstv, c7)
163
164
static av_always_inline
164
void put_vp8_epel_v_altivec_core(uint8_t *dst, int dst_stride,
165
uint8_t *src, int src_stride,
165
void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
166
uint8_t *src, ptrdiff_t src_stride,
166
167
int h, int my, int w, int is6tap)
168
169
LOAD_V_SUBPEL_FILTER(my-1);
227
228
#define EPEL_FUNCS(WIDTH, TAPS) \
228
229
static av_noinline \
229
void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, int dst_stride, uint8_t *src, int src_stride, int h, int mx, int my) \
230
void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \
231
232
put_vp8_epel_h_altivec_core(dst, dst_stride, src, src_stride, h, mx, WIDTH, TAPS == 6); \
234
235
static av_noinline \
235
void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, int dst_stride, uint8_t *src, int src_stride, int h, int mx, int my) \
236
void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \
237
238
put_vp8_epel_v_altivec_core(dst, dst_stride, src, src_stride, h, my, WIDTH, TAPS == 6); \
240
241
#define EPEL_HV(WIDTH, HTAPS, VTAPS) \
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) \
242
static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s, int h, int mx, int my) \
243
244
DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
244
245
if (VTAPS == 6) { \
269
static void put_vp8_pixels16_altivec(uint8_t *dst, int stride, uint8_t *src, int s, int h, int mx, int my)
270
static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s, int h, int mx, int my)
271
put_pixels16_altivec(dst, src, stride, h);
272
ff_put_pixels16_altivec(dst, src, stride, h);
274
275
av_cold void ff_vp8dsp_init_altivec(VP8DSPContext *c)