Created by the British Broadcasting Corporation.
Choose a quantiser. More...
#include <quant_chooser.h>
Public Member Functions | |
QuantChooser (const CoeffArray &pic_data, const float lambda) | |
Constructor. | |
int | GetBestQuant (Subband &node) |
Finds the best quantisers for the subband, returning the predicted number of bits needed. | |
void | SetEntropyCorrection (const float ecfac) |
Sets the factor used for correcting the entropy calculation. |
Private Member Functions | |
QuantChooser (const QuantChooser &cpy) | |
Copy constructor is private and body-less. This class should not be copied. | |
QuantChooser & | operator= (const QuantChooser &rhs) |
Assignment = is private and body-less. This class should not be assigned. | |
void | IntegralErrorCalc (Subband &node, const int xratio, const int yratio) |
Calculate errors and entropies for integral-bit quantisers. | |
void | NonIntegralErrorCalc (Subband &node, const int xratio, const int yratio) |
Calculate errors and entropies for non-integral-bit quantisers. | |
void | LagrangianCalc () |
Having got statistics, calculate the Lagrangian costs. | |
void | SelectBestQuant () |
Select the best quantisation index on the basis of the Lagrangian calculations. | |
CoeffType | BlockAbsMax (const Subband &node) |
void | SetSkip (CodeBlock &cblock, const int qidx) |
Set the skip flag for a codeblock. |
Private Attributes | |
float | m_subband_wt |
The perceptual weighting factor of the subband being tested. | |
int | m_bottom_idx |
The smallest quantisation index being tested. | |
int | m_top_idx |
The largest quantisation index being tested. | |
int | m_index_step |
The step we use in jumping through the list of quantisers. | |
int | m_min_idx |
The index of the quantiser with the lowest cost. | |
const CoeffArray & | m_coeff_data |
A local reference to the data under consideration. | |
const float | m_lambda |
The lambda value to be used in the Lagrangian calculation. | |
float | m_entropy_correctionfactor |
A value for correcting the crude calculation of the entropy. | |
OneDArray< int > | m_count0 |
An array used to count the number of zeroes. | |
int | m_count1 |
The number of ones (equal to the number of coefficients) | |
OneDArray< int > | m_countPOS |
An array used to count the number of positive values. | |
OneDArray< int > | m_countNEG |
An array used to count the number of negative values. | |
OneDArray< double > | m_error_total |
An array used to collate the sum of the perceptually-weighted errors. | |
OneDArray< CostType > | m_costs |
An array used to collate the computed costs. |
This class chooses a quantiser or quantisers for a subband
dirac::QuantChooser::QuantChooser | ( | const CoeffArray & | pic_data, |
const float | lambda | ||
) |
|
private |
int dirac::QuantChooser::GetBestQuant | ( | Subband & | node | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
References m_entropy_correctionfactor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by SetEntropyCorrection().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
© 2004 British Broadcasting Corporation.
Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's
excellent Doxygen tool.