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) {
133 .priv_class = &iccdetect_class,
enum AVColorTransferCharacteristic color_trc
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
enum AVColorPrimaries color_primaries
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_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...
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.
#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)
#define FILTER_OUTPUTS(array)
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const AVOption iccdetect_options[]