102 const rect &band_rect,
132 d /= (float)(1u << (31 - this->
K_max));
164 cb_size.
h =
ojph_min(tby1, y_lower_bound + nominal.
h) - tby0;
170 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
171 cb_size.
w = cbx1 - cbx0;
174 line_offset += cb_size.
w;
200 ui32 pcx0, pcx1, pcy0, pcy1, shift = (
band_num != 0 ? 1 : 0);
201 ui32 yb, xb, coly = 0, colx = 0;
202 for (
ui32 y = 0; y < num_precincts.
h; ++y)
206 pcy0 = (pcy0 - (
band_num >> 1) + (1<<shift) - 1) >> shift;
207 pcy1 = (pcy1 - (
band_num >> 1) + (1<<shift) - 1) >> shift;
209 precinct *p = precincts + y * num_precincts.
w;
214 for (
ui32 x = 0; x < num_precincts.
w; ++x, ++p)
218 pcx0 = (pcx0 - (
band_num & 1) + (1<<shift) - 1) >> shift;
219 pcx1 = (pcx1 - (
band_num & 1) + (1<<shift) - 1) >> shift;
284 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
285 cb_size.
w = cbx1 - cbx0;
316 cb_size.
h = cby1 - cby0;
321 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
322 cb_size.
w = cbx1 - cbx0;
static void pre_alloc(codestream *codestream, 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()
mem_fixed_allocator * get_allocator()
const param_cod * get_cod()
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
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 wrap(T *buffer, size_t num_ele, ui32 pre_size)
size get_log_block_dims() const
size get_log_precinct_size(ui32 res_num) const
bool is_reversible() const
ui32 get_Kmax(ui32 resolution, ui32 subband) const
float irrev_get_delta(ui32 resolution, ui32 subband) const