FFmpeg
Data Structures | Functions | Variables
vf_swapuv.c File Reference
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/version.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 []
 
static const AVFilterPad swapuv_outputs []
 
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 44 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 57 of file vf_swapuv.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame inpicref 
)
static

Definition at line 64 of file vf_swapuv.c.

◆ is_planar_yuv()

static int is_planar_yuv ( const AVPixFmtDescriptor desc)
static

Definition at line 70 of file vf_swapuv.c.

Referenced by query_formats().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 88 of file vf_swapuv.c.

Variable Documentation

◆ swapuv_options

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

Definition at line 38 of file vf_swapuv.c.

◆ swapuv_inputs

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

Definition at line 102 of file vf_swapuv.c.

◆ swapuv_outputs

const AVFilterPad swapuv_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 112 of file vf_swapuv.c.

◆ ff_vf_swapuv

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

Definition at line 120 of file vf_swapuv.c.

get_video_buffer
static AVFrame * get_video_buffer(AVFilterLink *link, int w, int h)
Definition: vf_swapuv.c:57
swapuv_outputs
static const AVFilterPad swapuv_outputs[]
Definition: vf_swapuv.c:112
swapuv_inputs
static const AVFilterPad swapuv_inputs[]
Definition: vf_swapuv.c:102
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_swapuv.c:88
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
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:117
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:126
SwapUVContext
Definition: vf_swapuv.c:34
filter_frame
static int filter_frame(AVFilterLink *link, AVFrame *inpicref)
Definition: vf_swapuv.c:64
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561