FFmpeg
Data Structures | Macros | Functions | Variables
vf_transpose_vulkan.c File Reference
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
#include "vulkan_filter.h"
#include "internal.h"
#include "transpose.h"

Go to the source code of this file.

Data Structures

struct  TransposeVulkanContext
 

Macros

#define CGS   32
 
#define OFFSET(x)   offsetof(TransposeVulkanContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static av_cold int init_filter (AVFilterContext *ctx, AVFrame *in)
 
static int process_frames (AVFilterContext *avctx, AVFrame *outframe, AVFrame *inframe)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void transpose_vulkan_uninit (AVFilterContext *avctx)
 
static int config_props_output (AVFilterLink *outlink)
 
 AVFILTER_DEFINE_CLASS (transpose_vulkan)
 

Variables

static const AVOption transpose_vulkan_options []
 
static const AVFilterPad transpose_vulkan_inputs []
 
static const AVFilterPad transpose_vulkan_outputs []
 
const AVFilter ff_vf_transpose_vulkan
 

Macro Definition Documentation

◆ CGS

#define CGS   32

Definition at line 26 of file vf_transpose_vulkan.c.

◆ OFFSET

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

Definition at line 297 of file vf_transpose_vulkan.c.

◆ FLAGS

Definition at line 298 of file vf_transpose_vulkan.c.

Function Documentation

◆ init_filter()

static av_cold int init_filter ( AVFilterContext ctx,
AVFrame in 
)
static

Definition at line 42 of file vf_transpose_vulkan.c.

Referenced by filter_frame().

◆ process_frames()

static int process_frames ( AVFilterContext avctx,
AVFrame outframe,
AVFrame inframe 
)
static

Definition at line 122 of file vf_transpose_vulkan.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 218 of file vf_transpose_vulkan.c.

◆ transpose_vulkan_uninit()

static av_cold void transpose_vulkan_uninit ( AVFilterContext avctx)
static

Definition at line 259 of file vf_transpose_vulkan.c.

◆ config_props_output()

static int config_props_output ( AVFilterLink outlink)
static

Definition at line 267 of file vf_transpose_vulkan.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( transpose_vulkan  )

Variable Documentation

◆ transpose_vulkan_options

const AVOption transpose_vulkan_options[]
static
Initial value:
= {
{ "dir", "set transpose direction", OFFSET(dir), AV_OPT_TYPE_INT, { .i64 = TRANSPOSE_CCLOCK_FLIP }, 0, 7, FLAGS, "dir" },
{ "cclock_flip", "rotate counter-clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
{ "clock", "rotate clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK }, .flags=FLAGS, .unit = "dir" },
{ "cclock", "rotate counter-clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK }, .flags=FLAGS, .unit = "dir" },
{ "clock_flip", "rotate clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
{ "passthrough", "do not apply transposition if the input matches the specified geometry",
OFFSET(passthrough), AV_OPT_TYPE_INT, {.i64=TRANSPOSE_PT_TYPE_NONE}, 0, INT_MAX, FLAGS, "passthrough" },
{ "none", "always apply transposition", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_NONE}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ "portrait", "preserve portrait geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_PORTRAIT}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ "landscape", "preserve landscape geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_LANDSCAPE}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ NULL }
}

Definition at line 300 of file vf_transpose_vulkan.c.

◆ transpose_vulkan_inputs

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

Definition at line 318 of file vf_transpose_vulkan.c.

◆ transpose_vulkan_outputs

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

Definition at line 327 of file vf_transpose_vulkan.c.

◆ ff_vf_transpose_vulkan

const AVFilter ff_vf_transpose_vulkan
Initial value:
= {
.name = "transpose_vulkan",
.description = NULL_IF_CONFIG_SMALL("Transpose Vulkan Filter"),
.priv_size = sizeof(TransposeVulkanContext),
.priv_class = &transpose_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 335 of file vf_transpose_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:371
transpose_vulkan_uninit
static av_cold void transpose_vulkan_uninit(AVFilterContext *avctx)
Definition: vf_transpose_vulkan.c:259
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:184
TRANSPOSE_CLOCK_FLIP
@ TRANSPOSE_CLOCK_FLIP
Definition: transpose.h:34
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:346
init
static int init
Definition: av_tx.c:47
TRANSPOSE_CCLOCK
@ TRANSPOSE_CCLOCK
Definition: transpose.h:33
transpose_vulkan_outputs
static const AVFilterPad transpose_vulkan_outputs[]
Definition: vf_transpose_vulkan.c:327
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_transpose_vulkan.c:218
OFFSET
#define OFFSET(x)
Definition: vf_transpose_vulkan.c:297
TransposeVulkanContext
Definition: vf_transpose_vulkan.c:28
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
config_props_output
static int config_props_output(AVFilterLink *outlink)
Definition: vf_transpose_vulkan.c:267
TRANSPOSE_PT_TYPE_PORTRAIT
@ TRANSPOSE_PT_TYPE_PORTRAIT
Definition: transpose.h:27
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
TRANSPOSE_PT_TYPE_NONE
@ TRANSPOSE_PT_TYPE_NONE
Definition: transpose.h:25
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:181
TRANSPOSE_CLOCK
@ TRANSPOSE_CLOCK
Definition: transpose.h:32
transpose_vulkan_inputs
static const AVFilterPad transpose_vulkan_inputs[]
Definition: vf_transpose_vulkan.c:318
TRANSPOSE_CCLOCK_FLIP
@ TRANSPOSE_CCLOCK_FLIP
Definition: transpose.h:31
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
FLAGS
#define FLAGS
Definition: vf_transpose_vulkan.c:298
TRANSPOSE_PT_TYPE_LANDSCAPE
@ TRANSPOSE_PT_TYPE_LANDSCAPE
Definition: transpose.h:26
ff_vk_filter_config_input
int ff_vk_filter_config_input(AVFilterLink *inlink)
Definition: vulkan_filter.c:52
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:282
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233