OPJ_UINT32 opj_dwt_getgain_real(OPJ_UINT32 orient)
Get the gain of a subband for the irreversible 9-7 DWT.
Definition: dwt.c:1258
OPJ_UINT32 cw
Definition: tcd.h:145
float OPJ_FLOAT32
Definition: openjpeg.h:115
OPJ_INT32 * decoded_data
Definition: tcd.h:138
OPJ_UINT32 w
Definition: dwt.c:1327
static void opj_dwt_segment_grow(OPJ_UINT32 filter_width, OPJ_UINT32 max_size, OPJ_UINT32 *start, OPJ_UINT32 *end)
Definition: dwt.c:1858
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:1267
OPJ_UINT32 win_x0
Definition: tcd.h:215
static void opj_v4dwt_decode_step2(opj_v4_t *l, opj_v4_t *w, OPJ_UINT32 start, OPJ_UINT32 end, OPJ_UINT32 m, OPJ_FLOAT32 c)
Definition: dwt.c:2395
OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet transform in 2-D.
Definition: dwt.c:1198
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1280
opj_dwt_t v
Definition: dwt.c:1349
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:215
OPJ_INT32 x0
Definition: tcd.h:159
static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t *OPJ_RESTRICT r, OPJ_UINT32 i)
Definition: dwt.c:1307
OPJ_UINT32 numresolutions
number of resolutions
Definition: j2k.h:179
#define OPJ_D__off(i, off)
Definition: dwt.c:1675
#define PARALLEL_COLS_53
Number of columns that we can process in parallel in the vertical pass.
Definition: dwt.c:78
static void opj_v4dwt_interleave_partial_h(opj_v4dwt_t *dwt, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_line, OPJ_UINT32 remaining_height)
Definition: dwt.c:2225
OPJ_UINT32 win_y0
Definition: tcd.h:216
static const OPJ_FLOAT32 opj_dwt_delta
Definition: dwt.c:108
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_INT32 x0
Definition: tcd.h:173
OPJ_INT32 y1
Definition: tcd.h:173
OPJ_INT32 x1
Definition: tcd.h:173
OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:1250
OPJ_UINT32 win_l_x0
Definition: dwt.c:99
OPJ_INT32 x1
Definition: tcd.h:124
static OPJ_BOOL opj_dwt_decode_partial_97(opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Definition: dwt.c:2642
#define SIZE_MAX
Definition: opj_malloc.c:40
opj_tcd_band_t bands[3]
Definition: tcd.h:179
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:1570
OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t *tilec)
Forward 9-7 wavelet transform in 2-D.
Definition: dwt.c:1250
static void opj_idwt53_h_cas1(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp)
Definition: dwt.c:483
OPJ_UINT32 opj_dwt_getgain(OPJ_UINT32 orient)
Get the gain of a subband for the reversible 5-3 DWT.
Definition: dwt.c:1220
#define OPJ_S_(i)
Definition: dwt.c:210
OPJ_UINT32 max_j
Definition: dwt.c:1330
static OPJ_BOOL opj_dwt_decode_partial_tile(opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Definition: dwt.c:1925
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:2883
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:953
static const OPJ_FLOAT32 opj_K
Definition: dwt.c:110
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
static OPJ_BOOL opj_dwt_decode_tile_97(opj_tcd_tilecomp_t *OPJ_RESTRICT tilec, OPJ_UINT32 numres)
Definition: dwt.c:2510
OPJ_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:1328
OPJ_UINT32 min_j
Definition: dwt.c:1353
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:1206
OPJ_INT32 x1
Definition: tcd.h:191
OPJ_UINT32 win_h_x1
Definition: dwt.c:102
#define INLINE
Definition: openjpeg.h:65
static void opj_dwt_encode_1(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas)
Forward 5-3 wavelet transform in 1-D.
Definition: dwt.c:347
OPJ_UINT32 ph
Definition: tcd.h:175
static void opj_dwt_encode_1_real(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas)
Forward 9-7 wavelet transform in 1-D.
Definition: dwt.c:1040
static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b)
Multiply two fixed-precision rational numbers.
Definition: opj_intmath.h:242
OPJ_INT32 y1
Definition: tcd.h:124
OPJ_UINT32 rh
Definition: dwt.c:1350
opj_tcd_resolution_t * resolutions
Definition: tcd.h:199
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:1234
double OPJ_FLOAT64
Definition: openjpeg.h:116
opj_stepsize_t stepsizes[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: j2k.h:191
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:854
#define OPJ_D_off(i, off)
Definition: dwt.c:1673
OPJ_INT32 x0
Definition: tcd.h:191
OPJ_UINT32 pw
Definition: tcd.h:175
OPJ_INT32 x0
Definition: tcd.h:124
void(* DWT1DFN)(const opj_dwt_t *v)
Virtual function type for wavelet transform in 1-D.
Definition: dwt.c:118
Quantization stepsize.
Definition: j2k.h:165
OPJ_BOOL whole_tile_decoding
Only valid for decoding.
Definition: tcd.h:282
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
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_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:1267
OPJ_INT32 mant
mantissa
Definition: j2k.h:169
OPJ_INT32 expn
exponent
Definition: j2k.h:167
OPJ_UINT32 rw
Definition: dwt.c:1326
static const OPJ_FLOAT32 opj_c13318
Definition: dwt.c:111
static const OPJ_FLOAT32 opj_dwt_beta
Definition: dwt.c:106
opj_dwt_t h
Definition: dwt.c:1325
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:197
#define OPJ_UNUSED(x)
Definition: jp2.c:47
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
int OPJ_BOOL
Definition: openjpeg.h:110
void * opj_aligned_32_malloc(size_t size)
Allocate memory aligned to a 32 byte boundary.
Definition: opj_malloc.c:216
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
static void opj_v4dwt_interleave_v(opj_v4dwt_t *OPJ_RESTRICT dwt, OPJ_FLOAT32 *OPJ_RESTRICT a, OPJ_UINT32 width, OPJ_UINT32 nb_elts_read)
Definition: dwt.c:2251
Precinct structure.
Definition: tcd.h:142
static const OPJ_FLOAT32 opj_dwt_gamma
Definition: dwt.c:107
static void opj_v4dwt_decode(opj_v4dwt_t *OPJ_RESTRICT dwt)
Definition: dwt.c:2444
struct v4dwt_local opj_v4dwt_t
Tile-component resolution structure.
Definition: tcd.h:171
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:1234
Tile-component structure.
Definition: tcd.h:189
Sub-band structure.
Definition: tcd.h:157
static void opj_v4dwt_interleave_h(opj_v4dwt_t *OPJ_RESTRICT dwt, OPJ_FLOAT32 *OPJ_RESTRICT a, OPJ_UINT32 width, OPJ_UINT32 remaining_height)
Definition: dwt.c:2171
OPJ_INT32 * data_win
data of the component limited to window of interest.
Definition: tcd.h:213
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:1543
OPJ_UINT32 numbands
Definition: tcd.h:177
int32_t OPJ_INT32
Definition: openjpeg.h:125
#define VREG_INT_COUNT
Number of int32 values in a SSE2 register.
Definition: dwt.c:74
static OPJ_BOOL opj_dwt_encode_procedure(opj_tcd_tilecomp_t *tilec, void(*p_function)(OPJ_INT32 *, OPJ_INT32, OPJ_INT32, OPJ_INT32))
Definition: dwt.c:1109
OPJ_INT32 cas
Definition: dwt.c:87
OPJ_UINT32 win_x0
Definition: tcd.h:182
OPJ_INT32 y0
Definition: tcd.h:173
static const OPJ_FLOAT64 opj_dwt_norms_real[4][10]
Definition: dwt.c:233
#define OPJ_RESTRICT
Definition: opj_includes.h:121
OPJ_UINT32 win_y1
Definition: tcd.h:218
opj_tcd_precinct_t * precincts
Definition: tcd.h:163
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:904
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
#define OPJ_TRUE
Definition: openjpeg.h:111
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_UINT32 min_j
Definition: dwt.c:1329
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
OPJ_UINT32 numresolutions
Definition: tcd.h:195
static void opj_dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas)
Forward lazy transform (vertical)
Definition: dwt.c:273
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
OPJ_FLOAT32 f[4]
Definition: dwt.c:91
#define OPJ_SS__off(i, off)
Definition: dwt.c:1676
union opj_tcd_precinct::@3 cblks
OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t *tilec)
Forward 5-3 wavelet transform in 2-D.
Definition: dwt.c:1198
Definition: sparse_array.c:35
OPJ_UINT32 qntsty
quantisation style
Definition: j2k.h:189
#define OPJ_D(i)
Definition: dwt.c:209
void opj_sparse_array_int32_free(opj_sparse_array_int32_t *sa)
Frees a sparse array.
Definition: sparse_array.c:81
OPJ_UINT32 qmfbid
discrete wavelet transform identifier
Definition: j2k.h:187
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_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
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
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:1597
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_INT32 *OPJ_RESTRICT tiledp
Definition: dwt.c:1352
#define OPJ_DD__off(i, off)
Definition: dwt.c:1677
OPJ_INT32 y0
Definition: tcd.h:159
#define OPJ_DD_(i)
Definition: dwt.c:214
Code-block for decoding.
Definition: tcd.h:120
OPJ_UINT32 w
Definition: dwt.c:1351
static opj_sparse_array_int32_t * opj_dwt_init_sparse_array(opj_tcd_tilecomp_t *tilec, OPJ_UINT32 numres)
Definition: dwt.c:1869
Tile-component coding parameters.
Definition: j2k.h:175
OPJ_INT32 * data
Definition: tcd.h:204
OPJ_INT32 * mem
Definition: dwt.c:84
opj_v4_t * wavelet
Definition: dwt.c:95
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1280
static const OPJ_FLOAT32 opj_dwt_alpha
Definition: dwt.c:105
struct dwt_local opj_dwt_t
void opj_aligned_free(void *ptr)
Definition: opj_malloc.c:225
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:1206
opj_thread_pool_t * thread_pool
Thread pool.
Definition: tcd.h:275
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_UINT32 win_l_x1
Definition: dwt.c:100
static void opj_idwt53_h_cas0(OPJ_INT32 *tmp, const OPJ_INT32 sn, const OPJ_INT32 len, OPJ_INT32 *tiledp)
Definition: dwt.c:415
OPJ_INT32 y0
Definition: tcd.h:124
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:1679
OPJ_UINT32 win_h_x0
Definition: dwt.c:101
void * opj_aligned_malloc(size_t size)
Allocate memory aligned to a 16 byte boundary.
Definition: opj_malloc.c:207
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:1381
static void opj_v4dwt_decode_step1(opj_v4_t *w, OPJ_UINT32 start, OPJ_UINT32 end, const OPJ_FLOAT32 c)
Definition: dwt.c:2376
static void opj_v4dwt_interleave_partial_v(opj_v4dwt_t *OPJ_RESTRICT dwt, opj_sparse_array_int32_t *sa, OPJ_UINT32 sa_col, OPJ_UINT32 nb_elts_read)
Definition: dwt.c:2273
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
OPJ_UINT32 bandno
Definition: tcd.h:161
#define OPJ_S_off(i, off)
Definition: dwt.c:1672
OPJ_UINT32 win_x1
Definition: tcd.h:217
OPJ_INT32 sn
Definition: dwt.c:86
#define OPJ_S(i)
Definition: dwt.c:208
OPJ_INT32 cas
Definition: dwt.c:98
OPJ_UINT32 opj_dwt_getgain_real(OPJ_UINT32 orient)
Get the gain of a subband for the irreversible 9-7 DWT.
Definition: dwt.c:1258
#define OPJ_FALSE
Definition: openjpeg.h:112
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:1816
static void opj_dwt_decode_v_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:1357
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:2883
OPJ_UINT32 opj_dwt_getgain(OPJ_UINT32 orient)
Get the gain of a subband for the reversible 5-3 DWT.
Definition: dwt.c:1220
#define OPJ_S__off(i, off)
Definition: dwt.c:1674
OPJ_UINT32 win_y1
Definition: tcd.h:185
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_UINT32 max_j
Definition: dwt.c:1354
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:148
OPJ_INT32 sn
Definition: dwt.c:97
static const OPJ_FLOAT64 opj_dwt_norms[4][10]
Definition: dwt.c:221
#define OPJ_SS_(i)
Definition: dwt.c:213
OPJ_INT32 dn
Definition: dwt.c:85
#define J2K_CCP_QNTSTY_NOQNT
Definition: j2k.h:64
static void opj_dwt_deinterleave_h(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas)
Forward lazy transform (horizontal)
Definition: dwt.c:249
OPJ_UINT32 ch
Definition: tcd.h:145
Tile coder/decoder.
Definition: tcd.h:251
#define OPJ_D_(i)
Definition: dwt.c:211
static void opj_dwt_decode_h_func(void *user_data, opj_tls_t *tls)
Definition: dwt.c:1333
OPJ_UINT32 win_y0
Definition: tcd.h:183
OPJ_UINT32 win_x1
Definition: tcd.h:184
static void opj_idwt53_h(const opj_dwt_t *dwt, OPJ_INT32 *tiledp)
Definition: dwt.c:559
OPJ_INT32 dn
Definition: dwt.c:96