OpenJPH: /build/openjph/src/OpenJPH/src/core/transform/ojph_transform_local.h Source File

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph_transform_local.h
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_transform_local.h
34// Author: Aous Naman
35// Date: 28 August 2019
36//***************************************************************************/
37
38
39#ifndef OJPH_TRANSFORM_LOCAL_H
40#define OJPH_TRANSFORM_LOCAL_H
41
42#include "ojph_defs.h"
43
44namespace ojph {
45
46 // defined elsewhere
47 class line_buf;
48
49 namespace local {
50 struct param_atk;
51 union lifting_step;
52
54 //
55 //
56 // Generic Functions
57 //
58 //
60
62 // Irreversible functions
64
66 void gen_irv_vert_step(const lifting_step* s, const line_buf* sig,
67 const line_buf* other, const line_buf* aug,
68 ui32 repeat, bool synthesis);
69
71 void gen_irv_vert_times_K(float K, const line_buf* aug, ui32 repeat);
72
74 void gen_irv_horz_ana(const param_atk* atk, const line_buf* ldst,
75 const line_buf* hdst, const line_buf* src,
76 ui32 width, bool even);
77
79 void gen_irv_horz_syn(const param_atk *atk, const line_buf* dst,
80 const line_buf *lsrc, const line_buf *hsrc,
81 ui32 width, bool even);
82
84 // Reversible functions
86
88 void gen_rev_vert_step(const lifting_step* s, const line_buf* sig,
89 const line_buf* other, const line_buf* aug,
90 ui32 repeat, bool synthesis);
91
93 void gen_rev_horz_ana(const param_atk* atk, const line_buf* ldst,
94 const line_buf* hdst, const line_buf* src,
95 ui32 width, bool even);
96
98 void gen_rev_horz_syn(const param_atk* atk, const line_buf* dst,
99 const line_buf* lsrc, const line_buf* hsrc,
100 ui32 width, bool even);
101
103 //
104 //
105 // SSE Functions (float)
106 //
107 //
109
111 // Irreversible functions
113
115 void sse_irv_vert_step(const lifting_step* s, const line_buf* sig,
116 const line_buf* other, const line_buf* aug,
117 ui32 repeat, bool synthesis);
118
120 void sse_irv_vert_times_K(float K, const line_buf* aug, ui32 repeat);
121
123 void sse_irv_horz_ana(const param_atk* atk, const line_buf* ldst,
124 const line_buf* hdst, const line_buf* src,
125 ui32 width, bool even);
126
128 void sse_irv_horz_syn(const param_atk *atk, const line_buf* dst,
129 const line_buf *lsrc, const line_buf *hsrc,
130 ui32 width, bool even);
131
133 //
134 //
135 // SSE2 Functions (int)
136 //
137 //
139
141 // Reversible functions
143
145 void sse2_rev_vert_step(const lifting_step* s, const line_buf* sig,
146 const line_buf* other, const line_buf* aug,
147 ui32 repeat, bool synthesis);
148
150 void sse2_rev_horz_ana(const param_atk* atk, const line_buf* ldst,
151 const line_buf* hdst, const line_buf* src,
152 ui32 width, bool even);
153
155 void sse2_rev_horz_syn(const param_atk* atk, const line_buf* dst,
156 const line_buf* lsrc, const line_buf* hsrc,
157 ui32 width, bool even);
158
159
161 //
162 //
163 // AVX Functions (float)
164 //
165 //
167
169 // Irreversible functions
171
173 void avx_irv_vert_step(const lifting_step* s, const line_buf* sig,
174 const line_buf* other, const line_buf* aug,
175 ui32 repeat, bool synthesis);
176
178 void avx_irv_vert_times_K(float K, const line_buf* aug, ui32 repeat);
179
181 void avx_irv_horz_ana(const param_atk* atk, const line_buf* ldst,
182 const line_buf* hdst, const line_buf* src,
183 ui32 width, bool even);
184
186 void avx_irv_horz_syn(const param_atk *atk, const line_buf* dst,
187 const line_buf *lsrc, const line_buf *hsrc,
188 ui32 width, bool even);
189
191 //
192 //
193 // AVX2 Functions (int)
194 //
195 //
197
199 // Reversible functions
201
203 void avx2_rev_vert_step(const lifting_step* s, const line_buf* sig,
204 const line_buf* other, const line_buf* aug,
205 ui32 repeat, bool synthesis);
206
208 void avx2_rev_horz_ana(const param_atk* atk, const line_buf* ldst,
209 const line_buf* hdst, const line_buf* src,
210 ui32 width, bool even);
211
213 void avx2_rev_horz_syn(const param_atk* atk, const line_buf* dst,
214 const line_buf* lsrc, const line_buf* hsrc,
215 ui32 width, bool even);
216
218 //
219 //
220 // AVX512 Functions
221 //
222 //
224
226 // Irreversible functions
228
230 void avx512_irv_vert_step(const lifting_step* s, const line_buf* sig,
231 const line_buf* other, const line_buf* aug,
232 ui32 repeat, bool synthesis);
233
235 void avx512_irv_vert_times_K(float K, const line_buf* aug, ui32 repeat);
236
238 void avx512_irv_horz_ana(const param_atk* atk, const line_buf* ldst,
239 const line_buf* hdst, const line_buf* src,
240 ui32 width, bool even);
241
243 void avx512_irv_horz_syn(const param_atk *atk, const line_buf* dst,
244 const line_buf *lsrc, const line_buf *hsrc,
245 ui32 width, bool even);
246
247
249 // Reversible functions
251
253 void avx512_rev_vert_step(const lifting_step* s, const line_buf* sig,
254 const line_buf* other, const line_buf* aug,
255 ui32 repeat, bool synthesis);
256
258 void avx512_rev_horz_ana(const param_atk* atk, const line_buf* ldst,
259 const line_buf* hdst, const line_buf* src,
260 ui32 width, bool even);
261
263 void avx512_rev_horz_syn(const param_atk* atk, const line_buf* dst,
264 const line_buf* lsrc, const line_buf* hsrc,
265 ui32 width, bool even);
266
268 //
269 //
270 // WASM Functions
271 //
272 //
274
276 // Irreversible functions
278
280 void wasm_irv_vert_step(const lifting_step* s, const line_buf* sig,
281 const line_buf* other, const line_buf* aug,
282 ui32 repeat, bool synthesis);
283
285 void wasm_irv_vert_times_K(float K, const line_buf* aug, ui32 repeat);
286
288 void wasm_irv_horz_ana(const param_atk* atk, const line_buf* ldst,
289 const line_buf* hdst, const line_buf* src,
290 ui32 width, bool even);
291
293 void wasm_irv_horz_syn(const param_atk *atk, const line_buf* dst,
294 const line_buf *lsrc, const line_buf *hsrc,
295 ui32 width, bool even);
296
298 // Reversible functions
300
302 void wasm_rev_vert_step(const lifting_step* s, const line_buf* sig,
303 const line_buf* other, const line_buf* aug,
304 ui32 repeat, bool synthesis);
305
307 void wasm_rev_horz_ana(const param_atk* atk, const line_buf* ldst,
308 const line_buf* hdst, const line_buf* src,
309 ui32 width, bool even);
310
312 void wasm_rev_horz_syn(const param_atk* atk, const line_buf* dst,
313 const line_buf* lsrc, const line_buf* hsrc,
314 ui32 width, bool even);
315 }
316}
317
318#endif // !OJPH_TRANSFORM_LOCAL_H
ojph::line_buf
Definition ojph_mem.h:161
ojph::local
Definition ojph_bitbuffer_read.h:52
ojph::local::gen_irv_vert_times_K
void gen_irv_vert_times_K(float K, const line_buf *aug, ui32 repeat)
Definition ojph_transform.cpp:692
ojph::local::gen_rev_vert_step
void gen_rev_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
Definition ojph_transform.cpp:297
ojph::local::gen_rev_horz_syn
void gen_rev_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
Definition ojph_transform.cpp:656
ojph::local::sse2_rev_horz_ana
void sse2_rev_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph::local::avx512_irv_vert_step
void avx512_irv_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::avx512_rev_horz_syn
void avx512_rev_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::wasm_rev_horz_ana
void wasm_rev_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
Definition ojph_transform_wasm.cpp:936
ojph::local::gen_rev_horz_ana
void gen_rev_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
Definition ojph_transform.cpp:478
ojph::local::gen_irv_horz_syn
void gen_irv_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
Definition ojph_transform.cpp:771
ojph::local::sse2_rev_horz_syn
void sse2_rev_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::avx512_rev_vert_step
void avx512_rev_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::gen_irv_vert_step
void gen_irv_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
Definition ojph_transform.cpp:676
ojph::local::avx_irv_horz_syn
void avx_irv_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::sse_irv_vert_times_K
void sse_irv_vert_times_K(float K, const line_buf *aug, ui32 repeat)
ojph::local::avx2_rev_horz_syn
void avx2_rev_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::wasm_rev_vert_step
void wasm_rev_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
Definition ojph_transform_wasm.cpp:577
ojph::local::wasm_irv_vert_times_K
void wasm_irv_vert_times_K(float K, const line_buf *aug, ui32 repeat)
Definition ojph_transform_wasm.cpp:153
ojph::local::avx512_irv_horz_ana
void avx512_irv_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph::local::avx2_rev_vert_step
void avx2_rev_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::sse_irv_vert_step
void sse_irv_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::wasm_irv_horz_ana
void wasm_irv_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
Definition ojph_transform_wasm.cpp:159
ojph::local::sse_irv_horz_ana
void sse_irv_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph::local::wasm_irv_vert_step
void wasm_irv_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
Definition ojph_transform_wasm.cpp:129
ojph::local::avx_irv_vert_step
void avx_irv_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::sse_irv_horz_syn
void sse_irv_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::avx512_irv_vert_times_K
void avx512_irv_vert_times_K(float K, const line_buf *aug, ui32 repeat)
ojph::local::avx512_irv_horz_syn
void avx512_irv_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
ojph::local::avx_irv_horz_ana
void avx_irv_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph::local::avx2_rev_horz_ana
void avx2_rev_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph::local::sse2_rev_vert_step
void sse2_rev_vert_step(const lifting_step *s, const line_buf *sig, const line_buf *other, const line_buf *aug, ui32 repeat, bool synthesis)
ojph::local::wasm_rev_horz_syn
void wasm_rev_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
Definition ojph_transform_wasm.cpp:1290
ojph::local::gen_irv_horz_ana
void gen_irv_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
Definition ojph_transform.cpp:700
ojph::local::avx_irv_vert_times_K
void avx_irv_vert_times_K(float K, const line_buf *aug, ui32 repeat)
ojph::local::wasm_irv_horz_syn
void wasm_irv_horz_syn(const param_atk *atk, const line_buf *dst, const line_buf *lsrc, const line_buf *hsrc, ui32 width, bool even)
Definition ojph_transform_wasm.cpp:237
ojph::local::avx512_rev_horz_ana
void avx512_rev_horz_ana(const param_atk *atk, const line_buf *ldst, const line_buf *hdst, const line_buf *src, ui32 width, bool even)
ojph
Definition ojph_img_io.h:52
ojph::ui32
uint32_t ui32
Definition ojph_defs.h:54
ojph_defs.h
ojph::local::param_atk
Definition ojph_params_local.h:1085
ojph::local::lifting_step
Definition ojph_params_local.h:1065