135 ui32 x_off = ((
parent->has_horz_transform()) ? 1 : 0);
136 ui32 y_off = ((
parent->has_vert_transform()) ? 1 : 0);
160 d /= (float)(1u << (31 - this->
K_max));
186 for (
int i = (
int)
num_blocks.area(); i > 0; --i, ++cp)
193 cb_size.
h =
ojph_min(tby1, y_lower_bound + nominal.
h) - tby0;
199 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
200 cb_size.
w = cbx1 - cbx0;
203 precision, comp_num);
204 line_offset += cb_size.
w;
238 ui32 pcx0, pcx1, pcy0, pcy1;
239 ui32 x_shift =
parent->has_horz_transform() ? 1 : 0;
240 ui32 y_shift =
parent->has_vert_transform() ? 1 : 0;
241 ui32 yb, xb, coly = 0, colx = 0;
242 for (
ui32 y = 0; y < num_precincts.
h; ++y)
246 pcy0 = (pcy0 - (
band_num >> 1) + (1 << y_shift) - 1) >> y_shift;
247 pcy1 = (pcy1 - (
band_num >> 1) + (1 << y_shift) - 1) >> y_shift;
249 precinct *p = precincts + y * num_precincts.
w;
254 for (
ui32 x = 0; x < num_precincts.
w; ++x, ++p)
258 pcx0 = (pcx0 - (
band_num & 1) + (1 << x_shift) - 1) >> x_shift;
259 pcx1 = (pcx1 - (
band_num & 1) + (1 << x_shift) - 1) >> x_shift;
285 void* p =
lines[0].p;
325 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
326 cb_size.
w = cbx1 - cbx0;
327 blocks[i].recreate(cb_size,
357 cb_size.
h = cby1 - cby0;
362 ui32 cbx1 =
ojph_min(tbx1, x_lower_bound + (i + 1) * nominal.
w);
363 cb_size.
w = cbx1 - cbx0;
364 blocks[i].recreate(cb_size,
static void pre_alloc(codestream *codestream, const size &nominal, ui32 precision)
const param_cod * get_coc(ui32 comp_num)
mem_elastic_allocator * get_elastic_alloc()
const param_qcd * access_qcd()
mem_fixed_allocator * get_allocator()
const param_dfs * access_dfs()
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
const param_dfs * get_dfs(int index) const
float get_irrev_delta(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const
ui32 propose_precision(const param_cod *cod) const
ui32 get_Kmax(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const
param_qcd * get_qcc(ui32 comp_idx)