FFmpeg
Data Structures | Macros | Functions
ops.c File Reference
#include "libavutil/mem.h"
#include "libavutil/refstruct.h"
#include "../graph.h"
#include "../ops_internal.h"
#include "../swscale_internal.h"
#include "ops.h"

Go to the source code of this file.

Data Structures

struct  VulkanPriv
 

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 ff_sws_vk_uninit (AVRefStructOpaque opaque, void *obj)
 Copyright (C) 2026 Lynne. More...
 
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. More...
 
static void process (const SwsFrame *dst, const SwsFrame *src, int y, int h, const SwsPass *pass)
 
static void free_fn (void *priv)
 
static int create_filter_buf (FFVulkanOpsCtx *s, VulkanPriv *p, const SwsFilterWeights *wd, FFVkBuffer *buf)
 
static int create_dither_buf (FFVulkanOpsCtx *s, VulkanPriv *p, const SwsDitherOp *dd, FFVkBuffer *buf)
 
static int create_bufs (FFVulkanOpsCtx *s, VulkanPriv *p, const SwsOpList *ops)
 
static int compile (SwsContext *sws, const SwsOpList *ops, SwsCompiledOp *out)
 

Macro Definition Documentation

◆ MAX_DITHER_BUFS

#define MAX_DITHER_BUFS   4

Definition at line 81 of file ops.c.

◆ MAX_FILT_BUFS

#define MAX_FILT_BUFS   4

Definition at line 82 of file ops.c.

◆ MAX_DATA_BUFS

#define MAX_DATA_BUFS   (MAX_DITHER_BUFS + MAX_FILT_BUFS*4)

Definition at line 83 of file ops.c.

Function Documentation

◆ ff_sws_vk_uninit()

static void ff_sws_vk_uninit ( AVRefStructOpaque  opaque,
void *  obj 
)
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 34 of file ops.c.

Referenced by ff_sws_vk_init().

◆ ff_sws_vk_init()

int ff_sws_vk_init ( SwsContext *  sws,
AVBufferRef *  dev_ref 
)

Definition at line 41 of file ops.c.

Referenced by sws_frame_setup().

◆ ff_sws_vk_device_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.

Definition at line 74 of file ops.c.

Referenced by pass_alloc_output().

◆ process()

static void process ( const SwsFrame *  dst,
const SwsFrame *  src,
int  y,
int  h,
const SwsPass *  pass 
)
static

Definition at line 96 of file ops.c.

Referenced by compile().

◆ free_fn()

static void free_fn ( void *  priv)
static

Definition at line 161 of file ops.c.

Referenced by compile().

◆ create_filter_buf()

static int create_filter_buf ( FFVulkanOpsCtx *  s,
VulkanPriv *  p,
const SwsFilterWeights *  wd,
FFVkBuffer *  buf 
)
static

Definition at line 172 of file ops.c.

Referenced by create_bufs().

◆ create_dither_buf()

static int create_dither_buf ( FFVulkanOpsCtx *  s,
VulkanPriv *  p,
const SwsDitherOp *  dd,
FFVkBuffer *  buf 
)
static

Definition at line 207 of file ops.c.

Referenced by create_bufs().

◆ create_bufs()

static int create_bufs ( FFVulkanOpsCtx *  s,
VulkanPriv *  p,
const SwsOpList *  ops 
)
static

Definition at line 242 of file ops.c.

◆ compile()

static int compile ( SwsContext *  sws,
const SwsOpList *  ops,
SwsCompiledOp *  out 
)
static

Definition at line 1290 of file ops.c.