70 while ((cur = strchr(cur,
'|'))) {
82 for (i = 0; i < nb_formats; i++) {
83 sep = strchr(cur,
'|');
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;
141 #define OFFSET(x) offsetof(FormatContext, x) 147 #if CONFIG_FORMAT_FILTER 149 #define format_options options 152 static const AVFilterPad avfilter_vf_format_inputs[] = {
161 static const AVFilterPad avfilter_vf_format_outputs[] = {
171 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input video to one of the specified pixel formats."),
179 .priv_class = &format_class,
181 .
inputs = avfilter_vf_format_inputs,
182 .
outputs = avfilter_vf_format_outputs,
186 #if CONFIG_NOFORMAT_FILTER 188 #define noformat_options options 191 static const AVFilterPad avfilter_vf_noformat_inputs[] = {
200 static const AVFilterPad avfilter_vf_noformat_outputs[] = {
210 .description =
NULL_IF_CONFIG_SMALL(
"Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
218 .priv_class = &noformat_class,
220 .
inputs = avfilter_vf_noformat_inputs,
221 .
outputs = avfilter_vf_noformat_outputs,
static enum AVPixelFormat pix_fmt
Main libavfilter public API header.
Memory handling functions.
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
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 format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
const char * name
Pad name.
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_OPT_FLAG_FILTERING_PARAM
a generic parameter which can be set by the user for filtering
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
common internal API header
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
enum AVPixelFormat * formats
pix_fmts parsed into AVPixelFormats and terminated with AV_PIX_FMT_NONE
static const AVFilterPad outputs[]
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AV_OPT_FLAG_VIDEO_PARAM
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 inputs
Describe the class of an AVClass context structure.
const char * name
Filter name.
#define AVFILTER_DEFINE_CLASS(fname)
#define av_malloc_array(a, b)
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
AVPixelFormat
Pixel format.
const AVFilter * filter
the AVFilter of which this is an instance
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.