OpenJPH: ojph::local::param_qcd Struct Reference

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph::local::param_qcd Struct Reference

`#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 | restart ()
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 | 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)
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
param_qcd * | avail

## Detailed Description

Definition at line 662 of file ojph_params_local.h.

## Member Enumeration Documentation

## ◆ default_comp_num

enum ojph::local::param_qcd::default_comp_num : ui16

Enumerator
OJPH_QCD_UNKNOWN |
OJPH_QCD_DEFAULT |

Definition at line 666 of file ojph_params_local.h.

## ◆ qcd_type

enum ojph::local::param_qcd::qcd_type : ui8

Enumerator
UNDEFINED |
QCD_MAIN |
QCC_MAIN |
QCD_TILE |
QCC_TILE |

Definition at line 672 of file ojph_params_local.h.

## Constructor & Destructor Documentation

## ◆ param_qcd()

ojph::local::param_qcd::param_qcd | ( | param_qcd * | top_qcd = NULL,
|  | ui16 | comp_idx = OJPH_QCD_DEFAULT )
| inline

Definition at line 681 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(), trim_non_existing_components(), and write_qcc().

## ◆ ~param_qcd()

ojph::local::param_qcd::~param_qcd | ( |  | ) |
| inline

Definition at line 683 of file ojph_params_local.h.

References destroy().

## Member Function Documentation

## ◆ add_qcc_object()

param_qcd * ojph::local::param_qcd::add_qcc_object | ( | ui32 | comp_idx | ) |

Definition at line 1769 of file ojph_params.cpp.

References avail, comp_idx, init(), next, param_qcd(), QCD_MAIN, and type.

Referenced by check_validity(), and set_delta().

## ◆ check_validity()

void ojph::local::param_qcd::check_validity | ( | const param_siz & | siz,
|  | const param_cod & | cod )

Definition at line 1138 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, param_qcd(), set_irrev_quant(), set_rev_quant(), and trim_non_existing_components().

## ◆ decode_SPqcd()

ui8 ojph::local::param_qcd::decode_SPqcd | ( | ui8 | v | ) | const
| inlineprivate

Definition at line 751 of file ojph_params_local.h.

Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().

## ◆ destroy()

void ojph::local::param_qcd::destroy | ( |  | ) |
| inlineprivate

Definition at line 733 of file ojph_params_local.h.

References avail, and next.

Referenced by ~param_qcd().

## ◆ encode_SPqcd()

ui8 ojph::local::param_qcd::encode_SPqcd | ( | ui8 | v | ) | const
| inlineprivate

Definition at line 753 of file ojph_params_local.h.

Referenced by set_rev_quant().

## ◆ get_comp_idx()

ui16 ojph::local::param_qcd::get_comp_idx | ( |  | ) | const
| inline

Definition at line 714 of file ojph_params_local.h.

References comp_idx.

Referenced by ojph::local::codestream::read_headers().

## ◆ get_irrev_delta()

float ojph::local::param_qcd::get_irrev_delta | ( | const param_dfs * | dfs,
|  | ui32 | num_decompositions,
|  | ui32 | resolution,
|  | ui32 | subband ) const

Definition at line 1403 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().

## ◆ get_Kmax()

ui32 ojph::local::param_qcd::get_Kmax | ( | const param_dfs * | dfs,
|  | ui32 | num_decompositions,
|  | ui32 | resolution,
|  | ui32 | subband ) const

Definition at line 1464 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().

## ◆ get_largest_Kmax()

ui32 ojph::local::param_qcd::get_largest_Kmax | ( |  | ) | const
| private

Definition at line 1500 of file ojph_params.cpp.

References decode_SPqcd(), get_num_guard_bits(), num_subbands, ojph_max, SPqcd, and Sqcd.

Referenced by propose_precision().

## ◆ get_MAGB()

ui32 ojph::local::param_qcd::get_MAGB | ( |  | ) | const

Definition at line 1368 of file ojph_params.cpp.

References decode_SPqcd(), get_num_guard_bits(), next, num_subbands, ojph_max, param_qcd(), SPqcd, Sqcd, u16, and u8.

Referenced by ojph::local::param_cap::check_validity().

## ◆ get_num_guard_bits()

ui32 ojph::local::param_qcd::get_num_guard_bits | ( |  | ) | const

Definition at line 1458 of file ojph_params.cpp.

References Sqcd.

Referenced by get_Kmax(), get_largest_Kmax(), and get_MAGB().

## ◆ get_qcc() [1/2]

param_qcd * ojph::local::param_qcd::get_qcc | ( | ui32 | comp_idx | ) |

Definition at line 1746 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(), and set_delta().

## ◆ get_qcc() [2/2]

const param_qcd * ojph::local::param_qcd::get_qcc | ( | ui32 | comp_idx | ) | const

Definition at line 1755 of file ojph_params.cpp.

References comp_idx, next, param_qcd(), QCD_MAIN, top_qcd, and type.

## ◆ init()

void ojph::local::param_qcd::init | ( | param_qcd * | top_qcd,
|  | ui16 | comp_idx )
| inlineprivate

Definition at line 718 of file ojph_params_local.h.

References base_delta, comp_idx, enabled, Lqcd, next, num_subbands, param_qcd(), QCC_MAIN, QCD_MAIN, SPqcd, Sqcd, top_qcd, and type.

Referenced by add_qcc_object(), param_qcd(), and restart().

## ◆ internal_write_qcc()

bool ojph::local::param_qcd::internal_write_qcc | ( | outfile_base * | file,
|  | ui32 | num_comps )
| private

Definition at line 1585 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().

## ◆ propose_precision()

ui32 ojph::local::param_qcd::propose_precision | ( | const param_cod * | cod | ) | const

Definition at line 1433 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().

## ◆ read()

void ojph::local::param_qcd::read | ( | infile_base * | file | ) |

Definition at line 1650 of file ojph_params.cpp.

References Lqcd, num_subbands, OJPH_ERROR, ojph::infile_base::read(), SPqcd, Sqcd, and ojph::local::swap_byte().

## ◆ read_qcc()

void ojph::local::param_qcd::read_qcc | ( | infile_base * | file,
|  | ui32 | num_comps )

Definition at line 1691 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().

## ◆ restart()

void ojph::local::param_qcd::restart | ( |  | ) |
| inline

Definition at line 686 of file ojph_params_local.h.

References avail, init(), next, OJPH_QCD_DEFAULT, param_qcd(), and top_qcd.

## ◆ set_delta() [1/2]

void ojph::local::param_qcd::set_delta | ( | float | delta | ) |
| inline

Definition at line 696 of file ojph_params_local.h.

References base_delta.

Referenced by set_delta().

## ◆ set_delta() [2/2]

void ojph::local::param_qcd::set_delta | ( | ui32 | comp_idx,
|  | float | delta )

Definition at line 1269 of file ojph_params.cpp.

References add_qcc_object(), comp_idx, get_qcc(), param_qcd(), QCD_MAIN, set_delta(), and type.

## ◆ set_irrev_quant()

void ojph::local::param_qcd::set_irrev_quant | ( | ui32 | num_decomps | ) |
| private

Definition at line 1326 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().

## ◆ set_rev_quant()

void ojph::local::param_qcd::set_rev_quant | ( | ui32 | num_decomps,
|  | ui32 | bit_depth,
|  | bool | is_employing_color_transform )
| private

Definition at line 1279 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().

## ◆ trim_non_existing_components()

void ojph::local::param_qcd::trim_non_existing_components | ( | ui32 | num_comps | ) |
| private

Definition at line 1637 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().

## ◆ write()

bool ojph::local::param_qcd::write | ( | outfile_base * | file | ) |

Definition at line 1527 of file ojph_params.cpp.

References Lqcd, num_subbands, ojph::local::QCD, SPqcd, Sqcd, ojph::local::swap_byte(), and ojph::outfile_base::write().

## ◆ write_qcc()

bool ojph::local::param_qcd::write_qcc | ( | outfile_base * | file,
|  | ui32 | num_comps )

Definition at line 1570 of file ojph_params.cpp.

References enabled, internal_write_qcc(), next, param_qcd(), QCD_MAIN, and type.

## Member Data Documentation

## ◆ avail

param_qcd* ojph::local::param_qcd::avail
| private

Definition at line 776 of file ojph_params_local.h.

Referenced by add_qcc_object(), destroy(), param_qcd(), and restart().

## ◆ base_delta

float ojph::local::param_qcd::base_delta
| private

Definition at line 766 of file ojph_params_local.h.

Referenced by check_validity(), init(), set_delta(), and set_irrev_quant().

## ◆ comp_idx

ui16 ojph::local::param_qcd::comp_idx
| private

Definition at line 773 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(), and trim_non_existing_components().

## ◆ enabled

bool ojph::local::param_qcd::enabled
| private

Definition at line 768 of file ojph_params_local.h.

Referenced by init(), trim_non_existing_components(), and write_qcc().

## ◆ Lqcd

ui16 ojph::local::param_qcd::Lqcd
| private

Definition at line 758 of file ojph_params_local.h.

Referenced by init(), internal_write_qcc(), read(), read_qcc(), and write().

## ◆ next

param_qcd* ojph::local::param_qcd::next
| private

Definition at line 769 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().

## ◆ num_subbands

ui32 ojph::local::param_qcd::num_subbands
| private

Definition at line 765 of file ojph_params_local.h.

Referenced by check_validity(), get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), init(), internal_write_qcc(), read(), read_qcc(), and write().

## ◆ [union]

union { ... } ojph::local::param_qcd::SPqcd

Referenced by get_irrev_delta(), get_Kmax(), get_largest_Kmax(), get_MAGB(), init(), internal_write_qcc(), read(), read_qcc(), set_irrev_quant(), set_rev_quant(), and write().

## ◆ Sqcd

ui8 ojph::local::param_qcd::Sqcd
| private

Definition at line 759 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().

## ◆ top_qcd

param_qcd* ojph::local::param_qcd::top_qcd
| private

Definition at line 770 of file ojph_params_local.h.

Referenced by get_qcc(), init(), param_qcd(), and restart().

## ◆ type

qcd_type ojph::local::param_qcd::type
| private

Definition at line 757 of file ojph_params_local.h.

Referenced by add_qcc_object(), get_qcc(), init(), set_delta(), trim_non_existing_components(), and write_qcc().

## ◆ u16

ui16 ojph::local::param_qcd::u16[97]

Definition at line 763 of file ojph_params_local.h.

Referenced by get_MAGB().

## ◆ u8

ui8 ojph::local::param_qcd::u8[97]

Definition at line 762 of file ojph_params_local.h.

Referenced by get_MAGB().

The documentation for this struct was generated from the following files:

- /build/openjph/src/OpenJPH/src/core/codestream/ojph_params_local.h
- /build/openjph/src/OpenJPH/src/core/codestream/ojph_params.cpp