FFmpeg
Data Structures | Functions | Variables
vf_swapuv.c File Reference
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  SwapUVContext
 

Functions

 AVFILTER_DEFINE_CLASS (swapuv)
 
static void do_swap (AVFrame *frame)
 
static AVFrameget_video_buffer (AVFilterLink *link, int w, int h)
 
static int filter_frame (AVFilterLink *link, AVFrame *inpicref)
 
static int is_planar_yuv (const AVPixFmtDescriptor *desc)
 
static int query_formats (AVFilterContext *ctx)
 

Variables

static const AVOption swapuv_options []
 
static const AVFilterPad swapuv_inputs []
 
const AVFilter ff_vf_swapuv
 

Detailed Description

swap UV filter

Definition in file vf_swapuv.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( swapuv  )

◆ do_swap()

static void do_swap ( AVFrame frame)
static

Definition at line 43 of file vf_swapuv.c.

Referenced by filter_frame(), and get_video_buffer().

◆ get_video_buffer()

static AVFrame* get_video_buffer ( AVFilterLink link,
int  w,
int  h 
)
static

Definition at line 50 of file vf_swapuv.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame inpicref 
)
static

Definition at line 57 of file vf_swapuv.c.

◆ is_planar_yuv()

static int is_planar_yuv ( const AVPixFmtDescriptor desc)
static

Definition at line 63 of file vf_swapuv.c.

Referenced by query_formats().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 81 of file vf_swapuv.c.

Variable Documentation

◆ swapuv_options

const AVOption swapuv_options[]
static
Initial value:
= {
{ NULL }
}

Definition at line 37 of file vf_swapuv.c.

◆ swapuv_inputs

const AVFilterPad swapuv_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_buffer.video = get_video_buffer,
.filter_frame = filter_frame,
},
}

Definition at line 95 of file vf_swapuv.c.

◆ ff_vf_swapuv

const AVFilter ff_vf_swapuv
Initial value:
= {
.name = "swapuv",
.description = NULL_IF_CONFIG_SMALL("Swap U and V components."),
.priv_size = sizeof(SwapUVContext),
.priv_class = &swapuv_class,
}

Definition at line 104 of file vf_swapuv.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
get_video_buffer
static AVFrame * get_video_buffer(AVFilterLink *link, int w, int h)
Definition: vf_swapuv.c:50
swapuv_inputs
static const AVFilterPad swapuv_inputs[]
Definition: vf_swapuv.c:95
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:37
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_swapuv.c:81
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:147
SwapUVContext
Definition: vf_swapuv.c:33
filter_frame
static int filter_frame(AVFilterLink *link, AVFrame *inpicref)
Definition: vf_swapuv.c:57
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183