FFmpeg
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vf_interlace_vulkan.c
Go to the documentation of this file.
1 /*
2  * Copyright 2025 (c) Niklas Haas
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include "libavutil/vulkan_spirv.h"
22 #include "libavutil/opt.h"
23 #include "vulkan_filter.h"
24 
25 #include "tinterlace.h"
26 #include "filters.h"
27 #include "video.h"
28 
29 typedef struct InterlaceVulkanContext {
31 
35  VkSampler sampler;
37 
38  int mode;
39  int lowpass;
40 
41  AVFrame *cur; /* first frame in pair */
43 
44 static const char lowpass_off[] = {
45  C(0, vec4 get_line(sampler2D tex, const vec2 pos) )
46  C(0, { )
47  C(1, return texture(tex, pos); )
48  C(0, } )
49 };
50 
51 static const char lowpass_lin[] = {
52  C(0, vec4 get_line(sampler2D tex, const vec2 pos) )
53  C(0, { )
54  C(1, return 0.50 * texture(tex, pos) + )
55  C(1, 0.25 * texture(tex, pos - ivec2(0, 1)) + )
56  C(1, 0.25 * texture(tex, pos + ivec2(0, 1)); )
57  C(0, } )
58 };
59 
60 static const char lowpass_complex[] = {
61  C(0, vec4 get_line(sampler2D tex, const vec2 pos) )
62  C(0, { )
63  C(1, return 0.75 * texture(tex, pos) + )
64  C(1, 0.25 * texture(tex, pos - ivec2(0, 1)) + )
65  C(1, 0.25 * texture(tex, pos + ivec2(0, 1)) + )
66  C(1, -0.125 * texture(tex, pos - ivec2(0, 2)) + )
67  C(1, -0.125 * texture(tex, pos + ivec2(0, 2)); )
68  C(0, } )
69 };
70 
72 {
73  int err;
74  uint8_t *spv_data;
75  size_t spv_len;
76  void *spv_opaque = NULL;
77  InterlaceVulkanContext *s = ctx->priv;
78  FFVulkanContext *vkctx = &s->vkctx;
79  const int planes = av_pix_fmt_count_planes(s->vkctx.output_format);
80  FFVulkanShader *shd;
81  FFVkSPIRVCompiler *spv;
83 
84  spv = ff_vk_spirv_init();
85  if (!spv) {
86  av_log(ctx, AV_LOG_ERROR, "Unable to initialize SPIR-V compiler!\n");
87  return AVERROR_EXTERNAL;
88  }
89 
90  s->qf = ff_vk_qf_find(vkctx, VK_QUEUE_COMPUTE_BIT, 0);
91  if (!s->qf) {
92  av_log(ctx, AV_LOG_ERROR, "Device has no compute queues\n");
93  err = AVERROR(ENOTSUP);
94  goto fail;
95  }
96 
97  RET(ff_vk_exec_pool_init(vkctx, s->qf, &s->e, s->qf->num*4, 0, 0, 0, NULL));
98  RET(ff_vk_init_sampler(vkctx, &s->sampler, 1,
99  s->lowpass == VLPF_OFF ? VK_FILTER_NEAREST
100  : VK_FILTER_LINEAR));
101  RET(ff_vk_shader_init(vkctx, &s->shd, "interlace",
102  VK_SHADER_STAGE_COMPUTE_BIT,
103  NULL, 0,
104  32, 32, 1,
105  0));
106  shd = &s->shd;
107 
109  {
110  .name = "top_field",
111  .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
112  .dimensions = 2,
113  .elems = planes,
114  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
115  .samplers = DUP_SAMPLER(s->sampler),
116  },
117  {
118  .name = "bot_field",
119  .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
120  .dimensions = 2,
121  .elems = planes,
122  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
123  .samplers = DUP_SAMPLER(s->sampler),
124  },
125  {
126  .name = "output_img",
127  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
128  .mem_layout = ff_vk_shader_rep_fmt(s->vkctx.output_format, FF_VK_REP_FLOAT),
129  .mem_quali = "writeonly",
130  .dimensions = 2,
131  .elems = planes,
132  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
133  },
134  };
135 
136  RET(ff_vk_shader_add_descriptor_set(vkctx, shd, desc, 3, 0, 0));
137 
138  switch (s->lowpass) {
139  case VLPF_OFF:
141  break;
142  case VLPF_LIN:
144  break;
145  case VLPF_CMP:
147  break;
148  }
149 
150  GLSLC(0, void main() );
151  GLSLC(0, { );
152  GLSLC(1, vec4 res; );
153  GLSLC(1, ivec2 size; );
154  GLSLC(1, const ivec2 pos = ivec2(gl_GlobalInvocationID.xy); );
155  GLSLC(1, const vec2 ipos = pos + vec2(0.5); );
156  for (int i = 0; i < planes; i++) {
157  GLSLC(0, );
158  GLSLF(1, size = imageSize(output_img[%i]); ,i);
159  GLSLC(1, if (!IS_WITHIN(pos, size)) );
160  GLSLC(2, return; );
161  GLSLC(1, if (pos.y %% 2 == 0) );
162  GLSLF(1, res = get_line(top_field[%i], ipos); ,i);
163  GLSLC(1, else );
164  GLSLF(1, res = get_line(bot_field[%i], ipos); ,i);
165  GLSLF(1, imageStore(output_img[%i], pos, res); ,i);
166  }
167  GLSLC(0, } );
168 
169  RET(spv->compile_shader(vkctx, spv, &s->shd, &spv_data, &spv_len, "main",
170  &spv_opaque));
171  RET(ff_vk_shader_link(vkctx, &s->shd, spv_data, spv_len, "main"));
172 
173  RET(ff_vk_shader_register_exec(vkctx, &s->e, &s->shd));
174 
175  s->initialized = 1;
176 
177 fail:
178  if (spv_opaque)
179  spv->free_shader(spv, &spv_opaque);
180  if (spv)
181  spv->uninit(&spv);
182 
183  return err;
184 }
185 
187 {
188  int err;
189  AVFrame *out = NULL, *input_top, *input_bot;
190  AVFilterContext *ctx = link->dst;
191  InterlaceVulkanContext *s = ctx->priv;
192  AVFilterLink *outlink = ctx->outputs[0];
193 
194  if (!s->initialized)
195  RET(init_filter(ctx));
196 
197  /* Need both frames to filter */
198  if (!s->cur) {
199  s->cur = in;
200  return 0;
201  }
202 
203  out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
204  if (!out) {
205  err = AVERROR(ENOMEM);
206  goto fail;
207  }
208 
209  if (s->mode == MODE_TFF) {
210  input_top = s->cur;
211  input_bot = in;
212  } else {
213  input_top = in;
214  input_bot = s->cur;
215  }
216 
217  RET(ff_vk_filter_process_Nin(&s->vkctx, &s->e, &s->shd,
218  out, (AVFrame *[]){ input_top, input_bot }, 2,
219  s->sampler, NULL, 0));
220 
221  err = av_frame_copy_props(out, s->cur);
222  if (err < 0)
223  goto fail;
224 
225  out->flags |= AV_FRAME_FLAG_INTERLACED;
226  if (s->mode == MODE_TFF)
228 
229  av_frame_free(&s->cur);
230  av_frame_free(&in);
231 
232  return ff_filter_frame(outlink, out);
233 
234 fail:
235  av_frame_free(&s->cur);
236  av_frame_free(&in);
237  av_frame_free(&out);
238  return err;
239 }
240 
242 {
243  InterlaceVulkanContext *s = avctx->priv;
244  FFVulkanContext *vkctx = &s->vkctx;
245  FFVulkanFunctions *vk = &vkctx->vkfn;
246 
247  av_frame_free(&s->cur);
248 
249  ff_vk_exec_pool_free(vkctx, &s->e);
250  ff_vk_shader_free(vkctx, &s->shd);
251 
252  if (s->sampler)
253  vk->DestroySampler(vkctx->hwctx->act_dev, s->sampler,
254  vkctx->hwctx->alloc);
255 
256  ff_vk_uninit(&s->vkctx);
257 
258  s->initialized = 0;
259 }
260 
261 static int config_out_props(AVFilterLink *outlink)
262 {
263  FilterLink *ol = ff_filter_link(outlink);
264 
265  ol->frame_rate = av_mul_q(ol->frame_rate, av_make_q(1, 2));
266  return ff_vk_filter_config_output(outlink);
267 }
268 
269 #define OFFSET(x) offsetof(InterlaceVulkanContext, x)
270 #define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
272  { "scan", "scanning mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = MODE_TFF}, 0, 1, FLAGS, .unit = "mode"},
273  { "tff", "top field first", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_TFF}, INT_MIN, INT_MAX, FLAGS, .unit = "mode"},
274  { "bff", "bottom field first", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_BFF}, INT_MIN, INT_MAX, FLAGS, .unit = "mode"},
275  { "lowpass", "set vertical low-pass filter", OFFSET(lowpass), AV_OPT_TYPE_INT, {.i64 = VLPF_LIN}, 0, 2, FLAGS, .unit = "lowpass" },
276  { "off", "disable vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = VLPF_OFF}, INT_MIN, INT_MAX, FLAGS, .unit = "lowpass" },
277  { "linear", "linear vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = VLPF_LIN}, INT_MIN, INT_MAX, FLAGS, .unit = "lowpass" },
278  { "complex", "complex vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = VLPF_CMP}, INT_MIN, INT_MAX, FLAGS, .unit = "lowpass" },
279  { NULL },
280 };
281 
282 AVFILTER_DEFINE_CLASS(interlace_vulkan);
283 
285  {
286  .name = "default",
287  .type = AVMEDIA_TYPE_VIDEO,
288  .filter_frame = &interlace_vulkan_filter_frame,
289  .config_props = &ff_vk_filter_config_input,
290  },
291 };
292 
294  {
295  .name = "default",
296  .type = AVMEDIA_TYPE_VIDEO,
297  .config_props = &config_out_props,
298  },
299 };
300 
302  .p.name = "interlace_vulkan",
303  .p.description = NULL_IF_CONFIG_SMALL("Convert progressive video into interlaced."),
304  .p.priv_class = &interlace_vulkan_class,
305  .p.flags = AVFILTER_FLAG_HWDEVICE,
306  .priv_size = sizeof(InterlaceVulkanContext),
312  .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
313 };
ff_get_video_buffer
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:116
interlace_vulkan_outputs
static const AVFilterPad interlace_vulkan_outputs[]
Definition: vf_interlace_vulkan.c:293
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
ff_vk_shader_free
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
Definition: vulkan.c:2852
ff_vk_shader_init
int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name, VkPipelineStageFlags stage, const char *extensions[], int nb_extensions, int lg_x, int lg_y, int lg_z, uint32_t required_subgroup_size)
Initialize a shader object, with a specific set of extensions, type+bind, local group size,...
Definition: vulkan.c:1995
out
FILE * out
Definition: movenc.c:55
config_out_props
static int config_out_props(AVFilterLink *outlink)
Definition: vf_interlace_vulkan.c:261
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1053
RET
#define RET(x)
Definition: vulkan.h:67
ff_vk_exec_pool_init
int ff_vk_exec_pool_init(FFVulkanContext *s, AVVulkanDeviceQueueFamily *qf, FFVkExecPool *pool, int nb_contexts, int nb_queries, VkQueryType query_type, int query_64bit, const void *query_create_pnext)
Allocates/frees an execution pool.
Definition: vulkan.c:296
InterlaceVulkanContext::qf
AVVulkanDeviceQueueFamily * qf
Definition: vf_interlace_vulkan.c:34
InterlaceVulkanContext::sampler
VkSampler sampler
Definition: vf_interlace_vulkan.c:35
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:63
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
mode
Definition: swscale.c:56
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:410
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:233
InterlaceVulkanContext::e
FFVkExecPool e
Definition: vf_interlace_vulkan.c:33
AVOption
AVOption.
Definition: opt.h:429
interlace_vulkan_inputs
static const AVFilterPad interlace_vulkan_inputs[]
Definition: vf_interlace_vulkan.c:284
interlace_vulkan_filter_frame
static int interlace_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_interlace_vulkan.c:186
interlace_vulkan_options
static const AVOption interlace_vulkan_options[]
Definition: vf_interlace_vulkan.c:271
ff_vk_uninit
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
Definition: vulkan.c:2893
FFVkSPIRVCompiler::uninit
void(* uninit)(struct FFVkSPIRVCompiler **ctx)
Definition: vulkan_spirv.h:32
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:203
lowpass_complex
static const char lowpass_complex[]
Definition: vf_interlace_vulkan.c:60
video.h
InterlaceVulkanContext::cur
AVFrame * cur
Definition: vf_interlace_vulkan.c:41
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
VLPF_LIN
@ VLPF_LIN
Definition: tinterlace.h:44
AV_FRAME_FLAG_TOP_FIELD_FIRST
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
Definition: frame.h:638
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3381
AVVulkanDeviceContext::alloc
const VkAllocationCallbacks * alloc
Custom memory allocator, else NULL.
Definition: hwcontext_vulkan.h:63
AVFilterContext::priv
void * priv
private data for use by the filter
Definition: avfilter.h:272
fail
#define fail()
Definition: checkasm.h:193
vulkan_filter.h
ff_vk_shader_register_exec
int ff_vk_shader_register_exec(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
Register a shader with an exec pool.
Definition: vulkan.c:2492
ff_vk_shader_add_descriptor_set
int ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd, FFVulkanDescriptorSetBinding *desc, int nb, int singular, int print_to_shader_only)
Add descriptor to a shader.
Definition: vulkan.c:2359
AVFilterPad
A filter pad used for either input or output.
Definition: filters.h:38
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
GLSLC
#define GLSLC(N, S)
Definition: vulkan.h:44
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:209
av_cold
#define av_cold
Definition: attributes.h:90
main
int main
Definition: dovi_rpuenc.c:37
FFFilter
Definition: filters.h:265
InterlaceVulkanContext::initialized
int initialized
Definition: vf_interlace_vulkan.c:32
s
#define s(width, name)
Definition: cbs_vp9.c:198
VLPF_CMP
@ VLPF_CMP
Definition: tinterlace.h:45
get_line
static char * get_line(AVIOContext *s, AVBPrint *bprint)
Definition: ffmpeg_mux_init.c:113
filters.h
FF_VK_REP_FLOAT
@ FF_VK_REP_FLOAT
Definition: vulkan.h:392
InterlaceVulkanContext::shd
FFVulkanShader shd
Definition: vf_interlace_vulkan.c:36
ctx
AVFormatContext * ctx
Definition: movenc.c:49
GLSLD
#define GLSLD(D)
Definition: vulkan.h:59
ff_vk_exec_pool_free
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
Definition: vulkan.c:233
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
InterlaceVulkanContext
Definition: vf_interlace_vulkan.c:29
link
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
Definition: filter_design.txt:23
ff_vk_shader_rep_fmt
const char * ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt, enum FFVkShaderRepFormat rep_fmt)
Definition: vulkan.c:1516
NULL
#define NULL
Definition: coverity.c:32
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:601
DUP_SAMPLER
#define DUP_SAMPLER(x)
Definition: vulkan.h:73
FLAGS
#define FLAGS
Definition: vf_interlace_vulkan.c:270
ff_vk_filter_config_output
int ff_vk_filter_config_output(AVFilterLink *outlink)
Definition: vulkan_filter.c:209
init_filter
static av_cold int init_filter(AVFilterContext *ctx)
Definition: vf_interlace_vulkan.c:71
FFVulkanContext
Definition: vulkan.h:276
ff_filter_link
static FilterLink * ff_filter_link(AVFilterLink *link)
Definition: filters.h:197
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
ff_vk_filter_process_Nin
int ff_vk_filter_process_Nin(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd, AVFrame *out, AVFrame *in[], int nb_in, VkSampler sampler, void *push_src, size_t push_size)
Up to 16 inputs, one output.
Definition: vulkan_filter.c:407
lowpass
@ lowpass
Definition: af_biquads.c:86
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
FFVulkanDescriptorSetBinding
Definition: vulkan.h:75
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(interlace_vulkan)
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:171
size
int size
Definition: twinvq_data.h:10344
av_make_q
static AVRational av_make_q(int num, int den)
Create an AVRational.
Definition: rational.h:71
planes
static const struct @489 planes[]
FFVulkanShader
Definition: vulkan.h:192
FFVkSPIRVCompiler::compile_shader
int(* compile_shader)(FFVulkanContext *s, struct FFVkSPIRVCompiler *ctx, FFVulkanShader *shd, uint8_t **data, size_t *size, const char *entrypoint, void **opaque)
Definition: vulkan_spirv.h:28
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
FFVkSPIRVCompiler
Definition: vulkan_spirv.h:26
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
ff_vk_shader_link
int ff_vk_shader_link(FFVulkanContext *s, FFVulkanShader *shd, uint8_t *spirv, size_t spirv_len, const char *entrypoint)
Link a shader into an executable.
Definition: vulkan.c:2284
MODE_BFF
@ MODE_BFF
Definition: tinterlace.h:62
vulkan_spirv.h
AVFilterPad::name
const char * name
Pad name.
Definition: filters.h:44
AV_FRAME_FLAG_INTERLACED
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
Definition: frame.h:633
FFVkSPIRVCompiler::free_shader
void(* free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque)
Definition: vulkan_spirv.h:31
interlace_vulkan_uninit
static void interlace_vulkan_uninit(AVFilterContext *avctx)
Definition: vf_interlace_vulkan.c:241
FFVulkanContext::vkfn
FFVulkanFunctions vkfn
Definition: vulkan.h:280
FFVkExecPool
Definition: vulkan.h:254
pos
unsigned int pos
Definition: spdifenc.c:414
ff_vk_qf_find
AVVulkanDeviceQueueFamily * ff_vk_qf_find(FFVulkanContext *s, VkQueueFlagBits dev_family, VkVideoCodecOperationFlagBitsKHR vid_ops)
Chooses an appropriate QF.
Definition: vulkan.c:220
tinterlace.h
InterlaceVulkanContext::mode
int mode
Definition: vf_interlace_vulkan.c:38
GLSLF
#define GLSLF(N, S,...)
Definition: vulkan.h:54
OFFSET
#define OFFSET(x)
Definition: vf_interlace_vulkan.c:269
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
av_mul_q
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
Definition: rational.c:80
AVFilterContext
An instance of a filter.
Definition: avfilter.h:257
ff_vf_interlace_vulkan
const FFFilter ff_vf_interlace_vulkan
Definition: vf_interlace_vulkan.c:301
desc
const char * desc
Definition: libsvtav1.c:79
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
FFFilter::p
AVFilter p
The public AVFilter.
Definition: filters.h:269
VLPF_OFF
@ VLPF_OFF
Definition: tinterlace.h:43
FFVulkanContext::hwctx
AVVulkanDeviceContext * hwctx
Definition: vulkan.h:305
InterlaceVulkanContext::lowpass
int lowpass
Definition: vf_interlace_vulkan.c:39
AVVulkanDeviceContext::act_dev
VkDevice act_dev
Active device.
Definition: hwcontext_vulkan.h:84
ff_vk_init_sampler
int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler, int unnorm_coords, VkFilter filt)
Create a sampler.
Definition: vulkan.c:1399
MODE_TFF
@ MODE_TFF
Definition: tinterlace.h:61
lowpass_off
static const char lowpass_off[]
Definition: vf_interlace_vulkan.c:44
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVVulkanDeviceQueueFamily
Definition: hwcontext_vulkan.h:33
InterlaceVulkanContext::vkctx
FFVulkanContext vkctx
Definition: vf_interlace_vulkan.c:30
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
lowpass_lin
static const char lowpass_lin[]
Definition: vf_interlace_vulkan.c:51
FFVulkanFunctions
Definition: vulkan_functions.h:265