This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467T - JPEGENC 2.00.01.00 - Custom Huffman Table



Hi all,

I'm using DVSDK 3.10.00.19.

In the datasheetof the jpegenc i read :

"Huffman tables are hard-codec and built into the application at compile-time"

In the idmjpge.h i read :


#ifdef iVLCD
/*
 *  ======== IDMJPGE_TIGEM_CustomHuffmanTables ========
 *  JPEG Encoder Custom Huffman Tables - This structure has two parts
 *  1. The first part defines the custom VLC tables that need to be passed to
 *  the JPEG Encoder. This will be used in the VLC Module.
 *  2. The second part defines the format in which the custom Huffman tables
 *  need to be passed to the JPEG Encoder. This is compliant with the format
 *  specified in RFC 2035 (RTP Payload Format for JPEG-compressed Video).This
 *  is used to create the DHT marker in the JPEG Header.
 *
 *  NOTE 1: An important note about the alignment requirement of this structure.
 *  This structure should be aligned to 128 byte boundary,i.e., the last 7 bits
 *  in the allocated base address should be zeroes.
 *
 *  NOTE 2: The "IDMJPGE_TIGEM_DynamicParams" structure defined below contains
 *  a pointer to this structure of type "IDMJPGE_TIGEM_CustomHuffmanTables" -
 *  "IDMJPGE_TIGEM_CustomHuffmanTables *huffmanTable".
 *  This field is used to pass custom Huffman tables to the JPEG Encoder.
 *  The application just needs to initialize this field appropriately.
 *  However, if the application wishes to use the Standard Huffman Tables, then
 *  there are 2 ways of informing this to the JPEG Encoder -
 *  (a) by using the base class only "IIMGENC1_DynamicParams" and not the
 *  extended class "IDMJPGE_TIGEM_DynamicParams", in which case the size field
 *  in the DynamicParams structure should be set to the size of
 *  "IIMGENC1_DynamicParams".
 *  (b) by using the extended class "IDMJPGE_TIGEM_DynamicParams", but by
 *  setting the field "IDMJPGE_TIGEM_CustomHuffmanTables *huffmanTable" to NULL
 */

  typedef struct IDMJPGE_TIGEM_CustomHuffmanTables
  {

But the extended structure doesn't appear in the user guide.

So, could someone can give the answer for "Can i use custom Huffman Tables with this encoder ?"

If yes, how i define iVLCD to use the extended struct or where can i add my huffman tables ?

Thanks,

Mika