FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
dsputil_alpha.c File Reference
#include "libavcodec/dsputil.h"
#include "dsputil_alpha.h"
#include "asm.h"

Go to the source code of this file.

Macros

#define OP(LOAD, STORE)
 
#define OP_X2(LOAD, STORE)
 
#define OP_Y2(LOAD, STORE)
 
#define OP_XY2(LOAD, STORE)
 
#define MAKE_OP(OPNAME, SUFF, OPKIND, STORE)
 
#define PIXOP(OPNAME, STORE)
 
#define AVG2   avg2
 
#define AVG4   avg4
 
#define AVG4_ROUNDER   BYTE_VEC(0x02)
 
#define STORE(l, b)   stq(l, b)
 
#define STORE(l, b)   stq(AVG2(l, ldq(b)), b);
 
#define AVG2   avg2_no_rnd
 
#define AVG4   avg4_no_rnd
 
#define AVG4_ROUNDER   BYTE_VEC(0x01)
 
#define STORE(l, b)   stq(l, b)
 
#define STORE(l, b)   stq(AVG2(l, ldq(b)), b);
 

Functions

static void clear_blocks_axp (DCTELEM *blocks)
 
static uint64_t avg2_no_rnd (uint64_t a, uint64_t b)
 
static uint64_t avg2 (uint64_t a, uint64_t b)
 
 PIXOP (put, STORE)
 
 PIXOP (avg, STORE)
 
 PIXOP (put_no_rnd, STORE)
 
 PIXOP (avg_no_rnd, STORE)
 
static void put_pixels16_axp_asm (uint8_t *block, const uint8_t *pixels, int line_size, int h)
 
void ff_dsputil_init_alpha (DSPContext *c, AVCodecContext *avctx)
 

Variables

void(* put_pixels_clamped_axp_p )(const DCTELEM *block, uint8_t *pixels, int line_size)
 
void(* add_pixels_clamped_axp_p )(const DCTELEM *block, uint8_t *pixels, int line_size)
 

Macro Definition Documentation

#define OP (   LOAD,
  STORE 
)
Value:
do { \
STORE(LOAD(pixels), block); \
pixels += line_size; \
block += line_size; \
} while (--h)

Definition at line 149 of file dsputil_alpha.c.

Referenced by decode_frame(), and tempNoiseReducer_altivec().

#define OP_X2 (   LOAD,
  STORE 
)
Value:
do { \
uint64_t pix1, pix2; \
\
pix1 = LOAD(pixels); \
pix2 = pix1 >> 8 | ((uint64_t) pixels[8] << 56); \
STORE(AVG2(pix1, pix2), block); \
pixels += line_size; \
block += line_size; \
} while (--h)

Definition at line 156 of file dsputil_alpha.c.

#define OP_Y2 (   LOAD,
  STORE 
)
Value:
do { \
uint64_t pix = LOAD(pixels); \
do { \
uint64_t next_pix; \
\
pixels += line_size; \
next_pix = LOAD(pixels); \
STORE(AVG2(pix, next_pix), block); \
block += line_size; \
pix = next_pix; \
} while (--h); \
} while (0)

Definition at line 167 of file dsputil_alpha.c.

#define OP_XY2 (   LOAD,
  STORE 
)
Value:
do { \
uint64_t pix1 = LOAD(pixels); \
uint64_t pix2 = pix1 >> 8 | ((uint64_t) pixels[8] << 56); \
uint64_t pix_l = (pix1 & BYTE_VEC(0x03)) \
+ (pix2 & BYTE_VEC(0x03)); \
uint64_t pix_h = ((pix1 & ~BYTE_VEC(0x03)) >> 2) \
+ ((pix2 & ~BYTE_VEC(0x03)) >> 2); \
\
do { \
uint64_t npix1, npix2; \
uint64_t npix_l, npix_h; \
uint64_t avg; \
\
pixels += line_size; \
npix1 = LOAD(pixels); \
npix2 = npix1 >> 8 | ((uint64_t) pixels[8] << 56); \
npix_l = (npix1 & BYTE_VEC(0x03)) \
+ (npix2 & BYTE_VEC(0x03)); \
npix_h = ((npix1 & ~BYTE_VEC(0x03)) >> 2) \
+ ((npix2 & ~BYTE_VEC(0x03)) >> 2); \
avg = (((pix_l + npix_l + AVG4_ROUNDER) >> 2) & BYTE_VEC(0x03)) \
+ pix_h + npix_h; \
STORE(avg, block); \
\
block += line_size; \
pix_l = npix_l; \
pix_h = npix_h; \
} while (--h); \
} while (0)

Definition at line 181 of file dsputil_alpha.c.

#define MAKE_OP (   OPNAME,
  SUFF,
  OPKIND,
  STORE 
)
Value:
static void OPNAME ## _pixels ## SUFF ## _axp \
int line_size, int h) \
{ \
if ((size_t) pixels & 0x7) { \
OPKIND(uldq, STORE); \
} else { \
OPKIND(ldq, STORE); \
} \
} \
\
static void OPNAME ## _pixels16 ## SUFF ## _axp \
int line_size, int h) \
{ \
OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \
OPNAME ## _pixels ## SUFF ## _axp(block + 8, pixels + 8, line_size, h); \
}

Definition at line 212 of file dsputil_alpha.c.

#define PIXOP (   OPNAME,
  STORE 
)
Value:
MAKE_OP(OPNAME, , OP, STORE) \
MAKE_OP(OPNAME, _x2, OP_X2, STORE) \
MAKE_OP(OPNAME, _y2, OP_Y2, STORE) \
MAKE_OP(OPNAME, _xy2, OP_XY2, STORE)

Definition at line 232 of file dsputil_alpha.c.

#define AVG2   avg2

Definition at line 254 of file dsputil_alpha.c.

#define AVG4   avg4

Definition at line 255 of file dsputil_alpha.c.

#define AVG4_ROUNDER   BYTE_VEC(0x02)

Definition at line 256 of file dsputil_alpha.c.

#define STORE (   l,
  b 
)    stq(l, b)

Definition at line 261 of file dsputil_alpha.c.

Referenced by doVertDefFilter_altivec(), and store_slice_c().

#define STORE (   l,
  b 
)    stq(AVG2(l, ldq(b)), b);

Definition at line 261 of file dsputil_alpha.c.

#define AVG2   avg2_no_rnd

Definition at line 254 of file dsputil_alpha.c.

#define AVG4   avg4_no_rnd

Definition at line 255 of file dsputil_alpha.c.

#define AVG4_ROUNDER   BYTE_VEC(0x01)

Definition at line 256 of file dsputil_alpha.c.

#define STORE (   l,
  b 
)    stq(l, b)

Definition at line 261 of file dsputil_alpha.c.

#define STORE (   l,
  b 
)    stq(AVG2(l, ldq(b)), b);

Definition at line 261 of file dsputil_alpha.c.

Function Documentation

static void clear_blocks_axp ( DCTELEM blocks)
static

Definition at line 103 of file dsputil_alpha.c.

Referenced by ff_dsputil_init_alpha().

static uint64_t avg2_no_rnd ( uint64_t  a,
uint64_t  b 
)
inlinestatic

Definition at line 121 of file dsputil_alpha.c.

static uint64_t avg2 ( uint64_t  a,
uint64_t  b 
)
inlinestatic

Definition at line 126 of file dsputil_alpha.c.

PIXOP ( put  ,
STORE   
)
PIXOP ( avg  ,
STORE   
)
PIXOP ( put_no_rnd  ,
STORE   
)
PIXOP ( avg_no_rnd  ,
STORE   
)
static void put_pixels16_axp_asm ( uint8_t block,
const uint8_t pixels,
int  line_size,
int  h 
)
static

Definition at line 264 of file dsputil_alpha.c.

Referenced by ff_dsputil_init_alpha().

void ff_dsputil_init_alpha ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 271 of file dsputil_alpha.c.

Referenced by ff_dsputil_init().

Variable Documentation

void(* put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, int line_size)

Definition at line 26 of file dsputil_alpha.c.

Referenced by ff_dsputil_init_alpha(), and ff_simple_idct_put_axp().

void(* add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, int line_size)

Definition at line 28 of file dsputil_alpha.c.

Referenced by ff_dsputil_init_alpha(), and ff_simple_idct_add_axp().