FFmpeg
Data Structures | Macros | Typedefs | Functions
ops_chain.h File Reference
#include "libavutil/cpu.h"
#include "ops_internal.h"

Go to the source code of this file.

Data Structures

union  SwsOpPriv
 Copyright (C) 2025 Niklas Haas. More...
 
struct  SwsOpImpl
 
struct  SwsOpChain
 Compiled "chain" of operations, which can be dispatched efficiently. More...
 
struct  SwsOpEntry
 
struct  SwsOpTable
 

Macros

#define SWS_MAX_OPS   16
 

Typedefs

typedef void(* SwsFuncPtr) (void)
 Per-kernel execution context. More...
 

Functions

int ff_sws_setup_u (const SwsOp *op, SwsOpPriv *out)
 
int ff_sws_setup_u8 (const SwsOp *op, SwsOpPriv *out)
 
int ff_sws_setup_q (const SwsOp *op, SwsOpPriv *out)
 
int ff_sws_setup_q4 (const SwsOp *op, SwsOpPriv *out)
 
SwsOpChainff_sws_op_chain_alloc (void)
 
void ff_sws_op_chain_free (SwsOpChain *chain)
 
int ff_sws_op_chain_append (SwsOpChain *chain, SwsFuncPtr func, void(*free)(void *), const SwsOpPriv *priv)
 
int ff_sws_op_compile_tables (const SwsOpTable *const tables[], int num_tables, SwsOpList *ops, const int block_size, SwsOpChain *chain)
 "Compile" a single op by looking it up in a list of fixed size op tables. More...
 

Macro Definition Documentation

◆ SWS_MAX_OPS

#define SWS_MAX_OPS   16

Definition at line 81 of file ops_chain.h.

Typedef Documentation

◆ SwsFuncPtr

typedef void(* SwsFuncPtr) (void)

Per-kernel execution context.

Note: This struct is hard-coded in assembly, so do not change the layout.

Definition at line 66 of file ops_chain.h.

Function Documentation

◆ ff_sws_setup_u()

int ff_sws_setup_u ( const SwsOp op,
SwsOpPriv out 
)

Definition at line 254 of file ops_chain.c.

◆ ff_sws_setup_u8()

int ff_sws_setup_u8 ( const SwsOp op,
SwsOpPriv out 
)

Definition at line 248 of file ops_chain.c.

◆ ff_sws_setup_q()

int ff_sws_setup_q ( const SwsOp op,
SwsOpPriv out 
)

Definition at line 265 of file ops_chain.c.

◆ ff_sws_setup_q4()

int ff_sws_setup_q4 ( const SwsOp op,
SwsOpPriv out 
)

Definition at line 278 of file ops_chain.c.

Referenced by normalize_clear().

◆ ff_sws_op_chain_alloc()

SwsOpChain* ff_sws_op_chain_alloc ( void  )

Definition at line 29 of file ops_chain.c.

Referenced by compile().

◆ ff_sws_op_chain_free()

void ff_sws_op_chain_free ( SwsOpChain chain)

Definition at line 34 of file ops_chain.c.

Referenced by compile().

◆ ff_sws_op_chain_append()

int ff_sws_op_chain_append ( SwsOpChain chain,
SwsFuncPtr  func,
void(*)(void *)  free,
const SwsOpPriv priv 
)

Definition at line 47 of file ops_chain.c.

Referenced by ff_sws_op_compile_tables().

◆ ff_sws_op_compile_tables()

int ff_sws_op_compile_tables ( const SwsOpTable *const  tables[],
int  num_tables,
SwsOpList ops,
const int  block_size,
SwsOpChain chain 
)

"Compile" a single op by looking it up in a list of fixed size op tables.

See op_match in ops.c for details on how the matching works.

Returns 0, AVERROR(EAGAIN), or a negative error code.

Definition at line 195 of file ops_chain.c.

Referenced by compile().