110 const rect &band_rect,
152 d /= (float)(1u << (31 - this->
K_max));
184 cb_size.
h =
ojph_min(tby1, y_lower_bound + nominal.
h) - tby0;
190 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
191 cb_size.
w = cbx1 - cbx0;
194 line_offset += cb_size.
w;
225 ui32 pcx0, pcx1, pcy0, pcy1;
228 ui32 yb, xb, coly = 0, colx = 0;
229 for (
ui32 y = 0; y < num_precincts.
h; ++y)
233 pcy0 = (pcy0 - (
band_num >> 1) + (1 << y_shift) - 1) >> y_shift;
234 pcy1 = (pcy1 - (
band_num >> 1) + (1 << y_shift) - 1) >> y_shift;
236 precinct *p = precincts + y * num_precincts.
w;
241 for (
ui32 x = 0; x < num_precincts.
w; ++x, ++p)
245 pcx0 = (pcx0 - (
band_num & 1) + (1 << x_shift) - 1) >> x_shift;
246 pcx1 = (pcx1 - (
band_num & 1) + (1 << x_shift) - 1) >> x_shift;
312 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
313 cb_size.
w = cbx1 - cbx0;
344 cb_size.
h = cby1 - cby0;
349 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
350 cb_size.
w = cbx1 - cbx0;
void wrap(T *buffer, size_t num_ele, ui32 pre_size)
static void pre_alloc(codestream *codestream, ui32 comp_num, const size &nominal)
void recreate(const size &cb_size, coded_cb_header *coded_cb)
void finalize_alloc(codestream *codestream, subband *parent, const size &nominal, const size &cb_size, coded_cb_header *coded_cb, ui32 K_max, int tbx0)
param_qcd * access_qcd(ui32 comp_num)
mem_elastic_allocator * get_elastic_alloc()
const param_siz * get_siz()
mem_fixed_allocator * get_allocator()
const param_cod * get_cod()
const param_dfs * access_dfs()
bool has_vert_transform()
bool has_horz_transform()
static void pre_alloc(codestream *codestream, const rect &band_rect, ui32 comp_num, ui32 res_num, ui32 transform_flags)
void exchange_buf(line_buf *l)
coded_cb_header * coded_cbs
void get_cb_indices(const size &num_precincts, precinct *precincts)
mem_elastic_allocator * elastic
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)
bool is_reversible() const
size get_log_block_dims() const
ui16 get_dfs_index() const
const param_atk * access_atk() const
size get_log_precinct_size(ui32 res_num) const
bool is_dfs_defined() const
ui8 get_num_decompositions() const
ui32 propose_precision(const param_siz *siz, ui32 comp_num) const
const param_dfs * get_dfs(int index) const
float irrev_get_delta(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const
ui32 get_Kmax(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const