|
FFmpeg
|
#include "libavutil/mem.h"#include "libavutil/refstruct.h"#include "../graph.h"#include "../ops_internal.h"#include "../swscale_internal.h"#include "../uops.h"#include "ops.h"#include "spvasm.h"Go to the source code of this file.
Data Structures | |
| struct | VulkanPriv |
| struct | SPIRVIDs |
Macros | |
| #define | MAX_DITHER_BUFS 4 |
| #define | MAX_FILT_BUFS 4 |
| #define | MAX_DATA_BUFS (MAX_DITHER_BUFS + MAX_FILT_BUFS*4) |
Functions | |
| static void | vk_ops_ctx_uninit (AVRefStructOpaque opaque, void *obj) |
| Copyright (C) 2026 Lynne. | |
| int | ff_sws_vk_init (SwsContext *sws, AVBufferRef *dev_ref) |
| AVBufferRef * | ff_sws_vk_device_ref (SwsContext *sws) |
Returns the Vulkan device reference associated with sws, or NULL if Vulkan has not been initialized for this context. | |
| static void | spirv_process (const SwsFrame *dst, const SwsFrame *src, int y, int h, const SwsPass *pass) |
| static void | spirv_free (void *priv) |
| static int | create_filter_buf (FFVulkanOpsCtx *s, const SwsFilterWeights *wd, FFVkBuffer *buf) |
| static int | create_dither_buf (FFVulkanOpsCtx *s, const SwsUOp *uop, FFVkBuffer *buf) |
| static int | type_scalar (const SPIRVIDs *id, SwsPixelType type) |
| static int | type_vec4 (const SPIRVIDs *id, SwsPixelType type) |
| static int | const_zero (const SPIRVIDs *id, SwsPixelType type) |
| static int | const_pixel (SPICtx *spi, const SPIRVIDs *id, SwsPixelType type, SwsPixel px) |
| static int | const_splat (SPICtx *spi, const SPIRVIDs *id, SwsPixelType type, SwsPixel px) |
| static void | define_pack_consts (SPICtx *spi, const SPIRVIDs *id, const SwsUOp *uop, int *shift_id, int *mask_id) |
| static int | emit_add (SPICtx *spi, SwsPixelType type, int res_type, int a, int b) |
| static int | emit_mul (SPICtx *spi, SwsPixelType type, int res_type, int a, int b) |
| static int | emit_min (SPICtx *spi, const SPIRVIDs *id, SwsPixelType type, int res_type, int a, int b) |
| static int | emit_max (SPICtx *spi, const SPIRVIDs *id, SwsPixelType type, int res_type, int a, int b) |
| static int | emit_convert (SPICtx *spi, SwsPixelType from, SwsPixelType to, int res_type, int a) |
| static void | define_shader_header (SPICtx *spi, SPIRVIDs *id) |
| static void | define_shader_consts (SPICtx *spi, SPIRVIDs *id) |
| static void | define_shader_bindings (const SwsOpList *ops, SPICtx *spi, SPIRVIDs *id, int in_img_count, int out_img_count) |
| static void | define_entry_point (FFVulkanShader *shd, SPICtx *spi, SPIRVIDs *id) |
| static int | insert_vmat_linear (const SwsUOp *uop, SPICtx *spi, SPIRVIDs *id, int data) |
| static int | insert_bitexact_linear (const SwsUOp *uop, SPICtx *spi, SPIRVIDs *id, int data) |
| static int | add_buf_binding (SPIRVIDs *id) |
| static int | emit_read_filtered (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static VkFormat | packed_word_fmt (const SwsOp *op) |
| static int | get_view_fmts (VkFormat view_fmts[AV_NUM_DATA_POINTERS], enum AVPixelFormat fmt, const SwsOp *op) |
| static int | rw_op_img_count (const SwsOp *op, const uint8_t *planes) |
| static int | emit_read (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_write (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_clamp (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_dither (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_linear (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_pack (SPICtx *spi, SPIRVIDs *id, const SwsUOp *uop, int *data) |
| static int | emit_shader (SwsContext *sws, VulkanPriv *p, FFVulkanOpsCtx *s, const SwsOpList *ops, const SwsUOpList *uops, FFVulkanShader *shd, SPICtx *spi) |
| static int | add_ops_spirv (SwsContext *sws, VulkanPriv *p, FFVulkanOpsCtx *s, const SwsOpList *ops, const SwsUOpList *uops, FFVulkanShader *shd) |
| static int | compile_ops_spirv (SwsContext *sws, const SwsOpList *ops, SwsCompiledOp *out) |
Variables | |
| const SwsOpBackend | backend_spirv |
| #define MAX_DATA_BUFS (MAX_DITHER_BUFS + MAX_FILT_BUFS*4) |
Definition at line 82 of file ops.c.
Referenced by emit_dither(), and emit_read_filtered().
|
static |
Copyright (C) 2026 Lynne.
This file is part of FFmpeg.
FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 33 of file ops.c.
Referenced by ff_sws_vk_init().
| int ff_sws_vk_init | ( | SwsContext * | sws, |
| AVBufferRef * | dev_ref ) |
Definition at line 40 of file ops.c.
Referenced by sws_frame_setup().
| AVBufferRef * ff_sws_vk_device_ref | ( | SwsContext * | sws | ) |
Returns the Vulkan device reference associated with sws, or NULL if Vulkan has not been initialized for this context.
Definition at line 73 of file ops.c.
Referenced by pass_alloc_output().
|
static |
Definition at line 95 of file ops.c.
Referenced by compile_ops_spirv().
|
static |
Definition at line 182 of file ops.c.
Referenced by compile_ops_spirv().
|
static |
Definition at line 193 of file ops.c.
Referenced by emit_read_filtered().
|
static |
Definition at line 228 of file ops.c.
Referenced by emit_dither().
|
static |
Definition at line 331 of file ops.c.
Referenced by define_shader_bindings(), emit_clamp(), emit_pack(), emit_read(), emit_read_filtered(), emit_write(), and insert_bitexact_linear().
|
static |
Definition at line 337 of file ops.c.
Referenced by const_splat(), emit_clamp(), emit_pack(), emit_read(), emit_read_filtered(), emit_shader(), emit_write(), and insert_bitexact_linear().
|
static |
Definition at line 343 of file ops.c.
Referenced by emit_read(), emit_shader(), and insert_bitexact_linear().
|
static |
Definition at line 349 of file ops.c.
Referenced by const_splat(), emit_clamp(), emit_shader(), insert_bitexact_linear(), and insert_vmat_linear().
|
static |
Definition at line 364 of file ops.c.
Referenced by emit_shader(), and insert_bitexact_linear().
|
static |
Definition at line 372 of file ops.c.
Referenced by emit_pack(), and emit_shader().
|
static |
Definition at line 389 of file ops.c.
Referenced by emit_shader(), and insert_bitexact_linear().
|
static |
Definition at line 395 of file ops.c.
Referenced by emit_shader(), and insert_bitexact_linear().
|
static |
Definition at line 401 of file ops.c.
Referenced by emit_clamp().
|
static |
Definition at line 408 of file ops.c.
Referenced by emit_clamp().
|
static |
Definition at line 416 of file ops.c.
Referenced by emit_read_filtered(), and emit_shader().
Definition at line 426 of file ops.c.
Referenced by emit_shader().
Definition at line 442 of file ops.c.
Referenced by emit_shader().
|
static |
Definition at line 472 of file ops.c.
Referenced by emit_shader().
|
static |
Definition at line 559 of file ops.c.
Referenced by emit_shader().
Definition at line 567 of file ops.c.
Referenced by emit_linear().
|
static |
Definition at line 590 of file ops.c.
Referenced by emit_linear().
|
static |
Definition at line 646 of file ops.c.
Referenced by emit_dither(), and emit_read_filtered().
|
static |
Definition at line 656 of file ops.c.
Referenced by emit_read().
Definition at line 765 of file ops.c.
Referenced by get_view_fmts().
|
static |
Definition at line 778 of file ops.c.
Referenced by emit_shader().
|
static |
Definition at line 802 of file ops.c.
Referenced by emit_shader().
Definition at line 811 of file ops.c.
Referenced by emit_shader().
Definition at line 849 of file ops.c.
Referenced by emit_shader().
Definition at line 877 of file ops.c.
Referenced by emit_shader().
Definition at line 898 of file ops.c.
Referenced by emit_shader().
Definition at line 961 of file ops.c.
Referenced by emit_shader().
Definition at line 971 of file ops.c.
Referenced by emit_shader().
|
static |
Definition at line 989 of file ops.c.
Referenced by add_ops_spirv().
|
static |
Definition at line 1244 of file ops.c.
Referenced by compile_ops_spirv().
|
static |
| const SwsOpBackend backend_spirv |