|
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 } |
| enum | qfactor_const : ui8 { QFACTOR_UNSET = 0 } |
| using | comp_type = ojph::param_qcd::comp_type |
Private Member Functions | |
| void | init (param_qcd *top_qcd, ui16 comp_idx) |
| void | destroy () |
| void | set_rev_quant (ui32 num_decomps, ui32 bit_depth, bool is_employing_color_transform) |
| void | set_irrev_quant (ui32 num_decomps) |
| void | encode_SPqcd (ui32 subband_index, float delta) |
| 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 |
| bool | is_init |
| ui16 | Lqcd |
| ui8 | Sqcd |
| union { | |
| ui8 u8 [97] | |
| ui16 u16 [97] | |
| } | SPqcd |
| ui32 | num_subbands |
| bool | enabled |
| param_qcd * | next |
| param_qcd * | top_qcd |
| float | base_delta |
| ui8 | qfactor |
| comp_type | ctype |
| bool | is_color_trans |
| ui32 | num_decomps |
| ui32 | bit_depth |
| bool | is_signed |
| ui32 | wavelet_kern |
| ojph::point | sampling |
| ui16 | comp_idx |
| param_qcd * | avail |
Definition at line 686 of file ojph_params_local.h.
Definition at line 710 of file ojph_params_local.h.
| Enumerator | |
|---|---|
| OJPH_QCD_UNKNOWN | |
| OJPH_QCD_DEFAULT | |
Definition at line 690 of file ojph_params_local.h.
| Enumerator | |
|---|---|
| UNDEFINED | |
| QCD_MAIN | |
| QCC_MAIN | |
| QCD_TILE | |
| QCC_TILE | |
Definition at line 696 of file ojph_params_local.h.
| Enumerator | |
|---|---|
| QFACTOR_UNSET | |
Definition at line 705 of file ojph_params_local.h.
|
inline |
Definition at line 713 of file ojph_params_local.h.
References avail, comp_idx, init(), OJPH_QCD_DEFAULT, param_qcd(), and top_qcd.
Referenced by add_qcc_object(), check_validity(), get_MAGB(), get_qcc(), get_qcc(), init(), param_qcd(), propose_precision(), restart(), set_delta(), set_qfactor(), trim_non_existing_components(), and write_qcc().
|
inline |
Definition at line 715 of file ojph_params_local.h.
References destroy().
Definition at line 2061 of file ojph_params.cpp.
References avail, comp_idx, init(), next, param_qcd(), QCD_MAIN, and type.
Referenced by check_validity(), set_delta(), and set_qfactor().
Definition at line 1359 of file ojph_params.cpp.
References add_qcc_object(), base_delta, ojph::local::param_cod::get_coc(), ojph::local::param_siz::get_num_components(), get_qcc(), is_qcc_needed(), make_quant_steps(), param_qcd(), QCD_MAIN, qfactor, QFACTOR_UNSET, set_delta(), set_qfactor(), trim_non_existing_components(), type, and ojph::param_qcd::ui8_2_comp_type().
Definition at line 794 of file ojph_params_local.h.
Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().
|
inlineprivate |
Definition at line 775 of file ojph_params_local.h.
Referenced by ~param_qcd().
|
private |
Definition at line 1602 of file ojph_params.cpp.
References SPqcd.
Referenced by set_irrev_quant(), and set_rev_quant().
Definition at line 796 of file ojph_params_local.h.
|
inline |
Definition at line 752 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 | comp_num, | ||
| ui32 | resolution, | ||
| ui32 | subband ) const |
Definition at line 1650 of file ojph_params.cpp.
References ojph::local::param_dfs::exists(), ojph::local::param_dfs::get_subband_idx(), num_subbands, OJPH_ERROR, 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 1715 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 1751 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 1615 of file ojph_params.cpp.
References decode_SPqcd(), get_num_guard_bits(), next, num_decomps, num_subbands, ojph_max, param_qcd(), 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 1709 of file ojph_params.cpp.
References Sqcd.
Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().
Definition at line 2038 of file ojph_params.cpp.
References comp_idx, get_qcc(), and param_qcd().
Referenced by check_validity(), ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), get_qcc(), ojph::local::resolution::pre_alloc(), ojph::local::subband::pre_alloc(), propose_precision(), set_delta(), and set_qfactor().
Definition at line 2047 of file ojph_params.cpp.
References comp_idx, next, param_qcd(), QCD_MAIN, top_qcd, and type.
Definition at line 756 of file ojph_params_local.h.
References base_delta, comp_idx, ctype, enabled, is_init, Lqcd, next, num_subbands, param_qcd(), QCC_MAIN, QCD_MAIN, qfactor, QFACTOR_UNSET, sampling, SPqcd, Sqcd, top_qcd, and type.
Referenced by add_qcc_object(), param_qcd(), and restart().
|
private |
Definition at line 1837 of file ojph_params.cpp.
References comp_idx, Lqcd, num_subbands, ojph::local::QCC, SPqcd, Sqcd, ojph::swap_bytes_if_le(), and ojph::outfile_base::write().
Referenced by write_qcc().
| bool ojph::local::param_qcd::is_qcc_needed | ( | ui32 | comp_num, |
| const param_cod & | cod, | ||
| const param_siz & | siz ) |
Definition at line 1470 of file ojph_params.cpp.
References bit_depth, ojph::local::param_siz::get_bit_depth(), ojph::local::param_cod::get_num_decompositions(), ojph::local::param_cod::get_wavelet_kern(), is_color_trans, ojph::local::param_cod::is_employing_color_transform(), is_init, is_signed, ojph::local::param_siz::is_signed(), num_decomps, OJPH_ERROR, and wavelet_kern.
Referenced by check_validity().
| void ojph::local::param_qcd::make_quant_steps | ( | ui32 | comp_num, |
| const param_cod & | cod, | ||
| const param_siz & | siz ) |
Definition at line 1435 of file ojph_params.cpp.
References base_delta, bit_depth, ojph::local::param_cod::DWT_IRV97, ojph::local::param_cod::DWT_REV53, ojph::local::param_siz::get_bit_depth(), ojph::local::param_siz::get_downsampling(), ojph::local::param_cod::get_num_decompositions(), ojph::local::param_cod::get_wavelet_kern(), is_color_trans, ojph::local::param_cod::is_employing_color_transform(), is_init, is_signed, ojph::local::param_siz::is_signed(), num_decomps, num_subbands, OJPH_ERROR, ojph_min, OJPH_WARN, qfactor, QFACTOR_UNSET, sampling, set_irrev_quant(), set_rev_quant(), and wavelet_kern.
Referenced by check_validity().
Definition at line 1684 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, ojph_max, and param_qcd().
Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), and ojph::local::subband::pre_alloc().
| void ojph::local::param_qcd::read | ( | infile_base * | file | ) |
Definition at line 1903 of file ojph_params.cpp.
References Lqcd, num_subbands, OJPH_ERROR, ojph::infile_base::read(), SPqcd, Sqcd, and ojph::swap_bytes_if_le().
| void ojph::local::param_qcd::read_qcc | ( | infile_base * | file, |
| ui32 | num_comps ) |
Definition at line 1950 of file ojph_params.cpp.
References comp_idx, Lqcd, num_subbands, OJPH_ERROR, ojph::infile_base::read(), SPqcd, Sqcd, and ojph::swap_bytes_if_le().
Referenced by ojph::local::codestream::read_headers().
|
inline |
Definition at line 718 of file ojph_params_local.h.
References avail, init(), next, OJPH_QCD_DEFAULT, param_qcd(), and top_qcd.
|
inline |
Definition at line 732 of file ojph_params_local.h.
References base_delta.
Referenced by check_validity(), and set_delta().
| void ojph::local::param_qcd::set_delta | ( | ui32 | comp_idx, |
| float | delta ) |
Definition at line 2011 of file ojph_params.cpp.
References add_qcc_object(), comp_idx, get_qcc(), param_qcd(), QCD_MAIN, set_delta(), and type.
|
private |
Definition at line 1542 of file ojph_params.cpp.
References base_delta, bit_depth, ctype, encode_SPqcd(), ojph::local::visual_weights::get_delta_ref(), ojph::local::visual_weights::get_format(), ojph::local::visual_weights::get_gain(), ojph::local::sqrt_energy_gains::get_gain_h(), ojph::local::sqrt_energy_gains::get_gain_l(), ojph::local::visual_weights::get_no_weights(), ojph::local::visual_weights::get_weight(), ojph::local::visual_weights::get_weights(), num_decomps, OJPH_ERROR, qfactor, QFACTOR_UNSET, sampling, Sqcd, and ojph::local::visual_weights::VW_COLOUR_FORMAT_ERROR.
Referenced by make_quant_steps().
Definition at line 2021 of file ojph_params.cpp.
References add_qcc_object(), comp_idx, ctype, get_qcc(), OJPH_ERROR, param_qcd(), QCD_MAIN, qfactor, and type.
| void ojph::local::param_qcd::set_qfactor | ( | ui8 | qfactor | ) |
Definition at line 1484 of file ojph_params.cpp.
References OJPH_ERROR, QCD_MAIN, qfactor, and type.
Referenced by check_validity().
|
private |
Definition at line 1495 of file ojph_params.cpp.
References bit_depth, encode_SPqcd(), ojph::local::bibo_gains::get_bibo_gain_h(), ojph::local::bibo_gains::get_bibo_gain_l(), num_decomps, OJPH_ERROR, ojph_max, SPqcd, and Sqcd.
Referenced by make_quant_steps().
|
private |
Definition at line 1890 of file ojph_params.cpp.
References comp_idx, enabled, next, OJPH_QCD_DEFAULT, param_qcd(), QCC_MAIN, QCD_MAIN, and type.
Referenced by check_validity().
| bool ojph::local::param_qcd::write | ( | outfile_base * | file | ) |
Definition at line 1778 of file ojph_params.cpp.
References Lqcd, num_subbands, ojph::local::QCD, SPqcd, Sqcd, ojph::swap_bytes_if_le(), and ojph::outfile_base::write().
| bool ojph::local::param_qcd::write_qcc | ( | outfile_base * | file, |
| ui32 | num_comps ) |
Definition at line 1822 of file ojph_params.cpp.
References enabled, internal_write_qcc(), next, param_qcd(), QCD_MAIN, and type.
|
private |
Definition at line 830 of file ojph_params_local.h.
Referenced by add_qcc_object(), destroy(), param_qcd(), and restart().
|
private |
Definition at line 815 of file ojph_params_local.h.
Referenced by check_validity(), init(), make_quant_steps(), set_delta(), and set_irrev_quant().
|
private |
Definition at line 821 of file ojph_params_local.h.
Referenced by is_qcc_needed(), make_quant_steps(), set_irrev_quant(), and set_rev_quant().
|
private |
Definition at line 827 of file ojph_params_local.h.
Referenced by add_qcc_object(), get_comp_idx(), get_qcc(), get_qcc(), init(), internal_write_qcc(), param_qcd(), propose_precision(), read_qcc(), set_delta(), set_qfactor(), and trim_non_existing_components().
|
private |
Definition at line 818 of file ojph_params_local.h.
Referenced by init(), set_irrev_quant(), and set_qfactor().
|
private |
Definition at line 810 of file ojph_params_local.h.
Referenced by init(), trim_non_existing_components(), and write_qcc().
|
private |
Definition at line 819 of file ojph_params_local.h.
Referenced by is_qcc_needed(), and make_quant_steps().
|
private |
Definition at line 801 of file ojph_params_local.h.
Referenced by init(), is_qcc_needed(), and make_quant_steps().
|
private |
Definition at line 822 of file ojph_params_local.h.
Referenced by is_qcc_needed(), and make_quant_steps().
|
private |
Definition at line 802 of file ojph_params_local.h.
Referenced by init(), internal_write_qcc(), read(), read_qcc(), and write().
|
private |
Definition at line 811 of file ojph_params_local.h.
Referenced by add_qcc_object(), destroy(), get_MAGB(), get_qcc(), init(), restart(), trim_non_existing_components(), and write_qcc().
|
private |
Definition at line 820 of file ojph_params_local.h.
Referenced by get_MAGB(), is_qcc_needed(), make_quant_steps(), set_irrev_quant(), and set_rev_quant().
|
private |
Definition at line 809 of file ojph_params_local.h.
Referenced by get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), init(), internal_write_qcc(), make_quant_steps(), read(), read_qcc(), and write().
|
private |
Definition at line 817 of file ojph_params_local.h.
Referenced by check_validity(), init(), make_quant_steps(), set_irrev_quant(), set_qfactor(), and set_qfactor().
|
private |
Definition at line 824 of file ojph_params_local.h.
Referenced by init(), make_quant_steps(), and set_irrev_quant().
| union { ... } ojph::local::param_qcd::SPqcd |
Referenced by encode_SPqcd(), get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), init(), internal_write_qcc(), read(), read_qcc(), set_rev_quant(), and write().
|
private |
Definition at line 803 of file ojph_params_local.h.
Referenced by get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), get_num_guard_bits(), init(), internal_write_qcc(), read(), read_qcc(), set_irrev_quant(), set_rev_quant(), and write().
|
private |
Definition at line 812 of file ojph_params_local.h.
Referenced by get_qcc(), init(), param_qcd(), and restart().
|
private |
Definition at line 800 of file ojph_params_local.h.
Referenced by add_qcc_object(), check_validity(), get_qcc(), init(), set_delta(), set_qfactor(), set_qfactor(), trim_non_existing_components(), and write_qcc().
| ui16 ojph::local::param_qcd::u16[97] |
Definition at line 807 of file ojph_params_local.h.
Referenced by get_MAGB().
| ui8 ojph::local::param_qcd::u8[97] |
Definition at line 806 of file ojph_params_local.h.
Referenced by get_MAGB().
|
private |
Definition at line 823 of file ojph_params_local.h.
Referenced by is_qcc_needed(), and make_quant_steps().