ht_block_decoding.cpp File Reference
`#include "coding_units.hpp"`
`#include "dec_CxtVLC_tables.hpp"`
`#include "ht_block_decoding.hpp"`
`#include "coding_local.hpp"`
`#include "utils.hpp"`

## Macros

#define | FIRST_QUAD 0
#define | SECOND_QUAD 1

## Functions

void | get_sample_position_from_quad (uint16_t q, uint16_t QW, uint16_t Wblk, uint16_t Hblk, uint16_t &sample_0, uint16_t &sample_1, uint16_t &sample_2, uint16_t &sample_3)
void | ht_cleanup_decode (j2k_codeblock *block, uint8_t *const Dcup, const uint32_t &Lcup, const uint8_t &ROIshift, const uint8_t &pLSB, state_MS_dec &MS, state_MEL_unPacker &MEL_unpacker, state_MEL_decoder &MEL_decoder, state_VLC_dec &VLC)
void | ht_sigprop_decode (j2k_codeblock *block, uint8_t *HT_magref_segment, uint32_t magref_length, const uint8_t &pLSB)
void | ht_magref_decode (j2k_codeblock *block, uint8_t *HT_magref_segment, uint32_t magref_length, const uint8_t &pLSB)
void | htj2k_decode (j2k_codeblock *block, const uint8_t ROIshift)

## Variables

auto | decodeSigEMB
auto | process_stripes_block

## Macro Definition Documentation

## FIRST_QUAD

#define FIRST_QUAD 0

## SECOND_QUAD

#define SECOND_QUAD 1

## Function Documentation

## get_sample_position_from_quad()

void get_sample_position_from_quad | ( | uint16_t | q,
|  | uint16_t | QW,
|  | uint16_t | Wblk,
|  | uint16_t | Hblk,
|  | uint16_t & | sample_0,
|  | uint16_t & | sample_1,
|  | uint16_t & | sample_2,
|  | uint16_t & | sample_3
| ) |  |

inline

## ht_cleanup_decode()

void ht_cleanup_decode | ( | j2k_codeblock * | block,
|  | uint8_t *const | Dcup,
|  | const uint32_t & | Lcup,
|  | const uint8_t & | ROIshift,
|  | const uint8_t & | pLSB,
|  | state_MS_dec & | MS,
|  | state_MEL_unPacker & | MEL_unpacker,
|  | state_MEL_decoder & | MEL_decoder,
|  | state_VLC_dec & | VLC
| ) |  |

References ceil_int, count_leading_zeros(), dec_CxtVLC_table0_fast_16, dec_CxtVLC_table1_fast_16, state_MS_dec::decodeMagSgnValue(), state_MEL_decoder::decodeMELSym(), decodeSigEMB, state_VLC_dec::decodeUExtension(), state_VLC_dec::decodeUPrefix(), state_VLC_dec::decodeUSuffix(), FIRST_QUAD, j2k_codeblock::modify_state(), j2k_codeblock::sample_buf, SECOND_QUAD, sigma(), j2k_codeblock::size, element_siz::x, and element_siz::y.

Referenced by htj2k_decode().

## ht_magref_decode()

void ht_magref_decode | ( | j2k_codeblock * | block,
|  | uint8_t * | HT_magref_segment,
|  | uint32_t | magref_length,
|  | const uint8_t & | pLSB
| ) |  |

References j2k_codeblock::get_state(), MR_dec::importMagRefBit(), j2k_codeblock::modify_state(), refinement_indicator(), j2k_codeblock::sample_buf, Sigma(), j2k_codeblock::size, element_siz::x, and element_siz::y.

Referenced by htj2k_decode().

## ht_sigprop_decode()

void ht_sigprop_decode | ( | j2k_codeblock * | block,
|  | uint8_t * | HT_magref_segment,
|  | uint32_t | magref_length,
|  | const uint8_t & | pLSB
| ) |  |

References process_stripes_block, j2k_codeblock::size, element_siz::x, and element_siz::y.

Referenced by htj2k_decode().

## htj2k_decode()

void htj2k_decode | ( | j2k_codeblock * | block,
|  | const uint8_t | ROIshift
| ) |  |

References j2k_codeblock::band_stride, j2k_codeblock::get_compressed_data(), j2k_codeblock::get_Mb(), j2k_codeblock::get_state(), ht_cleanup_decode(), ht_magref_decode(), ht_sigprop_decode(), j2k_codeblock::i_samples, j2k_codeblock::length, j2k_codeblock::num_passes, j2k_codeblock::num_ZBP, j2k_codeblock::pass_length, Refinement_indicator(), j2k_codeblock::sample_buf, j2k_codeblock::size, j2k_codeblock::transformation, element_siz::x, and element_siz::y.

Referenced by openhtj2k::T1OpenHTJ2K::decompress().

## Variable Documentation

## decodeSigEMB

auto decodeSigEMB

Initial value:
= [](state_MEL_decoder &MEL_decoder, state_VLC_dec &VLC, const uint16_t &context,
uint8_t (&u_off)[2], uint8_t (&rho)[2], uint8_t (&emb_k)[2], uint8_t (&emb_1)[2],
const uint8_t &first_or_second, const uint16_t *dec_CxtVLC_table) {
uint8_t sym;
if (context == 0) {
sym = MEL_decoder.decodeMELSym();
if (sym == 0) {
rho[first_or_second] = u_off[first_or_second] = emb_k[first_or_second] = emb_1[first_or_second] = 0;
return;
}
}
VLC.decodeCxtVLC(context, u_off, rho, emb_k, emb_1, first_or_second, dec_CxtVLC_table);
}
state_MEL_decoder
Definition ht_block_decoding.hpp:90
state_MEL_decoder::decodeMELSym
uint8_t decodeMELSym()
Definition ht_block_decoding.cpp:160
state_VLC_dec
Definition ht_block_decoding.hpp:117

Referenced by ht_cleanup_decode().

## process_stripes_block

auto process_stripes_block

Referenced by ht_sigprop_decode().