FFmpeg
Macros | Functions
cavsdsp.c File Reference
#include "idctdsp.h"
#include "mathops.h"
#include "cavsdsp.h"
#include "libavutil/common.h"

Go to the source code of this file.

Macros

#define P2   p0_p[-3*stride]
 
#define P1   p0_p[-2*stride]
 
#define P0   p0_p[-1*stride]
 
#define Q0   p0_p[ 0*stride]
 
#define Q1   p0_p[ 1*stride]
 
#define Q2   p0_p[ 2*stride]
 
#define CAVS_SUBPIX(OPNAME, OP, NAME, A, B, C, D, E, F)
 
#define CAVS_SUBPIX_HV(OPNAME, OP, NAME, AH, BH, CH, DH, EH, FH, AV, BV, CV, DV, EV, FV, FULL)
 
#define CAVS_MC(OPNAME, SIZE)
 
#define op_put1(a, b)   a = cm[((b)+4)>>3]
 
#define op_put2(a, b)   a = cm[((b)+64)>>7]
 
#define op_put3(a, b)   a = cm[((b)+32)>>6]
 
#define op_put4(a, b)   a = cm[((b)+512)>>10]
 
#define op_avg1(a, b)   a = ((a)+cm[((b)+4)>>3] +1)>>1
 
#define op_avg2(a, b)   a = ((a)+cm[((b)+64)>>7] +1)>>1
 
#define op_avg3(a, b)   a = ((a)+cm[((b)+32)>>6] +1)>>1
 
#define op_avg4(a, b)   a = ((a)+cm[((b)+512)>>10]+1)>>1
 
#define put_cavs_qpel8_mc00_c   ff_put_pixels8x8_c
 
#define avg_cavs_qpel8_mc00_c   ff_avg_pixels8x8_c
 
#define put_cavs_qpel16_mc00_c   ff_put_pixels16x16_c
 
#define avg_cavs_qpel16_mc00_c   ff_avg_pixels16x16_c
 
#define dspfunc(PFX, IDX, NUM)
 

Functions

static void loop_filter_l2 (uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta)
 
static void loop_filter_l1 (uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta, int tc)
 
static void loop_filter_c2 (uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta)
 
static void loop_filter_c1 (uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta, int tc)
 
static void cavs_filter_lv_c (uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2)
 
static void cavs_filter_lh_c (uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2)
 
static void cavs_filter_cv_c (uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2)
 
static void cavs_filter_ch_c (uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2)
 
static void cavs_idct8_add_c (uint8_t *dst, int16_t *block, ptrdiff_t stride)
 
av_cold void ff_cavsdsp_init (CAVSDSPContext *c)
 

Macro Definition Documentation

◆ P2

#define P2   p0_p[-3*stride]

Definition at line 36 of file cavsdsp.c.

◆ P1

#define P1   p0_p[-2*stride]

Definition at line 37 of file cavsdsp.c.

◆ P0

#define P0   p0_p[-1*stride]

Definition at line 38 of file cavsdsp.c.

◆ Q0

#define Q0   p0_p[ 0*stride]

Definition at line 39 of file cavsdsp.c.

◆ Q1

#define Q1   p0_p[ 1*stride]

Definition at line 40 of file cavsdsp.c.

◆ Q2

#define Q2   p0_p[ 2*stride]

Definition at line 41 of file cavsdsp.c.

◆ CAVS_SUBPIX

#define CAVS_SUBPIX (   OPNAME,
  OP,
  NAME,
  A,
  B,
  C,
  D,
  E,
  F 
)

Definition at line 269 of file cavsdsp.c.

◆ CAVS_SUBPIX_HV

#define CAVS_SUBPIX_HV (   OPNAME,
  OP,
  NAME,
  AH,
  BH,
  CH,
  DH,
  EH,
  FH,
  AV,
  BV,
  CV,
  DV,
  EV,
  FV,
  FULL 
)

Definition at line 343 of file cavsdsp.c.

◆ CAVS_MC

#define CAVS_MC (   OPNAME,
  SIZE 
)

Definition at line 438 of file cavsdsp.c.

◆ op_put1

#define op_put1 (   a,
  b 
)    a = cm[((b)+4)>>3]

Definition at line 514 of file cavsdsp.c.

◆ op_put2

#define op_put2 (   a,
  b 
)    a = cm[((b)+64)>>7]

Definition at line 515 of file cavsdsp.c.

◆ op_put3

#define op_put3 (   a,
  b 
)    a = cm[((b)+32)>>6]

Definition at line 516 of file cavsdsp.c.

◆ op_put4

#define op_put4 (   a,
  b 
)    a = cm[((b)+512)>>10]

Definition at line 517 of file cavsdsp.c.

◆ op_avg1

#define op_avg1 (   a,
  b 
)    a = ((a)+cm[((b)+4)>>3] +1)>>1

Definition at line 518 of file cavsdsp.c.

◆ op_avg2

#define op_avg2 (   a,
  b 
)    a = ((a)+cm[((b)+64)>>7] +1)>>1

Definition at line 519 of file cavsdsp.c.

◆ op_avg3

#define op_avg3 (   a,
  b 
)    a = ((a)+cm[((b)+32)>>6] +1)>>1

Definition at line 520 of file cavsdsp.c.

◆ op_avg4

#define op_avg4 (   a,
  b 
)    a = ((a)+cm[((b)+512)>>10]+1)>>1

Definition at line 521 of file cavsdsp.c.

◆ put_cavs_qpel8_mc00_c

#define put_cavs_qpel8_mc00_c   ff_put_pixels8x8_c

Definition at line 545 of file cavsdsp.c.

◆ avg_cavs_qpel8_mc00_c

#define avg_cavs_qpel8_mc00_c   ff_avg_pixels8x8_c

Definition at line 546 of file cavsdsp.c.

◆ put_cavs_qpel16_mc00_c

#define put_cavs_qpel16_mc00_c   ff_put_pixels16x16_c

Definition at line 547 of file cavsdsp.c.

◆ avg_cavs_qpel16_mc00_c

#define avg_cavs_qpel16_mc00_c   ff_avg_pixels16x16_c

Definition at line 548 of file cavsdsp.c.

◆ dspfunc

#define dspfunc (   PFX,
  IDX,
  NUM 
)
Value:
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \
c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \
c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \
c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \
c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \
c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \
c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \
c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \
c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \
c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \
c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \
c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \
c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \
c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \
c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \
c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c

Function Documentation

◆ loop_filter_l2()

static void loop_filter_l2 ( uint8_t *  p0_p,
ptrdiff_t  stride,
int  alpha,
int  beta 
)
inlinestatic

Definition at line 43 of file cavsdsp.c.

Referenced by cavs_filter_lh_c(), and cavs_filter_lv_c().

◆ loop_filter_l1()

static void loop_filter_l1 ( uint8_t *  p0_p,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc 
)
inlinestatic

Definition at line 64 of file cavsdsp.c.

Referenced by cavs_filter_lh_c(), and cavs_filter_lv_c().

◆ loop_filter_c2()

static void loop_filter_c2 ( uint8_t *  p0_p,
ptrdiff_t  stride,
int  alpha,
int  beta 
)
inlinestatic

Definition at line 84 of file cavsdsp.c.

Referenced by cavs_filter_ch_c(), and cavs_filter_cv_c().

◆ loop_filter_c1()

static void loop_filter_c1 ( uint8_t *  p0_p,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc 
)
inlinestatic

Definition at line 103 of file cavsdsp.c.

Referenced by cavs_filter_ch_c(), and cavs_filter_cv_c().

◆ cavs_filter_lv_c()

static void cavs_filter_lv_c ( uint8_t *  d,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc,
int  bs1,
int  bs2 
)
static

Definition at line 120 of file cavsdsp.c.

Referenced by ff_cavsdsp_init().

◆ cavs_filter_lh_c()

static void cavs_filter_lh_c ( uint8_t *  d,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc,
int  bs1,
int  bs2 
)
static

Definition at line 137 of file cavsdsp.c.

Referenced by ff_cavsdsp_init().

◆ cavs_filter_cv_c()

static void cavs_filter_cv_c ( uint8_t *  d,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc,
int  bs1,
int  bs2 
)
static

Definition at line 154 of file cavsdsp.c.

Referenced by ff_cavsdsp_init().

◆ cavs_filter_ch_c()

static void cavs_filter_ch_c ( uint8_t *  d,
ptrdiff_t  stride,
int  alpha,
int  beta,
int  tc,
int  bs1,
int  bs2 
)
static

Definition at line 171 of file cavsdsp.c.

Referenced by ff_cavsdsp_init().

◆ cavs_idct8_add_c()

static void cavs_idct8_add_c ( uint8_t *  dst,
int16_t *  block,
ptrdiff_t  stride 
)
static

Definition at line 194 of file cavsdsp.c.

Referenced by ff_cavsdsp_init().

◆ ff_cavsdsp_init()

av_cold void ff_cavsdsp_init ( CAVSDSPContext c)

Definition at line 550 of file cavsdsp.c.

Referenced by ff_cavs_init().

c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32