FFmpeg
Data Structures | Macros | Functions
ops_tmpl_float.c File Reference
#include "libavutil/avassert.h"
#include "ops_backend.h"
#include "ops_tmpl_common.c"

Go to the source code of this file.

Data Structures

struct  fn
 

Macros

#define BIT_DEPTH   32
 Copyright (C) 2025 Niklas Haas. More...
 
#define PIXEL_TYPE   SWS_PIXEL_F32
 
#define PIXEL_MAX   FLT_MAX
 
#define PIXEL_MIN   FLT_MIN
 
#define pixel_t   float
 
#define block_t   f32block_t
 
#define px   f32
 
#define IS_FLOAT   1
 
#define FMT_CHAR   f
 
#define WRAP_DITHER(N)
 
#define WRAP_LINEAR(NAME, MASK)
 

Functions

 DECL_SETUP (setup_dither)
 
 DECL_FUNC (dither, const int size_log2)
 
 DECL_SETUP (setup_linear)
 
 DECL_FUNC (linear_mask, const uint32_t mask)
 Fully general case for a 5x5 linear affine transformation. More...
 
static const SwsOpTable fn (op_table_float)
 

Macro Definition Documentation

◆ BIT_DEPTH

#define BIT_DEPTH   32

Copyright (C) 2025 Niklas Haas.

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 26 of file ops_tmpl_float.c.

◆ PIXEL_TYPE

#define PIXEL_TYPE   SWS_PIXEL_F32

Definition at line 30 of file ops_tmpl_float.c.

◆ PIXEL_MAX

#define PIXEL_MAX   FLT_MAX

Definition at line 31 of file ops_tmpl_float.c.

◆ PIXEL_MIN

#define PIXEL_MIN   FLT_MIN

Definition at line 32 of file ops_tmpl_float.c.

◆ pixel_t

#define pixel_t   float

Definition at line 33 of file ops_tmpl_float.c.

◆ block_t

#define block_t   f32block_t

Definition at line 34 of file ops_tmpl_float.c.

◆ px

#define px   f32

Definition at line 35 of file ops_tmpl_float.c.

◆ IS_FLOAT

#define IS_FLOAT   1

Definition at line 40 of file ops_tmpl_float.c.

◆ FMT_CHAR

#define FMT_CHAR   f

Definition at line 41 of file ops_tmpl_float.c.

◆ WRAP_DITHER

#define WRAP_DITHER (   N)
Value:
{ \
CALL(dither, N); \
} \
.dither_size = N, \
.setup = fn(setup_dither), \
.free = av_free, \
);

Definition at line 93 of file ops_tmpl_float.c.

◆ WRAP_LINEAR

#define WRAP_LINEAR (   NAME,
  MASK 
)
Value:
DECL_IMPL(linear_##NAME) \
{ \
CALL(linear_mask, MASK); \
} \
DECL_ENTRY(linear_##NAME, \
.setup = fn(setup_linear), \
.free = av_free, \
.linear_mask = (MASK), \
);

Definition at line 180 of file ops_tmpl_float.c.

Function Documentation

◆ DECL_SETUP() [1/2]

DECL_SETUP ( setup_dither  )

Definition at line 44 of file ops_tmpl_float.c.

◆ DECL_FUNC() [1/2]

DECL_FUNC ( dither  ,
const int  size_log2 
)

Definition at line 69 of file ops_tmpl_float.c.

◆ DECL_SETUP() [2/2]

DECL_SETUP ( setup_linear  )

Definition at line 122 of file ops_tmpl_float.c.

◆ DECL_FUNC() [2/2]

DECL_FUNC ( linear_mask  ,
const uint32_t  mask 
)

Fully general case for a 5x5 linear affine transformation.

Should never be called without constant mask. This function will compile down to the appropriately optimized version for the required subset of operations when called with a constant mask.

Definition at line 141 of file ops_tmpl_float.c.

◆ fn()

static const SwsOpTable fn ( op_table_float  )
static

Referenced by DECL_FUNC(), and DECL_SETUP().

setup_linear
static int setup_linear(const SwsOp *op, SwsOpPriv *out)
Definition: ops.c:213
SWS_OP_DITHER
@ SWS_OP_DITHER
Definition: ops.h:60
setup_dither
static int setup_dither(const SwsOp *op, SwsOpPriv *out)
Definition: ops.c:189
op
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Definition: anm.c:76
SWS_OP_LINEAR
@ SWS_OP_LINEAR
Definition: ops.h:63
DECL_ENTRY
#define DECL_ENTRY(NAME,...)
Definition: ops_backend.h:137
DECL_IMPL
#define DECL_IMPL(NAME)
Definition: ops_backend.h:109
MASK
#define MASK
Definition: median_template.c:42
N
#define N
Definition: af_mcompand.c:54
fn
static const SwsOpTable fn(op_table_float)
av_free
#define av_free(p)
Definition: tableprint_vlc.h:34
dither
static const uint8_t dither[8][8]
Definition: vf_fspp.c:62