FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hevcdsp_init.c File Reference
#include "config.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/hevcdsp.h"
#include "libavcodec/x86/hevcdsp.h"

Go to the source code of this file.

Macros

#define LFC_FUNC(DIR, DEPTH, OPT)   void ff_hevc_ ## DIR ## _loop_filter_chroma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, int *tc, uint8_t *no_p, uint8_t *no_q);
 
#define LFL_FUNC(DIR, DEPTH, OPT)   void ff_hevc_ ## DIR ## _loop_filter_luma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, int beta, int *tc, uint8_t *no_p, uint8_t *no_q);
 
#define LFC_FUNCS(type, depth, opt)
 
#define LFL_FUNCS(type, depth, opt)
 
#define IDCT_DC_FUNCS(W, opt)
 
#define IDCT_FUNCS(opt)
 
#define mc_rep_func(name, bitd, step, W, opt)
 
#define mc_rep_uni_func(name, bitd, step, W, opt)
 
#define mc_rep_bi_func(name, bitd, step, W, opt)
 
#define mc_rep_funcs(name, bitd, step, W, opt)
 
#define mc_rep_func2(name, bitd, step1, step2, W, opt)
 
#define mc_rep_uni_func2(name, bitd, step1, step2, W, opt)
 
#define mc_rep_bi_func2(name, bitd, step1, step2, W, opt)
 
#define mc_rep_funcs2(name, bitd, step1, step2, W, opt)
 
#define SAO_BAND_FILTER_FUNCS(bitd, opt)
 
#define SAO_BAND_INIT(bitd, opt)
 
#define SAO_EDGE_FILTER_FUNCS(bitd, opt)
 
#define SAO_EDGE_INIT(bitd, opt)
 
#define EPEL_LINKS(pointer, my, mx, fname, bitd, opt)
 
#define QPEL_LINKS(pointer, my, mx, fname, bitd, opt)
 

Functions

 IDCT_DC_FUNCS (4x4, mmxext)
 
 IDCT_DC_FUNCS (8x8, mmxext)
 
 IDCT_DC_FUNCS (8x8, sse2)
 
 IDCT_DC_FUNCS (16x16, sse2)
 
 IDCT_DC_FUNCS (32x32, sse2)
 
 IDCT_DC_FUNCS (16x16, avx2)
 
 IDCT_DC_FUNCS (32x32, avx2)
 
void ff_hevc_dsp_init_x86 (HEVCDSPContext *c, const int bit_depth)
 

Macro Definition Documentation

#define LFC_FUNC (   DIR,
  DEPTH,
  OPT 
)    void ff_hevc_ ## DIR ## _loop_filter_chroma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, int *tc, uint8_t *no_p, uint8_t *no_q);

Definition at line 31 of file hevcdsp_init.c.

#define LFL_FUNC (   DIR,
  DEPTH,
  OPT 
)    void ff_hevc_ ## DIR ## _loop_filter_luma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, int beta, int *tc, uint8_t *no_p, uint8_t *no_q);

Definition at line 34 of file hevcdsp_init.c.

#define LFC_FUNCS (   type,
  depth,
  opt 
)
Value:
LFC_FUNC(h, depth, opt) \
LFC_FUNC(v, depth, opt)
#define LFC_FUNC(DIR, DEPTH, OPT)
Definition: hevcdsp_init.c:31
int depth
Definition: v4l.c:62

Definition at line 37 of file hevcdsp_init.c.

#define LFL_FUNCS (   type,
  depth,
  opt 
)
Value:
LFL_FUNC(h, depth, opt) \
LFL_FUNC(v, depth, opt)
#define LFL_FUNC(DIR, DEPTH, OPT)
Definition: hevcdsp_init.c:34
int depth
Definition: v4l.c:62

Definition at line 41 of file hevcdsp_init.c.

#define IDCT_DC_FUNCS (   W,
  opt 
)
Value:
void ff_hevc_idct_ ## W ## _dc_8_ ## opt(int16_t *coeffs); \
void ff_hevc_idct_ ## W ## _dc_10_ ## opt(int16_t *coeffs); \
void ff_hevc_idct_ ## W ## _dc_12_ ## opt(int16_t *coeffs)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
#define W(a, i, v)
Definition: jpegls.h:122
static const int16_t coeffs[]

Definition at line 61 of file hevcdsp_init.c.

#define IDCT_FUNCS (   opt)
Value:
void ff_hevc_idct_4x4_8_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_4x4_10_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_8x8_8_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_8x8_10_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_16x16_8_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_16x16_10_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_32x32_8_ ## opt(int16_t *coeffs, int col_limit); \
void ff_hevc_idct_32x32_10_ ## opt(int16_t *coeffs, int col_limit);
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
static const int16_t coeffs[]

Definition at line 74 of file hevcdsp_init.c.

#define mc_rep_func (   name,
  bitd,
  step,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_##name##W##_##bitd##_##opt(int16_t *_dst, \
uint8_t *_src, ptrdiff_t _srcstride, int height, \
intptr_t mx, intptr_t my, int width) \
{ \
int i; \
int16_t *dst; \
for (i = 0; i < W; i += step) { \
src = _src + (i * ((bitd + 7) / 8)); \
dst = _dst + i; \
ff_hevc_put_hevc_##name##step##_##bitd##_##opt(dst, src, _srcstride, height, mx, my, width); \
} \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
int
#define _
Definition: wtv_common.c:49
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:103

Definition at line 87 of file hevcdsp_init.c.

#define mc_rep_uni_func (   name,
  bitd,
  step,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_uni_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, \
uint8_t *_src, ptrdiff_t _srcstride, int height, \
intptr_t mx, intptr_t my, int width) \
{ \
int i; \
uint8_t *dst; \
for (i = 0; i < W; i += step) { \
src = _src + (i * ((bitd + 7) / 8)); \
dst = _dst + (i * ((bitd + 7) / 8)); \
ff_hevc_put_hevc_uni_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, \
height, mx, my, width); \
} \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
int
#define _
Definition: wtv_common.c:49
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:103

Definition at line 101 of file hevcdsp_init.c.

#define mc_rep_bi_func (   name,
  bitd,
  step,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_bi_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, uint8_t *_src, \
ptrdiff_t _srcstride, int16_t* _src2, \
int height, intptr_t mx, intptr_t my, int width) \
{ \
int i; \
uint8_t *dst; \
int16_t *src2; \
for (i = 0; i < W ; i += step) { \
src = _src + (i * ((bitd + 7) / 8)); \
dst = _dst + (i * ((bitd + 7) / 8)); \
src2 = _src2 + i; \
ff_hevc_put_hevc_bi_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, src2, \
height, mx, my, width); \
} \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
int
#define _
Definition: wtv_common.c:49
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:103

Definition at line 116 of file hevcdsp_init.c.

#define mc_rep_funcs (   name,
  bitd,
  step,
  W,
  opt 
)
Value:
mc_rep_func(name, bitd, step, W, opt) \
mc_rep_uni_func(name, bitd, step, W, opt) \
mc_rep_bi_func(name, bitd, step, W, opt)
#define mc_rep_func(name, bitd, step, W, opt)
Definition: hevcdsp_init.c:87
#define mc_rep_uni_func(name, bitd, step, W, opt)
Definition: hevcdsp_init.c:101
#define W(a, i, v)
Definition: jpegls.h:122
#define mc_rep_bi_func(name, bitd, step, W, opt)
Definition: hevcdsp_init.c:116
const char * name
Definition: opengl_enc.c:103

Definition at line 134 of file hevcdsp_init.c.

#define mc_rep_func2 (   name,
  bitd,
  step1,
  step2,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_##name##W##_##bitd##_##opt(int16_t *dst, \
uint8_t *src, ptrdiff_t _srcstride, int height, \
intptr_t mx, intptr_t my, int width) \
{ \
ff_hevc_put_hevc_##name##step1##_##bitd##_##opt(dst, src, _srcstride, height, mx, my, width); \
ff_hevc_put_hevc_##name##step2##_##bitd##_##opt(dst + step1, src + (step1 * ((bitd + 7) / 8)), \
_srcstride, height, mx, my, width); \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
#define _
Definition: wtv_common.c:49
const char * name
Definition: opengl_enc.c:103

Definition at line 139 of file hevcdsp_init.c.

#define mc_rep_uni_func2 (   name,
  bitd,
  step1,
  step2,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_uni_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, \
uint8_t *src, ptrdiff_t _srcstride, int height, \
intptr_t mx, intptr_t my, int width) \
{ \
ff_hevc_put_hevc_uni_##name##step1##_##bitd##_##opt(dst, dststride, src, _srcstride, height, mx, my, width);\
ff_hevc_put_hevc_uni_##name##step2##_##bitd##_##opt(dst + (step1 * ((bitd + 7) / 8)), dststride, \
src + (step1 * ((bitd + 7) / 8)), _srcstride, \
height, mx, my, width); \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
#define _
Definition: wtv_common.c:49
const char * name
Definition: opengl_enc.c:103

Definition at line 148 of file hevcdsp_init.c.

#define mc_rep_bi_func2 (   name,
  bitd,
  step1,
  step2,
  W,
  opt 
)
Value:
void ff_hevc_put_hevc_bi_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \
ptrdiff_t _srcstride, int16_t* src2, \
int height, intptr_t mx, intptr_t my, int width) \
{ \
ff_hevc_put_hevc_bi_##name##step1##_##bitd##_##opt(dst, dststride, src, _srcstride, src2, height, mx, my, width);\
ff_hevc_put_hevc_bi_##name##step2##_##bitd##_##opt(dst + (step1 * ((bitd + 7) / 8)), dststride, \
src + (step1 * ((bitd + 7) / 8)), _srcstride, \
src2 + step1, height, mx, my, width); \
}
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
#define width
#define W(a, i, v)
Definition: jpegls.h:122
#define _
Definition: wtv_common.c:49
const char * name
Definition: opengl_enc.c:103

Definition at line 158 of file hevcdsp_init.c.

#define mc_rep_funcs2 (   name,
  bitd,
  step1,
  step2,
  W,
  opt 
)
Value:
mc_rep_func2(name, bitd, step1, step2, W, opt) \
mc_rep_uni_func2(name, bitd, step1, step2, W, opt) \
mc_rep_bi_func2(name, bitd, step1, step2, W, opt)
#define mc_rep_func2(name, bitd, step1, step2, W, opt)
Definition: hevcdsp_init.c:139
#define mc_rep_bi_func2(name, bitd, step1, step2, W, opt)
Definition: hevcdsp_init.c:158
#define W(a, i, v)
Definition: jpegls.h:122
#define mc_rep_uni_func2(name, bitd, step1, step2, W, opt)
Definition: hevcdsp_init.c:148
const char * name
Definition: opengl_enc.c:103

Definition at line 169 of file hevcdsp_init.c.

#define SAO_BAND_FILTER_FUNCS (   bitd,
  opt 
)
Value:
void ff_hevc_sao_band_filter_8_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
int16_t *sao_offset_val, int sao_left_class, int width, int height); \
void ff_hevc_sao_band_filter_16_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
int16_t *sao_offset_val, int sao_left_class, int width, int height); \
void ff_hevc_sao_band_filter_32_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
int16_t *sao_offset_val, int sao_left_class, int width, int height); \
void ff_hevc_sao_band_filter_48_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
int16_t *sao_offset_val, int sao_left_class, int width, int height); \
void ff_hevc_sao_band_filter_64_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
int16_t *sao_offset_val, int sao_left_class, int width, int height);
uint8_t
#define height
#define width
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
#define _
Definition: wtv_common.c:49

Definition at line 631 of file hevcdsp_init.c.

#define SAO_BAND_INIT (   bitd,
  opt 
)
Value:
do { \
c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_##bitd##_##opt; \
c->sao_band_filter[1] = ff_hevc_sao_band_filter_16_##bitd##_##opt; \
c->sao_band_filter[2] = ff_hevc_sao_band_filter_32_##bitd##_##opt; \
c->sao_band_filter[3] = ff_hevc_sao_band_filter_48_##bitd##_##opt; \
c->sao_band_filter[4] = ff_hevc_sao_band_filter_64_##bitd##_##opt; \
} while (0)
#define _
Definition: wtv_common.c:49
static double c[64]

Definition at line 653 of file hevcdsp_init.c.

Referenced by ff_hevc_dsp_init_x86().

#define SAO_EDGE_FILTER_FUNCS (   bitd,
  opt 
)
Value:
void ff_hevc_sao_edge_filter_8_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, \
int eo, int width, int height); \
void ff_hevc_sao_edge_filter_16_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, \
int eo, int width, int height); \
void ff_hevc_sao_edge_filter_32_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, \
int eo, int width, int height); \
void ff_hevc_sao_edge_filter_48_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, \
int eo, int width, int height); \
void ff_hevc_sao_edge_filter_64_##bitd##_##opt(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, \
int eo, int width, int height); \
uint8_t
#define height
#define width
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
#define _
Definition: wtv_common.c:49

Definition at line 661 of file hevcdsp_init.c.

#define SAO_EDGE_INIT (   bitd,
  opt 
)
Value:
do { \
c->sao_edge_filter[0] = ff_hevc_sao_edge_filter_8_##bitd##_##opt; \
c->sao_edge_filter[1] = ff_hevc_sao_edge_filter_16_##bitd##_##opt; \
c->sao_edge_filter[2] = ff_hevc_sao_edge_filter_32_##bitd##_##opt; \
c->sao_edge_filter[3] = ff_hevc_sao_edge_filter_48_##bitd##_##opt; \
c->sao_edge_filter[4] = ff_hevc_sao_edge_filter_64_##bitd##_##opt; \
} while (0)
#define _
Definition: wtv_common.c:49
static double c[64]

Definition at line 680 of file hevcdsp_init.c.

Referenced by ff_hevc_dsp_init_x86().

#define EPEL_LINKS (   pointer,
  my,
  mx,
  fname,
  bitd,
  opt 
)
Value:
PEL_LINK(pointer, 1, my , mx , fname##4 , bitd, opt ); \
PEL_LINK(pointer, 2, my , mx , fname##6 , bitd, opt ); \
PEL_LINK(pointer, 3, my , mx , fname##8 , bitd, opt ); \
PEL_LINK(pointer, 4, my , mx , fname##12, bitd, opt ); \
PEL_LINK(pointer, 5, my , mx , fname##16, bitd, opt ); \
PEL_LINK(pointer, 6, my , mx , fname##24, bitd, opt ); \
PEL_LINK(pointer, 7, my , mx , fname##32, bitd, opt ); \
PEL_LINK(pointer, 8, my , mx , fname##48, bitd, opt ); \
PEL_LINK(pointer, 9, my , mx , fname##64, bitd, opt )
#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt)
Definition: hevcdsp.h:32
GLint GLenum GLboolean GLsizei uintptr_t pointer
Definition: opengl_enc.c:105

Definition at line 688 of file hevcdsp_init.c.

Referenced by ff_hevc_dsp_init_x86().

#define QPEL_LINKS (   pointer,
  my,
  mx,
  fname,
  bitd,
  opt 
)
Value:
PEL_LINK(pointer, 1, my , mx , fname##4 , bitd, opt ); \
PEL_LINK(pointer, 3, my , mx , fname##8 , bitd, opt ); \
PEL_LINK(pointer, 4, my , mx , fname##12, bitd, opt ); \
PEL_LINK(pointer, 5, my , mx , fname##16, bitd, opt ); \
PEL_LINK(pointer, 6, my , mx , fname##24, bitd, opt ); \
PEL_LINK(pointer, 7, my , mx , fname##32, bitd, opt ); \
PEL_LINK(pointer, 8, my , mx , fname##48, bitd, opt ); \
PEL_LINK(pointer, 9, my , mx , fname##64, bitd, opt )
#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt)
Definition: hevcdsp.h:32
GLint GLenum GLboolean GLsizei uintptr_t pointer
Definition: opengl_enc.c:105

Definition at line 698 of file hevcdsp_init.c.

Referenced by ff_hevc_dsp_init_x86().

Function Documentation

IDCT_DC_FUNCS ( 4x4  ,
mmxext   
)
IDCT_DC_FUNCS ( 8x8  ,
mmxext   
)
IDCT_DC_FUNCS ( 8x8  ,
sse2   
)
IDCT_DC_FUNCS ( 16x16  ,
sse2   
)
IDCT_DC_FUNCS ( 32x32  ,
sse2   
)
IDCT_DC_FUNCS ( 16x16  ,
avx2   
)
IDCT_DC_FUNCS ( 32x32  ,
avx2   
)
void ff_hevc_dsp_init_x86 ( HEVCDSPContext c,
const int  bit_depth 
)

Definition at line 708 of file hevcdsp_init.c.

Referenced by ff_hevc_dsp_init().