39#ifndef OJPH_PARAMS_LOCAL_H
40#define OJPH_PARAMS_LOCAL_H
153 friend ::ojph::param_siz;
185 assert(comp_num <
Csiz);
186 assert(downsampling.
x != 0 && downsampling.
y != 0);
198 "You cannot set image extent nor tile size to zero");
201 "tile offset has to be smaller than image offset");
204 "the top left tile must intersect with the image");
210 assert(comp_num <
Csiz);
211 return (
cptr[comp_num].SSiz & 0x7F) + 1u;
215 assert(comp_num <
Csiz);
216 return (
cptr[comp_num].SSiz & 0x80) != 0;
220 assert(comp_num <
Csiz);
313 friend ::ojph::param_cod;
339 assert(val == 0 || val == 1);
350 "color transform can only be employed when the image has 3 or "
351 "more color components");
357 for (
ui32 i = 1; i < 3; ++i)
360 test = test || (p.
x != p1.
x || p.
y != p1.
y);
364 "when color transform is used, the first 3 colour "
365 "components must have the same downsampling.");
372 for (
ui32 i = 0; i < num_comps; ++i)
375 if (r.
x & (r.
x - 1) || r.
y & (r.
y - 1))
376 OJPH_ERROR(0x00040013,
"For RPCL and PCRL progression orders,"
377 "component downsampling factors have to be powers of 2");
414 {
return (
Scod & 2) == 2; }
416 {
return (
Scod & 4) == 4; }
437 friend ::ojph::param_qcd;
443 for (
int i = 0; i < 97; ++i)
575 ui8 tile_part_index = 0,
ui8 num_tile_parts = 0)
578 Psot = payload_length + 12;
580 TPsot = tile_part_index;
581 TNsot = num_tile_parts;
const char OJPH_PN_STRING_BROADCAST[]
const char OJPH_PN_STRING_CINEMAS4K[]
const char OJPH_PO_STRING_PCRL[]
const char OJPH_PN_STRING_IMF[]
const char OJPH_PN_STRING_CINEMA4K[]
const char OJPH_PO_STRING_RLCP[]
const char OJPH_PN_STRING_CINEMA2K[]
const char OJPH_PO_STRING_RPCL[]
const char OJPH_PO_STRING_CPRL[]
const char OJPH_PN_STRING_PROFILE0[]
@ OJPH_TILEPART_RESOLUTIONS
@ OJPH_TILEPART_COMPONENTS
@ OJPH_TILEPART_NODIVSIONS
const char OJPH_PN_STRING_CINEMAS2K[]
const char OJPH_PO_STRING_LRCP[]
const char OJPH_PN_STRING_PROFILE1[]
#define ojph_div_ceil(a, b)
#define OJPH_ERROR(t,...)
void check_validity(const param_cod &cod, const param_qcd &qcd)
void read(infile_base *file)
bool write(outfile_base *file)
void check_validity(const param_siz &siz)
bool write(outfile_base *file)
size get_block_dims() const
size get_log_block_dims() const
void set_reversible(bool reversible)
bool is_employing_color_transform() const
void employ_color_transform(ui8 val)
void read(infile_base *file)
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
size get_precinct_size(ui32 res_num) const
void read(infile_base *file, ui32 num_comps)
ui32 get_Kmax(ui32 resolution, ui32 subband) const
ui32 get_num_guard_bits() const
void set_delta(float delta)
void check_validity(const param_siz &siz, const param_cod &cod)
bool write(outfile_base *file)
void read(infile_base *file)
void set_rev_quant(ui32 bit_depth, bool is_employing_color_transform)
float irrev_get_delta(ui32 resolution, ui32 subband) const
void set_skipped_resolutions(ui32 skipped_resolutions)
ui32 get_bit_depth(ui32 comp_num) const
ui32 get_recon_height(ui32 comp_num) const
bool is_signed(ui32 comp_num) const
bool write(outfile_base *file)
param_siz(const param_siz &)=delete
ui16 get_num_components() const
ui32 get_height(ui32 comp_num) const
void set_comp_info(ui32 comp_num, const point &downsampling, ui32 bit_depth, bool is_signed)
point get_downsampling(ui32 comp_num) const
void read(infile_base *file)
param_siz & operator=(const param_siz &)=delete
void set_num_components(ui32 num_comps)
ui32 get_width(ui32 comp_num) const
ui32 get_recon_width(ui32 comp_num) const
ui8 get_num_tile_parts() const
void init(ui32 payload_length=0, ui16 tile_idx=0, ui8 tile_part_index=0, ui8 num_tile_parts=0)
ui16 get_tile_index() const
bool read(infile_base *file, bool resilient)
ui8 get_tile_part_index() const
ui32 get_payload_length() const
bool write(outfile_base *file, ui32 payload_len)
void set_next_pair(ui16 Ttlm, ui32 Ptlm)
bool write(outfile_base *file)
void init(ui32 num_pairs, Ttlm_Ptlm_pair *store)