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 ff_put_pixels16_altivec (uint8_t *block, const uint8_t *pixels, int line_size, int h)
void ff_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 ff_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 651 of file dsputil_altivec.c.


Function Documentation

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

Definition at line 592 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

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

Definition at line 671 of file dsputil_altivec.c.

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

Referenced by ff_dsputil_init_altivec().

static void clear_block_altivec ( DCTELEM block  )  [static]

Definition at line 579 of file dsputil_altivec.c.

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

Referenced by ff_dsputil_init_altivec().

void ff_avg_pixels16_altivec ( uint8_t block,
const uint8_t pixels,
int  line_size,
int  h 
)

Definition at line 652 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

void ff_dsputil_init_altivec ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 1372 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_ppc().

void ff_put_pixels16_altivec ( uint8_t block,
const uint8_t pixels,
int  line_size,
int  h 
)

Definition at line 610 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec(), and put_vp8_pixels16_altivec().

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

Definition at line 479 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 1275 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 1080 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 957 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 314 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 446 of file dsputil_altivec.c.

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

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

Referenced by ff_dsputil_init_altivec().

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

Definition at line 821 of file dsputil_altivec.c.

Referenced by ff_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 702 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 229 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 32 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 134 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 76 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 269 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 404 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 351 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().

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

Definition at line 1286 of file dsputil_altivec.c.

Referenced by ff_dsputil_init_altivec().


Generated on Fri Oct 26 02:47:58 2012 for FFmpeg by  doxygen 1.5.8