FFmpeg
Data Structures | Macros | Functions | Variables
vf_format.c File Reference
#include "config_components.h"
#include <string.h>
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  FormatContext
 

Macros

#define OFFSET(x)   offsetof(FormatContext, x)
 

Functions

static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int invert_formats (AVFilterFormats **fmts, AVFilterFormats *allfmts)
 
static int parse_pixel_format (enum AVPixelFormat *ret, const char *arg, void *log_ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
 AVFILTER_DEFINE_CLASS_EXT (format, "(no)format", options)
 

Variables

static const AVOption options []
 
static const AVFilterPad inputs []
 

Detailed Description

format and noformat video filters

Definition in file vf_format.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(FormatContext, x)

Definition at line 168 of file vf_format.c.

Function Documentation

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 51 of file vf_format.c.

◆ invert_formats()

static av_cold int invert_formats ( AVFilterFormats **  fmts,
AVFilterFormats allfmts 
)
static

Definition at line 59 of file vf_format.c.

Referenced by init().

◆ parse_pixel_format()

static int parse_pixel_format ( enum AVPixelFormat ret,
const char *  arg,
void *  log_ctx 
)
static

Definition at line 88 of file vf_format.c.

Referenced by init().

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 103 of file vf_format.c.

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 152 of file vf_format.c.

◆ AVFILTER_DEFINE_CLASS_EXT()

AVFILTER_DEFINE_CLASS_EXT ( format  ,
"(no)format ,
options   
)

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "pix_fmts", "A '|'-separated list of pixel formats", OFFSET(pix_fmts), AV_OPT_TYPE_STRING, .flags = AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM },
{ "color_spaces", "A '|'-separated list of color spaces", OFFSET(csps), AV_OPT_TYPE_STRING, .flags = AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM },
{ "color_ranges", "A '|'-separated list of color ranges", OFFSET(ranges), AV_OPT_TYPE_STRING, .flags = AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM },
{ NULL }
}

Definition at line 169 of file vf_format.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.get_buffer.video = ff_null_get_video_buffer,
},
}

Definition at line 178 of file vf_format.c.

pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:304
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_FLAG_FILTERING_PARAM
#define AV_OPT_FLAG_FILTERING_PARAM
A generic parameter which can be set by the user for filtering.
Definition: opt.h:381
OFFSET
#define OFFSET(x)
Definition: vf_format.c:168
ff_null_get_video_buffer
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:44
AV_OPT_FLAG_VIDEO_PARAM
#define AV_OPT_FLAG_VIDEO_PARAM
Definition: opt.h:358
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition: opt.h:276