Go to the source code of this file.
|
#define | R 0 |
|
#define | G 1 |
|
#define | B 2 |
|
#define | A 3 |
|
#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}, 0, 0, FLAGS } |
|
#define | DECLARE_RANGE_SCALE_FUNCS(nbits) |
|
#define | READ16(dst) |
|
#define | DECLARE_SELECTIVE_COLOR_FUNC(nbits) |
|
#define | DEF_SELECTIVE_COLOR_FUNC(name, direct, correction_method, nbits) |
|
#define | DEF_SELECTIVE_COLOR_FUNCS(nbits) |
|
|
enum | color_range {
RANGE_REDS,
RANGE_YELLOWS,
RANGE_GREENS,
RANGE_CYANS,
RANGE_BLUES,
RANGE_MAGENTAS,
RANGE_WHITES,
RANGE_NEUTRALS,
RANGE_BLACKS,
NB_RANGES
} |
|
enum | correction_method { CORRECTION_METHOD_ABSOLUTE,
CORRECTION_METHOD_RELATIVE,
NB_CORRECTION_METHODS
} |
|
|
| AVFILTER_DEFINE_CLASS (selectivecolor) |
|
static int | get_rgb_scale (int r, int g, int b, int min_val, int max_val) |
|
static int | get_cmy_scale (int r, int g, int b, int min_val, int max_val) |
|
static int | register_range (SelectiveColorContext *s, int range_id) |
|
static int | parse_psfile (AVFilterContext *ctx, const char *fname) |
|
static int | config_input (AVFilterLink *inlink) |
|
static int | query_formats (AVFilterContext *ctx) |
|
static int | comp_adjust (int scale, float value, float adjust, float k, int correction_method) |
|
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
|
#define RANGE_OPTION |
( |
|
color_name, |
|
|
|
range |
|
) |
| { color_name"s", "adjust "color_name" regions", OFFSET(opt_cmyk_adjust[range]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS } |
#define DECLARE_RANGE_SCALE_FUNCS |
( |
|
nbits | ) |
|
Value:static int get_neutrals_scale##nbits(
int r,
int g,
int b,
int min_val,
int max_val) \
{ \
return (((1<<nbits)-1)*2 - (
abs((max_val<<1) - ((1<<nbits)-1)) \
+
abs((min_val<<1) - ((1<<nbits)-1))) + 1) >> 1; \
} \
\
static
int get_whites_scale##nbits(
int r,
int g,
int b,
int min_val,
int max_val) \
{ \
return (min_val<<1) - ((1<<nbits)-1); \
} \
\
static
int get_blacks_scale##nbits(
int r,
int g,
int b,
int min_val,
int max_val) \
{ \
return ((1<<nbits)-1) - (max_val<<1); \
} \
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return
Definition at line 127 of file vf_selectivecolor.c.
Value: goto end; \
} \
} while (0)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
Referenced by parse_psfile().
#define DECLARE_SELECTIVE_COLOR_FUNC |
( |
|
nbits | ) |
|
Value:}
static void direct(const float *in, const FFTComplex *ir, int len, float *out)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return
Definition at line 396 of file vf_selectivecolor.c.
#define DEF_SELECTIVE_COLOR_FUNCS |
( |
|
nbits | ) |
|
Value:
#define DEF_SELECTIVE_COLOR_FUNC(name, direct, correction_method, nbits)
#define DECLARE_SELECTIVE_COLOR_FUNC(nbits)
Definition at line 402 of file vf_selectivecolor.c.
Enumerator |
---|
RANGE_REDS |
|
RANGE_YELLOWS |
|
RANGE_GREENS |
|
RANGE_CYANS |
|
RANGE_BLUES |
|
RANGE_MAGENTAS |
|
RANGE_WHITES |
|
RANGE_NEUTRALS |
|
RANGE_BLACKS |
|
NB_RANGES |
|
Definition at line 44 of file vf_selectivecolor.c.
Enumerator |
---|
CORRECTION_METHOD_ABSOLUTE |
|
CORRECTION_METHOD_RELATIVE |
|
NB_CORRECTION_METHODS |
|
Definition at line 58 of file vf_selectivecolor.c.
AVFILTER_DEFINE_CLASS |
( |
selectivecolor |
| ) |
|
static int comp_adjust |
( |
int |
scale, |
|
|
float |
value, |
|
|
float |
adjust, |
|
|
float |
k, |
|
|
int |
correction_method |
|
) |
| |
|
inlinestatic |
Initial value:= {
"red", "yellow", "green", "cyan", "blue", "magenta", "white", "neutral", "black"
}
Definition at line 64 of file vf_selectivecolor.c.
Referenced by config_input(), register_range(), and test_av_parse_color().
Initial value:= {
}
#define RANGE_OPTION(color_name, range)
Definition at line 98 of file vf_selectivecolor.c.
Initial value:= {
{
.name = "default",
},
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int config_input(AVFilterLink *inlink)
Definition at line 455 of file vf_selectivecolor.c.
Initial value:= {
.name = "selectivecolor",
.priv_class = &selectivecolor_class,
}
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
static const AVFilterPad selectivecolor_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
static const AVFilterPad selectivecolor_outputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static const AVFilterPad outputs[]
#define flags(name, subs,...)
static int query_formats(AVFilterContext *ctx)
Definition at line 473 of file vf_selectivecolor.c.