FFmpeg
Macros | Functions
vf_colordetect_init.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/x86/cpu.h"
#include "libavfilter/vf_colordetect.h"

Go to the source code of this file.

Macros

#define DETECT_RANGE_FUNC(FUNC_NAME, ASM_FUNC_NAME, C_FUNC_NAME, SHIFT, MMSIZE)
 
#define DETECT_ALPHA_FUNC(FUNC_NAME, ASM_FUNC_NAME, C_FUNC_NAME, SHIFT, MMSIZE)
 

Functions

av_cold void ff_color_detect_dsp_init_x86 (FFColorDetectDSPContext *dsp, int depth, enum AVColorRange color_range)
 

Macro Definition Documentation

◆ DETECT_RANGE_FUNC

#define DETECT_RANGE_FUNC (   FUNC_NAME,
  ASM_FUNC_NAME,
  C_FUNC_NAME,
  SHIFT,
  MMSIZE 
)
Value:
int ASM_FUNC_NAME(const uint8_t *src, ptrdiff_t stride, \
ptrdiff_t width, ptrdiff_t height, int min, int max); \
\
static int FUNC_NAME(const uint8_t *src, ptrdiff_t stride, \
ptrdiff_t width, ptrdiff_t height, int min, int max) \
{ \
ptrdiff_t bytes = (width << SHIFT) & ~(MMSIZE - 1); \
int ret = ASM_FUNC_NAME(src, stride, bytes, height, min, max); \
if (ret) \
return ret; \
\
return C_FUNC_NAME(src + bytes, stride, width - (bytes >> SHIFT), \
height, min, max); \
}

Definition at line 25 of file vf_colordetect_init.c.

◆ DETECT_ALPHA_FUNC

#define DETECT_ALPHA_FUNC (   FUNC_NAME,
  ASM_FUNC_NAME,
  C_FUNC_NAME,
  SHIFT,
  MMSIZE 
)
Value:
int ASM_FUNC_NAME(const uint8_t *color, ptrdiff_t color_stride, \
const uint8_t *alpha, ptrdiff_t alpha_stride, \
ptrdiff_t width, ptrdiff_t height, int p, int q, int k); \
\
static int FUNC_NAME(const uint8_t *color, ptrdiff_t color_stride, \
const uint8_t *alpha, ptrdiff_t alpha_stride, \
ptrdiff_t width, ptrdiff_t height, int p, int q, int k) \
{ \
ptrdiff_t bytes = (width << SHIFT) & ~(MMSIZE - 1); \
int ret = ASM_FUNC_NAME(color, color_stride, alpha, alpha_stride, \
bytes, height, p, q, k); \
if (ret) \
return ret; \
\
return C_FUNC_NAME(color + bytes, color_stride, alpha + bytes, alpha_stride,\
width - (bytes >> SHIFT), height, p, q, k); \
}

Definition at line 41 of file vf_colordetect_init.c.

Function Documentation

◆ ff_color_detect_dsp_init_x86()

av_cold void ff_color_detect_dsp_init_x86 ( FFColorDetectDSPContext dsp,
int  depth,
enum AVColorRange  color_range 
)

Definition at line 79 of file vf_colordetect_init.c.

Referenced by ff_color_detect_dsp_init().

color
Definition: vf_paletteuse.c:513
SHIFT
#define SHIFT
Definition: median_template.c:40
max
#define max(a, b)
Definition: cuda_runtime.h:33
height
#define height
Definition: dsp.h:89
stride
#define stride
Definition: h264pred_template.c:536
ret
ret
Definition: filter_design.txt:187
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
width
#define width
Definition: dsp.h:89
FUNC_NAME
#define FUNC_NAME(rw, codec, name)
Definition: cbs_av1.c:486
src
#define src
Definition: vp8dsp.c:248
min
float min
Definition: vorbis_enc_data.h:429