#include "avcodec.h"
#include "diracdsp.h"
Go to the source code of this file.
|
static void | dirac_hpel_filter (uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src, int stride, int width, int height) |
|
static void | put_signed_rect_clamped_8bit_c (uint8_t *dst, int dst_stride, const uint8_t *_src, int src_stride, int width, int height) |
|
static void | add_rect_clamped_c (uint8_t *dst, const uint16_t *src, int stride, const int16_t *idwt, int idwt_stride, int width, int height) |
|
av_cold void | ff_diracdsp_init (DiracDSPContext *c) |
|
#define PIXOP_BILINEAR |
( |
|
PFX, |
|
|
|
OP, |
|
|
|
WIDTH |
|
) |
| |
Value:
\
OP(dst[x], (s0[x]*w[0] + s1[x]*w[1] + s2[x]*w[2] + s3[x]*w[3] + 8) >> 4); \
} \
\
} \
}
GLint GLenum GLboolean GLsizei stride
Definition at line 52 of file diracdsp.c.
#define OP_PUT |
( |
|
dst, |
|
|
|
val |
|
) |
| (dst) = (val) |
#define OP_AVG |
( |
|
dst, |
|
|
|
val |
|
) |
| (dst) = (((dst) + (val) + 1)>>1) |
#define op_scale1 |
( |
|
x | ) |
block[x] = av_clip_uint8( (block[x]*weight + (1<<(log2_denom-1))) >> log2_denom) |
#define op_scale2 |
( |
|
x | ) |
dst[x] = av_clip_uint8( (src[x]*weights + dst[x]*weightd + (1<<(log2_denom-1))) >> log2_denom) |
#define DIRAC_WEIGHT |
( |
|
W | ) |
|
Value:
for (x = 0; x <
W; x++) {
\
} \
} \
static
void biweight_dirac_pixels ##
W ## _c(
uint8_t *dst,
const uint8_t *
src,
int stride,
int log2_denom, \
int weightd,
int weights,
int h) {
\
for (x = 0; x <
W; x++) {
\
} \
} \
}
static int weight(int i, int blen, int offset)
GLint GLenum GLboolean GLsizei stride
Definition at line 88 of file diracdsp.c.
#define ADD_OBMC |
( |
|
xblen | ) |
|
Value:static void add_obmc ## xblen ## _c(uint16_t *dst,
const uint8_t *
src,
int stride, \
const uint8_t *obmc_weight,
int yblen) \
for (x = 0; x < xblen; x += 2) { \
dst[x ] +=
src[x ] * obmc_weight[x ]; \
dst[x+1] +=
src[x+1] * obmc_weight[x+1]; \
} \
obmc_weight += 32; \
} \
}
GLint GLenum GLboolean GLsizei stride
Definition at line 117 of file diracdsp.c.
#define PUT_SIGNED_RECT_CLAMPED |
( |
|
PX | ) |
|
Value:static void put_signed_rect_clamped_ ## PX ## bit_c(
uint8_t *_dst,
int dst_stride,
const uint8_t *_src, \
uint16_t *dst = (uint16_t *)_dst;
\
dst[x ] = av_clip_uintp2(src[x ] + (1
U << (PX - 1)), PX); \
dst[x+1] = av_clip_uintp2(src[x+1] + (1
U << (PX - 1)), PX); \
dst[x+2] = av_clip_uintp2(src[x+2] + (1
U << (PX - 1)), PX); \
dst[x+3] = av_clip_uintp2(src[x+3] + (1
U << (PX - 1)), PX); \
} \
dst += dst_stride >> 1;
\
src += src_stride >> 2; \
} \
}
Definition at line 153 of file diracdsp.c.
#define DEQUANT_SUBBAND |
( |
|
PX | ) |
|
Value:
const int qf, const int qs, int tot_v, int tot_h) \
for (y = 0; y < tot_v; y++) { \
PX
c, sign, *src_r = (PX *)
src, *dst_r = (PX *)dst;
\
for (i = 0; i < tot_h; i++) {
\
c = (
FFABS(c)*(unsigned)qf + qs) >> 2; \
*dst_r++ = c*sign; \
src += tot_h << (sizeof(PX) >> 1); \
} \
}
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
GLint GLenum GLboolean GLsizei stride
Definition at line 192 of file diracdsp.c.
#define PIXFUNC |
( |
|
PFX, |
|
|
|
WIDTH |
|
) |
| |
Value:c->PFX ## _dirac_pixels_tab[
WIDTH>>4][0] = ff_ ## PFX ## _dirac_pixels ##
WIDTH ## _c;
\
c->PFX ## _dirac_pixels_tab[
WIDTH>>4][1] = ff_ ## PFX ## _dirac_pixels ##
WIDTH ## _l2_c;
\
c->PFX ## _dirac_pixels_tab[
WIDTH>>4][2] = ff_ ## PFX ## _dirac_pixels ##
WIDTH ## _l4_c;
\
c->PFX ## _dirac_pixels_tab[
WIDTH>>4][3] = ff_ ## PFX ## _dirac_pixels ##
WIDTH ## _bilinear_c
Definition at line 213 of file diracdsp.c.
Referenced by ff_diracdsp_init().
static void add_rect_clamped_c |
( |
uint8_t * |
dst, |
|
|
const uint16_t * |
src, |
|
|
int |
stride, |
|
|
const int16_t * |
idwt, |
|
|
int |
idwt_stride, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
static |