Lines Matching refs:table

551 void HuffCountData( HuffData* table, const u8 *srcp, u32 size, u8 bitSize );
552 u16 HuffConstructTree( HuffData* table, u32 dataNum );
553 u32 HuffConvertData( const HuffData *table, const u8* srcp, u8* dstp, u32 srcSize, u32 maxSize, u8…
555 void HuffAddParentDepthToTable( HuffData *table, u16 leftNo, u16 rightNo );
556 void HuffAddCodeToTable ( HuffData *table, u16 nodeNo, u32 paHuffCode );
557 u8 HuffAddCountHWordToTable ( HuffData *table, u16 nodeNo );
682 HuffData* table = info->huffTable; in HuffInitTable() local
687 table[ i ] = HUFF_TABLE_INIT_DATA; in HuffInitTable()
688 table[ i ].No = (u16)i; in HuffInitTable()
717 void HuffCountData( HuffData* table, const u8 *srcp, u32 size, u8 bitSize ) in HuffCountData() argument
726 table[ srcp[ i ] ].Freq++; // 8-bit encoding in HuffCountData()
734 table[ tmp ].Freq++; // Store from upper 4 bits first // Either is OK in HuffCountData()
736 table[ tmp ].Freq++; // The problem is the encoding in HuffCountData()
749 u16 HuffConstructTree( HuffData *table, u32 dataNum ) in HuffConstructTree() argument
765 if ( ( table[i].Freq == 0 ) || in HuffConstructTree()
766 ( table[i].PaNo != 0 ) ) in HuffConstructTree()
775 else if ( table[i].Freq < table[ leftNo ].Freq ) in HuffConstructTree()
784 if ( ( table[i].Freq == 0 ) || in HuffConstructTree()
785 ( table[i].PaNo != 0 ) || in HuffConstructTree()
795 else if ( table[i].Freq < table[rightNo].Freq ) in HuffConstructTree()
807 table[ tableTop ].Freq = table[ leftNo ].Freq; in HuffConstructTree()
808 table[ tableTop ].ChNo[0] = (s16)leftNo; in HuffConstructTree()
809 table[ tableTop ].ChNo[1] = (s16)leftNo; in HuffConstructTree()
810 table[ tableTop ].LeafDepth = 1; in HuffConstructTree()
811 table[ leftNo ].PaNo = (s16)tableTop; in HuffConstructTree()
812 table[ leftNo ].Bit = 0; in HuffConstructTree()
813 table[ leftNo ].PaDepth = 1; in HuffConstructTree()
825 table[ tableTop ].Freq = table[ leftNo ].Freq + table[ rightNo ].Freq; in HuffConstructTree()
826 table[ tableTop ].ChNo[0] = (s16)leftNo; in HuffConstructTree()
827 table[ tableTop ].ChNo[1] = (s16)rightNo; in HuffConstructTree()
828 if ( table[ leftNo ].LeafDepth > table[ rightNo ].LeafDepth ) in HuffConstructTree()
830 table[ tableTop ].LeafDepth = (u16)( table[ leftNo ].LeafDepth + 1 ); in HuffConstructTree()
834 table[ tableTop ].LeafDepth = (u16)( table[ rightNo ].LeafDepth + 1 ); in HuffConstructTree()
837 table[ leftNo ].PaNo = table[ rightNo ].PaNo = (s16)(tableTop); in HuffConstructTree()
838 table[ leftNo ].Bit = 0; in HuffConstructTree()
839 table[ rightNo ].Bit = 1; in HuffConstructTree()
841 HuffAddParentDepthToTable( table, (u16)leftNo, (u16)rightNo ); in HuffConstructTree()
848 …HuffAddCodeToTable( table, rootNo, 0x00 ); // The Huffman code is the code with HuffCode's … in HuffConstructTree()
851 HuffAddCountHWordToTable( table, rootNo ); in HuffConstructTree()
859 void HuffAddParentDepthToTable( HuffData *table, u16 leftNo, u16 rightNo ) in HuffAddParentDepthToTable() argument
861 table[ leftNo ].PaDepth++; in HuffAddParentDepthToTable()
862 table[ rightNo ].PaDepth++; in HuffAddParentDepthToTable()
864 if ( table[ leftNo ].LeafDepth != 0 ) in HuffAddParentDepthToTable()
866 … HuffAddParentDepthToTable( table, (u16)table[ leftNo ].ChNo[0], (u16)table[ leftNo ].ChNo[1] ); in HuffAddParentDepthToTable()
868 if ( table[ rightNo ].LeafDepth != 0 ) in HuffAddParentDepthToTable()
870 … HuffAddParentDepthToTable( table, (u16)table[ rightNo ].ChNo[0], (u16)table[ rightNo ].ChNo[1] ); in HuffAddParentDepthToTable()
877 void HuffAddCodeToTable( HuffData* table, u16 nodeNo, u32 paHuffCode ) in HuffAddCodeToTable() argument
879 table[ nodeNo ].HuffCode = (paHuffCode << 1) | table[ nodeNo ].Bit; in HuffAddCodeToTable()
881 if ( table[ nodeNo ].LeafDepth != 0 ) in HuffAddCodeToTable()
883 HuffAddCodeToTable( table, (u16)table[ nodeNo ].ChNo[0], table[ nodeNo ].HuffCode ); in HuffAddCodeToTable()
884 HuffAddCodeToTable( table, (u16)table[ nodeNo ].ChNo[1], table[ nodeNo ].HuffCode ); in HuffAddCodeToTable()
892 u8 HuffAddCountHWordToTable( HuffData *table, u16 nodeNo) in HuffAddCountHWordToTable() argument
896 switch ( table[ nodeNo ].LeafDepth ) in HuffAddCountHWordToTable()
904 leftHWord = HuffAddCountHWordToTable( table, (u16)table[nodeNo].ChNo[0] ); in HuffAddCountHWordToTable()
905 rightHWord = HuffAddCountHWordToTable( table, (u16)table[nodeNo].ChNo[1] ); in HuffAddCountHWordToTable()
909 table[ nodeNo ].HWord = (u16)( leftHWord + rightHWord + 1 ); in HuffAddCountHWordToTable()
1195 u32 HuffConvertData( const HuffData *table, const u8* srcp, u8* dstp, u32 srcSize, u32 maxSize, u8 … in HuffConvertData() argument
1209 bitStream = (bitStream << table[ val ].PaDepth) | table[ val ].HuffCode; in HuffConvertData()
1210 streamLength += table[ val ].PaDepth; in HuffConvertData()
1236 bitStream = (bitStream << table[ srcTmp ].PaDepth) | table[ srcTmp ].HuffCode; in HuffConvertData()
1237 streamLength += table[ srcTmp ].PaDepth; in HuffConvertData()