grk::Quantizer Struct Reference

`#include <Quantizer.h>`

Inheritance diagram for grk::Quantizer:

## Public Member Functions

| Quantizer (bool reversible, uint8_t guard_bits)
virtual | ~Quantizer ()=default
void | pull (grk_stepsize *stepptr)
| Note:
void | push (grk_stepsize *stepptr)
virtual void | generate (uint32_t decomps, uint32_t max_bit_depth, bool color_transform, bool is_signed)
virtual bool | write (BufferedStream *stream)

## Protected Member Functions

uint32_t | get_num_guard_bits () const

## Protected Attributes

uint8_t | Sqcd
union { |
uint8_t u8_SPqcd [97] |
uint16_t u16_SPqcd [97] |
}; |  |
uint32_t | num_decomps
bool | isReversible

## Constructor & Destructor Documentation

## Quantizer()

grk::Quantizer::Quantizer | ( | bool | reversible,
|  | uint8_t | guard_bits
| ) |  |

References GRK_J2K_MAXBANDS, grk::grk_read(), u16_SPqcd, and u8_SPqcd.

## ~Quantizer()

virtual grk::Quantizer::~Quantizer | ( |  | ) |

virtual default

## Member Function Documentation

## generate()

void grk::Quantizer::generate | ( | uint32_t | decomps,
|  | uint32_t | max_bit_depth,
|  | bool | color_transform,
|  | bool | is_signed
| ) |  |

virtual

Reimplemented in ojph::QuantizerOJPH, and openhtj2k::QuantizerOpenHTJ2K.

References grk::floorlog2(), grk::T1::getnorm(), grk::grk_read(), isReversible, num_decomps, u16_SPqcd, and u8_SPqcd.

## get_num_guard_bits()

uint32_t grk::Quantizer::get_num_guard_bits | ( |  | ) | const

protected

References grk::grk_read(), and Sqcd.

Referenced by ojph::QuantizerOJPH::get_MAGBp(), and openhtj2k::QuantizerOpenHTJ2K::get_MAGBp().

## pull()

void grk::Quantizer::pull | ( | grk_stepsize * | stepptr | ) |

Note:

Lossless u8_SPqcd[] stores expn in upper 5 bits (mantissa is zero)

Lossy u16_SPqcd[bn] stores expn in upper 5 bits and mantissa in lower 11 bits

References grk::grk_read(), isReversible, num_decomps, u16_SPqcd, and u8_SPqcd.

## push()

void grk::Quantizer::push | ( | grk_stepsize * | stepptr | ) |

References grk::grk_read(), isReversible, num_decomps, u16_SPqcd, and u8_SPqcd.

## write()

bool grk::Quantizer::write | ( | BufferedStream * | stream | ) |

virtual

Reimplemented in ojph::QuantizerOJPH, and openhtj2k::QuantizerOpenHTJ2K.

Referenced by grk::CodeStreamCompress::write_cap().

## Member Data Documentation

## [union]

union { ... } grk::Quantizer

## isReversible

bool grk::Quantizer::isReversible

protected

Referenced by generate(), ojph::QuantizerOJPH::generate(), openhtj2k::QuantizerOpenHTJ2K::generate(), pull(), push(), ojph::QuantizerOJPH::write(), and openhtj2k::QuantizerOpenHTJ2K::write().

## num_decomps

uint32_t grk::Quantizer::num_decomps

protected

Referenced by generate(), ojph::QuantizerOJPH::generate(), openhtj2k::QuantizerOpenHTJ2K::generate(), ojph::QuantizerOJPH::get_MAGBp(), openhtj2k::QuantizerOpenHTJ2K::get_MAGBp(), pull(), push(), ojph::QuantizerOJPH::set_irrev_quant(), openhtj2k::QuantizerOpenHTJ2K::set_irrev_quant(), ojph::QuantizerOJPH::set_rev_quant(), and openhtj2k::QuantizerOpenHTJ2K::set_rev_quant().

## Sqcd

uint8_t grk::Quantizer::Sqcd

protected

Referenced by ojph::QuantizerOJPH::get_MAGBp(), openhtj2k::QuantizerOpenHTJ2K::get_MAGBp(), and get_num_guard_bits().

## u16_SPqcd

uint16_t grk::Quantizer::u16_SPqcd[97]

Referenced by generate(), ojph::QuantizerOJPH::get_MAGBp(), openhtj2k::QuantizerOpenHTJ2K::get_MAGBp(), pull(), push(), Quantizer(), ojph::QuantizerOJPH::set_irrev_quant(), and openhtj2k::QuantizerOpenHTJ2K::set_irrev_quant().

## u8_SPqcd

uint8_t grk::Quantizer::u8_SPqcd[97]

Referenced by generate(), ojph::QuantizerOJPH::get_MAGBp(), openhtj2k::QuantizerOpenHTJ2K::get_MAGBp(), pull(), push(), Quantizer(), ojph::QuantizerOJPH::set_rev_quant(), and openhtj2k::QuantizerOpenHTJ2K::set_rev_quant().

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

- Quantizer.h
- Quantizer.cpp