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 "vulkan_filter.h"
#include "vulkan_spirv.h"
#include "filters.h"
#include "internal.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 28 of file vf_xfade_vulkan.c.

◆ IN_B

#define IN_B   1

Definition at line 29 of file vf_xfade_vulkan.c.

◆ IN_NB

#define IN_NB   2

Definition at line 30 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 144 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 190 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 221 of file vf_xfade_vulkan.c.

◆ OFFSET

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

Definition at line 655 of file vf_xfade_vulkan.c.

◆ FLAGS

Definition at line 656 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 70 of file vf_xfade_vulkan.c.

Function Documentation

◆ init_vulkan()

static av_cold int init_vulkan ( AVFilterContext avctx)
static

Definition at line 321 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 415 of file vf_xfade_vulkan.c.

Referenced by activate().

◆ config_props_output()

static int config_props_output ( AVFilterLink outlink)
static

Definition at line 456 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 646 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 91 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 100 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 111 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 122 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 133 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 158 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 166 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 174 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 182 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 205 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 213 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 227 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 238 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 253 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 265 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 277 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 289 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 658 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 684 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 699 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 707 of file vf_xfade_vulkan.c.

WIPETR
@ WIPETR
Definition: vf_xfade_vulkan.c:85
WIPELEFT
@ WIPELEFT
Definition: vf_xfade_vulkan.c:72
mix
static int mix(int c0, int c1)
Definition: 4xm.c:715
r
const char * r
Definition: vf_curves.c:126
transition_dissolve
static const char transition_dissolve[]
Definition: vf_xfade_vulkan.c:227
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
transition_wipeup
static const char transition_wipeup[]
Definition: vf_xfade_vulkan.c:122
transition_slideup
static const char transition_slideup[]
Definition: vf_xfade_vulkan.c:166
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:221
frand
static float frand(int x, int y)
Definition: vf_deband.c:115
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:646
CIRCLEOPEN
@ CIRCLEOPEN
Definition: vf_xfade_vulkan.c:80
AV_OPT_TYPE_DURATION
@ AV_OPT_TYPE_DURATION
Definition: opt.h:249
transition_wiperight
static const char transition_wiperight[]
Definition: vf_xfade_vulkan.c:111
transition_wipebl
static const char transition_wipebl[]
Definition: vf_xfade_vulkan.c:277
transition_wipebr
static const char transition_wipebr[]
Definition: vf_xfade_vulkan.c:289
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
WIPEBL
@ WIPEBL
Definition: vf_xfade_vulkan.c:86
SLIDELEFT
@ SLIDELEFT
Definition: vf_xfade_vulkan.c:78
transition_slideleft
static const char transition_slideleft[]
Definition: vf_xfade_vulkan.c:174
SLIDEDOWN
@ SLIDEDOWN
Definition: vf_xfade_vulkan.c:76
SLIDEUP
@ SLIDEUP
Definition: vf_xfade_vulkan.c:77
SHADER_FRAND_FUNC
#define SHADER_FRAND_FUNC
Definition: vf_xfade_vulkan.c:221
transition_circleclose
static const char transition_circleclose[]
Definition: vf_xfade_vulkan.c:213
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:64
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:291
transition_wipedown
static const char transition_wipedown[]
Definition: vf_xfade_vulkan.c:133
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
transition_pixelize
static const char transition_pixelize[]
Definition: vf_xfade_vulkan.c:238
activate
static int activate(AVFilterContext *avctx)
Definition: vf_xfade_vulkan.c:535
transition_circleopen
static const char transition_circleopen[]
Definition: vf_xfade_vulkan.c:205
transition_wipetl
static const char transition_wipetl[]
Definition: vf_xfade_vulkan.c:253
transition_fade
static const char transition_fade[]
Definition: vf_xfade_vulkan.c:91
xfade_vulkan_outputs
static const AVFilterPad xfade_vulkan_outputs[]
Definition: vf_xfade_vulkan.c:699
PIXELIZE
@ PIXELIZE
Definition: vf_xfade_vulkan.c:83
DISSOLVE
@ DISSOLVE
Definition: vf_xfade_vulkan.c:82
f
f
Definition: af_crystalizer.c:121
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
FLAGS
#define FLAGS
Definition: vf_xfade_vulkan.c:656
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
SHADER_CIRCLE_COMMON
#define SHADER_CIRCLE_COMMON
Definition: vf_xfade_vulkan.c:190
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
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:172
xfade_vulkan_inputs
static const AVFilterPad xfade_vulkan_inputs[]
Definition: vf_xfade_vulkan.c:684
NB_TRANSITIONS
@ NB_TRANSITIONS
Definition: vf_xfade_vulkan.c:88
CIRCLECLOSE
@ CIRCLECLOSE
Definition: vf_xfade_vulkan.c:81
fract
static float fract(float a)
Definition: vf_xfade.c:286
WIPERIGHT
@ WIPERIGHT
Definition: vf_xfade_vulkan.c:73
FADE
@ FADE
Definition: vf_xfade_vulkan.c:71
SHADER_SLIDE_COMMON
#define SHADER_SLIDE_COMMON
Definition: vf_xfade_vulkan.c:144
pos
unsigned int pos
Definition: spdifenc.c:413
transition_slideright
static const char transition_slideright[]
Definition: vf_xfade_vulkan.c:182
WIPEBR
@ WIPEBR
Definition: vf_xfade_vulkan.c:87
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
config_props_output
static int config_props_output(AVFilterLink *outlink)
Definition: vf_xfade_vulkan.c:456
transition_wipetr
static const char transition_wipetr[]
Definition: vf_xfade_vulkan.c:265
XFadeVulkanContext
Definition: vf_xfade_vulkan.c:36
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
WIPEDOWN
@ WIPEDOWN
Definition: vf_xfade_vulkan.c:75
WIPETL
@ WIPETL
Definition: vf_xfade_vulkan.c:84
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
SLIDERIGHT
@ SLIDERIGHT
Definition: vf_xfade_vulkan.c:79
d
d
Definition: ffmpeg_filter.c:409
transition_wipeleft
static const char transition_wipeleft[]
Definition: vf_xfade_vulkan.c:100
WIPEUP
@ WIPEUP
Definition: vf_xfade_vulkan.c:74
transition_slidedown
static const char transition_slidedown[]
Definition: vf_xfade_vulkan.c:158
uninit
static av_cold void uninit(AVFilterContext *avctx)
Definition: vf_xfade_vulkan.c:627
OFFSET
#define OFFSET(x)
Definition: vf_xfade_vulkan.c:655
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244
min
float min
Definition: vorbis_enc_data.h:429