OpenJPH Open-source implementation of JPEG2000 Part-15

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

`#include <ojph_params_local.h>`

## Public Types
enum | default_comp_num : ui16 { OJPH_COD_UNKNOWN = 65534 , OJPH_COD_DEFAULT = 65535 }
enum | BLOCK_CODING_STYLES { VERT_CAUSAL_MODE = 0x8 , HT_MODE = 0x40 }
enum | cod_type : ui8 { UNDEFINED = 0 , COD_MAIN = 1 , COC_MAIN = 2 , COD_TILE = 3 , COC_TILE = 4 }
enum | dwt_type : ui8 { DWT_IRV97 = 0 , DWT_REV53 = 1 }

## Public Member Functions
| param_cod (param_cod *top_cod=NULL, ui16 comp_idx=OJPH_COD_DEFAULT)
| ~param_cod ()
void | restart ()
void | set_reversible (bool reversible)
void | employ_color_transform (ui8 val)
void | check_validity (const param_siz &siz)
ui8 | get_num_decompositions () const
size | get_block_dims () const
size | get_log_block_dims () const
ui8 | get_wavelet_kern () const
bool | is_reversible () const
bool | is_employing_color_transform () const
size | get_precinct_size (ui32 res_num) const
size | get_log_precinct_size (ui32 res_num) const
bool | packets_may_use_sop () const
bool | packets_use_eph () const
bool | get_block_vertical_causality () const
bool | write (outfile_base *file)
bool | write_coc (outfile_base *file, ui32 num_comps)
void | read (infile_base *file)
void | read_coc (infile_base *file, ui32 num_comps, param_cod *top_cod)
void | update_atk (param_atk *atk)
const param_cod * | get_coc (ui32 comp_idx) const
param_cod * | get_coc (ui32 comp_idx)
param_cod * | add_coc_object (ui32 comp_idx)
const param_atk * | access_atk () const
bool | is_dfs_defined () const
ui16 | get_dfs_index () const
ui32 | get_comp_idx () const

## Private Member Functions
void | init (param_cod *top_cod, ui16 comp_idx)
void | destroy ()
bool | internal_write_coc (outfile_base *file, ui32 num_comps)

## Private Attributes
cod_type | type
ui16 | Lcod
ui8 | Scod
cod_SGcod | SGCod
cod_SPcod | SPcod
param_cod * | next
const param_atk * | atk
param_cod * | top_cod
ui16 | comp_idx
param_cod * | avail

## Detailed Description

Definition at line 384 of file ojph_params_local.h.

## Member Enumeration Documentation

## ◆ BLOCK_CODING_STYLES

enum ojph::local::param_cod::BLOCK_CODING_STYLES

Enumerator
VERT_CAUSAL_MODE |
HT_MODE |

Definition at line 394 of file ojph_params_local.h.

## ◆ cod_type

enum ojph::local::param_cod::cod_type : ui8

Enumerator
UNDEFINED |
COD_MAIN |
COC_MAIN |
COD_TILE |
COC_TILE |

Definition at line 399 of file ojph_params_local.h.

## ◆ default_comp_num

enum ojph::local::param_cod::default_comp_num : ui16

Enumerator
OJPH_COD_UNKNOWN |
OJPH_COD_DEFAULT |

Definition at line 388 of file ojph_params_local.h.

## ◆ dwt_type

enum ojph::local::param_cod::dwt_type : ui8

Enumerator
DWT_IRV97 |
DWT_REV53 |

Definition at line 407 of file ojph_params_local.h.

## Constructor & Destructor Documentation

## ◆ param_cod()

ojph::local::param_cod::param_cod | ( | param_cod * | top_cod = NULL,
|  | ui16 | comp_idx = OJPH_COD_DEFAULT )
| inline

Definition at line 413 of file ojph_params_local.h.

References avail, comp_idx, init(), OJPH_COD_DEFAULT, param_cod(), and top_cod.

Referenced by add_coc_object(), get_coc(), get_coc(), init(), param_cod(), read_coc(), restart(), update_atk(), and write_coc().

## ◆ ~param_cod()

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

Definition at line 415 of file ojph_params_local.h.

References destroy().

## Member Function Documentation

## ◆ access_atk()

const param_atk * ojph::local::param_cod::access_atk | ( |  | ) | const
| inline

Definition at line 606 of file ojph_params_local.h.

References atk.

Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), ojph::local::resolution::pre_alloc(), and ojph::local::subband::pre_alloc().

## ◆ add_coc_object()

param_cod * ojph::local::param_cod::add_coc_object | ( | ui32 | comp_idx | ) |

Definition at line 1132 of file ojph_params.cpp.

References avail, COD_MAIN, comp_idx, init(), next, param_cod(), and type.

## ◆ check_validity()

void ojph::local::param_cod::check_validity | ( | const param_siz & | siz | ) |
| inline

Definition at line 443 of file ojph_params_local.h.

References COD_MAIN, ojph::local::param_siz::get_bit_depth(), ojph::local::param_siz::get_downsampling(), ojph::local::param_siz::get_num_components(), ojph::local::param_siz::is_signed(), OJPH_ERROR, ojph::OJPH_PO_PCRL, ojph::OJPH_PO_RPCL, SGCod, type, ojph::point::x, and ojph::point::y.

## ◆ destroy()

void ojph::local::param_cod::destroy | ( |  | ) |
| inline private

Definition at line 639 of file ojph_params_local.h.

References avail, and next.

Referenced by ~param_cod().

## ◆ employ_color_transform()

void ojph::local::param_cod::employ_color_transform | ( | ui8 | val | ) |
| inline

Definition at line 435 of file ojph_params_local.h.

References COD_MAIN, SGCod, type, and UNDEFINED.

## ◆ get_block_dims()

size ojph::local::param_cod::get_block_dims | ( |  | ) | const
| inline

Definition at line 522 of file ojph_params_local.h.

References SPcod.

## ◆ get_block_vertical_causality()

bool ojph::local::param_cod::get_block_vertical_causality | ( |  | ) | const
| inline

Definition at line 578 of file ojph_params_local.h.

References SPcod, and VERT_CAUSAL_MODE.

Referenced by ojph::local::codeblock::finalize_alloc().

## ◆ get_coc() [1/2]

param_cod * ojph::local::param_cod::get_coc | ( | ui32 | comp_idx | ) |

Definition at line 1123 of file ojph_params.cpp.

References comp_idx, get_coc(), and param_cod().

## ◆ get_coc() [2/2]

const param_cod * ojph::local::param_cod::get_coc | ( | ui32 | comp_idx | ) | const

Definition at line 1109 of file ojph_params.cpp.

References COD_MAIN, comp_idx, next, param_cod(), top_cod, and type.

Referenced by ojph::local::param_qcd::check_validity(), get_coc(), and ojph::local::param_qcd::propose_precision().

## ◆ get_comp_idx()

ui32 ojph::local::param_cod::get_comp_idx | ( |  | ) | const
| inline

Definition at line 618 of file ojph_params_local.h.

References COC_MAIN, COD_MAIN, comp_idx, OJPH_COD_DEFAULT, and type.

Referenced by ojph::local::param_qcd::propose_precision(), and ojph::local::codestream::read_headers().

## ◆ get_dfs_index()

ui16 ojph::local::param_cod::get_dfs_index | ( |  | ) | const
| inline

Definition at line 614 of file ojph_params_local.h.

References SPcod.

Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), ojph::local::param_siz::get_recon_downsampling(), and ojph::local::resolution::pre_alloc().

## ◆ get_log_block_dims()

size ojph::local::param_cod::get_log_block_dims | ( |  | ) | const
| inline

Definition at line 526 of file ojph_params_local.h.

References SPcod.

Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), and ojph::local::subband::pre_alloc().

## ◆ get_log_precinct_size()

size ojph::local::param_cod::get_log_precinct_size | ( | ui32 | res_num | ) | const
| inline

Definition at line 553 of file ojph_params_local.h.

References Scod, and SPcod.

Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), get_precinct_size(), ojph::local::resolution::pre_alloc(), and ojph::local::subband::pre_alloc().

## ◆ get_num_decompositions()

ui8 ojph::local::param_cod::get_num_decompositions | ( |  | ) | const
| inline

Definition at line 504 of file ojph_params_local.h.

References COC_MAIN, COD_MAIN, is_dfs_defined(), SPcod, top_cod, and type.

Referenced by ojph::local::param_qcd::check_validity(), ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), ojph::local::tile::finalize_alloc(), ojph::local::tile_comp::finalize_alloc(), ojph::local::resolution::pre_alloc(), ojph::local::tile::pre_alloc(), ojph::local::tile_comp::pre_alloc(), read(), and read_coc().

## ◆ get_precinct_size()

size ojph::local::param_cod::get_precinct_size | ( | ui32 | res_num | ) | const
| inline

Definition at line 546 of file ojph_params_local.h.

References get_log_precinct_size(), ojph::size::h, and ojph::size::w.

## ◆ get_wavelet_kern()

ui8 ojph::local::param_cod::get_wavelet_kern | ( |  | ) | const
| inline

Definition at line 530 of file ojph_params_local.h.

References SPcod.

Referenced by ojph::local::param_cap::check_validity(), ojph::local::param_qcd::check_validity(), and is_reversible().

## ◆ init()

void ojph::local::param_cod::init | ( | param_cod * | top_cod,
|  | ui16 | comp_idx )
| inline private

Definition at line 627 of file ojph_params_local.h.

References atk, COC_MAIN, COD_MAIN, comp_idx, Lcod, next, param_cod(), Scod, top_cod, and type.

Referenced by add_coc_object(), param_cod(), and restart().

## ◆ internal_write_coc()

bool ojph::local::param_cod::internal_write_coc | ( | outfile_base * | file,
|  | ui32 | num_comps )
| private

Definition at line 909 of file ojph_params.cpp.

References ojph::local::COC, COC_MAIN, comp_idx, Lcod, Scod, SPcod, ojph::local::swap_byte(), type, and ojph::outfile_base::write().

Referenced by write_coc().

## ◆ is_dfs_defined()

bool ojph::local::param_cod::is_dfs_defined | ( |  | ) | const
| inline

Definition at line 610 of file ojph_params_local.h.

References SPcod.

Referenced by ojph::local::resolution::finalize_alloc(), ojph::local::subband::finalize_alloc(), get_num_decompositions(), ojph::local::param_siz::get_recon_downsampling(), and ojph::local::resolution::pre_alloc().

## ◆ is_employing_color_transform()

bool ojph::local::param_cod::is_employing_color_transform | ( |  | ) | const
| inline

Definition at line 537 of file ojph_params_local.h.

References COD_MAIN, COD_TILE, SGCod, top_cod, and type.

Referenced by ojph::local::param_qcd::check_validity(), ojph::local::tile::finalize_alloc(), and ojph::local::tile::pre_alloc().

## ◆ is_reversible()

bool ojph::local::param_cod::is_reversible | ( |  | ) | const

Definition at line 841 of file ojph_params.cpp.

References atk, DWT_REV53, get_wavelet_kern(), and SPcod.

Referenced by ojph::local::codeblock::finalize_alloc(), ojph::local::tile::finalize_alloc(), and ojph::local::tile::pre_alloc().

## ◆ packets_may_use_sop()

bool ojph::local::param_cod::packets_may_use_sop | ( |  | ) | const
| inline

Definition at line 562 of file ojph_params_local.h.

References COD_MAIN, COD_TILE, Scod, and type.

Referenced by ojph::local::resolution::finalize_alloc().

## ◆ packets_use_eph()

bool ojph::local::param_cod::packets_use_eph | ( |  | ) | const
| inline

Definition at line 570 of file ojph_params_local.h.

References COD_MAIN, COD_TILE, Scod, and type.

Referenced by ojph::local::resolution::finalize_alloc().

## ◆ read()

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

Definition at line 955 of file ojph_params.cpp.

References COD_MAIN, get_num_decompositions(), Lcod, OJPH_ERROR, ojph::infile_base::read(), Scod, SGCod, SPcod, ojph::local::swap_byte(), and type.

## ◆ read_coc()

void ojph::local::param_cod::read_coc | ( | infile_base * | file,
|  | ui32 | num_comps,
|  | param_cod * | top_cod )

Definition at line 1015 of file ojph_params.cpp.

References COC_MAIN, comp_idx, get_num_decompositions(), Lcod, OJPH_ERROR, OJPH_WARN, param_cod(), ojph::infile_base::read(), Scod, SGCod, SPcod, ojph::local::swap_byte(), top_cod, and type.

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

## ◆ restart()

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

Definition at line 418 of file ojph_params_local.h.

References avail, init(), next, OJPH_COD_DEFAULT, param_cod(), and top_cod.

## ◆ set_reversible()

void ojph::local::param_cod::set_reversible | ( | bool | reversible | ) |
| inline

Definition at line 428 of file ojph_params_local.h.

References COC_MAIN, COD_MAIN, DWT_IRV97, DWT_REV53, SPcod, type, and UNDEFINED.

## ◆ update_atk()

void ojph::local::param_cod::update_atk | ( | param_atk * | atk | ) |

Definition at line 1088 of file ojph_params.cpp.

References atk, COD_MAIN, next, OJPH_ERROR, param_cod(), SPcod, type, and ojph::local::cod_SPcod::wavelet_trans.

## ◆ write()

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

Definition at line 852 of file ojph_params.cpp.

References ojph::local::COD, COD_MAIN, Lcod, Scod, SGCod, SPcod, ojph::local::swap_byte(), type, and ojph::outfile_base::write().

## ◆ write_coc()

bool ojph::local::param_cod::write_coc | ( | outfile_base * | file,
|  | ui32 | num_comps )

Definition at line 894 of file ojph_params.cpp.

References COD_MAIN, comp_idx, internal_write_coc(), next, param_cod(), and type.

## Member Data Documentation

## ◆ atk

const param_atk* ojph::local::param_cod::atk
| private

Definition at line 659 of file ojph_params_local.h.

Referenced by access_atk(), init(), is_reversible(), and update_atk().

## ◆ avail

param_cod* ojph::local::param_cod::avail
| private

Definition at line 666 of file ojph_params_local.h.

Referenced by add_coc_object(), destroy(), param_cod(), and restart().

## ◆ comp_idx

ui16 ojph::local::param_cod::comp_idx
| private

Definition at line 663 of file ojph_params_local.h.

Referenced by add_coc_object(), get_coc(), get_coc(), get_comp_idx(), init(), internal_write_coc(), param_cod(), read_coc(), and write_coc().

## ◆ Lcod

ui16 ojph::local::param_cod::Lcod
| private

Definition at line 654 of file ojph_params_local.h.

Referenced by init(), internal_write_coc(), read(), read_coc(), and write().

## ◆ next

param_cod* ojph::local::param_cod::next
| private

Definition at line 658 of file ojph_params_local.h.

Referenced by add_coc_object(), destroy(), get_coc(), init(), restart(), update_atk(), and write_coc().

## ◆ Scod

ui8 ojph::local::param_cod::Scod
| private

Definition at line 655 of file ojph_params_local.h.

Referenced by get_log_precinct_size(), init(), internal_write_coc(), packets_may_use_sop(), packets_use_eph(), read(), read_coc(), and write().

## ◆ SGCod

cod_SGcod ojph::local::param_cod::SGCod
| private

Definition at line 656 of file ojph_params_local.h.

Referenced by check_validity(), employ_color_transform(), is_employing_color_transform(), read(), read_coc(), and write().

## ◆ SPcod

cod_SPcod ojph::local::param_cod::SPcod
| private

Definition at line 657 of file ojph_params_local.h.

Referenced by get_block_dims(), get_block_vertical_causality(), get_dfs_index(), get_log_block_dims(), get_log_precinct_size(), get_num_decompositions(), get_wavelet_kern(), internal_write_coc(), is_dfs_defined(), is_reversible(), read(), read_coc(), set_reversible(), update_atk(), and write().

## ◆ top_cod

param_cod* ojph::local::param_cod::top_cod
| private

Definition at line 662 of file ojph_params_local.h.

Referenced by get_coc(), get_num_decompositions(), init(), is_employing_color_transform(), param_cod(), read_coc(), and restart().

## ◆ type

cod_type ojph::local::param_cod::type
| private

Definition at line 653 of file ojph_params_local.h.

Referenced by add_coc_object(), check_validity(), employ_color_transform(), get_coc(), get_comp_idx(), get_num_decompositions(), init(), internal_write_coc(), is_employing_color_transform(), packets_may_use_sop(), packets_use_eph(), read(), read_coc(), set_reversible(), update_atk(), write(), and write_coc().

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