xp_comm_proj/rd_dicom/Papyrus3/JpegDir/JpgLless/huffcoptimisebug.c
/*
 *--------------------------------------------------------------
 *
 * LoadStdHuffTables --
 *
 *	Load the standard Huffman tables (cf. JPEG standard
 *	section K.3) into compression data structure pointed
 *	by cPtr.
 *	IMPORTANT: these are only valid for 8-bit data precision!
 *
 * Results:
 *      Standard Huffman table, bits and val, are copied into
 *	cPtr->dcHuffTblPtrs.
 *
 * Side effects:
 *      None.
 *
 *--------------------------------------------------------------
 */
LoadStdHuffTables
Load the standard Huffman tables (cf. JPEG standard
section K.3) into compression data structure pointed
by cPtr.
IMPORTANT: these are only valid for 8-bit data precision!

Standard Huffman table, bits and val, are copied into
cPtr->dcHuffTblPtrs.

Side effects:
None.
LoadStdHuffTables Load the standard Huffman tables ( cf . JPEG standard section K . 3 ) into compression data structure pointed by cPtr . IMPORTANT : these are only valid for 8 - bit data precision! Standard Huffman table bits and val are copied into cPtr - > dcHuffTblPtrs . Side effects : None .
void
LoadStdHuffTables (CompressInfo *cPtr)
{
    static Uchar dcLuminanceBits[17] =
      { 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 };
    static Uchar dcLuminanceVal[17] =
      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
    static Uchar dcChrominanceBits[17] =
      {  0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
    static Uchar dcChrominanceVal[17] =
      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
    AddHuffTable(&(cPtr->dcHuffTblPtrs[0]),dcLuminanceBits,dcLuminanceVal);
    AddHuffTable(&(cPtr->dcHuffTblPtrs[1]),dcChrominanceBits,dcChrominanceVal);
}
void LoadStdHuffTables ( CompressInfo * cPtr ) { static Uchar dcLuminanceBits [ 17 ] = { 0 , 0 , 1 , 5 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 } ; static Uchar dcLuminanceVal [ 17 ] = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 } ; static Uchar dcChrominanceBits [ 17 ] = { 0 , 0 , 3 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 } ; static Uchar dcChrominanceVal [ 17 ] = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 } ; AddHuffTable ( & ( cPtr -> dcHuffTblPtrs [ 0 ] ) , dcLuminanceBits , dcLuminanceVal ) ; AddHuffTable ( & ( cPtr -> dcHuffTblPtrs [ 1 ] ) , dcChrominanceBits , dcChrominanceVal ) ; }
LoadStdHuffTables
      Load the standard Huffman tables (cf.
LoadStdHuffTables Load the standard Huffman tables ( cf .
/* static Uchar dcLuminanceBits[17] =
      { 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
    static Uchar dcLuminanceVal[] =
      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; */ /* static Uchar dcChrominanceBits[17] =
      { 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
    static Uchar dcChrominanceVal[] =
      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; */ /* 0-base */