Go to the documentation of this file.
45 #define OFFSET(x) offsetof(IccDetectContext, x)
46 #define VF AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
81 if (
s->profile &&
s->profile->data == sd->
buf->
data) {
107 frame->color_primaries =
s->profile_prim;
112 frame->color_trc =
s->profile_trc;
137 .priv_class = &iccdetect_class,
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...
static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
enum AVColorPrimaries profile_prim
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
Struct that contains both white point location and primaries location, providing the complete descrip...
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
uint8_t * data
The data buffer.
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...
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
This structure describes decoded (raw) audio or video data.
enum AVColorTransferCharacteristic profile_trc
AVColorPrimaries
Chromaticity coordinates of the source primaries.
const char * name
Filter name.
A link between two filters.
static const AVFilterPad iccdetect_inputs[]
void * priv
private data for use by the filter
A filter pad used for either input or output.
AVFILTER_DEFINE_CLASS(iccdetect)
void ff_icc_context_uninit(FFIccContext *s)
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
#define FILTER_INPUTS(array)
Describe the class of an AVClass context structure.
static av_cold void iccdetect_uninit(AVFilterContext *avctx)
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
static const AVFilterPad iccdetect_outputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const AVFilter ff_vf_iccdetect
int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
Ensure dst refers to the same data as src.
const char * name
Pad name.
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
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
A reference to a data buffer.
Structure to hold side data for an AVFrame.
static av_cold int iccdetect_init(AVFilterContext *avctx)
#define FILTER_OUTPUTS(array)
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_cold int uninit(AVCodecContext *avctx)
static const AVOption iccdetect_options[]