Go to the documentation of this file.
70 while ((cur = strchr(cur,
'|'))) {
82 for (
i = 0;
i < nb_formats;
i++) {
83 sep = strchr(cur,
'|');
94 if (!strcmp(
ctx->filter->name,
"noformat")) {
97 int nb_formats_lavu = 0, nb_formats_allowed = 0;
103 formats_allowed =
av_malloc_array(nb_formats_lavu + 1,
sizeof(*formats_allowed));
104 if (!formats_allowed)
112 for (
i = 0;
i < nb_formats;
i++) {
119 formats_allowed[nb_formats_allowed++] =
pix_fmt;
123 s->formats = formats_allowed;
137 #define OFFSET(x) offsetof(FormatContext, x)
145 #if CONFIG_FORMAT_FILTER
147 static const AVFilterPad avfilter_vf_format_inputs[] = {
155 static const AVFilterPad avfilter_vf_format_outputs[] = {
164 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input video to one of the specified pixel formats."),
170 .priv_class = &format_class,
181 #if CONFIG_NOFORMAT_FILTER
183 static const AVFilterPad avfilter_vf_noformat_inputs[] = {
191 static const AVFilterPad avfilter_vf_noformat_outputs[] = {
200 .description =
NULL_IF_CONFIG_SMALL(
"Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
201 .priv_class = &format_class,
AVPixelFormat
Pixel format.
const AVFilter ff_vf_noformat
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define AV_OPT_FLAG_VIDEO_PARAM
#define FILTER_QUERY_FUNC(func)
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
const char * name
Filter name.
#define AV_OPT_FLAG_FILTERING_PARAM
a generic parameter which can be set by the user for filtering
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static enum AVPixelFormat pix_fmts[]
static enum AVPixelFormat pix_fmt
#define FILTER_INPUTS(array)
Describe the class of an AVClass context structure.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
#define i(width, name, range_min, range_max)
#define av_malloc_array(a, b)
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.
const AVFilter ff_vf_format
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define FILTER_OUTPUTS(array)
#define flags(name, subs,...)
enum AVPixelFormat * formats
pix_fmts parsed into AVPixelFormats and terminated with AV_PIX_FMT_NONE