Go to the documentation of this file.
48 #define OFFSET(x) offsetof(IccGenContext, x)
49 #define VF AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
53 {
"auto",
"infer based on frame", 0,
AV_OPT_TYPE_CONST, {.i64=0}, 0, 0,
VF,
"color_primaries"},
90 cmsCloseProfile(
s->profile);
139 if (
s->profile && prim !=
s->profile_prim && trc !=
s->profile_trc) {
140 cmsCloseProfile(
s->profile);
147 s->profile_prim = prim;
148 s->profile_trc = trc;
169 .priv_class = &iccgen_class,
enum AVColorTransferCharacteristic color_trc
enum AVColorRange color_range
MPEG vs JPEG YUV range.
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
@ 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
enum AVColorPrimaries color_primaries
This structure describes decoded (raw) audio or video data.
@ AVCOL_TRC_NB
Not part of ABI.
@ AVCOL_RANGE_JPEG
Full range content.
static av_cold int iccgen_init(AVFilterContext *avctx)
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
const char * name
Filter name.
int ff_icc_profile_attach(FFIccContext *s, cmsHPROFILE profile, AVFrame *frame)
Attach an ICC profile to a frame.
A link between two filters.
const AVFilter ff_vf_iccgen
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
void * priv
private data for use by the filter
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
A filter pad used for either input or output.
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.
int(* init)(AVBSFContext *ctx)
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
void ff_icc_context_uninit(FFIccContext *s)
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
#define FILTER_INPUTS(array)
@ 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.
@ 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
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_PRI_BT2020
ITU-R BT2020.
int ff_icc_profile_generate(FFIccContext *s, enum AVColorPrimaries color_prim, enum AVColorTransferCharacteristic color_trc, cmsHPROFILE *out_profile)
Generate an ICC profile for a given combination of color primaries and transfer function.
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
#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
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
static av_cold void iccgen_uninit(AVFilterContext *avctx)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type.
@ AVCOL_TRC_BT709
also ITU-R BT1361
static const AVFilterPad iccgen_inputs[]
const char * name
Pad name.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
AVFILTER_DEFINE_CLASS(iccgen)
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
#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
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
#define FILTER_OUTPUTS(array)
static const AVOption iccgen_options[]
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_cold int uninit(AVCodecContext *avctx)
static int iccgen_filter_frame(AVFilterLink *inlink, AVFrame *frame)