#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/common.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, ptrdiff_t stride, int width, int height) |
| |
| static void | put_signed_rect_clamped_8bit_c (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int width, int height) |
| |
| static void | add_rect_clamped_c (uint8_t *dst, const uint16_t *src, ptrdiff_t stride, const int16_t *idwt, ptrdiff_t idwt_stride, int width, int height) |
| |
| av_cold void | ff_diracdsp_init (DiracDSPContext *c) |
| |
◆ FILTER
◆ PIXOP_BILINEAR
| #define PIXOP_BILINEAR |
( |
| PFX, |
|
|
| OP, |
|
|
| WIDTH ) |
Value: static void ff_ ## PFX ## _dirac_pixels ##
WIDTH ## _bilinear_c(uint8_t *
dst,
const uint8_t *
src[5], ptrdiff_t
stride,
int h) \
{ \
int x; \
const uint8_t *s0 =
src[0]; \
const uint8_t *s1 =
src[1]; \
const uint8_t *s2 =
src[2]; \
const uint8_t *s3 =
src[3]; \
const uint8_t *
w =
src[4]; \
\
for (x = 0; x <
WIDTH; x++) { \
OP(
dst[x], (s0[x]*
w[0] + s1[x]*
w[1] + s2[x]*
w[2] + s3[x]*
w[3] + 8) >> 4); \
} \
\
} \
}
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition at line 54 of file diracdsp.c.
◆ OP_PUT
Value:
static double val(void *priv, double ch)
Definition at line 77 of file diracdsp.c.
◆ OP_AVG
◆ op_scale1
Value:
const h264_weight_func weight
Definition at line 87 of file diracdsp.c.
◆ op_scale2
Value:
static const int weights[]
Definition at line 88 of file diracdsp.c.
◆ DIRAC_WEIGHT
| #define DIRAC_WEIGHT |
( |
| W | ) |
|
Value: static void weight_dirac_pixels ##
W ## _c(uint8_t *
block, ptrdiff_t
stride, \
int log2_denom,
int weight,
int h) \
{ \
int x; \
for (x = 0; x <
W; x++) { \
op_scale1(x); \
op_scale1(x+1); \
} \
} \
} \
static void biweight_dirac_pixels ##
W ## _c(uint8_t *
dst,
const uint8_t *
src, \
ptrdiff_t
stride,
int log2_denom, \
int x; \
for (x = 0; x <
W; x++) { \
op_scale2(x); \
op_scale2(x+1); \
} \
} \
}
Definition at line 90 of file diracdsp.c.
◆ ADD_OBMC
| #define ADD_OBMC |
( |
| xblen | ) |
|
Value: static void add_obmc ## xblen ## _c(uint16_t *
dst,
const uint8_t *
src, ptrdiff_t
stride, \
const uint8_t *obmc_weight, int yblen) \
{ \
int x; \
while (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; \
} \
}
Definition at line 121 of file diracdsp.c.
◆ PUT_SIGNED_RECT_CLAMPED
| #define PUT_SIGNED_RECT_CLAMPED |
( |
| PX | ) |
|
Value:static void put_signed_rect_clamped_ ## PX ## bit_c(uint8_t *
_dst, ptrdiff_t dst_stride, \
const uint8_t *
_src, ptrdiff_t src_stride, \
{ \
int x, y; \
uint16_t *
dst = (uint16_t *)
_dst; \
for (y = 0; y <
height; y++) { \
for (x = 0; x <
width; x+=4) { \
} \
dst += dst_stride >> 1; \
src += src_stride >> 2; \
} \
}
uint8_t ptrdiff_t const uint8_t * _src
Definition at line 159 of file diracdsp.c.
◆ DEQUANT_SUBBAND
| #define DEQUANT_SUBBAND |
( |
| PX | ) |
|
Value:static void dequant_subband_ ## PX ## _c(uint8_t *
src, uint8_t *
dst, ptrdiff_t
stride, \
const int qf, const int qs, int tot_v, int tot_h) \
{ \
for (y = 0; y < tot_v; y++) { \
PX
c, *src_r = (PX *)
src, *dst_r = (PX *)
dst; \
for (
i = 0;
i < tot_h;
i++) { \
if (
c < 0)
c = -((-(
unsigned)
c*qf + qs) >> 2); \
else if(
c > 0)
c = (( (
unsigned)
c*qf + qs) >> 2); \
} \
src += tot_h << (sizeof(PX) >> 1); \
} \
}
#define i(width, name, range_min, range_max)
Definition at line 199 of file diracdsp.c.
◆ PIXFUNC
| #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 220 of file diracdsp.c.
Referenced by ff_diracdsp_init().
◆ dirac_hpel_filter()
| static void dirac_hpel_filter |
( |
uint8_t * | dsth, |
|
|
uint8_t * | dstv, |
|
|
uint8_t * | dstc, |
|
|
const uint8_t * | src, |
|
|
ptrdiff_t | stride, |
|
|
int | width, |
|
|
int | height ) |
|
static |
◆ put_signed_rect_clamped_8bit_c()
| static void put_signed_rect_clamped_8bit_c |
( |
uint8_t * | dst, |
|
|
ptrdiff_t | dst_stride, |
|
|
const uint8_t * | _src, |
|
|
ptrdiff_t | src_stride, |
|
|
int | width, |
|
|
int | height ) |
|
static |
◆ add_rect_clamped_c()
| static void add_rect_clamped_c |
( |
uint8_t * | dst, |
|
|
const uint16_t * | src, |
|
|
ptrdiff_t | stride, |
|
|
const int16_t * | idwt, |
|
|
ptrdiff_t | idwt_stride, |
|
|
int | width, |
|
|
int | height ) |
|
static |
◆ ff_diracdsp_init()