1 /**
2 * Copyright (C) 2025 Niklas Haas
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
22
23 #if AV_GCC_VERSION_AT_LEAST(4, 4)
24 #pragma GCC optimize ("finite-math-only")
25 #endif
26
27 /* Array-based reference implementation */
28
29 #ifndef SWS_BLOCK_SIZE
30 # define SWS_BLOCK_SIZE 32
31 #endif
32
37
38 #define BIT_DEPTH 8
40 #undef BIT_DEPTH
41
42 #define BIT_DEPTH 16
44 #undef BIT_DEPTH
45
49 #undef BIT_DEPTH
50
52 const int bx_start, const int y_start, int bx_end, int y_end)
53 {
57
58 for (iter.
y = y_start; iter.
y < y_end; iter.
y++) {
59 for (
int i = 0;
i < 4;
i++) {
62 }
63
67 (&iter, &impl[1]);
68 }
69 }
70 }
71
73 {
75
77 if (!chain)
79
81 &
bitfn(op_table_int, u8),
82 &
bitfn(op_table_int, u16),
83 &
bitfn(op_table_int, u32),
84 &
bitfn(op_table_float, f32),
85 };
86
87 do {
94 }
95
100 .priv = chain,
102 };
103 return 0;
104 }
105
109 };