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

Go to the source code of this file.

Macros

#define ONEITERBUTTERFLY(i, res)
 
#define ONEITERBUTTERFLY(i, res1, res2)
 

Functions

static int sad16_x2_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sad16_y2_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sad16_xy2_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sad16_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sad8_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_norm1_altivec (uint8_t *pix, int line_size)
 
static int sse8_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 Sum of Squared Errors for a 8x8 block. More...
 
static int sse16_altivec (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 Sum of Squared Errors for a 16x16 block. More...
 
static int pix_sum_altivec (uint8_t *pix, int line_size)
 
static void get_pixels_altivec (int16_t *restrict block, const uint8_t *pixels, int line_size)
 
static void diff_pixels_altivec (int16_t *restrict block, const uint8_t *s1, const uint8_t *s2, int stride)
 
static void clear_block_altivec (int16_t *block)
 
static void add_bytes_altivec (uint8_t *dst, uint8_t *src, int w)
 
static int hadamard8_diff8x8_altivec (void *s, uint8_t *dst, uint8_t *src, int stride, int h)
 
static int hadamard8_diff16x8_altivec (void *s, uint8_t *dst, uint8_t *src, int stride, int h)
 
static int hadamard8_diff16_altivec (void *s, uint8_t *dst, uint8_t *src, int stride, int h)
 
av_cold void ff_dsputil_init_altivec (DSPContext *c, AVCodecContext *avctx)
 

Macro Definition Documentation

#define ONEITERBUTTERFLY (   i,
  res 
)
Value:
{ \
register vector unsigned char src1, src2, srcO; \
register vector unsigned char dst1, dst2, dstO; \
register vector signed short srcV, dstV; \
register vector signed short but0, but1, but2, op1, op2, op3; \
src1 = vec_ld(stride * i, src); \
src2 = vec_ld((stride * i) + 15, src); \
srcO = vec_perm(src1, src2, vec_lvsl(stride * i, src)); \
dst1 = vec_ld(stride * i, dst); \
dst2 = vec_ld((stride * i) + 15, dst); \
dstO = vec_perm(dst1, dst2, vec_lvsl(stride * i, dst)); \
/* promote the unsigned chars to signed shorts */ \
/* we're in the 8x8 function, we only care for the first 8 */ \
srcV = (vector signed short)vec_mergeh((vector signed char)vzero, \
(vector signed char)srcO); \
dstV = (vector signed short)vec_mergeh((vector signed char)vzero, \
(vector signed char)dstO); \
/* subtractions inside the first butterfly */ \
but0 = vec_sub(srcV, dstV); \
op1 = vec_perm(but0, but0, perm1); \
but1 = vec_mladd(but0, vprod1, op1); \
op2 = vec_perm(but1, but1, perm2); \
but2 = vec_mladd(but1, vprod2, op2); \
op3 = vec_perm(but2, but2, perm3); \
res = vec_mladd(but2, vprod3, op3); \
}
int stride
Definition: mace.c:144
AVS_Value src
Definition: avisynth_c.h:523
synthesis window for stochastic i
#define vzero
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160

Referenced by hadamard8_diff16x8_altivec(), and hadamard8_diff8x8_altivec().

#define ONEITERBUTTERFLY (   i,
  res1,
  res2 
)

Function Documentation

static void add_bytes_altivec ( uint8_t dst,
uint8_t src,
int  w 
)
static

Definition at line 593 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static void clear_block_altivec ( int16_t *  block)
static

Definition at line 580 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static void diff_pixels_altivec ( int16_t *restrict  block,
const uint8_t s1,
const uint8_t s2,
int  stride 
)
static

Definition at line 506 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

av_cold void ff_dsputil_init_altivec ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 939 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_ppc().

static void get_pixels_altivec ( int16_t *restrict  block,
const uint8_t pixels,
int  line_size 
)
static

Definition at line 480 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int hadamard8_diff16_altivec ( void s,
uint8_t dst,
uint8_t src,
int  stride,
int  h 
)
static

Definition at line 928 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int hadamard8_diff16x8_altivec ( void s,
uint8_t dst,
uint8_t src,
int  stride,
int  h 
)
static

Definition at line 733 of file dsputil_altivec.c.

Referenced by hadamard8_diff16_altivec().

static int hadamard8_diff8x8_altivec ( void s,
uint8_t dst,
uint8_t src,
int  stride,
int  h 
)
static

Definition at line 610 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int pix_norm1_altivec ( uint8_t pix,
int  line_size 
)
static

Definition at line 315 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int pix_sum_altivec ( uint8_t pix,
int  line_size 
)
static

Definition at line 447 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sad16_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 230 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sad16_x2_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 33 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sad16_xy2_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 135 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sad16_y2_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 77 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sad8_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 270 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sse16_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Sum of Squared Errors for a 16x16 block.

AltiVec-enhanced. It's the sad16_altivec code above w/ squaring added.

Definition at line 405 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

static int sse8_altivec ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Sum of Squared Errors for a 8x8 block.

AltiVec-enhanced. It's the sad8_altivec code above w/ squaring added.

Definition at line 352 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().