48 #define AV_PIX_FMT_NAME_MAXSIZE 32
53 const char *cur, *sep;
59 for (cur = s->
pix_fmts; cur; cur = sep ? sep + 1 :
NULL) {
60 if (!(sep = strchr(cur,
'|')))
61 pix_fmt_name_len = strlen(cur);
63 pix_fmt_name_len = sep - cur;
69 memcpy(pix_fmt_name, cur, pix_fmt_name_len);
70 pix_fmt_name[pix_fmt_name_len] = 0;
101 #define OFFSET(x) offsetof(FormatContext, x)
107 #if CONFIG_FORMAT_FILTER
114 static const AVClass format_class = {
121 static const AVFilterPad avfilter_vf_format_inputs[] = {
130 static const AVFilterPad avfilter_vf_format_outputs[] = {
140 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input video to one of the specified pixel formats."),
144 .query_formats = query_formats_format,
147 .priv_class = &format_class,
149 .
inputs = avfilter_vf_format_inputs,
150 .
outputs = avfilter_vf_format_outputs,
154 #if CONFIG_NOFORMAT_FILTER
161 static const AVClass noformat_class = {
168 static const AVFilterPad avfilter_vf_noformat_inputs[] = {
177 static const AVFilterPad avfilter_vf_noformat_outputs[] = {
187 .description =
NULL_IF_CONFIG_SMALL(
"Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
191 .query_formats = query_formats_noformat,
194 .priv_class = &noformat_class,
196 .
inputs = avfilter_vf_noformat_inputs,
197 .
outputs = avfilter_vf_noformat_outputs,
int listed_pix_fmt_flags[AV_PIX_FMT_NB]
List of flags telling if a given image format has been listed as argument to the filter.
static const AVFilterPad outputs[]
Main libavfilter public API header.
memory handling functions
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
static enum AVSampleFormat formats[]
const char * name
Pad name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
A filter pad used for either input or output.
#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 pix_fmt
#define AV_OPT_FLAG_VIDEO_PARAM
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
AVPixelFormat
Pixel format.