FFmpeg
Macros | Functions
scene_sad_init.c File Reference
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
#include "libavfilter/scene_sad.h"

Go to the source code of this file.

Macros

#define SCENE_SAD_FUNC(FUNC_NAME, ASM_FUNC_NAME, MMSIZE)
 

Functions

ff_scene_sad_fn ff_scene_sad_get_fn_x86 (int depth)
 

Macro Definition Documentation

◆ SCENE_SAD_FUNC

#define SCENE_SAD_FUNC (   FUNC_NAME,
  ASM_FUNC_NAME,
  MMSIZE 
)
Value:
void ASM_FUNC_NAME(SCENE_SAD_PARAMS); \
\
static void FUNC_NAME(SCENE_SAD_PARAMS) { \
uint64_t sad[MMSIZE / 8] = {0}; \
ptrdiff_t awidth = width & ~(MMSIZE - 1); \
*sum = 0; \
ASM_FUNC_NAME(src1, stride1, src2, stride2, awidth, height, sad); \
for (int i = 0; i < MMSIZE / 8; i++) \
*sum += sad[i]; \
ff_scene_sad_c(src1 + awidth, stride1, \
src2 + awidth, stride2, \
width - awidth, height, sad); \
*sum += sad[0]; \
}

Definition at line 23 of file scene_sad_init.c.

Function Documentation

◆ ff_scene_sad_get_fn_x86()

ff_scene_sad_fn ff_scene_sad_get_fn_x86 ( int  depth)

Definition at line 46 of file scene_sad_init.c.

Referenced by ff_scene_sad_get_fn().

FUNC_NAME
#define FUNC_NAME(rw, codec, name)
Definition: cbs_av1.c:543
src1
const pixel * src1
Definition: h264pred_template.c:421
SCENE_SAD_PARAMS
#define SCENE_SAD_PARAMS
Definition: scene_sad.h:29
width
#define width
height
#define height
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
src2
const pixel * src2
Definition: h264pred_template.c:422