vp8dsp_altivec.c File Reference
Include dependency graph for vp8dsp_altivec.c:

Go to the source code of this file.

Macros

#define REPT4(...)   { __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__ }
 
#define LOAD_H_SUBPEL_FILTER(i)
 
#define FILTER_H(dstv, off)
 
#define LOAD_V_SUBPEL_FILTER(i)
 
#define FILTER_V(dstv, vec_mul)
 
#define EPEL_FUNCS(WIDTH, TAPS)
 
#define EPEL_HV(WIDTH, HTAPS, VTAPS)
 

Functions

static av_always_inline void put_vp8_epel_h_altivec_core (uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int w, int is6tap)
 
static av_always_inline void put_vp8_epel_v_altivec_core (uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int my, int w, int is6tap)
 
static void put_vp8_pixels16_altivec (uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s, int h, int mx, int my)
 
av_cold void ff_vp8dsp_init_altivec (VP8DSPContext *c)
 

Variables

static const vec_s8 h_subpel_filters_inner [7]
 
static const vec_s8 h_subpel_filters_outer [3]
 
static const vec_u8 v_subpel_filters [7]
 

Macro Definition Documentation

#define EPEL_FUNCS (   WIDTH,
  TAPS 
)
Value:
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) \
{ \
put_vp8_epel_h_altivec_core(dst, dst_stride, src, src_stride, h, mx, WIDTH, TAPS == 6); \
} \
\
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) \
{ \
put_vp8_epel_v_altivec_core(dst, dst_stride, src, src_stride, h, my, WIDTH, TAPS == 6); \
}
#define WIDTH
static av_always_inline void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int my, int w, int is6tap)
uint8_t
static av_always_inline void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int w, int is6tap)
AVS_Value src
Definition: avisynth_c.h:523
typedef void(RENAME(mix_any_func_type))
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160

Definition at line 228 of file vp8dsp_altivec.c.

#define EPEL_HV (   WIDTH,
  HTAPS,
  VTAPS 
)
Value:
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) \
{ \
DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
if (VTAPS == 6) { \
put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16, src-2*stride, stride, h+5, mx, my); \
put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+2*16, 16, h, mx, my); \
} else { \
put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16, src-stride, stride, h+4, mx, my); \
put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+16, 16, h, mx, my); \
} \
}
float v
#define WIDTH
const char * s
Definition: avisynth_c.h:668
#define DECLARE_ALIGNED(n, t, v)
Definition: mem.h:59
int stride
Definition: mace.c:144
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
uint8_t
AVS_Value src
Definition: avisynth_c.h:523
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160

Definition at line 241 of file vp8dsp_altivec.c.

#define FILTER_H (   dstv,
  off 
)
Value:
a = vec_ld((off)-is6tap-1, src); \
b = vec_ld((off)-is6tap-1+15, src); \
\
pixh = vec_perm(a, b, permh##off); \
pixl = vec_perm(a, b, perml##off); \
filth = vec_msum(filter_inner, pixh, c64); \
filtl = vec_msum(filter_inner, pixl, c64); \
if (is6tap) { \
outer = vec_perm(a, b, perm_6tap##off); \
filth = vec_msum(filter_outerh, outer, filth); \
filtl = vec_msum(filter_outerl, outer, filtl); \
} \
if (w == 4) \
filtl = filth; /* discard pixels 4-7 */ \
dstv = vec_packs(filth, filtl); \
dstv = vec_sra(dstv, c7)
output residual component w
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define b
Definition: input.c:42
AVS_Value src
Definition: avisynth_c.h:523
#define c7
Definition: idct_sh4.c:32

Definition at line 59 of file vp8dsp_altivec.c.

Referenced by put_vp8_epel_h_altivec_core().

#define FILTER_V (   dstv,
  vec_mul 
)
Value:
s1f = (vec_s16)vec_mul(s1, f1); \
s2f = (vec_s16)vec_mul(s2, f2); \
s3f = (vec_s16)vec_mul(s3, f3); \
s4f = (vec_s16)vec_mul(s4, f4); \
s2f = vec_subs(s2f, s1f); \
s3f = vec_subs(s3f, s4f); \
if (is6tap) { \
s0f = (vec_s16)vec_mul(s0, f0); \
s5f = (vec_s16)vec_mul(s5, f5); \
s2f = vec_adds(s2f, s0f); \
s3f = vec_adds(s3f, s5f); \
} \
dstv = vec_adds(s2f, s3f); \
dstv = vec_adds(dstv, c64); \
dstv = vec_sra(dstv, c7)
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define vec_s16
Definition: types_altivec.h:30
function f0
f2
Definition: genspecsines3.m:4
#define s2
Definition: regdef.h:39
#define s0
Definition: regdef.h:37
#define s5
Definition: regdef.h:42
#define s4
Definition: regdef.h:41
#define s3
Definition: regdef.h:40
f3
Definition: genspecsines3.m:5
#define s1
Definition: regdef.h:38
f1
Definition: genspecsines3.m:3
#define c7
Definition: idct_sh4.c:32

Definition at line 147 of file vp8dsp_altivec.c.

Referenced by put_vp8_epel_v_altivec_core().

#define LOAD_H_SUBPEL_FILTER (   i)
Value:
vec_s8 filter_inner = h_subpel_filters_inner[i]; \
vec_s8 filter_outerh = h_subpel_filters_outer[(i)>>1]; \
vec_s8 filter_outerl = vec_sld(filter_outerh, filter_outerh, 2)
static const vec_s8 h_subpel_filters_inner[7]
static const vec_s8 h_subpel_filters_outer[3]
synthesis window for stochastic i
#define vec_s8
Definition: types_altivec.h:28

Definition at line 54 of file vp8dsp_altivec.c.

Referenced by put_vp8_epel_h_altivec_core().

#define LOAD_V_SUBPEL_FILTER (   i)
Value:
vec_u8 subpel_filter = v_subpel_filters[i]; \
vec_u8 f0 = vec_splat(subpel_filter, 0); \
vec_u8 f1 = vec_splat(subpel_filter, 1); \
vec_u8 f2 = vec_splat(subpel_filter, 2); \
vec_u8 f3 = vec_splat(subpel_filter, 3); \
vec_u8 f4 = vec_splat(subpel_filter, 4); \
vec_u8 f5 = vec_splat(subpel_filter, 5)
static const vec_u8 v_subpel_filters[7]
function f0
f2
Definition: genspecsines3.m:4
#define vec_u8
Definition: types_altivec.h:27
f3
Definition: genspecsines3.m:5
synthesis window for stochastic i
f1
Definition: genspecsines3.m:3

Definition at line 138 of file vp8dsp_altivec.c.

Referenced by put_vp8_epel_v_altivec_core().

#define REPT4 (   ...)    { __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__ }

Definition at line 30 of file vp8dsp_altivec.c.

Function Documentation

av_cold void ff_vp8dsp_init_altivec ( VP8DSPContext c)

Definition at line 275 of file vp8dsp_altivec.c.

Referenced by ff_vp8dsp_init().

static av_always_inline void put_vp8_epel_h_altivec_core ( uint8_t dst,
ptrdiff_t  dst_stride,
uint8_t src,
ptrdiff_t  src_stride,
int  h,
int  mx,
int  w,
int  is6tap 
)
static

Definition at line 79 of file vp8dsp_altivec.c.

static av_always_inline void put_vp8_epel_v_altivec_core ( uint8_t dst,
ptrdiff_t  dst_stride,
uint8_t src,
ptrdiff_t  src_stride,
int  h,
int  my,
int  w,
int  is6tap 
)
static

Definition at line 165 of file vp8dsp_altivec.c.

static void put_vp8_pixels16_altivec ( uint8_t dst,
ptrdiff_t  stride,
uint8_t src,
ptrdiff_t  s,
int  h,
int  mx,
int  my 
)
static

Definition at line 270 of file vp8dsp_altivec.c.

Referenced by ff_vp8dsp_init_altivec().

Variable Documentation

const vec_s8 h_subpel_filters_inner[7]
static
Initial value:
=
{
REPT4( -6, 123, 12, -1),
REPT4(-11, 108, 36, -8),
REPT4( -9, 93, 50, -6),
REPT4(-16, 77, 77, -16),
REPT4( -6, 50, 93, -9),
REPT4( -8, 36, 108, -11),
REPT4( -1, 12, 123, -6),
}
#define REPT4(...)

Definition at line 33 of file vp8dsp_altivec.c.

const vec_s8 h_subpel_filters_outer[3]
static
Initial value:
=
{
REPT4(0, 0, 2, 1),
REPT4(0, 0, 3, 3),
REPT4(0, 0, 1, 2),
}
#define REPT4(...)

Definition at line 47 of file vp8dsp_altivec.c.

const vec_u8 v_subpel_filters[7]
static
Initial value:
=
{
{ 0, 6, 123, 12, 1, 0 },
{ 2, 11, 108, 36, 8, 1 },
{ 0, 9, 93, 50, 6, 0 },
{ 3, 16, 77, 77, 16, 3 },
{ 0, 6, 50, 93, 9, 0 },
{ 1, 8, 36, 108, 11, 2 },
{ 0, 1, 12, 123, 6, 0 },
}

Definition at line 127 of file vp8dsp_altivec.c.