29 #include "libavutil/mem.h"
30 #include "libavutil/pixdesc.h"
31 #include "libavutil/opt.h"
48 #define AV_PIX_FMT_NAME_MAXSIZE 32
53 const char *cur, *sep;
55 int pix_fmt_name_len,
ret;
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;
98 #define OFFSET(x) offsetof(FormatContext, x)
104 #if CONFIG_FORMAT_FILTER
111 #define format_options options
114 static const AVFilterPad avfilter_vf_format_inputs[] = {
123 static const AVFilterPad avfilter_vf_format_outputs[] = {
133 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input video to one of the specified pixel formats."),
135 .query_formats = query_formats_format,
137 .priv_class = &format_class,
138 .
inputs = avfilter_vf_format_inputs,
139 .
outputs = avfilter_vf_format_outputs,
143 #if CONFIG_NOFORMAT_FILTER
150 #define noformat_options options
153 static const AVFilterPad avfilter_vf_noformat_inputs[] = {
162 static const AVFilterPad avfilter_vf_noformat_outputs[] = {
172 .description =
NULL_IF_CONFIG_SMALL(
"Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
174 .query_formats = query_formats_noformat,
176 .priv_class = &noformat_class,
177 .
inputs = avfilter_vf_noformat_inputs,
178 .
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.
const char * name
Filter name.
void * priv
private data for use by the filter
static const AVFilterPad outputs[]
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
static enum AVSampleFormat formats[]
const char * name
Pad name.
#define AV_OPT_FLAG_VIDEO_PARAM
enum AVPixelFormat pix_fmt
const OptionDef options[]
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. ...
AVPixelFormat
Pixel format.
common internal API header
Main libavfilter public API header.
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
#define AVFILTER_DEFINE_CLASS(fname)