FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hpeldsp_alpha.c File Reference
#include "libavutil/attributes.h"
#include "libavcodec/hpeldsp.h"
#include "hpeldsp_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 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, ptrdiff_t line_size, int h)
 
av_cold void ff_hpeldsp_init_alpha (HpelDSPContext *c, int flags)
 

Macro Definition Documentation

#define OP (   LOAD,
  STORE 
)
Value:
do { \
pixels += line_size; \
block += line_size; \
} while (--h)
#define LOAD(x)
Definition: vf_hqdn3d.c:45
#define STORE(l, b)
int pixels
Definition: avisynth_c.h:298
static int16_t block[64]
Definition: dct-test.c:110

Definition at line 55 of file hpeldsp_alpha.c.

#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)
#define LOAD(x)
Definition: vf_hqdn3d.c:45
#define STORE(l, b)
#define AVG2
int pixels
Definition: avisynth_c.h:298
static int16_t block[64]
Definition: dct-test.c:110

Definition at line 62 of file hpeldsp_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)
#define LOAD(x)
Definition: vf_hqdn3d.c:45
#define STORE(l, b)
#define AVG2
int pixels
Definition: avisynth_c.h:298
static int16_t block[64]
Definition: dct-test.c:110

Definition at line 73 of file hpeldsp_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)
#define AVG4_ROUNDER
#define LOAD(x)
Definition: vf_hqdn3d.c:45
#define STORE(l, b)
int pixels
Definition: avisynth_c.h:298
static uint64_t BYTE_VEC(uint64_t x)
Definition: asm.h:42
static int16_t block[64]
Definition: dct-test.c:110

Definition at line 87 of file hpeldsp_alpha.c.

#define MAKE_OP (   OPNAME,
  SUFF,
  OPKIND,
  STORE 
)
Value:
static void OPNAME ## _pixels ## SUFF ## _axp \
(uint8_t *restrict block, const uint8_t *restrict pixels, \
ptrdiff_t line_size, int h) \
{ \
if ((size_t) pixels & 0x7) { \
OPKIND(uldq, STORE); \
} else { \
OPKIND(ldq, STORE); \
} \
} \
\
static void OPNAME ## _pixels16 ## SUFF ## _axp \
(uint8_t *restrict block, const uint8_t *restrict pixels, \
ptrdiff_t line_size, int h) \
{ \
OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \
OPNAME ## _pixels ## SUFF ## _axp(block + 8, pixels + 8, line_size, h); \
}
#define ldq(p)
Definition: asm.h:59
uint8_t
#define uldq(a)
Definition: asm.h:85
#define STORE(l, b)
if(ret< 0)
Definition: vf_mcdeint.c:280
int pixels
Definition: avisynth_c.h:298
static int16_t block[64]
Definition: dct-test.c:110

Definition at line 118 of file hpeldsp_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)
#define OP_Y2(LOAD, STORE)
Definition: hpeldsp_alpha.c:73
#define OP_X2(LOAD, STORE)
Definition: hpeldsp_alpha.c:62
#define OP(LOAD, STORE)
Definition: hpeldsp_alpha.c:55
#define STORE(l, b)
#define MAKE_OP(OPNAME, SUFF, OPKIND, STORE)
#define OP_XY2(LOAD, STORE)
Definition: hpeldsp_alpha.c:87

Definition at line 138 of file hpeldsp_alpha.c.

#define AVG2   avg2

Definition at line 160 of file hpeldsp_alpha.c.

#define AVG4   avg4

Definition at line 161 of file hpeldsp_alpha.c.

#define AVG4_ROUNDER   BYTE_VEC(0x02)

Definition at line 162 of file hpeldsp_alpha.c.

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

Definition at line 167 of file hpeldsp_alpha.c.

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

Definition at line 167 of file hpeldsp_alpha.c.

#define AVG2   avg2_no_rnd

Definition at line 160 of file hpeldsp_alpha.c.

#define AVG4   avg4_no_rnd

Definition at line 161 of file hpeldsp_alpha.c.

#define AVG4_ROUNDER   BYTE_VEC(0x01)

Definition at line 162 of file hpeldsp_alpha.c.

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

Definition at line 167 of file hpeldsp_alpha.c.

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

Definition at line 167 of file hpeldsp_alpha.c.

Function Documentation

static uint64_t avg2_no_rnd ( uint64_t  a,
uint64_t  b 
)
inlinestatic

Definition at line 27 of file hpeldsp_alpha.c.

static uint64_t avg2 ( uint64_t  a,
uint64_t  b 
)
inlinestatic

Definition at line 32 of file hpeldsp_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,
ptrdiff_t  line_size,
int  h 
)
static

Definition at line 170 of file hpeldsp_alpha.c.

Referenced by ff_hpeldsp_init_alpha().

av_cold void ff_hpeldsp_init_alpha ( HpelDSPContext c,
int  flags 
)

Definition at line 177 of file hpeldsp_alpha.c.

Referenced by ff_hpeldsp_init().