OpenJPH: /build/openjph/src/OpenJPH/src/core/codestream/ojph_codeblock_fun.cpp Source File

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph_codeblock_fun.cpp
Go to the documentation of this file.
1//***************************************************************************/
2// This software is released under the 2-Clause BSD license, included
3// below.
4//
5// Copyright (c) 2019, Aous Naman
6// Copyright (c) 2019, Kakadu Software Pty Ltd, Australia
7// Copyright (c) 2019, The University of New South Wales, Australia
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12//
13// 1. Redistributions of source code must retain the above copyright
14// notice, this list of conditions and the following disclaimer.
15//
16// 2. Redistributions in binary form must reproduce the above copyright
17// notice, this list of conditions and the following disclaimer in the
18// documentation and/or other materials provided with the distribution.
19//
20// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31//***************************************************************************/
32// This file is part of the OpenJPH software implementation.
33// File: ojph_codeblock_fun.cpp
34// Author: Aous Naman
35// Date: 28 August 2019
36//***************************************************************************/
37
38
39#include <climits>
40#include <cmath>
41
42#include "ojph_file.h"
43#include "ojph_mem.h"
44#include "ojph_params.h"
45#include "ojph_codestream.h"
46#include "ojph_codestream_local.h"
47#include "ojph_codeblock_fun.h"
48
49#include "../transform/ojph_colour.h"
50#include "../transform/ojph_transform.h"
51#include "../coding/ojph_block_decoder.h"
52#include "../coding/ojph_block_encoder.h"
53
54namespace ojph {
55
56 namespace local
57 {
58
60 void gen_mem_clear(void* addr, size_t count);
61 void sse_mem_clear(void* addr, size_t count);
62 void avx_mem_clear(void* addr, size_t count);
63 void wasm_mem_clear(void* addr, size_t count);
64 void vsx_mem_clear(void* addr, size_t count);
65
67 ui32 gen_find_max_val32(ui32* address);
68 ui32 sse2_find_max_val32(ui32* address);
69 ui32 avx2_find_max_val32(ui32* address);
70 ui32 wasm_find_max_val32(ui32* address);
71 ui32 vsx_find_max_val32(ui32* address);
72 ui64 gen_find_max_val64(ui64* address);
73 ui64 sse2_find_max_val64(ui64* address);
74 ui64 avx2_find_max_val64(ui64* address);
75 ui64 wasm_find_max_val64(ui64* address);
76 ui64 vsx_find_max_val64(ui64* address);
77
78
80 void gen_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
81 float delta_inv, ui32 count, ui32* max_val);
82 void sse2_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
83 float delta_inv, ui32 count, ui32* max_val);
84 void avx2_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
85 float delta_inv, ui32 count, ui32* max_val);
86 void gen_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
87 float delta_inv, ui32 count, ui32* max_val);
88 void sse2_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
89 float delta_inv, ui32 count, ui32* max_val);
90 void avx2_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
91 float delta_inv, ui32 count, ui32* max_val);
92 void wasm_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
93 float delta_inv, ui32 count, ui32* max_val);
94 void vsx_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
95 float delta_inv, ui32 count, ui32* max_val);
96 void wasm_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
97 float delta_inv, ui32 count, ui32* max_val);
98 void vsx_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max,
99 float delta_inv, ui32 count, ui32* max_val);
100
101 void gen_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max,
102 float delta_inv, ui32 count, ui64* max_val);
103 void sse2_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max,
104 float delta_inv, ui32 count, ui64* max_val);
105 void avx2_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max,
106 float delta_inv, ui32 count, ui64* max_val);
107 void wasm_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max,
108 float delta_inv, ui32 count, ui64* max_val);
109 void vsx_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max,
110 float delta_inv, ui32 count, ui64* max_val);
111
113 void gen_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
114 float delta, ui32 count);
115 void sse2_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
116 float delta, ui32 count);
117 void avx2_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
118 float delta, ui32 count);
119 void gen_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
120 float delta, ui32 count);
121 void sse2_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
122 float delta, ui32 count);
123 void avx2_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
124 float delta, ui32 count);
125 void wasm_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
126 float delta, ui32 count);
127 void vsx_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
128 float delta, ui32 count);
129 void wasm_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
130 float delta, ui32 count);
131 void vsx_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max,
132 float delta, ui32 count);
133
134 void gen_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
135 float delta, ui32 count);
136 void sse2_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
137 float delta, ui32 count);
138 void avx2_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
139 float delta, ui32 count);
140 void gen_irv_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
141 float delta, ui32 count);
142 void wasm_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
143 float delta, ui32 count);
144 void vsx_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max,
145 float delta, ui32 count);
146
147 void codeblock_fun::init(bool reversible) {
148
149#if !defined(OJPH_ENABLE_WASM_SIMD) || !defined(OJPH_EMSCRIPTEN)
150
151 // Default path, no acceleration. We may change this later
152 decode_cb32 = ojph_decode_codeblock32;
153 find_max_val32 = gen_find_max_val32;
154 mem_clear = gen_mem_clear;
155 if (reversible) {
156 tx_to_cb32 = gen_rev_tx_to_cb32;
157 tx_from_cb32 = gen_rev_tx_from_cb32;
158 }
159 else
160 {
161 tx_to_cb32 = gen_irv_tx_to_cb32;
162 tx_from_cb32 = gen_irv_tx_from_cb32;
163 }
164 encode_cb32 = ojph_encode_codeblock32;
165
166 decode_cb64 = ojph_decode_codeblock64;
167 find_max_val64 = gen_find_max_val64;
168 if (reversible) {
169 tx_to_cb64 = gen_rev_tx_to_cb64;
170 tx_from_cb64 = gen_rev_tx_from_cb64;
171 }
172 else
173 {
174 tx_to_cb64 = NULL;
175 tx_from_cb64 = gen_irv_tx_from_cb64;
176 }
177 encode_cb64 = ojph_encode_codeblock64;
178 bool result = initialize_block_encoder_tables();
179 assert(result); ojph_unused(result);
180
181 #ifndef OJPH_DISABLE_SIMD
182
183 #if (defined(OJPH_ARCH_X86_64) || defined(OJPH_ARCH_I386))
184
185 // Accelerated functions for INTEL/AMD CPUs
186 #ifndef OJPH_DISABLE_SSE
187 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_SSE)
188 mem_clear = sse_mem_clear;
189 #endif // !OJPH_DISABLE_SSE
190
191 #ifndef OJPH_DISABLE_SSE2
192 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_SSE2) {
193 find_max_val32 = sse2_find_max_val32;
194 if (reversible) {
195 tx_to_cb32 = sse2_rev_tx_to_cb32;
196 tx_from_cb32 = sse2_rev_tx_from_cb32;
197 }
198 else {
199 tx_to_cb32 = sse2_irv_tx_to_cb32;
200 tx_from_cb32 = sse2_irv_tx_from_cb32;
201 }
202 find_max_val64 = sse2_find_max_val64;
203 if (reversible) {
204 tx_to_cb64 = sse2_rev_tx_to_cb64;
205 tx_from_cb64 = sse2_rev_tx_from_cb64;
206 }
207 else
208 {
209 tx_to_cb64 = NULL;
210 tx_from_cb64 = gen_irv_tx_from_cb64;
211 }
212 }
213 #endif // !OJPH_DISABLE_SSE2
214
215 #ifndef OJPH_DISABLE_SSSE3
216 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_SSSE3)
217 decode_cb32 = ojph_decode_codeblock_ssse3;
218 #endif // !OJPH_DISABLE_SSSE3
219
220 #ifndef OJPH_DISABLE_AVX
221 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_AVX)
222 mem_clear = avx_mem_clear;
223 #endif // !OJPH_DISABLE_AVX
224
225 #ifndef OJPH_DISABLE_AVX2
226 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_AVX2) {
227 decode_cb32 = ojph_decode_codeblock_avx2;
228 find_max_val32 = avx2_find_max_val32;
229 if (reversible) {
230 tx_to_cb32 = avx2_rev_tx_to_cb32;
231 tx_from_cb32 = avx2_rev_tx_from_cb32;
232 }
233 else {
234 tx_to_cb32 = avx2_irv_tx_to_cb32;
235 tx_from_cb32 = avx2_irv_tx_from_cb32;
236 }
237 encode_cb32 = ojph_encode_codeblock_avx2;
238 bool result = initialize_block_encoder_tables_avx2();
239 assert(result); ojph_unused(result);
240
241 find_max_val64 = avx2_find_max_val64;
242 if (reversible) {
243 tx_to_cb64 = avx2_rev_tx_to_cb64;
244 tx_from_cb64 = avx2_rev_tx_from_cb64;
245 }
246 else
247 {
248 tx_to_cb64 = NULL;
249 tx_from_cb64 = gen_irv_tx_from_cb64;
250 }
251 }
252 #endif // !OJPH_DISABLE_AVX2
253
254 #if (defined(OJPH_ARCH_X86_64) && !defined(OJPH_DISABLE_AVX512))
255 if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_AVX512) {
256 encode_cb32 = ojph_encode_codeblock_avx512;
257 bool result = initialize_block_encoder_tables_avx512();
258 assert(result); ojph_unused(result);
259 }
260 #endif // !OJPH_DISABLE_AVX512
261
262 #elif defined(OJPH_ARCH_ARM)
263
264 #elif defined(OJPH_ARCH_PPC64LE)
265
266 // 128-bit VSX kernels; see ojph_simd_vsx.h.
267 // The SIMD block decoder is used everywhere on POWER10 (ISA 3.1),
268 // where it beats the scalar decoder on all measured content. On
269 // POWER9 it wins for irreversible content (more magnitude bits
270 // per sample) but trails the scalar decoder slightly on
271 // reversible content, so it is dispatched only for the former.
272 if (get_cpu_ext_level() >= PPC_CPU_EXT_LEVEL_ARCH_3_1 ||
273 (!reversible &&
274 get_cpu_ext_level() >= PPC_CPU_EXT_LEVEL_ARCH_3_00))
275 decode_cb32 = ojph_decode_codeblock_vsx;
276 if (get_cpu_ext_level() >= PPC_CPU_EXT_LEVEL_ARCH_3_00) {
277 find_max_val32 = vsx_find_max_val32;
278 mem_clear = vsx_mem_clear;
279 if (reversible) {
280 tx_to_cb32 = vsx_rev_tx_to_cb32;
281 tx_from_cb32 = vsx_rev_tx_from_cb32;
282 }
283 else {
284 tx_to_cb32 = vsx_irv_tx_to_cb32;
285 tx_from_cb32 = vsx_irv_tx_from_cb32;
286 }
287 find_max_val64 = vsx_find_max_val64;
288 if (reversible) {
289 tx_to_cb64 = vsx_rev_tx_to_cb64;
290 tx_from_cb64 = vsx_rev_tx_from_cb64;
291 }
292 else {
293 tx_to_cb64 = NULL;
294 tx_from_cb64 = gen_irv_tx_from_cb64;
295 }
296 }
297
298 #endif // !(defined(OJPH_ARCH_X86_64) || defined(OJPH_ARCH_I386))
299
300 #endif // !OJPH_DISABLE_SIMD
301
302#else // OJPH_ENABLE_WASM_SIMD
303
304 // Accelerated functions for WASM SIMD.
305 decode_cb32 = ojph_decode_codeblock_wasm;
306 find_max_val32 = wasm_find_max_val32;
307 mem_clear = wasm_mem_clear;
308 if (reversible) {
309 tx_to_cb32 = wasm_rev_tx_to_cb32;
310 tx_from_cb32 = wasm_rev_tx_from_cb32;
311 }
312 else {
313 tx_to_cb32 = wasm_irv_tx_to_cb32;
314 tx_from_cb32 = wasm_irv_tx_from_cb32;
315 }
316 encode_cb32 = ojph_encode_codeblock32;
317
318 decode_cb64 = ojph_decode_codeblock64;
319 find_max_val64 = wasm_find_max_val64;
320 if (reversible) {
321 tx_to_cb64 = wasm_rev_tx_to_cb64;
322 tx_from_cb64 = wasm_rev_tx_from_cb64;
323 }
324 else
325 {
326 tx_to_cb64 = NULL;
327 tx_from_cb64 = gen_irv_tx_from_cb64;
328 }
329 encode_cb64 = ojph_encode_codeblock64;
330 bool result = initialize_block_encoder_tables();
331 assert(result); ojph_unused(result);
332
333#endif // !OJPH_ENABLE_WASM_SIMD
334
335 }
336 } // local
337} // ojph
ojph::local
Definition ojph_bitbuffer_read.h:53
ojph::local::gen_irv_tx_from_cb64
void gen_irv_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_gen.cpp:171
ojph::local::ojph_decode_codeblock_wasm
bool ojph_decode_codeblock_wasm(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pa...
Definition ojph_block_decoder_wasm.cpp:1051
ojph::local::gen_rev_tx_to_cb64
void gen_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max, float delta_inv, ui32 count, ui64 *max_val)
Definition ojph_codestream_gen.cpp:81
ojph::local::avx2_find_max_val64
ui64 avx2_find_max_val64(ui64 *address)
ojph::local::vsx_find_max_val32
ui32 vsx_find_max_val32(ui32 *address)
Definition ojph_codestream_vsx.cpp:56
ojph::local::wasm_rev_tx_to_cb64
void wasm_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max, float delta_inv, ui32 count, ui64 *max_val)
Definition ojph_codestream_wasm.cpp:219
ojph::local::vsx_rev_tx_to_cb64
void vsx_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max, float delta_inv, ui32 count, ui64 *max_val)
Definition ojph_codestream_vsx.cpp:219
ojph::local::avx2_irv_tx_to_cb32
void avx2_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
ojph::local::initialize_block_encoder_tables_avx512
bool initialize_block_encoder_tables_avx512()
ojph::local::vsx_rev_tx_from_cb32
void vsx_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_vsx.cpp:176
ojph::local::sse2_rev_tx_from_cb32
void sse2_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::vsx_find_max_val64
ui64 vsx_find_max_val64(ui64 *address)
Definition ojph_codestream_vsx.cpp:68
ojph::local::avx2_rev_tx_from_cb64
void avx2_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::sse2_find_max_val32
ui32 sse2_find_max_val32(ui32 *address)
ojph::local::wasm_find_max_val32
ui32 wasm_find_max_val32(ui32 *address)
Definition ojph_codestream_wasm.cpp:56
ojph::local::sse2_find_max_val64
ui64 sse2_find_max_val64(ui64 *address)
ojph::local::ojph_decode_codeblock_ssse3
bool ojph_decode_codeblock_ssse3(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
ojph::local::wasm_rev_tx_from_cb32
void wasm_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_wasm.cpp:176
ojph::local::avx_mem_clear
void avx_mem_clear(void *addr, size_t count)
ojph::local::vsx_irv_tx_to_cb32
void vsx_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_vsx.cpp:126
ojph::local::avx2_find_max_val32
ui32 avx2_find_max_val32(ui32 *address)
ojph::local::avx2_rev_tx_to_cb32
void avx2_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
ojph::local::wasm_rev_tx_from_cb64
void wasm_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_wasm.cpp:266
ojph::local::vsx_irv_tx_from_cb32
void vsx_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_vsx.cpp:199
ojph::local::ojph_encode_codeblock32
void ojph_encode_codeblock32(ui32 *buf, ui32 missing_msbs, ui32 num_passes, ui32 width, ui32 height, ui32 stride, ui32 *lengths, ojph::mem_elastic_allocator *elastic, ojph::coded_lists *&coded)
Definition ojph_block_encoder.cpp:542
ojph::local::ojph_encode_codeblock64
void ojph_encode_codeblock64(ui64 *buf, ui32 missing_msbs, ui32 num_passes, ui32 width, ui32 height, ui32 stride, ui32 *lengths, ojph::mem_elastic_allocator *elastic, ojph::coded_lists *&coded)
Definition ojph_block_encoder.cpp:1026
ojph::local::sse2_rev_tx_to_cb32
void sse2_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
ojph::local::gen_irv_tx_from_cb32
void gen_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_gen.cpp:156
ojph::local::vsx_rev_tx_from_cb64
void vsx_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_vsx.cpp:266
ojph::local::gen_irv_tx_to_cb32
void gen_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_gen.cpp:103
ojph::local::ojph_encode_codeblock_avx2
void ojph_encode_codeblock_avx2(ui32 *buf, ui32 missing_msbs, ui32 num_passes, ui32 width, ui32 height, ui32 stride, ui32 *lengths, ojph::mem_elastic_allocator *elastic, ojph::coded_lists *&coded)
ojph::local::wasm_irv_tx_to_cb32
void wasm_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_wasm.cpp:126
ojph::local::wasm_find_max_val64
ui64 wasm_find_max_val64(ui64 *address)
Definition ojph_codestream_wasm.cpp:68
ojph::local::sse2_rev_tx_to_cb64
void sse2_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max, float delta_inv, ui32 count, ui64 *max_val)
ojph::local::gen_mem_clear
void gen_mem_clear(void *addr, size_t count)
Definition ojph_codestream_gen.cpp:47
ojph::local::gen_rev_tx_from_cb64
void gen_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_gen.cpp:140
ojph::local::sse_mem_clear
void sse_mem_clear(void *addr, size_t count)
ojph::local::ojph_decode_codeblock32
bool ojph_decode_codeblock32(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pa...
Definition ojph_block_decoder32.cpp:742
ojph::local::avx2_rev_tx_to_cb64
void avx2_rev_tx_to_cb64(const void *sp, ui64 *dp, ui32 K_max, float delta_inv, ui32 count, ui64 *max_val)
ojph::local::gen_find_max_val64
ui64 gen_find_max_val64(ui64 *address)
Definition ojph_codestream_gen.cpp:56
ojph::local::ojph_decode_codeblock_vsx
bool ojph_decode_codeblock_vsx(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pa...
Definition ojph_block_decoder_vsx.cpp:1154
ojph::local::sse2_irv_tx_from_cb32
void sse2_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::wasm_mem_clear
void wasm_mem_clear(void *addr, size_t count)
Definition ojph_codestream_wasm.cpp:48
ojph::local::gen_rev_tx_from_cb32
void gen_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_gen.cpp:124
ojph::local::wasm_rev_tx_to_cb32
void wasm_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_wasm.cpp:78
ojph::local::avx2_rev_tx_from_cb32
void avx2_rev_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::ojph_decode_codeblock_avx2
bool ojph_decode_codeblock_avx2(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
ojph::local::sse2_rev_tx_from_cb64
void sse2_rev_tx_from_cb64(const ui64 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::vsx_rev_tx_to_cb32
void vsx_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_vsx.cpp:78
ojph::local::initialize_block_encoder_tables
bool initialize_block_encoder_tables()
Definition ojph_block_encoder.cpp:258
ojph::local::gen_rev_tx_to_cb32
void gen_rev_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
Definition ojph_codestream_gen.cpp:59
ojph::local::initialize_block_encoder_tables_avx2
bool initialize_block_encoder_tables_avx2()
ojph::local::gen_find_max_val32
ui32 gen_find_max_val32(ui32 *address)
Definition ojph_codestream_gen.cpp:53
ojph::local::wasm_irv_tx_from_cb32
void wasm_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
Definition ojph_codestream_wasm.cpp:199
ojph::local::sse2_irv_tx_to_cb32
void sse2_irv_tx_to_cb32(const void *sp, ui32 *dp, ui32 K_max, float delta_inv, ui32 count, ui32 *max_val)
ojph::local::ojph_encode_codeblock_avx512
void ojph_encode_codeblock_avx512(ui32 *buf, ui32 missing_msbs, ui32 num_passes, ui32 width, ui32 height, ui32 stride, ui32 *lengths, ojph::mem_elastic_allocator *elastic, ojph::coded_lists *&coded)
ojph::local::avx2_irv_tx_from_cb32
void avx2_irv_tx_from_cb32(const ui32 *sp, void *dp, ui32 K_max, float delta, ui32 count)
ojph::local::vsx_mem_clear
void vsx_mem_clear(void *addr, size_t count)
Definition ojph_codestream_vsx.cpp:48
ojph::local::ojph_decode_codeblock64
bool ojph_decode_codeblock64(ui8 *coded_data, ui64 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride, bool stripe_causal)
Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pa...
Definition ojph_block_decoder64.cpp:766
ojph
Definition ojph_img_io.h:52
ojph::ui64
uint64_t ui64
Definition ojph_defs.h:56
ojph::PPC_CPU_EXT_LEVEL_ARCH_3_1
@ PPC_CPU_EXT_LEVEL_ARCH_3_1
Definition ojph_arch.h:181
ojph::PPC_CPU_EXT_LEVEL_ARCH_3_00
@ PPC_CPU_EXT_LEVEL_ARCH_3_00
Definition ojph_arch.h:180
ojph::get_cpu_ext_level
OJPH_EXPORT int get_cpu_ext_level()
Definition ojph_arch.cpp:296
ojph::ui32
uint32_t ui32
Definition ojph_defs.h:54
ojph::X86_CPU_EXT_LEVEL_AVX2
@ X86_CPU_EXT_LEVEL_AVX2
Definition ojph_arch.h:163
ojph::X86_CPU_EXT_LEVEL_AVX
@ X86_CPU_EXT_LEVEL_AVX
Definition ojph_arch.h:162
ojph::X86_CPU_EXT_LEVEL_AVX512
@ X86_CPU_EXT_LEVEL_AVX512
Definition ojph_arch.h:165
ojph::X86_CPU_EXT_LEVEL_SSE2
@ X86_CPU_EXT_LEVEL_SSE2
Definition ojph_arch.h:157
ojph::X86_CPU_EXT_LEVEL_SSE
@ X86_CPU_EXT_LEVEL_SSE
Definition ojph_arch.h:156
ojph::X86_CPU_EXT_LEVEL_SSSE3
@ X86_CPU_EXT_LEVEL_SSSE3
Definition ojph_arch.h:159
ojph_block_decoder.h
ojph_block_encoder.h
ojph_codeblock_fun.h
ojph_codestream.h
ojph_codestream_local.h
ojph_colour.h
ojph_unused
#define ojph_unused(x)
Definition ojph_defs.h:78
ojph_file.h
ojph_mem.h
ojph_params.h
ojph_transform.h
ojph::local::codeblock_fun::tx_to_cb64
tx_to_cb_fun64 tx_to_cb64
Definition ojph_codeblock_fun.h:106
ojph::local::codeblock_fun::encode_cb64
cb_encoder_fun64 encode_cb64
Definition ojph_codeblock_fun.h:118
ojph::local::codeblock_fun::init
void init(bool reversible)
Definition ojph_codeblock_fun.cpp:147
ojph::local::codeblock_fun::find_max_val32
find_max_val_fun32 find_max_val32
Definition ojph_codeblock_fun.h:101
ojph::local::codeblock_fun::tx_from_cb32
tx_from_cb_fun32 tx_from_cb32
Definition ojph_codeblock_fun.h:109
ojph::local::codeblock_fun::tx_to_cb32
tx_to_cb_fun32 tx_to_cb32
Definition ojph_codeblock_fun.h:105
ojph::local::codeblock_fun::find_max_val64
find_max_val_fun64 find_max_val64
Definition ojph_codeblock_fun.h:102
ojph::local::codeblock_fun::decode_cb32
cb_decoder_fun32 decode_cb32
Definition ojph_codeblock_fun.h:113
ojph::local::codeblock_fun::encode_cb32
cb_encoder_fun32 encode_cb32
Definition ojph_codeblock_fun.h:117
ojph::local::codeblock_fun::mem_clear
mem_clear_fun mem_clear
Definition ojph_codeblock_fun.h:98
ojph::local::codeblock_fun::decode_cb64
cb_decoder_fun64 decode_cb64
Definition ojph_codeblock_fun.h:114
ojph::local::codeblock_fun::tx_from_cb64
tx_from_cb_fun64 tx_from_cb64
Definition ojph_codeblock_fun.h:110