21#ifndef AVFILTER_THRESHOLD_INIT_H
22#define AVFILTER_THRESHOLD_INIT_H
31static void threshold8(
const uint8_t *in,
const uint8_t *threshold,
32 const uint8_t *
min,
const uint8_t *
max,
34 ptrdiff_t ilinesize, ptrdiff_t tlinesize,
35 ptrdiff_t flinesize, ptrdiff_t slinesize,
39 for (
int y = 0; y <
h; y++) {
40 for (
int x = 0; x <
w; x++)
41 out[x] = in[x] <= threshold[x] ?
min[x] :
max[x];
44 threshold += tlinesize;
51static void threshold16(
const uint8_t *iin,
const uint8_t *tthreshold,
52 const uint8_t *ffirst,
const uint8_t *ssecond,
54 ptrdiff_t ilinesize, ptrdiff_t tlinesize,
55 ptrdiff_t flinesize, ptrdiff_t slinesize,
59 const uint16_t *in = (
const uint16_t *)iin;
60 const uint16_t *threshold = (
const uint16_t *)tthreshold;
61 const uint16_t *
min = (
const uint16_t *)ffirst;
62 const uint16_t *
max = (
const uint16_t *)ssecond;
63 uint16_t *
out = (uint16_t *)oout;
65 for (
int y = 0; y <
h; y++) {
66 for (
int x = 0; x <
w; x++)
67 out[x] = in[x] <= threshold[x] ?
min[x] :
max[x];
70 threshold += tlinesize / 2;
87#if ARCH_X86 && HAVE_X86ASM
Macro definitions for various function/variable attributes.
void ff_threshold_init_x86(ThresholdContext *s)
static av_unused void ff_threshold_init(ThresholdContext *s)
static void threshold8(const uint8_t *in, const uint8_t *threshold, const uint8_t *min, const uint8_t *max, uint8_t *out, ptrdiff_t ilinesize, ptrdiff_t tlinesize, ptrdiff_t flinesize, ptrdiff_t slinesize, ptrdiff_t olinesize, int w, int h)
static void threshold16(const uint8_t *iin, const uint8_t *tthreshold, const uint8_t *ffirst, const uint8_t *ssecond, uint8_t *oout, ptrdiff_t ilinesize, ptrdiff_t tlinesize, ptrdiff_t flinesize, ptrdiff_t slinesize, ptrdiff_t olinesize, int w, int h)