NB_CORRECTION_METHODS,
};
-static const char *color_names[NB_RANGES] = {
+static const char *const color_names[NB_RANGES] = {
"red", "yellow", "green", "cyan", "blue", "magenta", "white", "neutral", "black"
};
#define OFFSET(x) offsetof(SelectiveColorContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
#define RANGE_OPTION(color_name, range) \
- { color_name"s", "adjust "color_name" regions", OFFSET(opt_cmyk_adjust[range]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS }
+ { color_name"s", "adjust "color_name" regions", OFFSET(opt_cmyk_adjust[range]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }
static const AVOption selectivecolor_options[] = {
{ "correction_method", "select correction method", OFFSET(correction_method), AV_OPT_TYPE_INT, {.i64 = CORRECTION_METHOD_ABSOLUTE}, 0, NB_CORRECTION_METHODS-1, FLAGS, "correction_method" },
const int max_color = FFMAX3(r, g, b); \
const int is_white = (r > 1<<(nbits-1) && g > 1<<(nbits-1) && b > 1<<(nbits-1)); \
const int is_neutral = (r || g || b) && \
- r != (1<<nbits)-1 && g != (1<<nbits)-1 && b != (1<<nbits)-1; \
+ (r != (1<<nbits)-1 || g != (1<<nbits)-1 || b != (1<<nbits)-1); \
const int is_black = (r < 1<<(nbits-1) && g < 1<<(nbits-1) && b < 1<<(nbits-1)); \
const uint32_t range_flag = (r == max_color) << RANGE_REDS \
| (r == min_color) << RANGE_CYANS \
{ NULL }
};
-AVFilter ff_vf_selectivecolor = {
+const AVFilter ff_vf_selectivecolor = {
.name = "selectivecolor",
.description = NULL_IF_CONFIG_SMALL("Apply CMYK adjustments to specific color ranges."),
.priv_size = sizeof(SelectiveColorContext),