39#ifndef OJPH_PARAMS_LOCAL_H
40#define OJPH_PARAMS_LOCAL_H
167 friend ::ojph::param_siz;
212 assert(comp_num <
Csiz);
213 assert(downsampling.
x != 0 && downsampling.
y != 0);
227 "You cannot set image extent nor tile size to zero");
230 "tile offset has to be smaller than image offset");
233 "the top left tile must intersect with the image");
239 assert(comp_num <
Csiz);
240 return (
cptr[comp_num].SSiz & 0x7F) + 1u;
244 assert(comp_num <
Csiz);
245 return (
cptr[comp_num].SSiz & 0x80) != 0;
249 assert(comp_num <
Csiz);
363 friend ::ojph::param_cod;
409 assert(val == 0 || val == 1);
426 "color transform can only be employed when the image has 3 or "
427 "more color components");
433 for (
ui32 i = 1; i < 3; ++i)
436 test = test || (p.
x != p1.
x || p.
y != p1.
y);
440 "when color transform is used, the first 3 colour "
441 "components must have the same downsampling.");
448 for (
ui32 i = 0; i < num_comps; ++i)
451 if (r.
x & (r.
x - 1) || r.
y & (r.
y - 1))
452 OJPH_ERROR(0x00040013,
"For RPCL and PCRL progression orders,"
453 "component downsampling factors have to be powers of 2");
496 return size(1 << t.
w, 1 << t.
h);
514 return (
Scod & 2) == 2;
523 return (
Scod & 4) == 4;
544 { this->
next = coc; }
551 result = result->
next;
597 friend ::ojph::param_qcd;
641 ui32 num_decompositions,
649 bool is_employing_color_transform);
653 {
return (
ui8)(v >> 3); }
655 {
return (
ui8)(v << 3); }
703 Cnlt = special_comp_num::ALL_COMPS;
720 bool& is_signed)
const;
805 ui8 tile_part_index = 0,
ui8 num_tile_parts = 0)
808 Psot = payload_length + 12;
810 TPsot = tile_part_index;
811 TNsot = num_tile_parts;
957 void init(
bool clear_all =
true) {
984 { assert(s <
Natk);
return d + s; }
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[]
@ OJPH_TILEPART_RESOLUTIONS
@ OJPH_TILEPART_NO_DIVISIONS
@ OJPH_TILEPART_COMPONENTS
const char OJPH_PO_STRING_CPRL[]
const char OJPH_PN_STRING_PROFILE0[]
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,...)
size get_log_precinct_size(ui32 res_num) const
size get_block_dims() const
size get_log_block_dims() const
const param_atk * get_atk(int index) const
ui32 get_num_steps() const
bool is_reversible() const
bool read(infile_base *file)
void init(bool clear_all=true)
int get_coeff_type() const
bool read_coefficient(infile_base *file, float &K)
bool is_whole_sample() const
const lifting_step * get_step(ui32 s) const
void link(param_atk *next)
bool is_using_ws_extension() const
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)
void link_cod(const param_cod *coc)
size get_block_dims() const
size get_log_block_dims() const
ui16 get_dfs_index() const
void set_reversible(bool reversible)
const param_cod * get_cod(ui32 comp_num) const
bool is_employing_color_transform() const
void employ_color_transform(ui8 val)
const param_atk * access_atk() const
size get_log_precinct_size(ui32 res_num) const
bool is_dfs_defined() const
bool packets_use_eph() const
ui8 get_num_decompositions() const
void read(infile_base *file, cod_type type)
void update_atk(const param_atk *atk)
bool packets_may_use_sop() const
size get_precinct_size(ui32 res_num) const
ui8 get_wavelet_kern() const
ui32 get_comp_num() const
ui32 propose_precision(const param_siz *siz, ui32 comp_num) const
bool read(infile_base *file)
dfs_dwt_type get_dwt_type(ui32 decomp_level) const
point get_res_downsamp(ui32 skipped_resolutions) const
ui32 get_subband_idx(ui32 num_decompositions, ui32 resolution, ui32 subband) const
const param_dfs * get_dfs(int index) const
void set_type3_transformation(ui32 comp_num, bool enable)
bool get_type3_transformation(ui32 comp_num, ui8 &bit_depth, bool &is_signed) const
bool write(outfile_base *file) const
param_nlt * add_object(ui32 comp_num)
void trim_non_existing_components(ui32 num_comps)
void read(infile_base *file)
const param_nlt * get_comp_object(ui32 comp_num) const
void check_validity(param_siz &siz)
bool is_any_enabled() const
void read(infile_base *file, ui32 num_comps)
float irrev_get_delta(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const
ui8 encode_SPqcd(ui8 v) const
void set_rev_quant(ui32 num_decomps, ui32 bit_depth, bool is_employing_color_transform)
void set_irrev_quant(ui32 num_decomps)
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)
ui32 get_Kmax(const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const
ui8 decode_SPqcd(ui8 v) const
void set_skipped_resolutions(ui32 skipped_resolutions)
ui32 get_bit_depth(ui32 comp_num) const
bool ws_kern_support_needed
ui32 get_recon_height(ui32 comp_num) const
bool is_signed(ui32 comp_num) const
void check_validity(const param_cod &cod)
bool write(outfile_base *file)
param_siz(const param_siz &)=delete
ui16 get_num_components() const
point get_recon_downsampling(ui32 comp_num) const
void set_Rsiz_flag(ui16 flag)
point get_recon_size(ui32 comp_num) const
bool is_dfs_support_needed()
ui32 get_height(ui32 comp_num) const
void set_comp_info(ui32 comp_num, const point &downsampling, ui32 bit_depth, bool is_signed)
bool is_ws_kern_support_needed()
void link(const param_cod *cod)
point get_downsampling(ui32 comp_num) const
void reset_Rsiz_flag(ui16 flag)
void read(infile_base *file)
param_siz & operator=(const param_siz &)=delete
void link(const param_dfs *dfs)
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)