FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | SwsOpExec |
Global execution context for all compiled functions. More... | |
struct | SwsCompiledOp |
struct | SwsOpBackend |
Macros | |
#define | Q(N) ((AVRational) { N, 1 }) |
Copyright (C) 2025 Niklas Haas. More... | |
#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 | |
static AVRational | ff_sws_pixel_expand (SwsPixelType from, SwsPixelType to) |
static void | ff_sws_pack_op_decode (const SwsOp *op, uint64_t mask[4], int shift[4]) |
int | ff_sws_ops_compile_backend (SwsContext *ctx, const SwsOpBackend *backend, const SwsOpList *ops, SwsCompiledOp *out) |
Attempt to compile a list of operations using a specific backend. More... | |
int | ff_sws_ops_compile (SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) |
Compile a list of operations using the best available backend. More... | |
int | ff_sws_solve_shuffle (const SwsOpList *ops, uint8_t shuffle[], int size, uint8_t clear_val, int *read_bytes, int *write_bytes) |
"Solve" an op list into a fixed shuffle mask, with an optional ability to also directly clear the output value (for e.g. More... | |
Variables | |
const SwsOpBackend *const | ff_sws_op_backends [] |
#define Q | ( | N | ) | ((AVRational) { N, 1 }) |
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 28 of file ops_internal.h.
#define SWS_DECL_FUNC | ( | NAME | ) | void NAME(const SwsOpExec *, const void *, int, int, int, int) |
Definition at line 87 of file ops_internal.h.
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 84 of file ops_internal.h.
|
inlinestatic |
Definition at line 30 of file ops_internal.h.
Referenced by ff_sws_apply_op_q(), and ff_sws_op_list_optimize().
|
inlinestatic |
Definition at line 40 of file ops_internal.h.
Referenced by ff_sws_apply_op_q().
int ff_sws_ops_compile_backend | ( | SwsContext * | ctx, |
const SwsOpBackend * | backend, | ||
const SwsOpList * | ops, | ||
SwsCompiledOp * | out | ||
) |
Attempt to compile a list of operations using a specific backend.
Returns 0 on success, or a negative error code on failure.
Referenced by check_ops().
int ff_sws_ops_compile | ( | SwsContext * | ctx, |
const SwsOpList * | ops, | ||
SwsCompiledOp * | out | ||
) |
Compile a list of operations using the best available backend.
Returns 0 on success, or a negative error code on failure.
int ff_sws_solve_shuffle | ( | const SwsOpList * | ops, |
uint8_t | shuffle[], | ||
int | size, | ||
uint8_t | clear_val, | ||
int * | read_bytes, | ||
int * | write_bytes | ||
) |
"Solve" an op list into a fixed shuffle mask, with an optional ability to also directly clear the output value (for e.g.
rgb24 -> rgb0). This can accept any operation chain that only consists of the following operations:
Basically, any operation that purely consists of moving around and reordering bytes within a single plane, can be turned into a shuffle mask.
ops | The operation list to decompose. |
shuffle | The output shuffle mask. |
size | The size (in bytes) of the output shuffle mask. |
clear_val | If nonzero, this index will be used to clear the output. |
read_bytes | Returns the number of bytes read per shuffle iteration. |
write_bytes | Returns the number of bytes written per shuffle iteration. |
Definition at line 774 of file ops_optimizer.c.
Referenced by solve_shuffle().
const SwsOpBackend* const ff_sws_op_backends[] |
Definition at line 34 of file ops.c.
Referenced by check_ops().