MxPEG
stream to a sequence of JPEG images using no external hardware-optimized acceleration routines.
More...
#include <mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h>
Inheritance diagram for mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly:
Public Member Functions | |
mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly (mxcpcJPEGReceiver *receiver) | |
The converter assumes ownership over the JPEG receiver. | |
~mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly () | |
const char * | getAccelerationTypeString (void) |
(Re)implemented. | |
void | setYQuantizationTable (unsigned char *data_bytes) |
(Re)implemented. | |
void | setUVQuantizationTable (unsigned char *data_bytes) |
(Re)implemented. | |
void | performScanSweep (mxcpcFramewiseMxPEGDecoder::UndecodedFrameDescriptor *frame_descriptor) |
(Re)implemented. | |
Private Member Functions | |
void | calcFoldedHuffTables (void) |
Calculate the huffman tables .. | |
void | generateHuffTables1 (const mxcpc::u8 *bits_tbl_off1, const mxcpc::u8 *val_tbl, int swap_symbol, HuffCodeTblEntry *folded_tbl_p) |
Create a huffman lookup table. | |
void | initHuffmanEncoderBufferState () |
Init the Buffer. | |
void | resetHuffmanEncoderBufferState () |
bool | consumeScanBit (void) |
We need this often in inner loops of performScanSweep(), 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 performScanSweep(), so we request inline substitution and hope the compiler sufficiently rocks. | |
bool | consumeAdditionalBits (int n) |
We need this often in inner loops of performScanSweep(), so we request inline substitution and hope the compiler sufficiently rocks. | |
void | encodeSubMCUTiles (mxcpc::s16 *coef_matrix, mxcpc::s16 *last_dc_coeff, FoldedHuffTbl_DC_AC *huff_code_tbl_entry, HuffmanBufferStateStructure *hbuf_state_ptr) |
This Method takes a 8x8 sub-MCU and preforms a swift Huffman Encoding. | |
Static Private Member Functions | |
static void | copyAccuToGlobalHuffBuffer (mxcpc::u32 huff_accu_32, HuffmanBufferStateStructure *huff_buf_state_ptr) |
Copies a word into the global huffman encoding buffer! | |
static int | shutDownHuffAccu (void) |
Closes down huffman encoding stream. | |
static int | returnBitsInCoef (mxcpc::s16 c) |
Number of bits from .... | |
Private Attributes | |
mxcpc::u8 * | HuffmanEncoderBuffer |
Pointer to Huffman encode buffer. | |
mxcpcHuffmanTree * | HuffmanTree_Y_DC |
mxcpcHuffmanTree * | HuffmanTree_Y_AC |
mxcpcHuffmanTree * | HuffmanTree_UV_DC |
mxcpcHuffmanTree * | HuffmanTree_UV_AC |
mxcpc::s16 | QuantizationTable_Y [64] |
mxcpc::s16 | QuantizationTable_UV [64] |
mxcpc::s16 * | CoeffBuffer |
Ptr. to decoded frame! | |
int | TileNumX |
Nb. of tiles to handle per frame! | |
int | TileNumY |
unsigned char * | CurrentScanByte |
unsigned char | ScanMask |
int | ScanBytesLeft |
int | CoeffInAdditionalBits |
mxcpc_mxpeg::APP0 | APP0_Block |
mxcpc_mxpeg::SOF0 | SOF0_Block |
mxcpc_mxpeg::SOS | SOS_Block |
int | FramesProcessed |
Static Private Attributes | |
static const unsigned char | ZigZag_StoreMap [64] |
static const int | ZigZagMap [64] |
static const HuffCompDC | HuffTbl_Y_UV_DC [2] |
static const HuffCompAC | HuffTbl_Y_UV_AC [2] |
static FoldedHuffTbl_DC_AC | Huff_Y_UV [2] |
Array of two tables, size = 2*0xB0 words = 1408 bytes : */. | |
static HuffmanBufferStateStructure | HuffmanBufferState |
Instance of HuffmanBufferStateStructure hold once! | |
Classes | |
struct | FoldedHuffTbl_DC_AC |
struct | HuffCodeTblEntry |
Single entry in table. More... | |
struct | HuffCompAC |
One AC huffman table - rules for one component (Y or UV). More... | |
struct | HuffCompDC |
One DC huffman table - rules for one component (Y or UV). More... | |
struct | HuffmanBufferStateStructure |
This structure holds the buffer state for huffman encoding ... More... | |
union | u32t |
Used to convert a HuffCodeTblEntry -> mxcpc::u32 ! More... |
MxPEG
stream to a sequence of JPEG images using no external hardware-optimized acceleration routines.
Does not really use the regular decoder backend, therefore install the mxcpcDefaultMxPEGDecoderBackEnd with your decoder
You can choose among various mxcpcJPEGReceiver s though, doing all sorts of stuff with your generated JPEG images.
Definition at line 58 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h.
|
Calculate the huffman tables .. Calculates huffman tables a la mobotix! Definition at line 698 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.cpp. |
|
We need this often in inner loops of performScanSweep(), so we request inline substitution and hope the compiler sufficiently rocks.
Specify as argument the number
The coefficient represented by the read bits will be stored to the class member variable
The method internally checks for
It returns Definition at line 311 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. References CoeffInAdditionalBits, consumeScanBit(), and ScanBytesLeft. |
|
We need this often in inner loops of performScanSweep(), 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
Returns the Huffman leaf node corresponding to the codeword just consumed or
Definition at line 269 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. References mxcpcHuffmanTree::Node::Child0, mxcpcHuffmanTree::Node::Child1, consumeScanBit(), mxcpcHuffmanTree::Node::IsLeaf, and ScanBytesLeft. |
|
We need this often in inner loops of performScanSweep(), so we request inline substitution and hope the compiler sufficiently rocks.
Only to be called if Returns whether or not the bit just consumed was set. Definition at line 215 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. References CurrentScanByte, ScanBytesLeft, ScanMask, and mxcpc::sendStatusMsg(). Referenced by consumeAdditionalBits(), and consumeHuffmanCodeword(). |
|
Copies a word into the global huffman encoding buffer!
Definition at line 589 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. References mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffmanBufferStateStructure::buf_current_w_pos, mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffmanBufferStateStructure::buf_end1, and mxcpc::sendStatusMsg(). Referenced by encodeSubMCUTiles(). |
|
This Method takes a 8x8 sub-MCU and preforms a swift Huffman Encoding.
Definition at line 363 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. References mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffCodeTblEntry::bit_len, mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffCodeTblEntry::code_msk, copyAccuToGlobalHuffBuffer(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffmanBufferStateStructure::huf_accu, mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffmanBufferStateStructure::huf_bits_used, returnBitsInCoef(), mxcpc::sendStatusMsg(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::u32t::table_entry, and ZigZagMap. |
|
Create a huffman lookup table.
Definition at line 759 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.cpp. References mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffCodeTblEntry::bit_len, mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffCodeTblEntry::code_msk, and mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::HuffCodeTblEntry::fill_0bit. |
|
Init the Buffer. Take care of initialisierung! Definition at line 798 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.cpp. |
|
Reset HuffmanEncoderBufferState in order to fetch next frame! Definition at line 816 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.cpp. |
|
Number of bits from ....
Definition at line 661 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. Referenced by encodeSubMCUTiles(). |
|
Initial value: { { { 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, }, { { 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, } } Definition at line 86 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. |
|
Initial value: { 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63 } Definition at line 62 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. |
|
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 } Definition at line 63 of file mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly.h. Referenced by encodeSubMCUTiles(). |