OpenJPEG: dwt.h Source File

OpenJPEG 2.4.0

dwt.h
Go to the documentation of this file.
1 /*
2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license.
6 *
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8 * Copyright (c) 2002-2014, Professor Benoit Macq
9 * Copyright (c) 2001-2003, David Janssens
10 * Copyright (c) 2002-2003, Yannick Verschueren
11 * Copyright (c) 2003-2007, Francois-Olivier Devaux
12 * Copyright (c) 2003-2014, Antonin Descampe
13 * Copyright (c) 2005, Herve Drolon, FreeImage Team
14 * All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38 #ifndef OPJ_DWT_H
39 #define OPJ_DWT_H
40
51
52
55 /* ----------------------------------------------------------------------- */
62 OPJ_BOOL opj_dwt_encode(opj_tcd_t *p_tcd,
63 opj_tcd_tilecomp_t * tilec);
64
72 OPJ_BOOL opj_dwt_decode(opj_tcd_t *p_tcd,
73 opj_tcd_tilecomp_t* tilec,
74 OPJ_UINT32 numres);
75
82 OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient);
89 OPJ_BOOL opj_dwt_encode_real(opj_tcd_t *p_tcd,
90 opj_tcd_tilecomp_t * tilec);
98 OPJ_BOOL opj_dwt_decode_real(opj_tcd_t *p_tcd,
99 opj_tcd_tilecomp_t* OPJ_RESTRICT tilec,
100 OPJ_UINT32 numres);
101
108 OPJ_FLOAT64 opj_dwt_getnorm_real(OPJ_UINT32 level, OPJ_UINT32 orient);
114 void opj_dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, OPJ_UINT32 prec);
115 /* ----------------------------------------------------------------------- */
119
120 #endif /* OPJ_DWT_H */
opj_tcd_precinct::cw
OPJ_UINT32 cw
Definition: tcd.h:145
opj_dwt_encode_v_job_t::tiledp
OPJ_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:1211
opj_tls_t
Definition: thread.c:504
opj_dwt_encode_v_job_t::rh
OPJ_UINT32 rh
Definition: dwt.c:1209
opj_dwt97_decode_h_job_t::h
opj_v8dwt_t h
Definition: dwt.c:3200
OPJ_FLOAT32
float OPJ_FLOAT32
Definition: openjpeg.h:115
opj_tcd_cblk_dec::decoded_data
OPJ_INT32 * decoded_data
Definition: tcd.h:138
opj_dwt_decode_v_job_t::v
opj_dwt_t v
Definition: dwt.c:2032
opj_dwt_decode_h_job_t::h
opj_dwt_t h
Definition: dwt.c:2008
opj_dwt_decode_v_job_t::tiledp
OPJ_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:2035
opj_dwt_encode_procedure
static OPJ_BOOL opj_dwt_encode_procedure(opj_thread_pool_t *tp, opj_tcd_tilecomp_t *tilec, opj_encode_and_deinterleave_v_fnptr_type p_encode_and_deinterleave_v, opj_encode_and_deinterleave_h_one_row_fnptr_type p_encode_and_deinterleave_h_one_row)
Definition: dwt.c:1717
opj_dwt_segment_grow
static void opj_dwt_segment_grow(OPJ_UINT32 filter_width, OPJ_UINT32 max_size, OPJ_UINT32 *start, OPJ_UINT32 *end)
Definition: dwt.c:2541
opj_dwt_getnorm_real
OPJ_FLOAT64 opj_dwt_getnorm_real(OPJ_UINT32 level, OPJ_UINT32 orient)
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
Definition: dwt.c:1950
v8dwt_local::win_l_x0
OPJ_UINT32 win_l_x0
Definition: dwt.c:101
opj_tcd_tilecomp::win_x0
OPJ_UINT32 win_x0
Definition: tcd.h:215
opj_dwt97_decode_v_job_t::nb_columns
OPJ_UINT32 nb_columns
Definition: dwt.c:3253
opj_dwt_encode_and_deinterleave_v_real
static void opj_dwt_encode_and_deinterleave_v_real(void *arrayIn, void *tmpIn, OPJ_UINT32 height, OPJ_BOOL even, OPJ_UINT32 stride_width, OPJ_UINT32 cols)
Definition: dwt.c:1647
opj_dwt_encode_1_real
static void opj_dwt_encode_1_real(void *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas)
Forward 9-7 wavelet transform in 1-D.
Definition: dwt.c:1038
v8dwt_local::sn
OPJ_INT32 sn
Definition: dwt.c:99
opj_dwt_encode_step1_combined
static void opj_dwt_encode_step1_combined(OPJ_FLOAT32 *fw, OPJ_UINT32 iters_c1, OPJ_UINT32 iters_c2, const OPJ_FLOAT32 c1, const OPJ_FLOAT32 c2)
Definition: dwt.c:968
opj_dwt_calc_explicit_stepsizes
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1963
opj_int_abs
static INLINE OPJ_INT32 opj_int_abs(OPJ_INT32 a)
Definition: opj_intmath.h:152
opj_int_floorlog2
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:225
opj_tcd_band::x0
OPJ_INT32 x0
Definition: tcd.h:159
opj_dwt_encode_v_job_t
Definition: dwt.c:1207
opj_dwt_max_resolution
static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t *OPJ_RESTRICT r, OPJ_UINT32 i)
Definition: dwt.c:1990
opj_tccp::numresolutions
OPJ_UINT32 numresolutions
number of resolutions
Definition: j2k.h:179
opj_dwt_encode_h_job_t
Definition: dwt.c:1180
OPJ_D__off
#define OPJ_D__off(i, off)
Definition: dwt.c:2358
PARALLEL_COLS_53
#define PARALLEL_COLS_53
Number of columns that we can process in parallel in the vertical pass.
Definition: dwt.c:78
opj_tcd_tilecomp::win_y0
OPJ_UINT32 win_y0
Definition: tcd.h:216
opj_dwt_delta
static const OPJ_FLOAT32 opj_dwt_delta
Definition: dwt.c:111
opj_int_min
static INLINE OPJ_INT32 opj_int_min(OPJ_INT32 a, OPJ_INT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:56
opj_tcd_resolution::x0
OPJ_INT32 x0
Definition: tcd.h:173
opj_dwt97_decode_v_job_t::aj
OPJ_FLOAT32 *OPJ_RESTRICT aj
Definition: dwt.c:3252
opj_tcd_resolution::y1
OPJ_INT32 y1
Definition: tcd.h:173
opj_tcd_resolution::x1
OPJ_INT32 x1
Definition: tcd.h:173
opj_dwt_decode_h_job_t::min_j
OPJ_UINT32 min_j
Definition: dwt.c:2012
opj_dwt_decode_h_job_t::rw
OPJ_UINT32 rw
Definition: dwt.c:2009
opj_dwt_encode_step2
static void opj_dwt_encode_step2(OPJ_FLOAT32 *fl, OPJ_FLOAT32 *fw, OPJ_UINT32 end, OPJ_UINT32 m, OPJ_FLOAT32 c)
Definition: dwt.c:1009
v8dwt_local::wavelet
opj_v8_t * wavelet
Definition: dwt.c:97
opj_dwt_encode_and_deinterleave_h_one_row_real
static void opj_dwt_encode_and_deinterleave_h_one_row_real(void *rowIn, void *tmpIn, OPJ_UINT32 width, OPJ_BOOL even)
Process one line for the horizontal pass of the 9x7 forward transform.
Definition: dwt.c:1161
opj_dwt_encode_v_job_t::v
opj_dwt_t v
Definition: dwt.c:1208
opj_tcd_cblk_dec::x1
OPJ_INT32 x1
Definition: tcd.h:124
opj_v8dwt_decode_step1
static void opj_v8dwt_decode_step1(opj_v8_t *w, OPJ_UINT32 start, OPJ_UINT32 end, const OPJ_FLOAT32 c)
Definition: dwt.c:3064
opj_dwt_decode_partial_97
static OPJ_BOOL opj_dwt_decode_partial_97(opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Definition: dwt.c:3513
SIZE_MAX
#define SIZE_MAX
Definition: opj_malloc.c:40
opj_tcd_resolution::bands
opj_tcd_band_t bands[3]
Definition: tcd.h:179
opj_dwt_interleave_partial_v
static void opj_dwt_interleave_partial_v(OPJ_INT32 *dest, OPJ_INT32 cas, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_col, OPJ_UINT32 nb_cols, OPJ_UINT32 sn, OPJ_UINT32 win_l_y0, OPJ_UINT32 win_l_y1, OPJ_UINT32 win_h_y0, OPJ_UINT32 win_h_y1)
Definition: dwt.c:2253
opj_encode_and_deinterleave_v_fnptr_type
void(* opj_encode_and_deinterleave_v_fnptr_type)(void *array, void *tmp, OPJ_UINT32 height, OPJ_BOOL even, OPJ_UINT32 stride_width, OPJ_UINT32 cols)
Definition: dwt.c:152
opj_dwt_decode_h_job_t
Definition: dwt.c:2007
opj_dwt_encode_h_job_t::h
opj_dwt_t h
Definition: dwt.c:1181
opj_idwt53_h_cas1
static void opj_idwt53_h_cas1(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp)
Definition: dwt.c:403
OPJ_S_
#define OPJ_S_(i)
Definition: dwt.c:186
opj_dwt97_decode_v_job_t
Definition: dwt.c:3248
opj_dwt_decode_partial_tile
static OPJ_BOOL opj_dwt_decode_partial_tile(opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Definition: dwt.c:2608
opj_dwt_decode_real
OPJ_BOOL opj_dwt_decode_real(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Inverse 9-7 wavelet transform in 2-D.
Definition: dwt.c:3747
opj_dwt97_decode_v_job_t::w
OPJ_UINT32 w
Definition: dwt.c:3251
opj_idwt53_v
static void opj_idwt53_v(const opj_dwt_t *dwt, OPJ_INT32 *tiledp_col, OPJ_SIZE_T stride, OPJ_INT32 nb_cols)
Definition: dwt.c:873
opj_dwt_decode_v_job_t
Definition: dwt.c:2031
opj_K
static const OPJ_FLOAT32 opj_K
Definition: dwt.c:113
opj_thread_pool_submit_job
OPJ_BOOL opj_thread_pool_submit_job(opj_thread_pool_t *tp, opj_job_fn job_fn, void *user_data)
Submit a new job to be run by one of the thread in the thread pool.
Definition: thread.c:827
opj_dwt_encode_v_job_t::p_encode_and_deinterleave_v
opj_encode_and_deinterleave_v_fnptr_type p_encode_and_deinterleave_v
Definition: dwt.c:1214
opj_dwt_decode_h_job_t::tiledp
OPJ_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:2011
opj_dwt_decode_v_job_t::w
OPJ_UINT32 w
Definition: dwt.c:2034
opj_dwt_encode_v_job_t::min_j
OPJ_UINT32 min_j
Definition: dwt.c:1212
dwt_local
Definition: dwt.c:83
opj_dwt_decode
OPJ_BOOL opj_dwt_decode(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Inverse 5-3 wavelet transform in 2-D.
Definition: dwt.c:1910
opj_tcd_tilecomp::x1
OPJ_INT32 x1
Definition: tcd.h:191
INLINE
#define INLINE
Definition: openjpeg.h:65
opj_tcd_resolution::ph
OPJ_UINT32 ph
Definition: tcd.h:175
opj_dwt97_decode_h_job_t
Definition: dwt.c:3199
v8dwt_local
Definition: dwt.c:96
v8dwt_local::win_h_x0
OPJ_UINT32 win_h_x0
Definition: dwt.c:103
opj_tcd_cblk_dec::y1
OPJ_INT32 y1
Definition: tcd.h:124
opj_dwt_encode_v_job_t::max_j
OPJ_UINT32 max_j
Definition: dwt.c:1213
v8dwt_local::win_h_x1
OPJ_UINT32 win_h_x1
Definition: dwt.c:104
opj_invK
static const OPJ_FLOAT32 opj_invK
Definition: dwt.c:114
opj_dwt_decode_v_job_t::rh
OPJ_UINT32 rh
Definition: dwt.c:2033
opj_tcd_tilecomp::resolutions
opj_tcd_resolution_t * resolutions
Definition: tcd.h:199
opj_dwt_deinterleave_v_cols
static INLINE void opj_dwt_deinterleave_v_cols(const OPJ_INT32 *OPJ_RESTRICT src, OPJ_INT32 *OPJ_RESTRICT dst, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_UINT32 stride_width, OPJ_INT32 cas, OPJ_UINT32 cols)
Definition: dwt.c:1279
opj_dwt_encode
OPJ_BOOL opj_dwt_encode(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet transform in 2-D.
Definition: dwt.c:1899
opj_dwt_getnorm
OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient)
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
Definition: dwt.c:1923
OPJ_FLOAT64
double OPJ_FLOAT64
Definition: openjpeg.h:116
opj_tccp::stepsizes
opj_stepsize_t stepsizes[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: j2k.h:191
opj_idwt3_v_cas0
static void opj_idwt3_v_cas0(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp_col, const OPJ_SIZE_T stride)
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on even coordinate.
Definition: dwt.c:774
OPJ_D_off
#define OPJ_D_off(i, off)
Definition: dwt.c:2356
opj_tcd_tilecomp::x0
OPJ_INT32 x0
Definition: tcd.h:191
opj_tcd_resolution::pw
OPJ_UINT32 pw
Definition: tcd.h:175
opj_tcd_cblk_dec::x0
OPJ_INT32 x0
Definition: tcd.h:124
opj_dwt_encode_h_job_t::p_function
opj_encode_and_deinterleave_h_one_row_fnptr_type p_function
Definition: dwt.c:1187
opj_v8dwt_t
struct v8dwt_local opj_v8dwt_t
opj_dwt97_decode_h_func
static void opj_dwt97_decode_h_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:3207
v8dwt_local::cas
OPJ_INT32 cas
Definition: dwt.c:100
opj_dwt_encode_real
OPJ_BOOL opj_dwt_encode_real(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:1939
opj_stepsize
Quantization stepsize.
Definition: j2k.h:165
opj_dwt_encode_h_job_t::w
OPJ_UINT32 w
Definition: dwt.c:1183
opj_dwt_decode_h_job_t::w
OPJ_UINT32 w
Definition: dwt.c:2010
opj_tcd::whole_tile_decoding
OPJ_BOOL whole_tile_decoding
Only valid for decoding.
Definition: tcd.h:282
opj_dwt_encode_stepsize
static void opj_dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsize_t *bandno_stepsize)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1089
opj_thread_pool_get_thread_count
int opj_thread_pool_get_thread_count(opj_thread_pool_t *tp)
Return the number of threads associated with the thread pool.
Definition: thread.c:914
opj_dwt_getnorm_real
OPJ_FLOAT64 opj_dwt_getnorm_real(OPJ_UINT32 level, OPJ_UINT32 orient)
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
Definition: dwt.c:1950
opj_stepsize::mant
OPJ_INT32 mant
mantissa
Definition: j2k.h:169
opj_stepsize::expn
OPJ_INT32 expn
exponent
Definition: j2k.h:167
opj_dwt_decode_tile_97
static OPJ_BOOL opj_dwt_decode_tile_97(opj_thread_pool_t *tp, opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Definition: dwt.c:3290
opj_dwt_beta
static const OPJ_FLOAT32 opj_dwt_beta
Definition: dwt.c:109
opj_tcd_tilecomp::minimum_num_resolutions
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:197
OPJ_UNUSED
#define OPJ_UNUSED(x)
Definition: jp2.c:47
opj_uint_adds
static INLINE OPJ_UINT32 opj_uint_adds(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated sum of two unsigned integers.
Definition: opj_intmath.h:92
opj_dwt_encode_h_job_t::max_j
OPJ_UINT32 max_j
Definition: dwt.c:1186
OPJ_BOOL
int OPJ_BOOL
Definition: openjpeg.h:110
opj_aligned_32_malloc
void * opj_aligned_32_malloc(size_t size)
Allocate memory aligned to a 32 byte boundary.
Definition: opj_malloc.c:216
OPJ_SIZE_T
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
opj_tcd_precinct
Precinct structure.
Definition: tcd.h:142
opj_encode_and_deinterleave_h_one_row_fnptr_type
void(* opj_encode_and_deinterleave_h_one_row_fnptr_type)(void *row, void *tmp, OPJ_UINT32 width, OPJ_BOOL even)
Definition: dwt.c:161
opj_includes.h
opj_dwt_encode_and_deinterleave_v
static void opj_dwt_encode_and_deinterleave_v(void *arrayIn, void *tmpIn, OPJ_UINT32 height, OPJ_BOOL even, OPJ_UINT32 stride_width, OPJ_UINT32 cols)
Definition: dwt.c:1337
opj_dwt_gamma
static const OPJ_FLOAT32 opj_dwt_gamma
Definition: dwt.c:110
opj_dwt_decode_h_job_t::max_j
OPJ_UINT32 max_j
Definition: dwt.c:2013
opj_dwt97_decode_v_func
static void opj_dwt97_decode_v_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:3256
opj_tcd_resolution
Tile-component resolution structure.
Definition: tcd.h:171
opj_dwt_getnorm
OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient)
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
Definition: dwt.c:1923
v8dwt_local::dn
OPJ_INT32 dn
Definition: dwt.c:98
opj_tcd_tilecomp
Tile-component structure.
Definition: tcd.h:189
NB_ELTS_V8
#define NB_ELTS_V8
Definition: dwt.c:90
opj_dwt_deinterleave_h
static void opj_dwt_deinterleave_h(const OPJ_INT32 *OPJ_RESTRICT a, OPJ_INT32 *OPJ_RESTRICT b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas)
Forward lazy transform (horizontal)
Definition: dwt.c:225
opj_tcd_band
Sub-band structure.
Definition: tcd.h:157
opj_tcd_tilecomp::data_win
OPJ_INT32 * data_win
data of the component limited to window of interest.
Definition: tcd.h:213
opj_dwt_interleave_partial_h
static void opj_dwt_interleave_partial_h(OPJ_INT32 *dest, OPJ_INT32 cas, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_line, OPJ_UINT32 sn, OPJ_UINT32 win_l_x0, OPJ_UINT32 win_l_x1, OPJ_UINT32 win_h_x0, OPJ_UINT32 win_h_x1)
Definition: dwt.c:2226
opj_tcd_resolution::numbands
OPJ_UINT32 numbands
Definition: tcd.h:177
opj_dwt_encode_real
OPJ_BOOL opj_dwt_encode_real(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:1939
OPJ_INT32
int32_t OPJ_INT32
Definition: openjpeg.h:125
opj_v8dwt_decode_step2
static void opj_v8dwt_decode_step2(opj_v8_t *l, opj_v8_t *w, OPJ_UINT32 start, OPJ_UINT32 end, OPJ_UINT32 m, OPJ_FLOAT32 c)
Definition: dwt.c:3084
VREG_INT_COUNT
#define VREG_INT_COUNT
Number of int32 values in a SSE2 register.
Definition: dwt.c:74
opj_tcd_precinct::cblks
union opj_tcd_precinct::@0 cblks
opj_v8dwt_decode
static void opj_v8dwt_decode(opj_v8dwt_t *OPJ_RESTRICT dwt)
Definition: dwt.c:3130
dwt_local::cas
OPJ_INT32 cas
Definition: dwt.c:87
opj_tcd_resolution::win_x0
OPJ_UINT32 win_x0
Definition: tcd.h:182
opj_v8_t
Definition: dwt.c:92
opj_dwt_encode_h_job_t::tiledp
OPJ_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:1184
opj_tcd_resolution::y0
OPJ_INT32 y0
Definition: tcd.h:173
opj_v8dwt_interleave_v
static INLINE void opj_v8dwt_interleave_v(opj_v8dwt_t *OPJ_RESTRICT dwt, OPJ_FLOAT32 *OPJ_RESTRICT a, OPJ_UINT32 width, OPJ_UINT32 nb_elts_read)
Definition: dwt.c:2964
opj_dwt_norms_real
static const OPJ_FLOAT64 opj_dwt_norms_real[4][10]
Definition: dwt.c:209
OPJ_RESTRICT
#define OPJ_RESTRICT
Definition: opj_includes.h:121
opj_tcd_tilecomp::win_y1
OPJ_UINT32 win_y1
Definition: tcd.h:218
opj_v8dwt_interleave_h
static void opj_v8dwt_interleave_h(opj_v8dwt_t *OPJ_RESTRICT dwt, OPJ_FLOAT32 *OPJ_RESTRICT a, OPJ_UINT32 width, OPJ_UINT32 remaining_height)
Definition: dwt.c:2854
v8dwt_local::win_l_x1
OPJ_UINT32 win_l_x1
Definition: dwt.c:102
OPJ_Sc
#define OPJ_Sc(i)
opj_tcd_band::precincts
opj_tcd_precinct_t * precincts
Definition: tcd.h:163
opj_idwt3_v_cas1
static void opj_idwt3_v_cas1(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp_col, const OPJ_SIZE_T stride)
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on odd coordinate.
Definition: dwt.c:824
opj_dwt_fetch_cols_vertical_pass
static void opj_dwt_fetch_cols_vertical_pass(const void *arrayIn, void *tmpOut, OPJ_UINT32 height, OPJ_UINT32 stride_width, OPJ_UINT32 cols)
Fetch up to cols <= NB_ELTS_V8 for each line, and put them in tmpOut.
Definition: dwt.c:1247
opj_uint_min
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:111
opj_uint_max
static INLINE OPJ_UINT32 opj_uint_max(OPJ_UINT32 a, OPJ_UINT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:83
opj_malloc
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
opj_v8_t::f
OPJ_FLOAT32 f[NB_ELTS_V8]
Definition: dwt.c:93
opj_tcd_tilecomp::numresolutions
OPJ_UINT32 numresolutions
Definition: tcd.h:195
opj_free
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
opj_dwt_decode_v_job_t::min_j
OPJ_UINT32 min_j
Definition: dwt.c:2036
opj_dwt_encode_h_job_t::rw
OPJ_UINT32 rw
Definition: dwt.c:1182
OPJ_SS__off
#define OPJ_SS__off(i, off)
Definition: dwt.c:2359
opj_v8dwt_encode_step1
static void opj_v8dwt_encode_step1(OPJ_FLOAT32 *fw, OPJ_UINT32 end, const OPJ_FLOAT32 cst)
Definition: dwt.c:1567
opj_sparse_array_int32
Definition: sparse_array.c:35
opj_tccp::qntsty
OPJ_UINT32 qntsty
quantisation style
Definition: j2k.h:189
OPJ_D
#define OPJ_D(i)
Definition: dwt.c:185
opj_sparse_array_int32_free
void opj_sparse_array_int32_free(opj_sparse_array_int32_t *sa)
Frees a sparse array.
Definition: sparse_array.c:81
opj_tccp::qmfbid
OPJ_UINT32 qmfbid
discrete wavelet transform identifier
Definition: j2k.h:187
opj_thread_pool_wait_completion
void opj_thread_pool_wait_completion(opj_thread_pool_t *tp, int max_remaining_jobs)
Wait that no more than max_remaining_jobs jobs are remaining in the queue of the thread pool.
Definition: thread.c:894
opj_sparse_array_int32_write
OPJ_BOOL opj_sparse_array_int32_write(opj_sparse_array_int32_t *sa, OPJ_UINT32 x0, OPJ_UINT32 y0, OPJ_UINT32 x1, OPJ_UINT32 y1, const OPJ_INT32 *src, OPJ_UINT32 src_col_stride, OPJ_UINT32 src_line_stride, OPJ_BOOL forgiving)
Write the content of a rectangular region into the sparse array from a user buffer.
Definition: sparse_array.c:330
opj_uint_subs
static INLINE OPJ_UINT32 opj_uint_subs(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated difference of two unsigned integers.
Definition: opj_intmath.h:102
opj_dwt_decode_partial_1
static void opj_dwt_decode_partial_1(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas, OPJ_INT32 win_l_x0, OPJ_INT32 win_l_x1, OPJ_INT32 win_h_x0, OPJ_INT32 win_h_x1)
Definition: dwt.c:2280
opj_sparse_array_int32_read
OPJ_BOOL opj_sparse_array_int32_read(const opj_sparse_array_int32_t *sa, OPJ_UINT32 x0, OPJ_UINT32 y0, OPJ_UINT32 x1, OPJ_UINT32 y1, OPJ_INT32 *dest, OPJ_UINT32 dest_col_stride, OPJ_UINT32 dest_line_stride, OPJ_BOOL forgiving)
Read the content of a rectangular region of the sparse array into a user buffer.
Definition: sparse_array.c:311
opj_dwt_encode_h_job_t::min_j
OPJ_UINT32 min_j
Definition: dwt.c:1185
opj_v8dwt_interleave_partial_v
static void opj_v8dwt_interleave_partial_v(opj_v8dwt_t *OPJ_RESTRICT dwt, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_col, OPJ_UINT32 nb_elts_read)
Definition: dwt.c:2986
OPJ_DD__off
#define OPJ_DD__off(i, off)
Definition: dwt.c:2360
opj_tcd_band::y0
OPJ_INT32 y0
Definition: tcd.h:159
opj_dwt97_decode_h_job_t::nb_rows
OPJ_UINT32 nb_rows
Definition: dwt.c:3204
OPJ_Dc
#define OPJ_Dc(i)
OPJ_DD_
#define OPJ_DD_(i)
Definition: dwt.c:190
opj_tcd_cblk_dec
Code-block for decoding.
Definition: tcd.h:120
opj_dwt_init_sparse_array
static opj_sparse_array_int32_t * opj_dwt_init_sparse_array(opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Definition: dwt.c:2552
opj_dwt97_decode_h_job_t::rw
OPJ_UINT32 rw
Definition: dwt.c:3201
opj_tccp
Tile-component coding parameters.
Definition: j2k.h:175
opj_tcd_tilecomp::data
OPJ_INT32 * data
Definition: tcd.h:204
opj_dwt_encode_v_func
static void opj_dwt_encode_v_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:1217
dwt_local::mem
OPJ_INT32 * mem
Definition: dwt.c:84
opj_dwt_encode
OPJ_BOOL opj_dwt_encode(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet transform in 2-D.
Definition: dwt.c:1899
opj_dwt_calc_explicit_stepsizes
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1963
opj_dwt_alpha
static const OPJ_FLOAT32 opj_dwt_alpha
Definition: dwt.c:108
opj_dwt_t
struct dwt_local opj_dwt_t
opj_aligned_free
void opj_aligned_free(void *ptr)
Definition: opj_malloc.c:225
opj_dwt_decode
OPJ_BOOL opj_dwt_decode(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Inverse 5-3 wavelet transform in 2-D.
Definition: dwt.c:1910
opj_dwt97_decode_h_job_t::w
OPJ_UINT32 w
Definition: dwt.c:3202
opj_tcd::thread_pool
opj_thread_pool_t * thread_pool
Thread pool.
Definition: tcd.h:275
opj_uint_ceildivpow2
static INLINE OPJ_UINT32 opj_uint_ceildivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:198
opj_idwt53_h_cas0
static void opj_idwt53_h_cas0(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp)
Definition: dwt.c:335
opj_tcd_cblk_dec::y0
OPJ_INT32 y0
Definition: tcd.h:124
opj_dwt_decode_partial_1_parallel
static void opj_dwt_decode_partial_1_parallel(OPJ_INT32 *a, OPJ_UINT32 nb_cols, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas, OPJ_INT32 win_l_x0, OPJ_INT32 win_l_x1, OPJ_INT32 win_h_x0, OPJ_INT32 win_h_x1)
Definition: dwt.c:2362
opj_aligned_malloc
void * opj_aligned_malloc(size_t size)
Allocate memory aligned to a 16 byte boundary.
Definition: opj_malloc.c:207
opj_dwt_decode_v_job_t::max_j
OPJ_UINT32 max_j
Definition: dwt.c:2037
opj_dwt_decode_tile
static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t *tp, opj_tcd_tilecomp_t *tilec, OPJ_UINT32 i)
Inverse wavelet transform in 2-D.
Definition: dwt.c:2064
OPJ_UINT32
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
opj_tcd_band::bandno
OPJ_UINT32 bandno
Definition: tcd.h:161
OPJ_S_off
#define OPJ_S_off(i, off)
Definition: dwt.c:2355
opj_tcd_tilecomp::win_x1
OPJ_UINT32 win_x1
Definition: tcd.h:217
opj_dwt_encode_v_job_t::w
OPJ_UINT32 w
Definition: dwt.c:1210
dwt_local::sn
OPJ_INT32 sn
Definition: dwt.c:86
OPJ_S
#define OPJ_S(i)
Definition: dwt.c:184
opj_v8dwt_interleave_partial_h
static void opj_v8dwt_interleave_partial_h(opj_v8dwt_t *dwt, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_line, OPJ_UINT32 remaining_height)
Definition: dwt.c:2938
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:112
opj_dwt_get_band_coordinates
static void opj_dwt_get_band_coordinates(opj_tcd_tilecomp_t *tilec, OPJ_UINT32 resno, OPJ_UINT32 bandno, OPJ_UINT32 tcx0, OPJ_UINT32 tcy0, OPJ_UINT32 tcx1, OPJ_UINT32 tcy1, OPJ_UINT32 *tbx0, OPJ_UINT32 *tby0, OPJ_UINT32 *tbx1, OPJ_UINT32 *tby1)
Definition: dwt.c:2499
opj_dwt_decode_v_func
static void opj_dwt_decode_v_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:2040
opj_dwt_decode_real
OPJ_BOOL opj_dwt_decode_real(opj_tcd_t *p_tcd, opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Inverse 9-7 wavelet transform in 2-D.
Definition: dwt.c:3747
OPJ_S__off
#define OPJ_S__off(i, off)
Definition: dwt.c:2357
opj_tcd_resolution::win_y1
OPJ_UINT32 win_y1
Definition: tcd.h:185
opj_dwt97_decode_h_job_t::aj
OPJ_FLOAT32 *OPJ_RESTRICT aj
Definition: dwt.c:3203
opj_dwt_encode_and_deinterleave_h_one_row
static void opj_dwt_encode_and_deinterleave_h_one_row(void *rowIn, void *tmpIn, OPJ_UINT32 width, OPJ_BOOL even)
Process one line for the horizontal pass of the 5x3 forward transform.
Definition: dwt.c:1107
opj_sparse_array_int32_create
opj_sparse_array_int32_t * opj_sparse_array_int32_create(OPJ_UINT32 width, OPJ_UINT32 height, OPJ_UINT32 block_width, OPJ_UINT32 block_height)
Creates a new sparse array.
Definition: sparse_array.c:45
opj_tcd_precinct::dec
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:148
opj_dwt_norms
static const OPJ_FLOAT64 opj_dwt_norms[4][10]
Definition: dwt.c:197
OPJ_SS_
#define OPJ_SS_(i)
Definition: dwt.c:189
dwt_local::dn
OPJ_INT32 dn
Definition: dwt.c:85
J2K_CCP_QNTSTY_NOQNT
#define J2K_CCP_QNTSTY_NOQNT
Definition: j2k.h:64
opj_dwt97_decode_v_job_t::v
opj_v8dwt_t v
Definition: dwt.c:3249
opj_dwt97_decode_v_job_t::rh
OPJ_UINT32 rh
Definition: dwt.c:3250
opj_tcd_precinct::ch
OPJ_UINT32 ch
Definition: tcd.h:145
opj_thread_pool_t
Definition: thread.c:605
opj_tcd
Tile coder/decoder.
Definition: tcd.h:251
opj_dwt_encode_h_func
static void opj_dwt_encode_h_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:1190
OPJ_D_
#define OPJ_D_(i)
Definition: dwt.c:187
opj_dwt_decode_h_func
static void opj_dwt_decode_h_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:2016
opj_tcd_resolution::win_y0
OPJ_UINT32 win_y0
Definition: tcd.h:183
opj_tcd_resolution::win_x1
OPJ_UINT32 win_x1
Definition: tcd.h:184
opj_idwt53_h
static void opj_idwt53_h(const opj_dwt_t *dwt, OPJ_INT32 *tiledp)
Definition: dwt.c:479
opj_v8dwt_encode_step2
static void opj_v8dwt_encode_step2(OPJ_FLOAT32 *fl, OPJ_FLOAT32 *fw, OPJ_UINT32 end, OPJ_UINT32 m, OPJ_FLOAT32 cst)
Definition: dwt.c:1590