diracdsp.c File Reference
#include "dsputil.h"
#include "diracdsp.h"
#include "libavcodec/x86/diracdsp_mmx.h"
Include dependency graph for diracdsp.c:

Go to the source code of this file.

Macros

#define FILTER(src, stride)
 
#define PIXOP_BILINEAR(PFX, OP, WIDTH)
 
#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)
 
#define ADD_OBMC(xblen)
 
#define PIXFUNC(PFX, WIDTH)
 

Functions

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_c (uint8_t *dst, int dst_stride, const int16_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)
 
void ff_diracdsp_init (DiracDSPContext *c)
 

Macro Definition Documentation

#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) \
{ \
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]; \
} \
src += stride; \
obmc_weight += 32; \
} \
}
int stride
Definition: mace.c:144
uint8_t
Discrete Time axis x
AVS_Value src
Definition: avisynth_c.h:523
Synth Windw Norm while(pin< pend)%Until the end...%---Analysis x_w
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160
for(j=16;j >0;--j)

Definition at line 118 of file diracdsp.c.

#define DIRAC_WEIGHT (   W)
Value:
static void weight_dirac_pixels ## W ## _c(uint8_t *block, int stride, int log2_denom, \
int weight, int h) { \
int x; \
while (h--) { \
for (x = 0; x < W; x++) { \
op_scale1(x+1); \
} \
block += stride; \
} \
} \
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) { \
int x; \
while (h--) { \
for (x = 0; x < W; x++) { \
op_scale2(x+1); \
} \
src += stride; \
} \
}
int stride
Definition: mace.c:144
#define op_scale1(x)
Definition: diracdsp.c:86
#define op_scale2(x)
Definition: diracdsp.c:87
uint8_t
Discrete Time axis x
AVS_Value src
Definition: avisynth_c.h:523
static int weight(int i, int blen, int offset)
Synth Windw Norm while(pin< pend)%Until the end...%---Analysis x_w
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160
for(j=16;j >0;--j)
normalize window W
Definition: stft_peak.m:10

Definition at line 89 of file diracdsp.c.

#define FILTER (   src,
  stride 
)
Value:
((21*((src)[ 0*stride] + (src)[1*stride]) \
-7*((src)[-1*stride] + (src)[2*stride]) \
+3*((src)[-2*stride] + (src)[3*stride]) \
-1*((src)[-3*stride] + (src)[4*stride]) + 16) >> 5)
int stride
Definition: mace.c:144
AVS_Value src
Definition: avisynth_c.h:523

Definition at line 25 of file diracdsp.c.

Referenced by dirac_hpel_filter().

#define OP_AVG (   dst,
  val 
)    (dst) = (((dst) + (val) + 1)>>1)

Definition at line 77 of file diracdsp.c.

Referenced by DEF().

#define OP_PUT (   dst,
  val 
)    (dst) = (val)

Definition at line 76 of file diracdsp.c.

#define op_scale1 (   x)    block[x] = av_clip_uint8( (block[x]*weight + (1<<(log2_denom-1))) >> log2_denom)

Definition at line 86 of file diracdsp.c.

#define op_scale2 (   x)    dst[x] = av_clip_uint8( (src[x]*weights + dst[x]*weightd + (1<<(log2_denom-1))) >> log2_denom)

Definition at line 87 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
#define WIDTH
static double c[64]

Definition at line 170 of file diracdsp.c.

Referenced by ff_diracdsp_init().

#define PIXOP_BILINEAR (   PFX,
  OP,
  WIDTH 
)
Value:
static void ff_ ## PFX ## _dirac_pixels ## WIDTH ## _bilinear_c(uint8_t *dst, const uint8_t *src[5], int 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]; \
while (h--) { \
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); \
} \
\
s3 += stride; \
} \
}
#define WIDTH
int stride
Definition: mace.c:144
output residual component w
uint8_t
Discrete Time axis x
#define s2
Definition: regdef.h:39
#define s0
Definition: regdef.h:37
#define OP(LOAD, STORE)
Definition: hpeldsp_alpha.c:55
#define s3
Definition: regdef.h:40
AVS_Value src
Definition: avisynth_c.h:523
#define s1
Definition: regdef.h:38
Synth Windw Norm while(pin< pend)%Until the end...%---Analysis x_w
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160
for(j=16;j >0;--j)

Definition at line 53 of file diracdsp.c.

Function Documentation

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

Definition at line 153 of file diracdsp.c.

Referenced by ff_diracdsp_init().

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

Definition at line 31 of file diracdsp.c.

Referenced by ff_diracdsp_init().

void ff_diracdsp_init ( DiracDSPContext c)

Definition at line 176 of file diracdsp.c.

Referenced by dirac_decode_init().

static void put_signed_rect_clamped_c ( uint8_t dst,
int  dst_stride,
const int16_t *  src,
int  src_stride,
int  width,
int  height 
)
static

Definition at line 138 of file diracdsp.c.

Referenced by ff_diracdsp_init().