libavcodec/ppc/dsputil_altivec.c File Reference

#include "config.h"
#include "libavcodec/dsputil.h"
#include "util_altivec.h"
#include "types_altivec.h"
#include "dsputil_altivec.h"

Go to the source code of this file.

Defines

#define op_avg(a, b)   a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) )
#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.
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.
static int pix_sum_altivec (uint8_t *pix, int line_size)
static void get_pixels_altivec (DCTELEM *restrict block, const uint8_t *pixels, int line_size)
static void diff_pixels_altivec (DCTELEM *restrict block, const uint8_t *s1, const uint8_t *s2, int stride)
static void clear_block_altivec (DCTELEM *block)
static void add_bytes_altivec (uint8_t *dst, uint8_t *src, int w)
void put_pixels16_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
void avg_pixels16_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
static void avg_pixels8_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
static void put_pixels8_xy2_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
static void put_no_rnd_pixels8_xy2_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
static void put_pixels16_xy2_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
static void put_no_rnd_pixels16_xy2_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
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)
static void vorbis_inverse_coupling_altivec (float *mag, float *ang, int blocksize)
static void avg_pixels8_xy2_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
void dsputil_init_altivec (DSPContext *c, AVCodecContext *avctx)


Define Documentation

#define ONEITERBUTTERFLY ( i,
res1,
res2   ) 

#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);                              \
    }

Referenced by hadamard8_diff16x8_altivec(), and hadamard8_diff8x8_altivec().

#define op_avg ( a,
 )     a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) )

Definition at line 664 of file dsputil_altivec.c.


Function Documentation

static void add_bytes_altivec ( uint8_t *  dst,
uint8_t *  src,
int  w 
) [static]

Definition at line 594 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

void avg_pixels16_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
)

Definition at line 665 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void avg_pixels8_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 684 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void avg_pixels8_xy2_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 1323 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void clear_block_altivec ( DCTELEM block  )  [static]

Definition at line 581 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void diff_pixels_altivec ( DCTELEM *restrict  block,
const uint8_t *  s1,
const uint8_t *  s2,
int  stride 
) [static]

Definition at line 509 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

void dsputil_init_altivec ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 1385 of file dsputil_altivec.c.

Referenced by dsputil_init_ppc().

static void get_pixels_altivec ( DCTELEM *restrict  block,
const uint8_t *  pixels,
int  line_size 
) [static]

Definition at line 484 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

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

Definition at line 1288 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

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

Definition at line 1093 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 970 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static int pix_norm1_altivec ( uint8_t *  pix,
int  line_size 
) [static]

Definition at line 317 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static int pix_sum_altivec ( uint8_t *  pix,
int  line_size 
) [static]

Definition at line 451 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void put_no_rnd_pixels16_xy2_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 902 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void put_no_rnd_pixels8_xy2_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 774 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

void put_pixels16_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
)

Definition at line 612 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec(), and put_vp8_pixels16_altivec().

static void put_pixels16_xy2_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 834 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void put_pixels8_xy2_altivec ( uint8_t *  block,
const uint8_t *  pixels,
int  line_size,
int  h 
) [static]

Definition at line 715 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

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

Definition at line 228 of file dsputil_altivec.c.

Referenced by 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 32 of file dsputil_altivec.c.

Referenced by 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 133 of file dsputil_altivec.c.

Referenced by 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 dsputil_init_altivec().

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

Definition at line 272 of file dsputil_altivec.c.

Referenced by 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 407 of file dsputil_altivec.c.

Referenced by 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 353 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().

static void vorbis_inverse_coupling_altivec ( float *  mag,
float *  ang,
int  blocksize 
) [static]

Definition at line 1299 of file dsputil_altivec.c.

Referenced by dsputil_init_altivec().


Generated on Fri Oct 26 02:38:17 2012 for FFmpeg by  doxygen 1.5.8