FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Functions
pixelutils.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "common.h"

Go to the source code of this file.

Typedefs

typedef 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]) More...
 

Functions

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...
 

Typedef Documentation

typedef 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])

Definition at line 29 of file pixelutils.h.

Function Documentation

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 config_input(), filter_frame(), init(), and run_single_test().