mx::MxPEGScanDecoderSoftwareOnlyCore Class Reference

Core functionality for software-only MxPEG decoding. More...

#include <MxPEGScanDecoderSoftwareOnlyCore.h>

Inheritance diagram for mx::MxPEGScanDecoderSoftwareOnlyCore:

mxmObject mx::IUndecodedMxPEGFrameReceiver mx::IErrorState mx::IInterface mx::MxPEGScanDecoderSoftwareOnly mx::MxPEGScanToJPEGConverterSoftwareOnly List of all members.

Public Member Functions

void setQuantizationTable (int target_table, mxm::u8 *data_bytes)
 (Re)implemented.
void setHuffmanTable (const mxmHuffmanTableId &target_table, mxm::u8 *data_bytes)
 (Re)implemented.

Protected Member Functions

bool mapTables (mxmUndecodedMxPEGFrameDescriptor *frame_descriptor)
 Used by derived implementations to compute the mappings for the Huffman and quantization tables managed by the core.
bool consumeScanBit (void)
 We need this often in inner loops of the decoder routine, so we request inline substitution and hope the compiler sufficiently rocks.
const mxcpcHuffmanTree::Node * consumeHuffmanCodeword (const mxcpcHuffmanTree::Node *current_huffman_node)
 We need this often in inner loops of the decoding routine, so we request inline substitution and hope the compiler sufficiently rocks.
bool consumeAdditionalBits (int n)
 We need this often in inner loops of the decoding routine, so we request inline substitution and hope the compiler sufficiently rocks.
void idct (short *blk)
 Inverse discrete cosine transform (8x8).
void dct (short *blk)
 Forward discrete cosine transform (8x8).

Protected Attributes

unsigned char * CurrentScanByte
 The following fields' state is defined to only be valid during scan sweeps - so they won't show up in the constructor.
unsigned char ScanMask
int ScanBytesLeft
int CoeffInAdditionalBits
int MCUsPerTile
const mxcpcHuffmanTree::Node * HuffmanDCRootForMCU [MaxMCUsPerTile]
const mxcpcHuffmanTree::Node * HuffmanACRootForMCU [MaxMCUsPerTile]
mxm::s16 * QuantTableForMCU [MaxMCUsPerTile]
mxm::s16 LastHuffmanDCs [3]
mxm::s16 * LastHuffmanDCPtrForMCU [MaxMCUsPerTile]
mxm::s16 CoeffBuffers [MaxMCUsPerTile][64]

Static Protected Attributes

static const int MaxMCUsPerTile = 8
static const int ZigZagMap [64]

Private Member Functions

void idctrow (short *blk)
void idctcol (short *blk)

Private Attributes

mxcpcHuffmanTreeHuffmanTrees [2][4]
mxm::s16 * QuantizationTables [4]

Static Private Attributes

static const int W1 = 2841
static const int W2 = 2676
static const int W3 = 2408
static const int W5 = 1609
static const int W6 = 1108
static const int W7 = 565
static short iclip [1024]
static short * iclp

Detailed Description

Core functionality for software-only MxPEG decoding.

Author:
Kai Hergenroether


Member Function Documentation

bool mx::MxPEGScanDecoderSoftwareOnlyCore::consumeAdditionalBits int  n  )  [inline, protected]
 

We need this often in inner loops of the decoding routine, so we request inline substitution and hope the compiler sufficiently rocks.

Specify as argument the number n >= 1 of additional bits to read.

The coefficient represented by the read bits will be stored to the class member variable CoeffInAdditionalBits.

The method internally checks for ScanBytesLeft > 0.

It returns false on success, and true if all scan bytes were cosumed before a valid codeword was detected.

const mxcpcHuffmanTree::Node* mx::MxPEGScanDecoderSoftwareOnlyCore::consumeHuffmanCodeword const mxcpcHuffmanTree::Node *  current_huffman_node  )  [inline, protected]
 

We need this often in inner loops of the decoding routine, so we request inline substitution and hope the compiler sufficiently rocks.

Specify as argument the root of the Huffman tree to be used for codeword recognition.

Internally checks for ScanBytesLeft > 0.

Returns the Huffman leaf node corresponding to the codeword just consumed or 0 in case of failure. Failure conditions can be

  • an invalid bitstring was encountered
  • all scan bytes were cosumed before a valid codeword was detected

bool mx::MxPEGScanDecoderSoftwareOnlyCore::consumeScanBit void   )  [inline, protected]
 

We need this often in inner loops of the decoder routine, so we request inline substitution and hope the compiler sufficiently rocks.

Only to be called if ScanBytesLeft > 0.

Returns whether or not the bit just consumed was set.


Member Data Documentation

unsigned char* mx::MxPEGScanDecoderSoftwareOnlyCore::CurrentScanByte [protected]
 

The following fields' state is defined to only be valid during scan sweeps - so they won't show up in the constructor.

..

const int mx::MxPEGScanDecoderSoftwareOnlyCore::ZigZagMap [static, protected]
 

Initial value:

 {  0,  1,  8, 16,  9,  2,  3, 10,
                               17, 24, 32, 25, 18, 11,  4,  5,
                               12, 19, 26, 33, 40, 48, 41, 34,
                               27, 20, 13,  6,  7, 14, 21, 28,
                               35, 42, 49, 56, 57, 50, 43, 36,
                               29, 22, 15, 23, 30, 37, 44, 51,
                               58, 59, 52, 45, 38, 31, 39, 46,
                               53, 60, 61, 54, 47, 55, 62, 63 
                             }


The documentation for this class was generated from the following files:
Generated on Fri Jun 29 17:21:07 2007 for MxPEG SDK by  doxygen 1.4.6