OpenJPH
Open-source implementation of JPEG2000 Part-15
|
#include <ojph_params_local.h>
Public Types | |
enum | default_comp_num : ui16 { OJPH_QCD_UNKNOWN = 65534 , OJPH_QCD_DEFAULT = 65535 } |
enum | qcd_type : ui8 { UNDEFINED = 0 , QCD_MAIN = 1 , QCC_MAIN = 2 , QCD_TILE = 3 , QCC_TILE = 4 } |
Public Member Functions | |
param_qcd (param_qcd *top_qcd=NULL, ui16 comp_idx=OJPH_QCD_DEFAULT) | |
~param_qcd () | |
void | check_validity (const param_siz &siz, const param_cod &cod) |
void | set_delta (float delta) |
void | set_delta (ui32 comp_idx, float delta) |
ui32 | get_num_guard_bits () const |
ui32 | get_MAGB () const |
ui32 | get_Kmax (const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const |
ui32 | propose_precision (const param_cod *cod) const |
float | get_irrev_delta (const param_dfs *dfs, ui32 num_decompositions, ui32 resolution, ui32 subband) const |
bool | write (outfile_base *file) |
bool | write_qcc (outfile_base *file, ui32 num_comps) |
void | read (infile_base *file) |
void | read_qcc (infile_base *file, ui32 num_comps) |
param_qcd * | get_qcc (ui32 comp_idx) |
const param_qcd * | get_qcc (ui32 comp_idx) const |
param_qcd * | add_qcc_object (ui32 comp_idx) |
ui16 | get_comp_idx () const |
Private Member Functions | |
void | set_rev_quant (ui32 num_decomps, ui32 bit_depth, bool is_employing_color_transform) |
void | set_irrev_quant (ui32 num_decomps) |
ui32 | get_largest_Kmax () const |
bool | internal_write_qcc (outfile_base *file, ui32 num_comps) |
void | trim_non_existing_components (ui32 num_comps) |
ui8 | decode_SPqcd (ui8 v) const |
ui8 | encode_SPqcd (ui8 v) const |
Private Attributes | |
qcd_type | type |
ui16 | Lqcd |
ui8 | Sqcd |
union { | |
ui8 u8 [97] | |
ui16 u16 [97] | |
} | SPqcd |
ui32 | num_subbands |
float | base_delta |
bool | enabled |
param_qcd * | next |
param_qcd * | top_qcd |
ui16 | comp_idx |
Definition at line 641 of file ojph_params_local.h.
Enumerator | |
---|---|
OJPH_QCD_UNKNOWN | |
OJPH_QCD_DEFAULT |
Definition at line 645 of file ojph_params_local.h.
Enumerator | |
---|---|
UNDEFINED | |
QCD_MAIN | |
QCC_MAIN | |
QCD_TILE | |
QCC_TILE |
Definition at line 651 of file ojph_params_local.h.
|
inline |
Definition at line 660 of file ojph_params_local.h.
References base_delta, comp_idx, enabled, Lqcd, next, num_subbands, QCC_MAIN, QCD_MAIN, SPqcd, Sqcd, top_qcd, and type.
Referenced by add_qcc_object().
|
inline |
Definition at line 673 of file ojph_params_local.h.
References next.
Definition at line 1736 of file ojph_params.cpp.
References comp_idx, next, param_qcd(), QCD_MAIN, and type.
Referenced by check_validity(), ojph::local::codestream::read_headers(), and set_delta().
Definition at line 1105 of file ojph_params.cpp.
References add_qcc_object(), base_delta, ojph::local::param_cod::DWT_IRV97, ojph::local::param_cod::DWT_REV53, ojph::local::param_siz::get_bit_depth(), ojph::local::param_cod::get_coc(), ojph::local::param_siz::get_num_components(), ojph::local::param_cod::get_num_decompositions(), get_qcc(), ojph::local::param_cod::get_wavelet_kern(), ojph::local::param_cod::is_employing_color_transform(), ojph::local::param_siz::is_signed(), num_subbands, set_irrev_quant(), set_rev_quant(), and trim_non_existing_components().
Referenced by ojph::local::codestream::write_headers().
Definition at line 710 of file ojph_params_local.h.
Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().
Definition at line 712 of file ojph_params_local.h.
Referenced by set_rev_quant().
|
inline |
Definition at line 700 of file ojph_params_local.h.
References comp_idx.
Referenced by ojph::local::codestream::read_headers().
float ojph::local::param_qcd::get_irrev_delta | ( | const param_dfs * | dfs, |
ui32 | num_decompositions, | ||
ui32 | resolution, | ||
ui32 | subband | ||
) | const |
Definition at line 1370 of file ojph_params.cpp.
References ojph::local::param_dfs::exists(), ojph::local::param_dfs::get_subband_idx(), num_subbands, OJPH_INFO, SPqcd, and Sqcd.
Referenced by ojph::local::subband::finalize_alloc().
ui32 ojph::local::param_qcd::get_Kmax | ( | const param_dfs * | dfs, |
ui32 | num_decompositions, | ||
ui32 | resolution, | ||
ui32 | subband | ||
) | const |
Definition at line 1431 of file ojph_params.cpp.
References decode_SPqcd(), ojph::local::param_dfs::exists(), get_num_guard_bits(), ojph::local::param_dfs::get_subband_idx(), num_subbands, OJPH_INFO, SPqcd, and Sqcd.
Referenced by ojph::local::subband::finalize_alloc().
|
private |
Definition at line 1467 of file ojph_params.cpp.
References decode_SPqcd(), get_num_guard_bits(), num_subbands, ojph_max, SPqcd, and Sqcd.
Referenced by propose_precision().
ui32 ojph::local::param_qcd::get_MAGB | ( | ) | const |
Definition at line 1335 of file ojph_params.cpp.
References decode_SPqcd(), get_num_guard_bits(), next, num_subbands, ojph_max, SPqcd, Sqcd, u16, and u8.
Referenced by ojph::local::param_cap::check_validity().
ui32 ojph::local::param_qcd::get_num_guard_bits | ( | ) | const |
Definition at line 1425 of file ojph_params.cpp.
References Sqcd.
Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().
Definition at line 1713 of file ojph_params.cpp.
References comp_idx, and get_qcc().
Referenced by check_validity(), ojph::local::subband::finalize_alloc(), ojph::local::resolution::finalize_alloc(), get_qcc(), ojph::local::subband::pre_alloc(), ojph::local::resolution::pre_alloc(), propose_precision(), ojph::local::codestream::read_headers(), and set_delta().
|
private |
Definition at line 1552 of file ojph_params.cpp.
References comp_idx, Lqcd, num_subbands, ojph::local::QCC, SPqcd, Sqcd, ojph::local::swap_byte(), and ojph::outfile_base::write().
Referenced by write_qcc().
Definition at line 1400 of file ojph_params.cpp.
References comp_idx, ojph::local::param_cod::get_coc(), ojph::local::param_cod::get_comp_idx(), get_largest_Kmax(), get_qcc(), main(), ojph::local::param_cod::OJPH_COD_DEFAULT, and ojph_max.
Referenced by ojph::local::subband::finalize_alloc(), ojph::local::resolution::finalize_alloc(), ojph::local::subband::pre_alloc(), and ojph::local::resolution::pre_alloc().
void ojph::local::param_qcd::read | ( | infile_base * | file | ) |
Definition at line 1617 of file ojph_params.cpp.
References Lqcd, num_subbands, OJPH_ERROR, ojph::infile_base::read(), SPqcd, Sqcd, and ojph::local::swap_byte().
Referenced by ojph::local::codestream::read_headers().
void ojph::local::param_qcd::read_qcc | ( | infile_base * | file, |
ui32 | num_comps | ||
) |
Definition at line 1658 of file ojph_params.cpp.
References comp_idx, Lqcd, num_subbands, OJPH_ERROR, ojph::infile_base::read(), SPqcd, Sqcd, and ojph::local::swap_byte().
Referenced by ojph::local::codestream::read_headers().
|
inline |
Definition at line 682 of file ojph_params_local.h.
References base_delta.
Referenced by set_delta(), and ojph::param_qcd::set_irrev_quant().
void ojph::local::param_qcd::set_delta | ( | ui32 | comp_idx, |
float | delta | ||
) |
Definition at line 1236 of file ojph_params.cpp.
References add_qcc_object(), comp_idx, get_qcc(), QCD_MAIN, set_delta(), and type.
|
private |
Definition at line 1293 of file ojph_params.cpp.
References base_delta, ojph::local::sqrt_energy_gains::get_gain_h(), ojph::local::sqrt_energy_gains::get_gain_l(), SPqcd, and Sqcd.
Referenced by check_validity().
|
private |
Definition at line 1246 of file ojph_params.cpp.
References encode_SPqcd(), ojph::local::bibo_gains::get_bibo_gain_h(), ojph::local::bibo_gains::get_bibo_gain_l(), OJPH_ERROR, ojph_max, SPqcd, and Sqcd.
Referenced by check_validity().
|
private |
Definition at line 1604 of file ojph_params.cpp.
References comp_idx, enabled, next, OJPH_QCD_DEFAULT, QCC_MAIN, QCD_MAIN, and type.
Referenced by check_validity().
bool ojph::local::param_qcd::write | ( | outfile_base * | file | ) |
Definition at line 1494 of file ojph_params.cpp.
References Lqcd, num_subbands, ojph::local::QCD, SPqcd, Sqcd, ojph::local::swap_byte(), and ojph::outfile_base::write().
Referenced by ojph::local::codestream::write_headers().
bool ojph::local::param_qcd::write_qcc | ( | outfile_base * | file, |
ui32 | num_comps | ||
) |
Definition at line 1537 of file ojph_params.cpp.
References enabled, internal_write_qcc(), next, QCD_MAIN, and type.
Referenced by ojph::local::codestream::write_headers().
|
private |
Definition at line 725 of file ojph_params_local.h.
Referenced by check_validity(), param_qcd(), set_delta(), and set_irrev_quant().
|
private |
Definition at line 732 of file ojph_params_local.h.
Referenced by add_qcc_object(), get_comp_idx(), get_qcc(), internal_write_qcc(), param_qcd(), propose_precision(), read_qcc(), set_delta(), and trim_non_existing_components().
|
private |
Definition at line 727 of file ojph_params_local.h.
Referenced by param_qcd(), trim_non_existing_components(), and write_qcc().
|
private |
Definition at line 717 of file ojph_params_local.h.
Referenced by internal_write_qcc(), param_qcd(), read(), read_qcc(), and write().
|
private |
Definition at line 728 of file ojph_params_local.h.
Referenced by add_qcc_object(), get_MAGB(), get_qcc(), param_qcd(), trim_non_existing_components(), write_qcc(), and ~param_qcd().
|
private |
Definition at line 724 of file ojph_params_local.h.
Referenced by check_validity(), get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), internal_write_qcc(), param_qcd(), read(), read_qcc(), and write().
union { ... } ojph::local::param_qcd::SPqcd |
Referenced by get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), internal_write_qcc(), param_qcd(), read(), read_qcc(), set_irrev_quant(), set_rev_quant(), and write().
|
private |
Definition at line 718 of file ojph_params_local.h.
Referenced by get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), get_num_guard_bits(), internal_write_qcc(), param_qcd(), read(), read_qcc(), set_irrev_quant(), set_rev_quant(), and write().
|
private |
Definition at line 729 of file ojph_params_local.h.
Referenced by get_qcc(), and param_qcd().
|
private |
Definition at line 716 of file ojph_params_local.h.
Referenced by add_qcc_object(), get_qcc(), param_qcd(), set_delta(), trim_non_existing_components(), and write_qcc().
ui16 ojph::local::param_qcd::u16[97] |
Definition at line 722 of file ojph_params_local.h.
Referenced by get_MAGB().
ui8 ojph::local::param_qcd::u8[97] |
Definition at line 721 of file ojph_params_local.h.
Referenced by get_MAGB().