Go to the documentation of this file.
31 #if ARCH_AARCH64 && HAVE_NEON
33 #elif ARCH_ARM && HAVE_ARMV6
35 #elif ARCH_MIPS && HAVE_MSA
39 #elif ARCH_X86 && HAVE_X86ASM
44 const uint8_t *
src2, ptrdiff_t stride2,
49 for (y = 0; y <
h; y++) {
50 for (x = 0; x <
w; x++)
58 #define DECLARE_BLOCK_FUNCTIONS(size) \
59 static int block_sad_##size##x##size##_c(const uint8_t *src1, ptrdiff_t stride1, \
60 const uint8_t *src2, ptrdiff_t stride2) \
62 return sad_wxh(src1, stride1, src2, stride2, size, size); \
65 DECLARE_BLOCK_FUNCTIONS(2)
66 DECLARE_BLOCK_FUNCTIONS(4)
67 DECLARE_BLOCK_FUNCTIONS(8)
68 DECLARE_BLOCK_FUNCTIONS(16)
69 DECLARE_BLOCK_FUNCTIONS(32)
84 #if !CONFIG_PIXELUTILS
86 "but libavutil is not compiled with it\n");
91 memcpy(sad, sad_c,
sizeof(sad));
99 #if ARCH_AARCH64 && HAVE_NEON
103 #elif ARCH_MIPS && HAVE_MSA
107 #elif ARCH_X86 && HAVE_X86ASM
111 return sad[w_bits - 1];
static av_cold void ff_pixelutils_sad_init_aarch64(av_pixelutils_sad_fn *sad, int aligned)
int(* av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1, const uint8_t *src2, ptrdiff_t stride2)
Sum of abs(src1[x] - src2[x])
static av_cold void ff_pixelutils_init_riscv(av_pixelutils_sad_fn *sad, int aligned)
static av_cold void ff_pixelutils_sad_init_x86(av_pixelutils_sad_fn *sad, int aligned)
av_pixelutils_sad_fn av_pixelutils_get_sad_fn(int w_bits, int h_bits, int aligned, void *log_ctx)
Get a potentially optimized pointer to a Sum-of-absolute-differences function (see the av_pixelutils_...
static int aligned(int val)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
static av_cold void ff_pixelutils_sad_init_mips(av_pixelutils_sad_fn *sad, int aligned)
static av_cold void ff_pixelutils_sad_init_arm(av_pixelutils_sad_fn *sad, int aligned)