#include "libavcodec/dsputil.h"
#include "dsputil_alpha.h"
#include "asm.h"
Go to the source code of this file.
Defines | |
#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) |
#define AVG2 avg2_no_rnd |
Definition at line 254 of file dsputil_alpha.c.
#define AVG2 avg2 |
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 avg4 |
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 AVG4_ROUNDER BYTE_VEC(0x02) |
Definition at line 256 of file dsputil_alpha.c.
#define MAKE_OP | ( | OPNAME, | |||
SUFF, | |||||
OPKIND, | |||||
STORE | ) |
Value:
static void OPNAME ## _pixels ## SUFF ## _axp \ (uint8_t *av_restrict block, const uint8_t *av_restrict pixels, \ int line_size, int h) \ { \ if ((size_t) pixels & 0x7) { \ OPKIND(uldq, STORE); \ } else { \ OPKIND(ldq, STORE); \ } \ } \ \ static void OPNAME ## _pixels16 ## SUFF ## _axp \ (uint8_t *av_restrict block, const uint8_t *av_restrict pixels, \ 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 OP | ( | LOAD, | |||
STORE | ) |
Value:
Definition at line 149 of file dsputil_alpha.c.
Referenced by decode_frame(), and tempNoiseReducer_TMPL().
#define OP_X2 | ( | LOAD, | |||
STORE | ) |
#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 OP_Y2 | ( | LOAD, | |||
STORE | ) |
#define PIXOP | ( | OPNAME, | |||
STORE | ) |
#define STORE | ( | l, | |||
b | ) | stq(AVG2(l, ldq(b)), b); |
Definition at line 261 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.
#define STORE | ( | l, | |||
b | ) | stq(l, b) |
Definition at line 261 of file dsputil_alpha.c.
Referenced by denoise_spatial(), denoise_temporal(), doVertDefFilter_altivec(), and store_slice_c().
Definition at line 126 of file dsputil_alpha.c.
Definition at line 121 of file dsputil_alpha.c.
static void clear_blocks_axp | ( | DCTELEM * | blocks | ) | [static] |
void ff_dsputil_init_alpha | ( | DSPContext * | c, | |
AVCodecContext * | avctx | |||
) |
PIXOP | ( | avg_no_rnd | , | |
STORE | ||||
) |
PIXOP | ( | put_no_rnd | , | |
STORE | ||||
) |
PIXOP | ( | avg | , | |
STORE | ||||
) |
PIXOP | ( | put | , | |
STORE | ||||
) |
void(* add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, int line_size) |
Referenced by ff_dsputil_init_alpha(), and ff_simple_idct_add_axp().
void(* put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, int line_size) |
Referenced by ff_dsputil_init_alpha(), and ff_simple_idct_put_axp().