FFmpeg  4.4.4
Macros | Functions | Variables
pixelutils.c File Reference
#include "config.h"
#include "common.h"
#include "pixelutils.h"
#include "internal.h"
#include "x86/pixelutils.h"

Go to the source code of this file.

Macros

#define DECLARE_BLOCK_FUNCTIONS(size)
 

Functions

static av_always_inline int sad_wxh (const uint8_t *src1, ptrdiff_t stride1, const uint8_t *src2, ptrdiff_t stride2, int w, int h)
 
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_sad_fn prototype). More...
 

Variables

static const av_pixelutils_sad_fn sad_c []
 

Macro Definition Documentation

◆ DECLARE_BLOCK_FUNCTIONS

#define DECLARE_BLOCK_FUNCTIONS (   size)
Value:
static int block_sad_##size##x##size##_c(const uint8_t *src1, ptrdiff_t stride1, \
const uint8_t *src2, ptrdiff_t stride2) \
{ \
return sad_wxh(src1, stride1, src2, stride2, size, size); \
}
uint8_t
static av_always_inline int sad_wxh(const uint8_t *src1, ptrdiff_t stride1, const uint8_t *src2, ptrdiff_t stride2, int w, int h)
Definition: pixelutils.c:28
#define src1
Definition: h264pred.c:140
int size

Definition at line 43 of file pixelutils.c.

Function Documentation

◆ sad_wxh()

static av_always_inline int sad_wxh ( const uint8_t src1,
ptrdiff_t  stride1,
const uint8_t src2,
ptrdiff_t  stride2,
int  w,
int  h 
)
static

Definition at line 28 of file pixelutils.c.

◆ av_pixelutils_get_sad_fn()

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_sad_fn prototype).

Parameters
w_bits1<<w_bits is the requested width of the block size
h_bits1<<h_bits is the requested height of the block size
alignedIf set to 2, the returned sad function will assume src1 and src2 addresses are aligned on the block size. If set to 1, the returned sad function will assume src1 is aligned on the block size. If set to 0, the returned sad function assume no particular alignment.
log_ctxcontext used for logging, can be NULL
Returns
a pointer to the SAD function or NULL in case of error (because of invalid parameters)

Definition at line 66 of file pixelutils.c.

Referenced by filter_frame(), init(), and run_single_test().

Variable Documentation

◆ sad_c

const av_pixelutils_sad_fn sad_c[]
static
Initial value:
= {
block_sad_2x2_c,
block_sad_4x4_c,
block_sad_8x8_c,
block_sad_16x16_c,
block_sad_32x32_c,
}

Definition at line 56 of file pixelutils.c.

Referenced by av_pixelutils_get_sad_fn(), run_single_test(), and run_test().