FFmpeg
Loading...
Searching...
No Matches
ops_memcpy.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "ops_internal.h"

Go to the source code of this file.

Data Structures

struct  MemcpyPriv
 Copyright (C) 2025 Niklas Haas. More...
 

Macros

#define SWS_MAX_PADDING   64
 Switch to loop if total padding exceeds this number of bytes.
 

Functions

static void process (const SwsOpExec *exec, const void *priv, int x_start, int y_start, int x_end, int y_end)
 
static int compile (SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
 

Variables

const SwsOpBackend backend_murder
 

Macro Definition Documentation

◆ SWS_MAX_PADDING

#define SWS_MAX_PADDING   64

Switch to loop if total padding exceeds this number of bytes.

Chosen to align with the typical L1 cache size of modern CPUs, as this avoids the risk of the implementation loading one extra unnecessary cache line.

Definition at line 37 of file ops_memcpy.c.

Referenced by process().

Function Documentation

◆ process()

static void process ( const SwsOpExec * exec,
const void * priv,
int x_start,
int y_start,
int x_end,
int y_end )
static

Definition at line 41 of file ops_memcpy.c.

◆ compile()

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

Definition at line 76 of file ops_memcpy.c.

Variable Documentation

◆ backend_murder

const SwsOpBackend backend_murder
Initial value:
= {
.name = "memcpy",
.compile = compile,
.hw_format = AV_PIX_FMT_NONE,
}
@ SWS_BACKEND_MEMCPY
Fast path using libc memcpy() / memset()
Definition swscale.h:117
static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
Definition ops_memcpy.c:76
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72

Definition at line 147 of file ops_memcpy.c.