51#include "../transform/ojph_transform.h"
101 const rect& recon_res_rect,
ui32 res_num)
119 next_res_rect.
org.
x = trx0;
120 next_res_rect.
org.
y = try0;
121 next_res_rect.
siz.
w = trx1 - trx0;
122 next_res_rect.
siz.
h = try1 - try0;
136 for (
ui32 i = 1; i < 4; ++i)
138 ui32 tbx0 = (trx0 - (i & 1) + 1) >> 1;
139 ui32 tbx1 = (trx1 - (i & 1) + 1) >> 1;
140 ui32 tby0 = (try0 - (i >> 1) + 1) >> 1;
141 ui32 tby1 = (try1 - (i >> 1) + 1) >> 1;
144 band_rect.
org.
x = tbx0;
145 band_rect.
org.
y = tby0;
146 band_rect.
siz.
w = tbx1 - tbx0;
147 band_rect.
siz.
h = tby1 - tby0;
157 if (trx0 != trx1 && try0 != try1)
181 const rect& res_rect,
182 const rect& recon_res_rect,
214 next_res_rect.
org.
x = trx0;
215 next_res_rect.
org.
y = try0;
216 next_res_rect.
siz.
w = trx1 - trx0;
217 next_res_rect.
siz.
h = try1 - try0;
235 for (
ui32 i = 1; i < 4; ++i)
237 ui32 tbx0 = (trx0 - (i & 1) + 1) >> 1;
238 ui32 tbx1 = (trx1 - (i & 1) + 1) >> 1;
239 ui32 tby0 = (try0 - (i >> 1) + 1) >> 1;
240 ui32 tby1 = (try1 - (i >> 1) + 1) >> 1;
243 band_rect.
org.
x = tbx0;
244 band_rect.
org.
y = tby0;
245 band_rect.
siz.
w = tbx1 - tbx0;
246 band_rect.
siz.
h = tby1 - tby0;
259 if (trx0 != trx1 && try0 != try1)
268 for (
ui64 i = 0; i < num; ++i)
288 point t(proj_factor.
x * ppx0, proj_factor.
y * ppy0);
289 t.x = t.x > tile_top_left.
x ? t.x : tile_top_left.
x;
290 t.y = t.y > tile_top_left.
y ? t.y : tile_top_left.
y;
303 for (
int i = 1; i < 4; ++i)
317 for (
ui32 i = 1; i <= max_num_levels; ++i, val >>= 2)
429 for (
ui32 i = width; i > 0; --i)
453 lines + 1, 0, width);
456 lines + 2, 1, width);
459 lines + 3, 2, width);
462 lines + 4, 3, width);
495 lines + 1, 2, width);
498 lines + 2, 3, width);
531 lines + 1, 1, width);
534 lines + 2, 2, width);
537 lines + 3, 3, width);
543 lines + 1, 3, width);
674 for (
ui32 i = width; i > 0; --i)
715 lines + 1, 7, width);
719 lines + 2, 6, width);
723 lines + 3, 5, width);
727 lines + 4, 4, width);
752 for (
ui32 i = width; i > 0; --i)
766 ui32 lower_resolutions_bytes = 0;
772 for (
si32 i = 0; i < repeat; ++i)
775 return this->
num_bytes + lower_resolutions_bytes;
852 if (this->
res_num == resolution_num)
mem_elastic_allocator * get_elastic_alloc()
ui32 get_skipped_res_for_read()
mem_fixed_allocator * get_allocator()
ui8 * get_precinct_scratch()
const param_cod * get_cod()
ui32 get_skipped_res_for_recon()
bool get_top_left_precinct(point &top_left)
void parse_one_precinct(ui32 &data_left, infile_base *file)
bool skipped_res_for_recon
ui32 get_num_bytes() const
mem_elastic_allocator * elastic
void write_precincts(outfile_base *file)
bool skipped_res_for_read
void finalize_alloc(codestream *codestream, const rect &res_rect, const rect &recon_res_rect, ui32 comp_num, ui32 res_num, point comp_downsamp, tile_comp *parent_tile_comp, resolution *parent_res)
void parse_all_precincts(ui32 &data_left, infile_base *file)
static void pre_alloc(codestream *codestream, const rect &res_rect, const rect &recon_res_rect, ui32 res_num)
void write_one_precinct(outfile_base *file)
void exchange_buf(line_buf *l)
void get_cb_indices(const size &num_precincts, precinct *precincts)
static void pre_alloc(codestream *codestream, const rect &band_rect, ui32 res_num)
void finalize_alloc(codestream *codestream, const rect &band_rect, resolution *res, ui32 res_num, ui32 subband_num)
void pre_alloc_data(size_t num_ele, ui32 pre_size)
void pre_alloc_obj(size_t num_ele)
T * post_alloc_data(size_t num_ele, ui32 pre_size)
T * post_alloc_obj(size_t num_ele)
void(* irrev_horz_wvlt_fwd_tx)(line_buf *src, line_buf *ldst, line_buf *hdst, ui32 width, bool even)
void(* rev_horz_wvlt_bwd_tx)(line_buf *dst, line_buf *lsrc, line_buf *hsrc, ui32 width, bool even)
static void rotate_buffers(line_buf *line1, line_buf *line2, line_buf *line3, line_buf *line4)
void(* rev_vert_wvlt_fwd_update)(const line_buf *src1, const line_buf *src2, line_buf *dst, ui32 repeat)
void(* rev_horz_wvlt_fwd_tx)(line_buf *src, line_buf *ldst, line_buf *hdst, ui32 width, bool even)
void(* irrev_vert_wvlt_step)(const line_buf *src1, const line_buf *src2, line_buf *dst, int step_num, ui32 repeat)
void(* rev_vert_wvlt_bwd_update)(const line_buf *src1, const line_buf *src2, line_buf *dst, ui32 repeat)
void(* rev_vert_wvlt_bwd_predict)(const line_buf *src1, const line_buf *src2, line_buf *dst, ui32 repeat)
void(* rev_vert_wvlt_fwd_predict)(const line_buf *src1, const line_buf *src2, line_buf *dst, ui32 repeat)
void(* irrev_horz_wvlt_bwd_tx)(line_buf *src, line_buf *ldst, line_buf *hdst, ui32 width, bool even)
void(* irrev_vert_wvlt_K)(const line_buf *src, line_buf *dst, bool L_analysis_or_H_synthesis, ui32 repeat)
#define ojph_div_ceil(a, b)
size get_log_block_dims() const
size get_log_precinct_size(ui32 res_num) const
bool packets_use_eph() const
ui8 get_num_decompositions() const
bool packets_may_use_sop() const
bool is_reversible() const
void write(outfile_base *file)
void parse(int tag_tree_size, ui32 *lev_idx, mem_elastic_allocator *elastic, ui32 &data_left, infile_base *file, bool skipped)