Go to the documentation of this file.
19 #ifndef AVFILTER_COLORDETECT_H
20 #define AVFILTER_COLORDETECT_H
32 int mpeg_min,
int mpeg_max);
36 const uint8_t *
alpha, ptrdiff_t alpha_stride,
49 int mpeg_min,
int mpeg_max)
52 for (
int x = 0; x <
width; x++) {
54 if (val < mpeg_min || val > mpeg_max)
65 int mpeg_min,
int mpeg_max)
68 const uint16_t *data16 = (
const uint16_t *)
data;
69 for (
int x = 0; x <
width; x++) {
70 const uint16_t
val = data16[x];
71 if (val < mpeg_min || val > mpeg_max)
82 const uint8_t *
alpha, ptrdiff_t alpha_stride,
87 for (
int x = 0; x <
width; x++) {
91 color += color_stride;
92 alpha += alpha_stride;
99 const uint8_t *
alpha, ptrdiff_t alpha_stride,
104 for (
int x = 0; x <
width; x++) {
108 color += color_stride;
109 alpha += alpha_stride;
116 const uint8_t *
alpha, ptrdiff_t alpha_stride,
122 const uint16_t *alpha16 = (
const uint16_t *)
alpha;
123 for (
int x = 0; x <
width; x++) {
127 color += color_stride;
128 alpha += alpha_stride;
135 const uint8_t *
alpha, ptrdiff_t alpha_stride,
141 const uint16_t *alpha16 = (
const uint16_t *)
alpha;
142 for (
int x = 0; x <
width; x++) {
146 color += color_stride;
147 alpha += alpha_stride;
static double val(void *priv, double ch)
void ff_color_detect_dsp_init_x86(FFColorDetectDSPContext *dsp, int depth, enum AVColorRange color_range)
static int ff_detect_range16_c(const uint8_t *data, ptrdiff_t stride, ptrdiff_t width, ptrdiff_t height, int mpeg_min, int mpeg_max)
static int ff_detect_alpha_limited_c(const uint8_t *color, ptrdiff_t color_stride, const uint8_t *alpha, ptrdiff_t alpha_stride, ptrdiff_t width, ptrdiff_t height, int p, int q, int k)
static int ff_detect_alpha_full_c(const uint8_t *color, ptrdiff_t color_stride, const uint8_t *alpha, ptrdiff_t alpha_stride, ptrdiff_t width, ptrdiff_t height, int p, int q, int k)
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
static int ff_detect_alpha16_full_c(const uint8_t *color, ptrdiff_t color_stride, const uint8_t *alpha, ptrdiff_t alpha_stride, ptrdiff_t width, ptrdiff_t height, int p, int q, int k)
void ff_color_detect_dsp_init(FFColorDetectDSPContext *dsp, int depth, enum AVColorRange color_range)
int(* detect_range)(const uint8_t *data, ptrdiff_t stride, ptrdiff_t width, ptrdiff_t height, int mpeg_min, int mpeg_max)
static int ff_detect_alpha16_limited_c(const uint8_t *color, ptrdiff_t color_stride, const uint8_t *alpha, ptrdiff_t alpha_stride, ptrdiff_t width, ptrdiff_t height, int p, int q, int k)
static const int16_t alpha[]
int(* detect_alpha)(const uint8_t *color, ptrdiff_t color_stride, const uint8_t *alpha, ptrdiff_t alpha_stride, ptrdiff_t width, ptrdiff_t height, int p, int q, int k)
AVColorRange
Visual content value range.
static int ff_detect_range_c(const uint8_t *data, ptrdiff_t stride, ptrdiff_t width, ptrdiff_t height, int mpeg_min, int mpeg_max)