FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
vf_xfade_vulkan.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
#include "libavutil/vulkan_spirv.h"
#include "vulkan_filter.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  XFadeParameters
 
struct  XFadeVulkanContext
 

Macros

#define IN_A   0
 
#define IN_B   1
 
#define IN_NB   2
 
#define SHADER_SLIDE_COMMON
 
#define SHADER_CIRCLE_COMMON
 
#define SHADER_FRAND_FUNC
 
#define OFFSET(x)   offsetof(XFadeVulkanContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Enumerations

enum  XFadeTransitions {
  CUSTOM = -1, FADE, WIPELEFT, WIPERIGHT,
  WIPEUP, WIPEDOWN, SLIDELEFT, SLIDERIGHT,
  SLIDEUP, SLIDEDOWN, CIRCLECROP, RECTCROP,
  DISTANCE, FADEBLACK, FADEWHITE, RADIAL,
  SMOOTHLEFT, SMOOTHRIGHT, SMOOTHUP, SMOOTHDOWN,
  CIRCLEOPEN, CIRCLECLOSE, VERTOPEN, VERTCLOSE,
  HORZOPEN, HORZCLOSE, DISSOLVE, PIXELIZE,
  DIAGTL, DIAGTR, DIAGBL, DIAGBR,
  HLSLICE, HRSLICE, VUSLICE, VDSLICE,
  HBLUR, FADEGRAYS, WIPETL, WIPETR,
  WIPEBL, WIPEBR, SQUEEZEH, SQUEEZEV,
  ZOOMIN, FADEFAST, FADESLOW, HLWIND,
  HRWIND, VUWIND, VDWIND, COVERLEFT,
  COVERRIGHT, COVERUP, COVERDOWN, REVEALLEFT,
  REVEALRIGHT, REVEALUP, REVEALDOWN, NB_TRANSITIONS,
  CUSTOM, FADE, WIPELEFT, WIPERIGHT,
  WIPEUP, WIPEDOWN, SLIDELEFT, SLIDERIGHT,
  SLIDEUP, SLIDEDOWN, NB_TRANSITIONS, FADE,
  WIPELEFT, WIPERIGHT, WIPEUP, WIPEDOWN,
  SLIDEDOWN, SLIDEUP, SLIDELEFT, SLIDERIGHT,
  CIRCLEOPEN, CIRCLECLOSE, DISSOLVE, PIXELIZE,
  WIPETL, WIPETR, WIPEBL, WIPEBR,
  NB_TRANSITIONS
}
 

Functions

static av_cold int init_vulkan (AVFilterContext *avctx)
 
static int xfade_frame (AVFilterContext *avctx, AVFrame *frame_a, AVFrame *frame_b)
 
static int config_props_output (AVFilterLink *outlink)
 
static int forward_frame (XFadeVulkanContext *s, AVFilterLink *inlink, AVFilterLink *outlink)
 
static int activate (AVFilterContext *avctx)
 
static av_cold void uninit (AVFilterContext *avctx)
 
static AVFrameget_video_buffer (AVFilterLink *inlink, int w, int h)
 
 AVFILTER_DEFINE_CLASS (xfade_vulkan)
 

Variables

static const char transition_fade []
 
static const char transition_wipeleft []
 
static const char transition_wiperight []
 
static const char transition_wipeup []
 
static const char transition_wipedown []
 
static const char transition_slidedown []
 
static const char transition_slideup []
 
static const char transition_slideleft []
 
static const char transition_slideright []
 
static const char transition_circleopen []
 
static const char transition_circleclose []
 
static const char transition_dissolve []
 
static const char transition_pixelize []
 
static const char transition_wipetl []
 
static const char transition_wipetr []
 
static const char transition_wipebl []
 
static const char transition_wipebr []
 
static const char * transitions_map [NB_TRANSITIONS]
 
static const AVOption xfade_vulkan_options []
 
static const AVFilterPad xfade_vulkan_inputs []
 
static const AVFilterPad xfade_vulkan_outputs []
 
const AVFilter ff_vf_xfade_vulkan
 

Macro Definition Documentation

◆ IN_A

#define IN_A   0

Definition at line 27 of file vf_xfade_vulkan.c.

◆ IN_B

#define IN_B   1

Definition at line 28 of file vf_xfade_vulkan.c.

◆ IN_NB

#define IN_NB   2

Definition at line 29 of file vf_xfade_vulkan.c.

◆ SHADER_SLIDE_COMMON

#define SHADER_SLIDE_COMMON
Value:
C(0, void slide(int idx, ivec2 pos, float progress, ivec2 direction) ) \
C(0, { ) \
C(1, ivec2 size = imageSize(output_images[idx]); ) \
C(1, ivec2 pi = ivec2(progress * size); ) \
C(1, ivec2 p = pos + pi * direction; ) \
C(1, ivec2 f = p % size; ) \
C(1, f = f + size * ivec2(f.x < 0, f.y < 0); ) \
C(1, vec4 a = texture(a_images[idx], f); ) \
C(1, vec4 b = texture(b_images[idx], f); ) \
C(1, vec4 r = (p.y >= 0 && p.x >= 0 && size.y > p.y && size.x > p.x) ? a : b; ) \
C(1, imageStore(output_images[idx], pos, r); ) \
C(0, } )

Definition at line 142 of file vf_xfade_vulkan.c.

◆ SHADER_CIRCLE_COMMON

#define SHADER_CIRCLE_COMMON
Value:
C(0, void circle(int idx, ivec2 pos, float progress, bool open) ) \
C(0, { ) \
C(1, const ivec2 half_size = imageSize(output_images[idx]) / 2; ) \
C(1, const float z = dot(half_size, half_size); ) \
C(1, float p = ((open ? (1.0 - progress) : progress) - 0.5) * 3.0; ) \
C(1, ivec2 dsize = pos - half_size; ) \
C(1, float sm = dot(dsize, dsize) / z + p; ) \
C(1, vec4 a = texture(a_images[idx], pos); ) \
C(1, vec4 b = texture(b_images[idx], pos); ) \
C(1, imageStore(output_images[idx], pos, \
mix(open ? b : a, open ? a : b, \
smoothstep(0.f, 1.f, sm))); ) \
C(0, } )

Definition at line 188 of file vf_xfade_vulkan.c.

◆ SHADER_FRAND_FUNC

#define SHADER_FRAND_FUNC
Value:
C(0, float frand(vec2 v) ) \
C(0, { ) \
C(1, return fract(sin(dot(v, vec2(12.9898, 78.233))) * 43758.545); ) \
C(0, } )

Definition at line 219 of file vf_xfade_vulkan.c.

◆ OFFSET

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

Definition at line 654 of file vf_xfade_vulkan.c.

◆ FLAGS

Definition at line 655 of file vf_xfade_vulkan.c.

Enumeration Type Documentation

◆ XFadeTransitions

Enumerator
CUSTOM 
FADE 
WIPELEFT 
WIPERIGHT 
WIPEUP 
WIPEDOWN 
SLIDELEFT 
SLIDERIGHT 
SLIDEUP 
SLIDEDOWN 
CIRCLECROP 
RECTCROP 
DISTANCE 
FADEBLACK 
FADEWHITE 
RADIAL 
SMOOTHLEFT 
SMOOTHRIGHT 
SMOOTHUP 
SMOOTHDOWN 
CIRCLEOPEN 
CIRCLECLOSE 
VERTOPEN 
VERTCLOSE 
HORZOPEN 
HORZCLOSE 
DISSOLVE 
PIXELIZE 
DIAGTL 
DIAGTR 
DIAGBL 
DIAGBR 
HLSLICE 
HRSLICE 
VUSLICE 
VDSLICE 
HBLUR 
FADEGRAYS 
WIPETL 
WIPETR 
WIPEBL 
WIPEBR 
SQUEEZEH 
SQUEEZEV 
ZOOMIN 
FADEFAST 
FADESLOW 
HLWIND 
HRWIND 
VUWIND 
VDWIND 
COVERLEFT 
COVERRIGHT 
COVERUP 
COVERDOWN 
REVEALLEFT 
REVEALRIGHT 
REVEALUP 
REVEALDOWN 
NB_TRANSITIONS 
CUSTOM 
FADE 
WIPELEFT 
WIPERIGHT 
WIPEUP 
WIPEDOWN 
SLIDELEFT 
SLIDERIGHT 
SLIDEUP 
SLIDEDOWN 
NB_TRANSITIONS 
FADE 
WIPELEFT 
WIPERIGHT 
WIPEUP 
WIPEDOWN 
SLIDEDOWN 
SLIDEUP 
SLIDELEFT 
SLIDERIGHT 
CIRCLEOPEN 
CIRCLECLOSE 
DISSOLVE 
PIXELIZE 
WIPETL 
WIPETR 
WIPEBL 
WIPEBR 
NB_TRANSITIONS 

Definition at line 68 of file vf_xfade_vulkan.c.

Function Documentation

◆ init_vulkan()

static av_cold int init_vulkan ( AVFilterContext avctx)
static

Definition at line 319 of file vf_xfade_vulkan.c.

Referenced by xfade_frame().

◆ xfade_frame()

static int xfade_frame ( AVFilterContext avctx,
AVFrame frame_a,
AVFrame frame_b 
)
static

Definition at line 413 of file vf_xfade_vulkan.c.

Referenced by activate().

◆ config_props_output()

static int config_props_output ( AVFilterLink outlink)
static

Definition at line 454 of file vf_xfade_vulkan.c.

◆ forward_frame()

static int forward_frame ( XFadeVulkanContext s,
AVFilterLink inlink,
AVFilterLink outlink 
)
static

Definition at line 497 of file vf_xfade_vulkan.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext avctx)
static

Definition at line 535 of file vf_xfade_vulkan.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext avctx)
static

Definition at line 627 of file vf_xfade_vulkan.c.

◆ get_video_buffer()

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

Definition at line 645 of file vf_xfade_vulkan.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( xfade_vulkan  )

Variable Documentation

◆ transition_fade

const char transition_fade[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, mix(a, b, progress)); )
C(0, } )
}

Definition at line 89 of file vf_xfade_vulkan.c.

◆ transition_wipeleft

const char transition_wipeleft[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, int s = int(size.x * (1.0 - progress)); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, pos.x > s ? b : a); )
C(0, } )
}

Definition at line 98 of file vf_xfade_vulkan.c.

◆ transition_wiperight

const char transition_wiperight[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, int s = int(size.x * progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, pos.x > s ? a : b); )
C(0, } )
}

Definition at line 109 of file vf_xfade_vulkan.c.

◆ transition_wipeup

const char transition_wipeup[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, int s = int(size.y * (1.0 - progress)); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, pos.y > s ? b : a); )
C(0, } )
}

Definition at line 120 of file vf_xfade_vulkan.c.

◆ transition_wipedown

const char transition_wipedown[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, int s = int(size.y * progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, pos.y > s ? a : b); )
C(0, } )
}

Definition at line 131 of file vf_xfade_vulkan.c.

◆ transition_slidedown

const char transition_slidedown[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, slide(idx, pos, progress, ivec2(0, -1)); )
C(0, } )
}

Definition at line 156 of file vf_xfade_vulkan.c.

◆ transition_slideup

const char transition_slideup[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, slide(idx, pos, progress, ivec2(0, +1)); )
C(0, } )
}

Definition at line 164 of file vf_xfade_vulkan.c.

◆ transition_slideleft

const char transition_slideleft[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, slide(idx, pos, progress, ivec2(+1, 0)); )
C(0, } )
}

Definition at line 172 of file vf_xfade_vulkan.c.

◆ transition_slideright

const char transition_slideright[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, slide(idx, pos, progress, ivec2(-1, 0)); )
C(0, } )
}

Definition at line 180 of file vf_xfade_vulkan.c.

◆ transition_circleopen

const char transition_circleopen[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, circle(idx, pos, progress, true); )
C(0, } )
}

Definition at line 203 of file vf_xfade_vulkan.c.

◆ transition_circleclose

const char transition_circleclose[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, circle(idx, pos, progress, false); )
C(0, } )
}

Definition at line 211 of file vf_xfade_vulkan.c.

◆ transition_dissolve

const char transition_dissolve[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, float sm = frand(pos) * 2.0 + (1.0 - progress) * 2.0 - 1.5; )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, sm >= 0.5 ? a : b); )
C(0, } )
}

Definition at line 225 of file vf_xfade_vulkan.c.

◆ transition_pixelize

const char transition_pixelize[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, float d = min(progress, 1.0 - progress); )
C(1, float dist = ceil(d * 50.0) / 50.0; )
C(1, float sq = 2.0 * dist * min(size.x, size.y) / 20.0; )
C(1, float sx = dist > 0.0 ? min((floor(pos.x / sq) + 0.5) * sq, size.x - 1) : pos.x; )
C(1, float sy = dist > 0.0 ? min((floor(pos.y / sq) + 0.5) * sq, size.y - 1) : pos.y; )
C(1, vec4 a = texture(a_images[idx], vec2(sx, sy)); )
C(1, vec4 b = texture(b_images[idx], vec2(sx, sy)); )
C(1, imageStore(output_images[idx], pos, mix(a, b, progress)); )
C(0, } )
}

Definition at line 236 of file vf_xfade_vulkan.c.

◆ transition_wipetl

const char transition_wipetl[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, float zw = size.x * (1.0 - progress); )
C(1, float zh = size.y * (1.0 - progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, (pos.y <= zh && pos.x <= zw) ? a : b); )
C(0, } )
}

Definition at line 251 of file vf_xfade_vulkan.c.

◆ transition_wipetr

const char transition_wipetr[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, float zw = size.x * (progress); )
C(1, float zh = size.y * (1.0 - progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, (pos.y <= zh && pos.x > zw) ? a : b); )
C(0, } )
}

Definition at line 263 of file vf_xfade_vulkan.c.

◆ transition_wipebl

const char transition_wipebl[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, float zw = size.x * (1.0 - progress); )
C(1, float zh = size.y * (progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, (pos.y > zh && pos.x <= zw) ? a : b); )
C(0, } )
}

Definition at line 275 of file vf_xfade_vulkan.c.

◆ transition_wipebr

const char transition_wipebr[]
static
Initial value:
= {
C(0, void transition(int idx, ivec2 pos, float progress) )
C(0, { )
C(1, ivec2 size = imageSize(output_images[idx]); )
C(1, float zw = size.x * (progress); )
C(1, float zh = size.y * (progress); )
C(1, vec4 a = texture(a_images[idx], pos); )
C(1, vec4 b = texture(b_images[idx], pos); )
C(1, imageStore(output_images[idx], pos, (pos.y > zh && pos.x > zw) ? a : b); )
C(0, } )
}

Definition at line 287 of file vf_xfade_vulkan.c.

◆ transitions_map

const char* transitions_map[NB_TRANSITIONS]
static

◆ xfade_vulkan_options

const AVOption xfade_vulkan_options[]
static
Initial value:
= {
{ "transition", "set cross fade transition", OFFSET(transition), AV_OPT_TYPE_INT, {.i64=FADE}, 0, NB_TRANSITIONS-1, FLAGS, .unit = "transition" },
{ "fade", "fade transition", 0, AV_OPT_TYPE_CONST, {.i64=FADE}, 0, 0, FLAGS, .unit = "transition" },
{ "wipeleft", "wipe left transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPELEFT}, 0, 0, FLAGS, .unit = "transition" },
{ "wiperight", "wipe right transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPERIGHT}, 0, 0, FLAGS, .unit = "transition" },
{ "wipeup", "wipe up transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEUP}, 0, 0, FLAGS, .unit = "transition" },
{ "wipedown", "wipe down transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEDOWN}, 0, 0, FLAGS, .unit = "transition" },
{ "slidedown", "slide down transition", 0, AV_OPT_TYPE_CONST, {.i64=SLIDEDOWN}, 0, 0, FLAGS, .unit = "transition" },
{ "slideup", "slide up transition", 0, AV_OPT_TYPE_CONST, {.i64=SLIDEUP}, 0, 0, FLAGS, .unit = "transition" },
{ "slideleft", "slide left transition", 0, AV_OPT_TYPE_CONST, {.i64=SLIDELEFT}, 0, 0, FLAGS, .unit = "transition" },
{ "slideright", "slide right transition", 0, AV_OPT_TYPE_CONST, {.i64=SLIDERIGHT}, 0, 0, FLAGS, .unit = "transition" },
{ "circleopen", "circleopen transition", 0, AV_OPT_TYPE_CONST, {.i64=CIRCLEOPEN}, 0, 0, FLAGS, .unit = "transition" },
{ "circleclose", "circleclose transition", 0, AV_OPT_TYPE_CONST, {.i64=CIRCLECLOSE}, 0, 0, FLAGS, .unit = "transition" },
{ "dissolve", "dissolve transition", 0, AV_OPT_TYPE_CONST, {.i64=DISSOLVE}, 0, 0, FLAGS, .unit = "transition" },
{ "pixelize", "pixelize transition", 0, AV_OPT_TYPE_CONST, {.i64=PIXELIZE}, 0, 0, FLAGS, .unit = "transition" },
{ "wipetl", "wipe top left transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPETL}, 0, 0, FLAGS, .unit = "transition" },
{ "wipetr", "wipe top right transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPETR}, 0, 0, FLAGS, .unit = "transition" },
{ "wipebl", "wipe bottom left transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEBL}, 0, 0, FLAGS, .unit = "transition" },
{ "wipebr", "wipe bottom right transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEBR}, 0, 0, FLAGS, .unit = "transition" },
{ "duration", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64=1000000}, 0, 60000000, FLAGS },
{ "offset", "set cross fade start relative to first input stream", OFFSET(offset), AV_OPT_TYPE_DURATION, {.i64=0}, INT64_MIN, INT64_MAX, FLAGS },
{ NULL }
}

Definition at line 657 of file vf_xfade_vulkan.c.

◆ xfade_vulkan_inputs

const AVFilterPad xfade_vulkan_inputs[]
static
Initial value:
= {
{
.name = "main",
.get_buffer.video = &get_video_buffer,
.config_props = &ff_vk_filter_config_input,
},
{
.name = "xfade",
.get_buffer.video = &get_video_buffer,
.config_props = &ff_vk_filter_config_input,
},
}

Definition at line 683 of file vf_xfade_vulkan.c.

◆ xfade_vulkan_outputs

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

Definition at line 698 of file vf_xfade_vulkan.c.

◆ ff_vf_xfade_vulkan

const AVFilter ff_vf_xfade_vulkan
Initial value:
= {
.name = "xfade_vulkan",
.description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."),
.priv_size = sizeof(XFadeVulkanContext),
.priv_class = &xfade_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 706 of file vf_xfade_vulkan.c.

WIPETR
@ WIPETR
Definition: vf_xfade_vulkan.c:83
WIPELEFT
@ WIPELEFT
Definition: vf_xfade_vulkan.c:70
mix
static int mix(int c0, int c1)
Definition: 4xm.c:716
r
const char * r
Definition: vf_curves.c:127
transition_dissolve
static const char transition_dissolve[]
Definition: vf_xfade_vulkan.c:225
transition_wipeup
static const char transition_wipeup[]
Definition: vf_xfade_vulkan.c:120
transition_slideup
static const char transition_slideup[]
Definition: vf_xfade_vulkan.c:164
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:233
frand
static float frand(int x, int y)
Definition: vf_deband.c:119
b
#define b
Definition: input.c:41
get_video_buffer
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_xfade_vulkan.c:645
CIRCLEOPEN
@ CIRCLEOPEN
Definition: vf_xfade_vulkan.c:78
AV_OPT_TYPE_DURATION
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
Definition: opt.h:319
transition_wiperight
static const char transition_wiperight[]
Definition: vf_xfade_vulkan.c:109
transition_wipebl
static const char transition_wipebl[]
Definition: vf_xfade_vulkan.c:275
transition_wipebr
static const char transition_wipebr[]
Definition: vf_xfade_vulkan.c:287
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
WIPEBL
@ WIPEBL
Definition: vf_xfade_vulkan.c:84
SLIDELEFT
@ SLIDELEFT
Definition: vf_xfade_vulkan.c:76
transition_slideleft
static const char transition_slideleft[]
Definition: vf_xfade_vulkan.c:172
SLIDEDOWN
@ SLIDEDOWN
Definition: vf_xfade_vulkan.c:74
SLIDEUP
@ SLIDEUP
Definition: vf_xfade_vulkan.c:75
SHADER_FRAND_FUNC
#define SHADER_FRAND_FUNC
Definition: vf_xfade_vulkan.c:219
transition_circleclose
static const char transition_circleclose[]
Definition: vf_xfade_vulkan.c:211
C
s EdgeDetect Foobar g libavfilter vf_edgedetect c libavfilter vf_foobar c edit libavfilter and add an entry for foobar following the pattern of the other filters edit libavfilter allfilters and add an entry for foobar following the pattern of the other filters configure make j< whatever > ffmpeg ffmpeg i you should get a foobar png with Lena edge detected That s your new playground is ready Some little details about what s going which in turn will define variables for the build system and the C
Definition: writing_filters.txt:58
ceil
static __device__ float ceil(float a)
Definition: cuda_runtime.h:176
duration
int64_t duration
Definition: movenc.c:65
s
#define s(width, name)
Definition: cbs_vp9.c:198
floor
static __device__ float floor(float a)
Definition: cuda_runtime.h:173
smoothstep
static float smoothstep(float edge0, float edge1, float x)
Definition: vf_xfade.c:290
transition_wipedown
static const char transition_wipedown[]
Definition: vf_xfade_vulkan.c:131
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
transition_pixelize
static const char transition_pixelize[]
Definition: vf_xfade_vulkan.c:236
activate
static int activate(AVFilterContext *avctx)
Definition: vf_xfade_vulkan.c:535
transition_circleopen
static const char transition_circleopen[]
Definition: vf_xfade_vulkan.c:203
transition_wipetl
static const char transition_wipetl[]
Definition: vf_xfade_vulkan.c:251
transition_fade
static const char transition_fade[]
Definition: vf_xfade_vulkan.c:89
xfade_vulkan_outputs
static const AVFilterPad xfade_vulkan_outputs[]
Definition: vf_xfade_vulkan.c:698
PIXELIZE
@ PIXELIZE
Definition: vf_xfade_vulkan.c:81
DISSOLVE
@ DISSOLVE
Definition: vf_xfade_vulkan.c:80
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: filters.h:206
f
f
Definition: af_crystalizer.c:122
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
FLAGS
#define FLAGS
Definition: vf_xfade_vulkan.c:655
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:94
AVFILTER_FLAG_HWDEVICE
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition: avfilter.h:173
SHADER_CIRCLE_COMMON
#define SHADER_CIRCLE_COMMON
Definition: vf_xfade_vulkan.c:188
size
int size
Definition: twinvq_data.h:10344
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
xfade_vulkan_inputs
static const AVFilterPad xfade_vulkan_inputs[]
Definition: vf_xfade_vulkan.c:683
NB_TRANSITIONS
@ NB_TRANSITIONS
Definition: vf_xfade_vulkan.c:86
CIRCLECLOSE
@ CIRCLECLOSE
Definition: vf_xfade_vulkan.c:79
fract
static float fract(float a)
Definition: vf_xfade.c:285
WIPERIGHT
@ WIPERIGHT
Definition: vf_xfade_vulkan.c:71
FADE
@ FADE
Definition: vf_xfade_vulkan.c:69
SHADER_SLIDE_COMMON
#define SHADER_SLIDE_COMMON
Definition: vf_xfade_vulkan.c:142
pos
unsigned int pos
Definition: spdifenc.c:414
transition_slideright
static const char transition_slideright[]
Definition: vf_xfade_vulkan.c:180
WIPEBR
@ WIPEBR
Definition: vf_xfade_vulkan.c:85
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
config_props_output
static int config_props_output(AVFilterLink *outlink)
Definition: vf_xfade_vulkan.c:454
transition_wipetr
static const char transition_wipetr[]
Definition: vf_xfade_vulkan.c:263
XFadeVulkanContext
Definition: vf_xfade_vulkan.c:35
ff_vk_filter_config_input
int ff_vk_filter_config_input(AVFilterLink *inlink)
Definition: vulkan_filter.c:176
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
WIPEDOWN
@ WIPEDOWN
Definition: vf_xfade_vulkan.c:73
WIPETL
@ WIPETL
Definition: vf_xfade_vulkan.c:82
SLIDERIGHT
@ SLIDERIGHT
Definition: vf_xfade_vulkan.c:77
transition_wipeleft
static const char transition_wipeleft[]
Definition: vf_xfade_vulkan.c:98
WIPEUP
@ WIPEUP
Definition: vf_xfade_vulkan.c:72
transition_slidedown
static const char transition_slidedown[]
Definition: vf_xfade_vulkan.c:156
uninit
static av_cold void uninit(AVFilterContext *avctx)
Definition: vf_xfade_vulkan.c:627
OFFSET
#define OFFSET(x)
Definition: vf_xfade_vulkan.c:654
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: filters.h:252
min
float min
Definition: vorbis_enc_data.h:429