69 while ((cur = strchr(cur,
'|'))) {
81 for (i = 0; i < nb_formats; i++) {
82 sep = strchr(cur,
'|');
99 int nb_formats_lavu = 0, nb_formats_allowed = 0;;
105 formats_allowed =
av_malloc_array(nb_formats_lavu + 1,
sizeof(*formats_allowed));
106 if (!formats_allowed)
114 for (i = 0; i < nb_formats; i++) {
121 formats_allowed[nb_formats_allowed++] =
pix_fmt;
144 #define OFFSET(x) offsetof(FormatContext, x) 150 #if CONFIG_FORMAT_FILTER 151 static const AVClass format_class = {
158 static const AVFilterPad avfilter_vf_format_inputs[] = {
167 static const AVFilterPad avfilter_vf_format_outputs[] = {
177 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input video to one of the specified pixel formats."),
185 .priv_class = &format_class,
187 .
inputs = avfilter_vf_format_inputs,
188 .
outputs = avfilter_vf_format_outputs,
192 #if CONFIG_NOFORMAT_FILTER 193 static const AVClass noformat_class = {
200 static const AVFilterPad avfilter_vf_noformat_inputs[] = {
209 static const AVFilterPad avfilter_vf_noformat_outputs[] = {
219 .description =
NULL_IF_CONFIG_SMALL(
"Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
227 .priv_class = &noformat_class,
229 .
inputs = avfilter_vf_noformat_inputs,
230 .
outputs = avfilter_vf_noformat_outputs,
static const AVFilterPad outputs[]
Main libavfilter public API header.
memory handling functions
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#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
void av_log(void *avcl, int level, const char *fmt,...)
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
enum AVPixelFormat pix_fmt
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
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
static void * av_malloc_array(size_t nmemb, size_t size)
struct AVFilterPad AVFilterPad
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
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.