46#define OFFSET(x) offsetof(IccDetectContext, x)
47#define VF AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
82 if (
s->profile &&
s->profile->data == sd->
buf->
data) {
110 frame->color_primaries =
s->profile_prim;
115 frame->color_trc =
s->profile_trc;
130 .p.name =
"iccdetect",
132 .p.priv_class = &iccdetect_class,
const FFFilter ff_vf_iccdetect
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
Colorspace value utility functions for libavutil.
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
Ensure dst refers to the same data as src.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
static av_cold void uninit(AVBitStreamFilterContext *ctx)
void ff_icc_context_uninit(FFIccContext *s)
int ff_icc_profile_sanitize(FFIccContext *s, cmsHPROFILE profile)
Sanitize an ICC profile to try and fix badly broken values.
int ff_icc_profile_read_primaries(FFIccContext *s, cmsHPROFILE profile, AVColorPrimariesDesc *out_primaries)
Read the color primaries and white point coefficients encoded by an ICC profile, and return the raw v...
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
int ff_icc_profile_detect_transfer(FFIccContext *s, cmsHPROFILE profile, enum AVColorTransferCharacteristic *out_trc)
Attempt detecting the transfer characteristic that best approximates the transfer function encoded by...
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define AVFILTER_DEFINE_CLASS(fname)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
A reference to a data buffer.
uint8_t * data
The data buffer.
Describe the class of an AVClass context structure.
Struct that contains both white point location and primaries location, providing the complete descrip...
void * priv
private data for use by the filter
AVFilterLink ** outputs
array of pointers to output links
A link between two filters.
AVFilterContext * dst
dest filter
A filter pad used for either input or output.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
enum AVColorTransferCharacteristic profile_trc
enum AVColorPrimaries profile_prim
static const AVFilterPad iccdetect_inputs[]
static av_cold int iccdetect_init(AVFilterContext *avctx)
static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
static const AVOption iccdetect_options[]
static av_cold void iccdetect_uninit(AVFilterContext *avctx)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.