FFmpeg
Data Structures | Enumerations | Functions | Variables
vf_flip_vulkan.c File Reference
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
#include "vulkan_filter.h"
#include "vulkan_spirv.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  FlipVulkanContext
 

Enumerations

enum  FlipType { FLIP_VERTICAL, FLIP_HORIZONTAL, FLIP_BOTH }
 

Functions

static av_cold int init_filter (AVFilterContext *ctx, AVFrame *in, enum FlipType type)
 
static av_cold void flip_vulkan_uninit (AVFilterContext *avctx)
 
static int filter_frame (AVFilterLink *link, AVFrame *in, enum FlipType type)
 
static int hflip_vulkan_filter_frame (AVFilterLink *link, AVFrame *in)
 
static int vflip_vulkan_filter_frame (AVFilterLink *link, AVFrame *in)
 
static int flip_vulkan_filter_frame (AVFilterLink *link, AVFrame *in)
 
 AVFILTER_DEFINE_CLASS (hflip_vulkan)
 
 AVFILTER_DEFINE_CLASS (vflip_vulkan)
 
 AVFILTER_DEFINE_CLASS (flip_vulkan)
 

Variables

static const AVFilterPad flip_vulkan_outputs []
 
static const AVOption hflip_vulkan_options []
 
static const AVFilterPad hflip_vulkan_inputs []
 
const AVFilter ff_vf_hflip_vulkan
 
static const AVOption vflip_vulkan_options []
 
static const AVFilterPad vflip_vulkan_inputs []
 
const AVFilter ff_vf_vflip_vulkan
 
static const AVOption flip_vulkan_options []
 
static const AVFilterPad flip_vulkan_inputs []
 
const AVFilter ff_vf_flip_vulkan
 

Enumeration Type Documentation

◆ FlipType

enum FlipType
Enumerator
FLIP_VERTICAL 
FLIP_HORIZONTAL 
FLIP_BOTH 

Definition at line 29 of file vf_flip_vulkan.c.

Function Documentation

◆ init_filter()

static av_cold int init_filter ( AVFilterContext ctx,
AVFrame in,
enum FlipType  type 
)
static

Definition at line 46 of file vf_flip_vulkan.c.

Referenced by filter_frame().

◆ flip_vulkan_uninit()

static av_cold void flip_vulkan_uninit ( AVFilterContext avctx)
static

Definition at line 141 of file vf_flip_vulkan.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame in,
enum FlipType  type 
)
static

◆ hflip_vulkan_filter_frame()

static int hflip_vulkan_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 193 of file vf_flip_vulkan.c.

◆ vflip_vulkan_filter_frame()

static int vflip_vulkan_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 198 of file vf_flip_vulkan.c.

◆ flip_vulkan_filter_frame()

static int flip_vulkan_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 203 of file vf_flip_vulkan.c.

◆ AVFILTER_DEFINE_CLASS() [1/3]

AVFILTER_DEFINE_CLASS ( hflip_vulkan  )

◆ AVFILTER_DEFINE_CLASS() [2/3]

AVFILTER_DEFINE_CLASS ( vflip_vulkan  )

◆ AVFILTER_DEFINE_CLASS() [3/3]

AVFILTER_DEFINE_CLASS ( flip_vulkan  )

Variable Documentation

◆ flip_vulkan_outputs

const AVFilterPad flip_vulkan_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = &ff_vk_filter_config_output,
}
}

Definition at line 208 of file vf_flip_vulkan.c.

◆ hflip_vulkan_options

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

Definition at line 216 of file vf_flip_vulkan.c.

◆ hflip_vulkan_inputs

const AVFilterPad hflip_vulkan_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &hflip_vulkan_filter_frame,
.config_props = &ff_vk_filter_config_input,
}
}

Definition at line 222 of file vf_flip_vulkan.c.

◆ ff_vf_hflip_vulkan

const AVFilter ff_vf_hflip_vulkan
Initial value:
= {
.name = "hflip_vulkan",
.description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video in Vulkan"),
.priv_size = sizeof(FlipVulkanContext),
.priv_class = &hflip_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 231 of file vf_flip_vulkan.c.

◆ vflip_vulkan_options

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

Definition at line 244 of file vf_flip_vulkan.c.

◆ vflip_vulkan_inputs

const AVFilterPad vflip_vulkan_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &vflip_vulkan_filter_frame,
.config_props = &ff_vk_filter_config_input,
}
}

Definition at line 250 of file vf_flip_vulkan.c.

◆ ff_vf_vflip_vulkan

const AVFilter ff_vf_vflip_vulkan
Initial value:
= {
.name = "vflip_vulkan",
.description = NULL_IF_CONFIG_SMALL("Vertically flip the input video in Vulkan"),
.priv_size = sizeof(FlipVulkanContext),
.priv_class = &vflip_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 259 of file vf_flip_vulkan.c.

◆ flip_vulkan_options

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

Definition at line 272 of file vf_flip_vulkan.c.

◆ flip_vulkan_inputs

const AVFilterPad flip_vulkan_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &flip_vulkan_filter_frame,
.config_props = &ff_vk_filter_config_input,
}
}

Definition at line 278 of file vf_flip_vulkan.c.

◆ ff_vf_flip_vulkan

const AVFilter ff_vf_flip_vulkan
Initial value:
= {
.name = "flip_vulkan",
.description = NULL_IF_CONFIG_SMALL("Flip both horizontally and vertically"),
.priv_size = sizeof(FlipVulkanContext),
.priv_class = &flip_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 287 of file vf_flip_vulkan.c.

FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:351
flip_vulkan_filter_frame
static int flip_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_flip_vulkan.c:203
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:221
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
vflip_vulkan_inputs
static const AVFilterPad vflip_vulkan_inputs[]
Definition: vf_flip_vulkan.c:250
hflip_vulkan_inputs
static const AVFilterPad hflip_vulkan_inputs[]
Definition: vf_flip_vulkan.c:222
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
ff_vk_filter_config_output
int ff_vk_filter_config_output(AVFilterLink *outlink)
Definition: vulkan_filter.c:198
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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_HWDEVICE
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition: avfilter.h:138
flip_vulkan_inputs
static const AVFilterPad flip_vulkan_inputs[]
Definition: vf_flip_vulkan.c:278
hflip_vulkan_filter_frame
static int hflip_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_flip_vulkan.c:193
flip_vulkan_uninit
static av_cold void flip_vulkan_uninit(AVFilterContext *avctx)
Definition: vf_flip_vulkan.c:141
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:172
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
vflip_vulkan_filter_frame
static int vflip_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_flip_vulkan.c:198
flip_vulkan_outputs
static const AVFilterPad flip_vulkan_outputs[]
Definition: vf_flip_vulkan.c:208
ff_vk_filter_config_input
int ff_vk_filter_config_input(AVFilterLink *inlink)
Definition: vulkan_filter.c:166
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FlipVulkanContext
Definition: vf_flip_vulkan.c:35
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183