Go to the source code of this file.
◆ OFFSET
◆ FLAGS
◆ init_filter()
◆ chromaber_vulkan_filter_frame()
◆ chromaber_vulkan_uninit()
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
chromaber_vulkan |
| ) |
|
◆ distort_chroma_kernel
const char distort_chroma_kernel[] |
|
static |
Initial value:= {
C(0,
void distort_rgb(ivec2
size, ivec2
pos) )
C(1,
const vec2 p = ((vec2(
pos)/vec2(
size)) - 0.5
f)*2.0
f; )
C(1,
const vec2 o = p * (dist - 1.0
f); )
C(1, res.
r = texture(input_img[0], ((p - o)/2.0
f) + 0.5
f).
r; )
C(1, res.
g = texture(input_img[0], ((p )/2.0
f) + 0.5
f).
g; )
C(1, res.
b = texture(input_img[0], ((p + o)/2.0
f) + 0.5
f).
b; )
C(1, res.
a = texture(input_img[0], ((p )/2.0
f) + 0.5
f).
a; )
C(1, imageStore(output_img[0],
pos, res); )
C(0,
void distort_chroma(
int idx, ivec2
size, ivec2
pos) )
C(1, vec2 p = ((vec2(
pos)/vec2(
size)) - 0.5
f)*2.0f; )
C(1,
float d = sqrt(p.x*p.x + p.y*p.y); )
C(1, p *= d / (d*dist); )
C(1, vec4 res = texture(input_img[idx], (p/2.0
f) + 0.5
f); )
C(1, imageStore(output_img[idx],
pos, res); )
}
Definition at line 44 of file vf_chromaber_vulkan.c.
Referenced by init_filter().
◆ chromaber_vulkan_options
const AVOption chromaber_vulkan_options[] |
|
static |
◆ chromaber_vulkan_inputs
◆ chromaber_vulkan_outputs
◆ ff_vf_chromaber_vulkan
Initial value:= {
.name = "chromaber_vulkan",
.priv_class = &chromaber_vulkan_class,
}
Definition at line 252 of file vf_chromaber_vulkan.c.
#define FILTER_INPUTS(array)
static void chromaber_vulkan_uninit(AVFilterContext *avctx)
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
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
#define FILTER_OUTPUTS(array)
int ff_vk_filter_config_output(AVFilterLink *outlink)
static const AVFilterPad chromaber_vulkan_outputs[]
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
int(* init)(AVBSFContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
static int chromaber_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
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
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
static void uninit(AVBSFContext *ctx)
int ff_vk_filter_config_input(AVFilterLink *inlink)
static const AVFilterPad chromaber_vulkan_inputs[]
#define FILTER_SINGLE_PIXFMT(pix_fmt_)