Go to the documentation of this file.
21 #include "config_components.h"
47 #define OFFSET(x) offsetof(SetParamsContext, x)
48 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
69 {
"auto",
"keep the same color primaries", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0,
FLAGS, .unit =
"color_primaries"},
85 {
"auto",
"keep the same color transfer", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0,
FLAGS, .unit =
"color_trc"},
125 {
"auto",
"keep the same chroma location", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0,
FLAGS, .unit =
"chroma_location"},
146 if (
s->colorspace >= 0) {
153 if (
s->color_range >= 0) {
170 #if FF_API_INTERLACED_FRAME
172 frame->interlaced_frame = 0;
177 #if FF_API_INTERLACED_FRAME
179 frame->interlaced_frame = 1;
180 frame->top_field_first =
s->field_mode;
191 if (
s->color_range >= 0)
192 frame->color_range =
s->color_range;
193 if (
s->color_primaries >= 0)
194 frame->color_primaries =
s->color_primaries;
195 if (
s->color_trc >= 0)
196 frame->color_trc =
s->color_trc;
197 if (
s->colorspace >= 0)
198 frame->colorspace =
s->colorspace;
199 if (
s->chroma_location >= 0)
200 frame->chroma_location =
s->chroma_location;
215 .description =
NULL_IF_CONFIG_SMALL(
"Force field, or color property for the output video frame."),
217 .priv_class = &setparams_class,
224 #if CONFIG_SETRANGE_FILTER
226 static const AVOption setrange_options[] = {
247 s->color_primaries = -1;
257 .
init = init_setrange,
258 .priv_class = &setrange_class,
266 #if CONFIG_SETFIELD_FILTER
267 static const AVOption setfield_options[] = {
283 s->color_primaries = -1;
293 .
init = init_setfield,
294 .priv_class = &setfield_class,
#define FF_ENABLE_DEPRECATION_WARNINGS
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
@ AVCOL_SPC_YCGCO_RE
YCgCo-R, even addition of bits.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
@ AVCOL_TRC_NB
Not part of ABI.
@ AVCOL_RANGE_JPEG
Full range content.
@ AVCOL_SPC_NB
Not part of ABI.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
const char * name
Filter name.
A link between two filters.
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
const AVFilter ff_vf_setparams
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
const AVFilter ff_vf_setfield
@ AVCOL_RANGE_NB
Not part of ABI.
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
A filter pad used for either input or output.
AVFILTER_DEFINE_CLASS(setparams)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
@ AVCOL_PRI_NB
Not part of ABI.
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
static const AVOption setparams_options[]
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
#define FILTER_OUTPUTS(array)
@ AVCOL_SPC_IPT_C2
SMPTE ST 2128, IPT-C2.
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Describe the class of an AVClass context structure.
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_SPC_YCGCO
used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
@ AVCOL_RANGE_UNSPECIFIED
@ AVCOL_PRI_BT2020
ITU-R BT2020.
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
int(* init)(AVBSFContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
@ AVCOL_SPC_YCGCO_RO
YCgCo-R, odd addition of bits.
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
@ AVCHROMA_LOC_UNSPECIFIED
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
@ AVCOL_TRC_BT709
also ITU-R BT1361
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
#define FILTER_QUERY_FUNC2(func)
const char * name
Pad name.
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
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 frame
static const AVFilterPad inputs[]
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AV_OPT_TYPE_INT
Underlying C type is int.
const AVFilter ff_vf_setrange
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
#define FF_DISABLE_DEPRECATION_WARNINGS
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
#define flags(name, subs,...)
@ AVCHROMA_LOC_NB
Not part of ABI.
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AVCHROMA_LOC_BOTTOMLEFT
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)