43 #define OFFSET(x) offsetof(SetParamsContext, x)
44 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
65 {
"auto",
"keep the same color primaries", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX,
FLAGS,
"color_primaries"},
81 {
"auto",
"keep the same color transfer", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX,
FLAGS,
"color_trc"},
101 {
"auto",
"keep the same colorspace", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX,
FLAGS,
"colorspace"},
135 if (
s->color_range >= 0)
139 if (
s->color_primaries >= 0)
141 if (
s->color_trc >= 0)
143 if (
s->colorspace >= 0)
167 .description =
NULL_IF_CONFIG_SMALL(
"Force field, or color property for the output video frame."),
169 .priv_class = &setparams_class,
174 #if CONFIG_SETRANGE_FILTER
176 static const AVOption setrange_options[] = {
197 s->color_primaries = -1;
207 .
init = init_setrange,
208 .priv_class = &setrange_class,
214 #if CONFIG_SETFIELD_FILTER
215 static const AVOption setfield_options[] = {
231 s->color_primaries = -1;
241 .
init = init_setfield,
242 .priv_class = &setfield_class,
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
static av_cold int init(AVCodecContext *avctx)
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_NB
Not part of ABI.
@ AVCOL_RANGE_JPEG
Full range content.
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_NB
Not part of ABI.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
@ AVCOL_PRI_SMPTE240M
functionally identical to above
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E / JEDEC P22 phosphors.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
@ AVCOL_PRI_BT2020
ITU-R BT2020.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_TRC_BT709
also ITU-R BT1361
@ AVCOL_TRC_NB
Not part of ABI.
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
@ 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_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
@ AVCOL_SPC_NB
Not part of ABI.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
@ AVCOL_SPC_SMPTE240M
functionally identical to above
@ AVCOL_SPC_YCGCO
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
Describe the class of an AVClass context structure.
A link between two filters.
AVFilterContext * dst
dest filter
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
This structure describes decoded (raw) audio or video data.
enum AVColorPrimaries color_primaries
int top_field_first
If the content is interlaced, is top field displayed first.
int interlaced_frame
The content of the picture is interlaced.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
static const AVOption setparams_options[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
AVFILTER_DEFINE_CLASS(setparams)