FFmpeg
Macros | Functions
ops_tmpl_common.c File Reference
#include "ops_backend.h"

Go to the source code of this file.

Macros

#define WRAP_CONVERT_UINT(N)
 Copyright (C) 2025 Niklas Haas. More...
 
#define WRAP_CLEAR(X, Y, Z, W)
 

Functions

 DECL_PATTERN (clear)
 
 WRAP_CLEAR (WRAP_CLEAR(1, WRAP_CLEAR(1, WRAP_CLEAR(1, WRAP_CLEAR(0)
 
 DECL_PATTERN (max)
 
 WRAP_COMMON_PATTERNS (min,.op=SWS_OP_MIN,.setup=ff_sws_setup_q4,.flexible=true,)
 
 WRAP_COMMON_PATTERNS (max,.op=SWS_OP_MAX,.setup=ff_sws_setup_q4,.flexible=true,)
 
 DECL_PATTERN (scale)
 
 WRAP_COMMON_PATTERNS (scale,.op=SWS_OP_SCALE,.setup=ff_sws_setup_q,.flexible=true,)
 

Macro Definition Documentation

◆ WRAP_CONVERT_UINT

#define WRAP_CONVERT_UINT (   N)
Value:
DECL_PATTERN(convert_uint##N) \
{ \
u##N##block_t xu, yu, zu, wu; \
for (int i = 0; i < SWS_BLOCK_SIZE; i++) { \
if (X) \
xu[i] = x[i]; \
if (Y) \
yu[i] = y[i]; \
if (Z) \
zu[i] = z[i]; \
if (W) \
wu[i] = w[i]; \
} \
CONTINUE(u##N##block_t, xu, yu, zu, wu); \
} \
WRAP_COMMON_PATTERNS(convert_uint##N, \
.convert.to = SWS_PIXEL_U##N, \
);

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 27 of file ops_tmpl_common.c.

◆ WRAP_CLEAR

#define WRAP_CLEAR (   X,
  Y,
  Z,
  W 
)
Value:
DECL_IMPL(clear##_##X##Y##Z##W) \
{ \
CALL(clear, X, Y, Z, W); \
} \
DECL_ENTRY(clear##_##X##Y##Z##W, \
.setup = ff_sws_setup_q4, \
.flexible = true, \
.unused = { !X, !Y, !Z, !W }, \
);

Definition at line 81 of file ops_tmpl_common.c.

Function Documentation

◆ DECL_PATTERN() [1/3]

DECL_PATTERN ( clear  )

Definition at line 64 of file ops_tmpl_common.c.

◆ WRAP_CLEAR()

WRAP_CLEAR ( WRAP_CLEAR(  1,
WRAP_CLEAR(  1,
WRAP_CLEAR(  1,
WRAP_CLEAR(  0 
)

Definition at line 94 of file ops_tmpl_common.c.

◆ DECL_PATTERN() [2/3]

DECL_PATTERN ( max  )

Definition at line 124 of file ops_tmpl_common.c.

◆ WRAP_COMMON_PATTERNS() [1/3]

WRAP_COMMON_PATTERNS ( min  ,
op = SWS_OP_MIN,
setup = ff_sws_setup_q4,
flexible = true 
)

◆ WRAP_COMMON_PATTERNS() [2/3]

WRAP_COMMON_PATTERNS ( max  ,
op = SWS_OP_MAX,
setup = ff_sws_setup_q4,
flexible = true 
)

◆ DECL_PATTERN() [3/3]

DECL_PATTERN ( scale  )

Definition at line 153 of file ops_tmpl_common.c.

◆ WRAP_COMMON_PATTERNS() [3/3]

WRAP_COMMON_PATTERNS ( scale  ,
op = SWS_OP_SCALE,
setup = ff_sws_setup_q,
flexible = true 
)
W
@ W
Definition: vf_addroi.c:27
SWS_OP_CLEAR
@ SWS_OP_CLEAR
Definition: ops.h:55
block_t
#define block_t
Definition: ops_tmpl_float.c:34
w
uint8_t w
Definition: llviddspenc.c:38
u
#define u(width, name, range_min, range_max)
Definition: cbs_apv.c:68
convert
static void convert(float y, float u, float v, float *b, float *g, float *r)
Definition: exr.c:968
DECL_PATTERN
DECL_PATTERN(clear)
Definition: ops_tmpl_common.c:64
xu
#define xu(width, name, var, range_min, range_max, subs,...)
Definition: cbs_apv.c:120
WRAP_COMMON_PATTERNS
WRAP_COMMON_PATTERNS(min,.op=SWS_OP_MIN,.setup=ff_sws_setup_q4,.flexible=true,)
CONTINUE
#define CONTINUE(TYPE,...)
Definition: ops_backend.h:120
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
DECL_ENTRY
#define DECL_ENTRY(NAME,...)
Definition: ops_backend.h:137
SWS_BLOCK_SIZE
#define SWS_BLOCK_SIZE
Copyright (C) 2025 Niklas Haas.
Definition: ops_backend.c:30
DECL_IMPL
#define DECL_IMPL(NAME)
Definition: ops_backend.h:109
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:424
X
@ X
Definition: vf_addroi.c:27
N
#define N
Definition: af_mcompand.c:54
Y
#define Y
Definition: boxblur.h:37
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
ff_sws_setup_q4
int ff_sws_setup_q4(const SwsOp *op, SwsOpPriv *out)
Definition: ops_chain.c:279
_
#define _
SWS_OP_CONVERT
@ SWS_OP_CONVERT
Definition: ops.h:59