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

Go to the source code of this file.

Macros

#define FUNC_MAIN_DECL(KIND, SPAN)
 
#define FUNC_MAIN_DECL_16bit(KIND, SPAN)
 

Functions

 FUNC_MAIN_DECL_16bit (sse2, 8)
 

Macro Definition Documentation

◆ FUNC_MAIN_DECL

#define FUNC_MAIN_DECL (   KIND,
  SPAN 
)
Value:
int ff_idet_filter_line_##KIND(const uint8_t *a, const uint8_t *b, \
const uint8_t *c, int w); \
static int idet_filter_line_##KIND(const uint8_t *a, const uint8_t *b, \
const uint8_t *c, int w) { \
int sum = 0; \
const int left_over = w & (SPAN - 1); \
w -= left_over; \
if (w > 0) \
sum += ff_idet_filter_line_##KIND(a, b, c, w); \
if (left_over > 0) \
sum += ff_idet_filter_line_c(a + w, b + w, c + w, left_over); \
return sum; \
}

Definition at line 25 of file vf_idetdsp_init.c.

◆ FUNC_MAIN_DECL_16bit

#define FUNC_MAIN_DECL_16bit (   KIND,
  SPAN 
)
Value:
int ff_idet_filter_line_16bit_##KIND(const uint8_t *a, const uint8_t *b, \
const uint8_t *c, int w); \
static int idet_filter_line_16bit_##KIND(const uint8_t *a, const uint8_t *b, \
const uint8_t *c, int w) { \
int sum = 0; \
const int left_over = w & (SPAN - 1); \
const int w_main = w - left_over; \
const int offset = w_main << 1; \
if (w_main > 0) \
sum += ff_idet_filter_line_16bit_##KIND(a, b, c, w_main); \
if (left_over > 0) { \
left_over); \
} \
return sum; \
}

Definition at line 41 of file vf_idetdsp_init.c.

Function Documentation

◆ FUNC_MAIN_DECL_16bit()

FUNC_MAIN_DECL_16bit ( sse2  ,
 
)

Definition at line 60 of file vf_idetdsp_init.c.

b
#define b
Definition: input.c:42
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
ff_idet_filter_line_c
int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w)
Definition: vf_idetdsp.c:26
w
uint8_t w
Definition: llvidencdsp.c:39
ff_idet_filter_line_c_16bit
int ff_idet_filter_line_c_16bit(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w)
Definition: vf_idetdsp.c:39