FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
ops_dispatch.h File Reference
#include <assert.h>
#include "libavutil/frame.h"
#include "graph.h"

Go to the source code of this file.

Data Structures

struct  SwsOpExec
 Copyright (C) 2026 Niklas Haas. More...
 
struct  SwsCompiledOp
 
struct  SwsOpBackend
 

Macros

#define SWS_DECL_FUNC(NAME)   void NAME(const SwsOpExec *, const void *, int, int, int, int)
 

Typedefs

typedef void(* SwsOpFunc) (const SwsOpExec *exec, const void *priv, int bx_start, int y_start, int bx_end, int y_end)
 Process a given range of pixel blocks. More...
 

Functions

void ff_sws_compiled_op_unref (SwsCompiledOp *comp)
 
int ff_sws_ops_compile (SwsContext *ctx, const SwsOpBackend *backend, const SwsOpList *ops, SwsCompiledOp *out)
 Attempt to compile a list of operations using a specific backend, or the best available backend if backend is NULL. More...
 
int ff_sws_compile_pass (SwsGraph *graph, const SwsOpBackend *backend, SwsOpList **ops, int flags, SwsPass *input, SwsPass **output)
 Resolves an operation list to a graph pass. More...
 

Variables

const SwsOpBackend *const ff_sws_op_backends []
 

Macro Definition Documentation

◆ SWS_DECL_FUNC

#define SWS_DECL_FUNC (   NAME)    void NAME(const SwsOpExec *, const void *, int, int, int, int)

Definition at line 97 of file ops_dispatch.h.

Typedef Documentation

◆ SwsOpFunc

typedef void(* SwsOpFunc) (const SwsOpExec *exec, const void *priv, int bx_start, int y_start, int bx_end, int y_end)

Process a given range of pixel blocks.

Note: bx_start and bx_end are in units of SwsCompiledOp.block_size.

Definition at line 94 of file ops_dispatch.h.

Function Documentation

◆ ff_sws_compiled_op_unref()

void ff_sws_compiled_op_unref ( SwsCompiledOp comp)

Definition at line 113 of file ops_dispatch.c.

Referenced by check_ops(), and op_pass_free().

◆ ff_sws_ops_compile()

int ff_sws_ops_compile ( SwsContext ctx,
const SwsOpBackend backend,
const SwsOpList ops,
SwsCompiledOp out 
)

Attempt to compile a list of operations using a specific backend, or the best available backend if backend is NULL.

Returns 0 on success, or a negative error code on failure.

Definition at line 93 of file ops_dispatch.c.

Referenced by check_ops(), and compile().

◆ ff_sws_compile_pass()

int ff_sws_compile_pass ( SwsGraph graph,
const SwsOpBackend backend,
SwsOpList **  ops,
int  flags,
SwsPass input,
SwsPass **  output 
)

Resolves an operation list to a graph pass.

The first and last operations must be a read/write respectively.

Parameters
backendForce the use of a specific backend (Optional)
opsOperations to compile. Ownership passes to this function, and will be set to NULL, even on failure.
flagsSet of SwsOpCompileFlags
inputThe input for the compiled passes. (Optional)
outputThe resulting final output pass will be stored here. If NULL, no output passes are created, and any compiled functions are instead immediately freed.

Definition at line 585 of file ops_dispatch.c.

Variable Documentation

◆ ff_sws_op_backends

const SwsOpBackend* const ff_sws_op_backends[]

Definition at line 45 of file ops.c.

Referenced by check_ops(), and ff_sws_ops_compile().