|
OpenJPH
Open-source implementation of JPEG2000 Part-15
|
Quantization parameters object. More...
#include <ojph_params.h>
Public Types | |
| enum | comp_type : ui8 { OJPH_COMP_Y = 0 , OJPH_COMP_CB = 1 , OJPH_COMP_CR = 2 , OJPH_COMP_UNDEFINED = 0xFF } |
Public Member Functions | |
| param_qcd (local::param_qcd *p) | |
| void | set_irrev_quant (float delta) |
| Set the irreversible quantization base delta. | |
| void | set_qfactor (ui8 qfactor) |
| Sets Qfactor. | |
| void | set_irrev_quant (ui32 comp_idx, float delta) |
| Set the irreversible quantization base delta for a specific component. | |
| void | set_qfactor (ui32 comp_idx, comp_type ctype, ui8 qfactor) |
| Sets Qfactor for a specific component. | |
Static Public Member Functions | |
| static comp_type | ui8_2_comp_type (ui8 c) |
Private Attributes | |
| local::param_qcd * | state |
Quantization parameters object.
Definition at line 169 of file ojph_params.h.
| enum ojph::param_qcd::comp_type : ui8 |
| Enumerator | |
|---|---|
| OJPH_COMP_Y | |
| OJPH_COMP_CB | |
| OJPH_COMP_CR | |
| OJPH_COMP_UNDEFINED | |
Definition at line 172 of file ojph_params.h.
|
inline |
Definition at line 186 of file ojph_params.h.
References state.
| void ojph::param_qcd::set_irrev_quant | ( | float | delta | ) |
Set the irreversible quantization base delta.
This represents the default base delta and influences QCD marker segment
| delta |
Definition at line 411 of file ojph_params.cpp.
References state.
Referenced by LLVMFuzzerTestOneInput(), main(), and TEST().
| void ojph::param_qcd::set_irrev_quant | ( | ui32 | comp_idx, |
| float | delta ) |
Set the irreversible quantization base delta for a specific component.
This represents the default base delta for component comp_idx, and influences QCC marker segment for the component, inserting one if needed, which is usually the case.
| comp_idx | |
| delta |
Definition at line 422 of file ojph_params.cpp.
References state.
Sets Qfactor for a specific component.
Setting Qfactor takes precedence over setting an irreversible quantization base delta
| comp_idx | Component index |
| ctype | Indicates whether the component is a Y, Cb or Cr channel, after the ICT if present |
| qfactor | Compression quality as an integer between 1 (worst quality) and 100 (best quality) |
Definition at line 428 of file ojph_params.cpp.
References state.
| void ojph::param_qcd::set_qfactor | ( | ui8 | qfactor | ) |
Sets Qfactor.
This is a top level Qfactor; it will automatically set the qfactor; if you have one or two channels they will be set to luminance (or Y) visual weighting. If you have three or more, the first three will be set to Y, Cb, Cr; channels 4 onwards will be set to luminance. If that does not match the desired behaviour; then do not set the top level qfactor, but set the Qfactor for individual channels according to desired visual weighting type, using set_qfactor(ui32 comp_idx, comp_type ctype, ui8 qfactor);
Note that setting Qfactor takes precedence over setting an irreversible quantization base delta.
| qfactor | Compression quality as an integer between 1 (worst quality) and 100 (best quality) |
Definition at line 417 of file ojph_params.cpp.
References state.
Referenced by main().
Definition at line 178 of file ojph_params.h.
References OJPH_COMP_CR, OJPH_COMP_UNDEFINED, and OJPH_COMP_Y.
Referenced by ojph::local::param_qcd::check_validity().
|
private |
Definition at line 246 of file ojph_params.h.
Referenced by param_qcd(), set_irrev_quant(), set_irrev_quant(), set_qfactor(), and set_qfactor().