Go to the documentation of this file.
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;
133 .priv_class = &iccdetect_class,
static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
enum AVColorPrimaries profile_prim
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...
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.
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.
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
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
A filter pad used for either input or output.
AVFILTER_DEFINE_CLASS(iccdetect)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
void ff_icc_context_uninit(FFIccContext *s)
#define FILTER_OUTPUTS(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...
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...
int(* init)(AVBSFContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static void uninit(AVBSFContext *ctx)
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
#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.
int ff_icc_profile_sanitize(FFIccContext *s, cmsHPROFILE profile)
Sanitize an ICC profile to try and fix badly broken values.
Structure to hold side data for an AVFrame.
static av_cold int iccdetect_init(AVFilterContext *avctx)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const AVOption iccdetect_options[]