FFmpeg
Macros | Functions | Variables
hevcdsp.c File Reference
#include "hevcdsp.h"
#include "hevcdsp_template.c"

Go to the source code of this file.

Macros

#define BIT_DEPTH   8
 
#define BIT_DEPTH   9
 
#define BIT_DEPTH   10
 
#define BIT_DEPTH   12
 
#define FUNC(a, depth)   a ## _ ## depth
 
#define PEL_FUNC(dst1, idx1, idx2, a, depth)
 
#define EPEL_FUNCS(depth)
 
#define EPEL_UNI_FUNCS(depth)
 
#define EPEL_BI_FUNCS(depth)
 
#define QPEL_FUNCS(depth)
 
#define QPEL_UNI_FUNCS(depth)
 
#define QPEL_BI_FUNCS(depth)
 
#define HEVC_DSP(depth)
 

Functions

void ff_hevc_dsp_init (HEVCDSPContext *hevcdsp, int bit_depth)
 

Variables

static const int8_t transform [32][32]
 
const int8_t ff_hevc_epel_filters [8][4]
 ff_hevc_.pel_filters[0] are dummies to simplify array addressing More...
 
const int8_t ff_hevc_qpel_filters [4][16]
 

Macro Definition Documentation

◆ BIT_DEPTH [1/4]

#define BIT_DEPTH   8

Definition at line 124 of file hevcdsp.c.

◆ BIT_DEPTH [2/4]

#define BIT_DEPTH   9

Definition at line 124 of file hevcdsp.c.

◆ BIT_DEPTH [3/4]

#define BIT_DEPTH   10

Definition at line 124 of file hevcdsp.c.

◆ BIT_DEPTH [4/4]

#define BIT_DEPTH   12

Definition at line 124 of file hevcdsp.c.

◆ FUNC

#define FUNC (   a,
  depth 
)    a ## _ ## depth

◆ PEL_FUNC

#define PEL_FUNC (   dst1,
  idx1,
  idx2,
  a,
  depth 
)
Value:
for(i = 0 ; i < 10 ; i++) \
{ \
hevcdsp->dst1[i][idx1][idx2] = a ## _ ## depth; \
}

◆ EPEL_FUNCS

#define EPEL_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_epel, 0, 0, put_hevc_pel_pixels, depth); \
PEL_FUNC(put_hevc_epel, 0, 1, put_hevc_epel_h, depth); \
PEL_FUNC(put_hevc_epel, 1, 0, put_hevc_epel_v, depth); \
PEL_FUNC(put_hevc_epel, 1, 1, put_hevc_epel_hv, depth)

◆ EPEL_UNI_FUNCS

#define EPEL_UNI_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_epel_uni, 0, 0, put_hevc_pel_uni_pixels, depth); \
PEL_FUNC(put_hevc_epel_uni, 0, 1, put_hevc_epel_uni_h, depth); \
PEL_FUNC(put_hevc_epel_uni, 1, 0, put_hevc_epel_uni_v, depth); \
PEL_FUNC(put_hevc_epel_uni, 1, 1, put_hevc_epel_uni_hv, depth); \
PEL_FUNC(put_hevc_epel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth); \
PEL_FUNC(put_hevc_epel_uni_w, 0, 1, put_hevc_epel_uni_w_h, depth); \
PEL_FUNC(put_hevc_epel_uni_w, 1, 0, put_hevc_epel_uni_w_v, depth); \
PEL_FUNC(put_hevc_epel_uni_w, 1, 1, put_hevc_epel_uni_w_hv, depth)

◆ EPEL_BI_FUNCS

#define EPEL_BI_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_epel_bi, 0, 0, put_hevc_pel_bi_pixels, depth); \
PEL_FUNC(put_hevc_epel_bi, 0, 1, put_hevc_epel_bi_h, depth); \
PEL_FUNC(put_hevc_epel_bi, 1, 0, put_hevc_epel_bi_v, depth); \
PEL_FUNC(put_hevc_epel_bi, 1, 1, put_hevc_epel_bi_hv, depth); \
PEL_FUNC(put_hevc_epel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth); \
PEL_FUNC(put_hevc_epel_bi_w, 0, 1, put_hevc_epel_bi_w_h, depth); \
PEL_FUNC(put_hevc_epel_bi_w, 1, 0, put_hevc_epel_bi_w_v, depth); \
PEL_FUNC(put_hevc_epel_bi_w, 1, 1, put_hevc_epel_bi_w_hv, depth)

◆ QPEL_FUNCS

#define QPEL_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_qpel, 0, 0, put_hevc_pel_pixels, depth); \
PEL_FUNC(put_hevc_qpel, 0, 1, put_hevc_qpel_h, depth); \
PEL_FUNC(put_hevc_qpel, 1, 0, put_hevc_qpel_v, depth); \
PEL_FUNC(put_hevc_qpel, 1, 1, put_hevc_qpel_hv, depth)

◆ QPEL_UNI_FUNCS

#define QPEL_UNI_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_qpel_uni, 0, 0, put_hevc_pel_uni_pixels, depth); \
PEL_FUNC(put_hevc_qpel_uni, 0, 1, put_hevc_qpel_uni_h, depth); \
PEL_FUNC(put_hevc_qpel_uni, 1, 0, put_hevc_qpel_uni_v, depth); \
PEL_FUNC(put_hevc_qpel_uni, 1, 1, put_hevc_qpel_uni_hv, depth); \
PEL_FUNC(put_hevc_qpel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth); \
PEL_FUNC(put_hevc_qpel_uni_w, 0, 1, put_hevc_qpel_uni_w_h, depth); \
PEL_FUNC(put_hevc_qpel_uni_w, 1, 0, put_hevc_qpel_uni_w_v, depth); \
PEL_FUNC(put_hevc_qpel_uni_w, 1, 1, put_hevc_qpel_uni_w_hv, depth)

◆ QPEL_BI_FUNCS

#define QPEL_BI_FUNCS (   depth)
Value:
PEL_FUNC(put_hevc_qpel_bi, 0, 0, put_hevc_pel_bi_pixels, depth); \
PEL_FUNC(put_hevc_qpel_bi, 0, 1, put_hevc_qpel_bi_h, depth); \
PEL_FUNC(put_hevc_qpel_bi, 1, 0, put_hevc_qpel_bi_v, depth); \
PEL_FUNC(put_hevc_qpel_bi, 1, 1, put_hevc_qpel_bi_hv, depth); \
PEL_FUNC(put_hevc_qpel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth); \
PEL_FUNC(put_hevc_qpel_bi_w, 0, 1, put_hevc_qpel_bi_w_h, depth); \
PEL_FUNC(put_hevc_qpel_bi_w, 1, 0, put_hevc_qpel_bi_w_v, depth); \
PEL_FUNC(put_hevc_qpel_bi_w, 1, 1, put_hevc_qpel_bi_w_hv, depth)

◆ HEVC_DSP

#define HEVC_DSP (   depth)

Function Documentation

◆ ff_hevc_dsp_init()

void ff_hevc_dsp_init ( HEVCDSPContext hevcdsp,
int  bit_depth 
)

Variable Documentation

◆ transform

const int8_t transform[32][32]
static

◆ ff_hevc_epel_filters

const int8_t ff_hevc_epel_filters[8][4]
Initial value:
= {
{ 0 },
{ -2, 58, 10, -2},
{ -4, 54, 16, -2},
{ -6, 46, 28, -4},
{ -4, 36, 36, -4},
{ -4, 28, 46, -6},
{ -2, 16, 54, -4},
{ -2, 10, 58, -2},
}

ff_hevc_.pel_filters[0] are dummies to simplify array addressing

Definition at line 94 of file hevcdsp.c.

Referenced by put_hevc_epel_bi_h(), put_hevc_epel_bi_hv(), put_hevc_epel_bi_v(), put_hevc_epel_bi_w_h(), put_hevc_epel_bi_w_hv(), and put_hevc_epel_bi_w_v().

◆ ff_hevc_qpel_filters

const int8_t ff_hevc_qpel_filters[4][16]
Initial value:
= {
{ 0 },
{ -1, 4,-10, 58, 17, -5, 1, 0, -1, 4,-10, 58, 17, -5, 1, 0},
{ -1, 4,-11, 40, 40,-11, 4, -1, -1, 4,-11, 40, 40,-11, 4, -1},
{ 0, 1, -5, 17, 58,-10, 4, -1, 0, 1, -5, 17, 58,-10, 4, -1}
}

Definition at line 105 of file hevcdsp.c.

Referenced by put_hevc_qpel_bi_h(), put_hevc_qpel_bi_hv(), put_hevc_qpel_bi_v(), put_hevc_qpel_bi_w_h(), put_hevc_qpel_bi_w_hv(), and put_hevc_qpel_bi_w_v().

put_hevc_epel_bi_v
static void FUNC() put_hevc_epel_bi_v(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:642
put_hevc_qpel_bi_hv
static void FUNC() put_hevc_qpel_bi_hv(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:470
put_hevc_qpel_bi_v
static void FUNC() put_hevc_qpel_bi_v(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:442
put_hevc_qpel_bi_w_h
static void FUNC() put_hevc_qpel_bi_w_h(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:510
put_hevc_qpel_bi_w_v
static void FUNC() put_hevc_qpel_bi_w_v(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:538
put_hevc_pel_bi_pixels
static void FUNC() put_hevc_pel_bi_pixels(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:349
PEL_FUNC
#define PEL_FUNC(dst1, idx1, idx2, a, depth)
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
put_hevc_qpel_bi_w_hv
static void FUNC() put_hevc_qpel_bi_w_hv(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:566
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
put_hevc_qpel_bi_h
static void FUNC() put_hevc_qpel_bi_h(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:414
put_hevc_epel_bi_w_v
static void FUNC() put_hevc_epel_bi_w_v(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:734
put_hevc_epel_bi_w_h
static void FUNC() put_hevc_epel_bi_w_h(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:708
_
#define _
put_hevc_epel_bi_h
static void FUNC() put_hevc_epel_bi_h(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:615
put_hevc_pel_bi_w_pixels
static void FUNC() put_hevc_pel_bi_w_pixels(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:375
put_hevc_epel_bi_w_hv
static void FUNC() put_hevc_epel_bi_w_hv(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:760
put_hevc_epel_bi_hv
static void FUNC() put_hevc_epel_bi_hv(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width)
Definition: hevcdsp_template.c:668