Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,8 @@ #define REND_STATIC_MEM_OPT #define EUALER2QUAT_FIX #define ROM_TO_RAM /*switch to convert CQMF decoder tables to RAM*/ #endif /* ################## End DEVELOPMENT switches ######################### */ Loading lib_rend/ivas_CQMFDecoder.c +309 −5 Original line number Diff line number Diff line Loading @@ -57,6 +57,23 @@ Nations Convention on Contracts on the International Sales of Goods. #include "ivas_prot_rend.h" #include "wmc_auto.h" #ifdef ROM_TO_RAM typedef struct TableNode { struct TableNode **ppoNextTable; struct TableNode *poOrderedNext; int32_t *piCodeIndex; int32_t *piDifference; int32_t *piLength; } TableNode; typedef struct TableList { TableNode *poOrderedTop; TableNode *poOrderedBottom; } TableList; #endif struct CQMF_DECODER { int32_t iSampleRate; Loading @@ -68,6 +85,11 @@ struct CQMF_DECODER int32_t iMSMode; int32_t *piMSFlags; #ifdef ROM_TO_RAM TableList *ptable_list; uint32_t ( *c_apauiHuffDecTable_RAM[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; uint32_t num_decode_table[2 * ALLOC_TABLE_SIZE]; #endif #ifdef ENABLE_MS_PRED int32_t piMSPredCoefs[MAX_BANDS]; int32_t piLRPhaseDiffs[MAX_BANDS]; Loading Loading @@ -99,11 +121,250 @@ struct CQMF_DECODER int32_t iLastError; }; #ifdef ROM_TO_RAM static void CreateDecodeTable( CQMFDecoder *psCQMFDecoder, int32_t num, const uint32_t ( *ppuiEncTable )[2], int32_t iSize, int32_t iReadLength, uint32_t *iTables ); static TableNode *CreateTableList( int32_t iReadLength ); static void DeleteTableList( TableList *ptable_list, int32_t iReadLength, int32_t iTables ); static TableNode *GetNextTable( int32_t iIndex, TableList *table_list, TableNode *poParent, int32_t iReadLength, uint32_t *iTablesCreated ); static void AddcodeTableList( TableList *ptable_list, int32_t iLength, int32_t iCode, int32_t iCodeIndex, int32_t iReadLength, uint32_t *iTables ); static void CompleteTables( CQMFDecoder *psCQMFDecoder, int32_t n, TableList *ptable_list, int32_t iReadLength, int32_t iTablesCreated ); static TableNode *CreateTableList( int32_t iReadLength ) { int32_t n; int32_t iMaxTables; TableNode *ptable_top; iMaxTables = 1 << iReadLength; ptable_top = (TableNode *) malloc( sizeof( TableNode ) ); ptable_top->ppoNextTable = (TableNode **) malloc( iMaxTables * sizeof( TableNode * ) ); ptable_top->piCodeIndex = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); ptable_top->piDifference = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); ptable_top->piLength = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); for ( n = 0; n < iMaxTables; n++ ) { ptable_top->ppoNextTable[n] = NULL; ptable_top->piCodeIndex[n] = 0xffff; ptable_top->piDifference[n] = 0; ptable_top->piLength[n] = 0; } return ptable_top; } static void DeleteTableList( TableList *ptable_list, int32_t iReadLength, int32_t iTables ) { TableNode *node; int32_t iMaxTables; node = ptable_list->poOrderedTop; iMaxTables = 1 << iReadLength; while ( ( iTables ) ) { TableNode *node1 = node; node = node1->poOrderedNext; if ( node1->piCodeIndex != NULL ) { free( node1->piCodeIndex ); } if ( node1->piLength != NULL ) { free( node1->piLength ); } if ( node1->piDifference != NULL ) { free( node1->piDifference ); } if ( node1->ppoNextTable != NULL ) { free( node1->ppoNextTable ); } if ( node1 != NULL ) { free( node1 ); } iTables--; } if ( ptable_list != NULL ) { free( ptable_list ); } } static TableNode *GetNextTable( int32_t iIndex, TableList *table_list, TableNode *poParent, int32_t iReadLength, uint32_t *iTablesCreated ) { TableNode *poNextNode; if ( poParent->ppoNextTable[iIndex] == NULL ) { poNextNode = CreateTableList( iReadLength ); poParent->ppoNextTable[iIndex] = poNextNode; poParent->piDifference[iIndex] = *iTablesCreated; // this is a link to the next table rather than the // difference table_list->poOrderedBottom->poOrderedNext = poNextNode; table_list->poOrderedBottom = poNextNode; ( *iTablesCreated )++; } else { poNextNode = poParent->ppoNextTable[iIndex]; } return poNextNode; } static void CompleteTables( CQMFDecoder *psCQMFDecoder, int32_t n, TableList *ptable_list, int32_t iReadLength, int32_t iTablesCreated ) { int32_t iMaxTables; int32_t j; TableNode *poNode; iMaxTables = 1 << iReadLength; psCQMFDecoder->c_apauiHuffDecTable_RAM[n] = malloc( iTablesCreated * iMaxTables * sizeof( uint32_t * ) ); poNode = ptable_list->poOrderedTop; for ( j = 0; j < iTablesCreated; j++ ) { int32_t k; if ( poNode != NULL ) { for ( k = 0; k < iMaxTables; k++ ) { uint32_t uiCode; uiCode = poNode->piDifference[k]; uiCode <<= 16; uiCode |= poNode->piCodeIndex[k]; psCQMFDecoder->c_apauiHuffDecTable_RAM[n][j][k] = uiCode; } } poNode = poNode->poOrderedNext; } } static void AddcodeTableList( TableList *ptable_list, int32_t iLength, int32_t iCode, int32_t iCodeIndex, int32_t iReadLength, uint32_t *iTables ) { int32_t iDifference; int32_t iMask; int32_t iCurrentLength; int32_t iIndex; int32_t iCodeLow; int32_t iCodeHigh; TableNode *poNode; poNode = ptable_list->poOrderedTop; iMask = ( 1 << iReadLength ) - 1; iCurrentLength = iLength; while ( iCurrentLength > iReadLength ) { iDifference = iCurrentLength - iReadLength; iIndex = iCode >> iDifference; iIndex &= iMask; poNode = GetNextTable( iIndex, ptable_list, poNode, iReadLength, iTables ); iCurrentLength -= iReadLength; } iMask = ( 1 << iCurrentLength ) - 1; iDifference = iReadLength - iCurrentLength; iCodeLow = ( iCode & iMask ) << iDifference; iMask = ( 1 << iDifference ) - 1; iCodeHigh = iCodeLow | iMask; for ( iIndex = iCodeLow; iIndex <= iCodeHigh; iIndex++ ) { poNode->piCodeIndex[iIndex] = iCodeIndex; poNode->piDifference[iIndex] = iDifference; poNode->piLength[iIndex] = iLength; } } static void CreateDecodeTable( CQMFDecoder *psCQMFDecoder, int32_t num, const uint32_t ( *ppuiEncTable )[2], int32_t iSize, int32_t iReadLength, uint32_t *iTables ) { int32_t n; int32_t iMaxTables; uint32_t **ppsort_enc_table; TableList *ptable_list; ptable_list = (TableList *) malloc( sizeof( TableList ) ); iMaxTables = 1 << iReadLength; ppsort_enc_table = (uint32_t **) malloc( iSize * sizeof( int32_t * ) ); for ( n = 0; n < iSize; n++ ) { ppsort_enc_table[n] = (uint32_t *) malloc( 3 * sizeof( int32_t ) ); ppsort_enc_table[n][0] = ppuiEncTable[n][0]; ppsort_enc_table[n][1] = ppuiEncTable[n][1]; ppsort_enc_table[n][2] = (uint32_t) n; } for ( n = 0; n < iSize; n++ ) { uint32_t iMin; int32_t iMinIndex; int32_t k; iMin = ppsort_enc_table[n][0]; iMinIndex = n; for ( k = n; k < iSize; k++ ) { if ( ppsort_enc_table[k][0] < iMin ) { iMin = ppsort_enc_table[k][0]; iMinIndex = k; } } if ( iMinIndex != n ) { uint32_t uiLength; uint32_t uiCode; uint32_t uiCodeIndex; uiLength = ppsort_enc_table[n][0]; uiCode = ppsort_enc_table[n][1]; uiCodeIndex = ppsort_enc_table[n][2]; ppsort_enc_table[n][0] = ppsort_enc_table[iMinIndex][0]; ppsort_enc_table[n][1] = ppsort_enc_table[iMinIndex][1]; ppsort_enc_table[n][2] = ppsort_enc_table[iMinIndex][2]; ppsort_enc_table[iMinIndex][0] = uiLength; ppsort_enc_table[iMinIndex][1] = uiCode; ppsort_enc_table[iMinIndex][2] = uiCodeIndex; } } ptable_list->poOrderedTop = CreateTableList( iReadLength ); ptable_list->poOrderedBottom = ptable_list->poOrderedTop; for ( n = 0; n < iSize; n++ ) { int32_t iLength; int32_t iCode; int32_t iCodeIndex; iLength = ppsort_enc_table[n][0]; iCode = ppsort_enc_table[n][1]; iCodeIndex = ppsort_enc_table[n][2]; AddcodeTableList( ptable_list, iLength, iCode, iCodeIndex, iReadLength, iTables ); } CompleteTables( psCQMFDecoder, num, ptable_list, iReadLength, *iTables ); DeleteTableList( ptable_list, iReadLength, *iTables ); for ( n = 0; n < iSize; n++ ) { free( ppsort_enc_table[n] ); } free( ppsort_enc_table ); } #endif CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, const int32_t iChannels ) { int32_t n; #ifdef ROM_TO_RAM int32_t read_length; #endif CQMFDecoder *psCQMFDecoder = NULL; assert( iSampleRate == 48000 ); // Fix Loading Loading @@ -203,7 +464,22 @@ CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, (int32_t *) malloc( CQMF_BANDS * sizeof( int32_t ) ); } } #ifdef ROM_TO_RAM read_length = READ_LENGTH; for ( n = 0; n < ALLOC_TABLE_SIZE * 2; n++ ) { psCQMFDecoder->num_decode_table[n] = 1; // initialising the value to 1 if ( c_apauiHuffEncTabels[n] != NULL ) { CreateDecodeTable( psCQMFDecoder, n, c_apauiHuffEncTabels[n], num_row_aauiCQMFHuff[n], read_length, &psCQMFDecoder->num_decode_table[n] ); } else { psCQMFDecoder->c_apauiHuffDecTable_RAM[n] = NULL; } } #endif psCQMFDecoder->psPredictionDecoder = CreatePredictionDecoder( iChannels, psCQMFDecoder->iNumBlocks ); // psCQMFDecoder->pReadBuff = Loading Loading @@ -377,6 +653,19 @@ void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ) //{ // free( psCQMFDecoder->pReadBuff ); // } #ifdef ROM_TO_RAM for ( uint32_t n = 0; n < ALLOC_TABLE_SIZE * 2; n++ ) { if ( psCQMFDecoder->num_decode_table[n] > 1 ) { if ( psCQMFDecoder->c_apauiHuffDecTable_RAM[n] != NULL ) { free( psCQMFDecoder->c_apauiHuffDecTable_RAM[n] ); } } } #endif DeletePredictionDecoder( psCQMFDecoder->psPredictionDecoder ); Loading Loading @@ -445,9 +734,13 @@ static int32_t ReadRMSEnvelope( const int32_t iChannels, ivas_split_rend_bits_t *pBits ); static int32_t ReadAllocInformation( int32_t *piAllocOffset, ivas_split_rend_bits_t *pBits ); #ifdef ROM_TO_RAM static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ); #else static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits ); #endif static void ComputeAllocation( const int32_t iChannels, const int32_t *piNumGroups, Loading Loading @@ -487,12 +780,14 @@ int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, psCQMFDecoder->iChannels, psCQMFDecoder->iNumBlocks, &psCQMFDecoder->iCommonGrouping, psCQMFDecoder->piNumGroups, psCQMFDecoder->ppiGroupLengths, pBits ); pBits ); iBitsRead += ReadRMSEnvelope( psCQMFDecoder->iChannels, (const int32_t *) psCQMFDecoder->piNumGroups, psCQMFDecoder->iNumBands, psCQMFDecoder->pppiRMSEnvelope, pBits ); pBits ); #ifdef ENABLE_PMOD_ADJUST iBitsRead += Loading Loading @@ -549,7 +844,12 @@ int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, psCQMFDecoder->pppiAlloc[n], psCQMFDecoder->pppiCQMFSignReal[n], psCQMFDecoder->pppiCQMFSignImag[n], psCQMFDecoder->pppiQCQMFReal[n], psCQMFDecoder->pppiQCQMFImag[n], pBits ); pBits #ifdef ROM_TO_RAM , psCQMFDecoder->c_apauiHuffDecTable_RAM #endif ); } for ( n = 0; n < psCQMFDecoder->iChannels; n++ ) Loading Loading @@ -1216,9 +1516,13 @@ static int32_t ReadAllocInformation( int32_t *piAllocOffset, return iBitsRead; } #ifdef ROM_TO_RAM static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ) #else static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits ) #endif { int32_t n; int32_t iBitsRead; Loading lib_rend/ivas_CQMFHuff.c +136 −55 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_rend/ivas_CQMFHuff.h +129 −2 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ extern "C" { #endif #include "options.h" #include "ivas_Tables.h" #include <stdio.h> // For NULL #include <stdint.h> Loading @@ -55,256 +56,382 @@ extern "C" extern const uint32_t c_aauiCQMFHuffEnc1[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec1[3][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc2[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec2[3][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc3[25][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec3[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc4[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec4[5][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc5[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec5[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc6[49][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec6[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc7[64][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec7[25][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc8[81][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec8[16][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc9[100][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec9[22][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc10[169][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec10[45][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc11[196][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec11[50][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc12[289][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec12[76][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc13[324][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec13[89][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc14[400][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec14[53][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc15[576][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec15[73][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc16[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec16[85][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc17[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec17[93][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc18[28][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec18[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc19[29][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec19[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc20[32][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec20[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc21[37][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec21[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc22[39][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec22[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc23[46][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec23[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc24[55][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec24[17][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc25[65][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec25[19][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc26[77][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec26[26][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc27[91][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec27[28][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc28[109][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec28[30][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc29[129][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec29[34][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc30[153][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec30[39][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc31[181][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec31[43][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc33[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec33[2][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc34[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec34[2][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc35[25][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec35[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc36[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec36[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc37[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec37[4][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc38[49][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec38[22][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc39[64][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec39[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc40[81][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec40[36][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc41[100][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec41[16][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc42[169][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec42[28][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc43[196][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec43[32][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc44[289][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec44[27][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc45[324][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec45[50][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc46[400][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec46[61][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc47[576][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec47[87][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc48[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec48[110][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc49[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec49[113][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc50[28][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec50[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc51[29][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec51[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc52[32][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec52[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc53[37][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec53[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc54[39][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec54[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc55[46][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec55[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc56[55][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec56[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc57[65][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec57[14][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc58[77][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec58[17][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc59[91][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec59[20][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc60[109][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec60[24][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc61[129][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec61[33][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc62[153][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec62[41][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc63[181][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec63[39][16]; #endif extern const uint32_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; #ifndef ROM_TO_RAM extern const uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; #else extern const uint32_t num_row_aauiCQMFHuff[2 * ALLOC_TABLE_SIZE]; #endif #ifdef USE_DEMOD_TABLES extern const int32_t c_aaiHuffDemod1[16][2]; Loading lib_rend/ivas_Tables.h +3 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,9 @@ extern "C" #define MIN_ALLOC_OFFSET ( -128 ) #define MAX_ALLOC_OFFSET ( 127 ) #ifdef ROM_TO_RAM #define READ_LENGTH ( 4 ) #endif #define ALLOC_TABLE_SIZE ( 32 ) Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,8 @@ #define REND_STATIC_MEM_OPT #define EUALER2QUAT_FIX #define ROM_TO_RAM /*switch to convert CQMF decoder tables to RAM*/ #endif /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_rend/ivas_CQMFDecoder.c +309 −5 Original line number Diff line number Diff line Loading @@ -57,6 +57,23 @@ Nations Convention on Contracts on the International Sales of Goods. #include "ivas_prot_rend.h" #include "wmc_auto.h" #ifdef ROM_TO_RAM typedef struct TableNode { struct TableNode **ppoNextTable; struct TableNode *poOrderedNext; int32_t *piCodeIndex; int32_t *piDifference; int32_t *piLength; } TableNode; typedef struct TableList { TableNode *poOrderedTop; TableNode *poOrderedBottom; } TableList; #endif struct CQMF_DECODER { int32_t iSampleRate; Loading @@ -68,6 +85,11 @@ struct CQMF_DECODER int32_t iMSMode; int32_t *piMSFlags; #ifdef ROM_TO_RAM TableList *ptable_list; uint32_t ( *c_apauiHuffDecTable_RAM[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; uint32_t num_decode_table[2 * ALLOC_TABLE_SIZE]; #endif #ifdef ENABLE_MS_PRED int32_t piMSPredCoefs[MAX_BANDS]; int32_t piLRPhaseDiffs[MAX_BANDS]; Loading Loading @@ -99,11 +121,250 @@ struct CQMF_DECODER int32_t iLastError; }; #ifdef ROM_TO_RAM static void CreateDecodeTable( CQMFDecoder *psCQMFDecoder, int32_t num, const uint32_t ( *ppuiEncTable )[2], int32_t iSize, int32_t iReadLength, uint32_t *iTables ); static TableNode *CreateTableList( int32_t iReadLength ); static void DeleteTableList( TableList *ptable_list, int32_t iReadLength, int32_t iTables ); static TableNode *GetNextTable( int32_t iIndex, TableList *table_list, TableNode *poParent, int32_t iReadLength, uint32_t *iTablesCreated ); static void AddcodeTableList( TableList *ptable_list, int32_t iLength, int32_t iCode, int32_t iCodeIndex, int32_t iReadLength, uint32_t *iTables ); static void CompleteTables( CQMFDecoder *psCQMFDecoder, int32_t n, TableList *ptable_list, int32_t iReadLength, int32_t iTablesCreated ); static TableNode *CreateTableList( int32_t iReadLength ) { int32_t n; int32_t iMaxTables; TableNode *ptable_top; iMaxTables = 1 << iReadLength; ptable_top = (TableNode *) malloc( sizeof( TableNode ) ); ptable_top->ppoNextTable = (TableNode **) malloc( iMaxTables * sizeof( TableNode * ) ); ptable_top->piCodeIndex = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); ptable_top->piDifference = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); ptable_top->piLength = (int32_t *) malloc( iMaxTables * sizeof( int32_t ) ); for ( n = 0; n < iMaxTables; n++ ) { ptable_top->ppoNextTable[n] = NULL; ptable_top->piCodeIndex[n] = 0xffff; ptable_top->piDifference[n] = 0; ptable_top->piLength[n] = 0; } return ptable_top; } static void DeleteTableList( TableList *ptable_list, int32_t iReadLength, int32_t iTables ) { TableNode *node; int32_t iMaxTables; node = ptable_list->poOrderedTop; iMaxTables = 1 << iReadLength; while ( ( iTables ) ) { TableNode *node1 = node; node = node1->poOrderedNext; if ( node1->piCodeIndex != NULL ) { free( node1->piCodeIndex ); } if ( node1->piLength != NULL ) { free( node1->piLength ); } if ( node1->piDifference != NULL ) { free( node1->piDifference ); } if ( node1->ppoNextTable != NULL ) { free( node1->ppoNextTable ); } if ( node1 != NULL ) { free( node1 ); } iTables--; } if ( ptable_list != NULL ) { free( ptable_list ); } } static TableNode *GetNextTable( int32_t iIndex, TableList *table_list, TableNode *poParent, int32_t iReadLength, uint32_t *iTablesCreated ) { TableNode *poNextNode; if ( poParent->ppoNextTable[iIndex] == NULL ) { poNextNode = CreateTableList( iReadLength ); poParent->ppoNextTable[iIndex] = poNextNode; poParent->piDifference[iIndex] = *iTablesCreated; // this is a link to the next table rather than the // difference table_list->poOrderedBottom->poOrderedNext = poNextNode; table_list->poOrderedBottom = poNextNode; ( *iTablesCreated )++; } else { poNextNode = poParent->ppoNextTable[iIndex]; } return poNextNode; } static void CompleteTables( CQMFDecoder *psCQMFDecoder, int32_t n, TableList *ptable_list, int32_t iReadLength, int32_t iTablesCreated ) { int32_t iMaxTables; int32_t j; TableNode *poNode; iMaxTables = 1 << iReadLength; psCQMFDecoder->c_apauiHuffDecTable_RAM[n] = malloc( iTablesCreated * iMaxTables * sizeof( uint32_t * ) ); poNode = ptable_list->poOrderedTop; for ( j = 0; j < iTablesCreated; j++ ) { int32_t k; if ( poNode != NULL ) { for ( k = 0; k < iMaxTables; k++ ) { uint32_t uiCode; uiCode = poNode->piDifference[k]; uiCode <<= 16; uiCode |= poNode->piCodeIndex[k]; psCQMFDecoder->c_apauiHuffDecTable_RAM[n][j][k] = uiCode; } } poNode = poNode->poOrderedNext; } } static void AddcodeTableList( TableList *ptable_list, int32_t iLength, int32_t iCode, int32_t iCodeIndex, int32_t iReadLength, uint32_t *iTables ) { int32_t iDifference; int32_t iMask; int32_t iCurrentLength; int32_t iIndex; int32_t iCodeLow; int32_t iCodeHigh; TableNode *poNode; poNode = ptable_list->poOrderedTop; iMask = ( 1 << iReadLength ) - 1; iCurrentLength = iLength; while ( iCurrentLength > iReadLength ) { iDifference = iCurrentLength - iReadLength; iIndex = iCode >> iDifference; iIndex &= iMask; poNode = GetNextTable( iIndex, ptable_list, poNode, iReadLength, iTables ); iCurrentLength -= iReadLength; } iMask = ( 1 << iCurrentLength ) - 1; iDifference = iReadLength - iCurrentLength; iCodeLow = ( iCode & iMask ) << iDifference; iMask = ( 1 << iDifference ) - 1; iCodeHigh = iCodeLow | iMask; for ( iIndex = iCodeLow; iIndex <= iCodeHigh; iIndex++ ) { poNode->piCodeIndex[iIndex] = iCodeIndex; poNode->piDifference[iIndex] = iDifference; poNode->piLength[iIndex] = iLength; } } static void CreateDecodeTable( CQMFDecoder *psCQMFDecoder, int32_t num, const uint32_t ( *ppuiEncTable )[2], int32_t iSize, int32_t iReadLength, uint32_t *iTables ) { int32_t n; int32_t iMaxTables; uint32_t **ppsort_enc_table; TableList *ptable_list; ptable_list = (TableList *) malloc( sizeof( TableList ) ); iMaxTables = 1 << iReadLength; ppsort_enc_table = (uint32_t **) malloc( iSize * sizeof( int32_t * ) ); for ( n = 0; n < iSize; n++ ) { ppsort_enc_table[n] = (uint32_t *) malloc( 3 * sizeof( int32_t ) ); ppsort_enc_table[n][0] = ppuiEncTable[n][0]; ppsort_enc_table[n][1] = ppuiEncTable[n][1]; ppsort_enc_table[n][2] = (uint32_t) n; } for ( n = 0; n < iSize; n++ ) { uint32_t iMin; int32_t iMinIndex; int32_t k; iMin = ppsort_enc_table[n][0]; iMinIndex = n; for ( k = n; k < iSize; k++ ) { if ( ppsort_enc_table[k][0] < iMin ) { iMin = ppsort_enc_table[k][0]; iMinIndex = k; } } if ( iMinIndex != n ) { uint32_t uiLength; uint32_t uiCode; uint32_t uiCodeIndex; uiLength = ppsort_enc_table[n][0]; uiCode = ppsort_enc_table[n][1]; uiCodeIndex = ppsort_enc_table[n][2]; ppsort_enc_table[n][0] = ppsort_enc_table[iMinIndex][0]; ppsort_enc_table[n][1] = ppsort_enc_table[iMinIndex][1]; ppsort_enc_table[n][2] = ppsort_enc_table[iMinIndex][2]; ppsort_enc_table[iMinIndex][0] = uiLength; ppsort_enc_table[iMinIndex][1] = uiCode; ppsort_enc_table[iMinIndex][2] = uiCodeIndex; } } ptable_list->poOrderedTop = CreateTableList( iReadLength ); ptable_list->poOrderedBottom = ptable_list->poOrderedTop; for ( n = 0; n < iSize; n++ ) { int32_t iLength; int32_t iCode; int32_t iCodeIndex; iLength = ppsort_enc_table[n][0]; iCode = ppsort_enc_table[n][1]; iCodeIndex = ppsort_enc_table[n][2]; AddcodeTableList( ptable_list, iLength, iCode, iCodeIndex, iReadLength, iTables ); } CompleteTables( psCQMFDecoder, num, ptable_list, iReadLength, *iTables ); DeleteTableList( ptable_list, iReadLength, *iTables ); for ( n = 0; n < iSize; n++ ) { free( ppsort_enc_table[n] ); } free( ppsort_enc_table ); } #endif CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, const int32_t iChannels ) { int32_t n; #ifdef ROM_TO_RAM int32_t read_length; #endif CQMFDecoder *psCQMFDecoder = NULL; assert( iSampleRate == 48000 ); // Fix Loading Loading @@ -203,7 +464,22 @@ CQMFDecoder *CreateCQMFDecoder( const int32_t iSampleRate, (int32_t *) malloc( CQMF_BANDS * sizeof( int32_t ) ); } } #ifdef ROM_TO_RAM read_length = READ_LENGTH; for ( n = 0; n < ALLOC_TABLE_SIZE * 2; n++ ) { psCQMFDecoder->num_decode_table[n] = 1; // initialising the value to 1 if ( c_apauiHuffEncTabels[n] != NULL ) { CreateDecodeTable( psCQMFDecoder, n, c_apauiHuffEncTabels[n], num_row_aauiCQMFHuff[n], read_length, &psCQMFDecoder->num_decode_table[n] ); } else { psCQMFDecoder->c_apauiHuffDecTable_RAM[n] = NULL; } } #endif psCQMFDecoder->psPredictionDecoder = CreatePredictionDecoder( iChannels, psCQMFDecoder->iNumBlocks ); // psCQMFDecoder->pReadBuff = Loading Loading @@ -377,6 +653,19 @@ void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ) //{ // free( psCQMFDecoder->pReadBuff ); // } #ifdef ROM_TO_RAM for ( uint32_t n = 0; n < ALLOC_TABLE_SIZE * 2; n++ ) { if ( psCQMFDecoder->num_decode_table[n] > 1 ) { if ( psCQMFDecoder->c_apauiHuffDecTable_RAM[n] != NULL ) { free( psCQMFDecoder->c_apauiHuffDecTable_RAM[n] ); } } } #endif DeletePredictionDecoder( psCQMFDecoder->psPredictionDecoder ); Loading Loading @@ -445,9 +734,13 @@ static int32_t ReadRMSEnvelope( const int32_t iChannels, ivas_split_rend_bits_t *pBits ); static int32_t ReadAllocInformation( int32_t *piAllocOffset, ivas_split_rend_bits_t *pBits ); #ifdef ROM_TO_RAM static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ); #else static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits ); #endif static void ComputeAllocation( const int32_t iChannels, const int32_t *piNumGroups, Loading Loading @@ -487,12 +780,14 @@ int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, psCQMFDecoder->iChannels, psCQMFDecoder->iNumBlocks, &psCQMFDecoder->iCommonGrouping, psCQMFDecoder->piNumGroups, psCQMFDecoder->ppiGroupLengths, pBits ); pBits ); iBitsRead += ReadRMSEnvelope( psCQMFDecoder->iChannels, (const int32_t *) psCQMFDecoder->piNumGroups, psCQMFDecoder->iNumBands, psCQMFDecoder->pppiRMSEnvelope, pBits ); pBits ); #ifdef ENABLE_PMOD_ADJUST iBitsRead += Loading Loading @@ -549,7 +844,12 @@ int32_t DecodeFrame( CQMFDecoder *psCQMFDecoder, psCQMFDecoder->pppiAlloc[n], psCQMFDecoder->pppiCQMFSignReal[n], psCQMFDecoder->pppiCQMFSignImag[n], psCQMFDecoder->pppiQCQMFReal[n], psCQMFDecoder->pppiQCQMFImag[n], pBits ); pBits #ifdef ROM_TO_RAM , psCQMFDecoder->c_apauiHuffDecTable_RAM #endif ); } for ( n = 0; n < psCQMFDecoder->iChannels; n++ ) Loading Loading @@ -1216,9 +1516,13 @@ static int32_t ReadAllocInformation( int32_t *piAllocOffset, return iBitsRead; } #ifdef ROM_TO_RAM static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ) #else static int32_t ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ivas_split_rend_bits_t *pBits ) #endif { int32_t n; int32_t iBitsRead; Loading
lib_rend/ivas_CQMFHuff.c +136 −55 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_rend/ivas_CQMFHuff.h +129 −2 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ extern "C" { #endif #include "options.h" #include "ivas_Tables.h" #include <stdio.h> // For NULL #include <stdint.h> Loading @@ -55,256 +56,382 @@ extern "C" extern const uint32_t c_aauiCQMFHuffEnc1[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec1[3][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc2[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec2[3][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc3[25][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec3[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc4[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec4[5][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc5[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec5[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc6[49][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec6[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc7[64][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec7[25][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc8[81][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec8[16][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc9[100][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec9[22][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc10[169][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec10[45][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc11[196][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec11[50][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc12[289][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec12[76][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc13[324][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec13[89][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc14[400][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec14[53][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc15[576][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec15[73][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc16[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec16[85][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc17[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec17[93][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc18[28][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec18[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc19[29][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec19[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc20[32][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec20[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc21[37][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec21[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc22[39][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec22[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc23[46][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec23[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc24[55][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec24[17][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc25[65][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec25[19][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc26[77][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec26[26][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc27[91][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec27[28][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc28[109][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec28[30][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc29[129][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec29[34][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc30[153][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec30[39][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc31[181][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec31[43][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc33[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec33[2][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc34[16][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec34[2][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc35[25][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec35[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc36[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec36[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc37[36][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec37[4][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc38[49][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec38[22][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc39[64][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec39[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc40[81][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec40[36][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc41[100][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec41[16][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc42[169][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec42[28][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc43[196][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec43[32][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc44[289][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec44[27][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc45[324][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec45[50][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc46[400][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec46[61][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc47[576][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec47[87][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc48[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec48[110][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc49[729][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec49[113][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc50[28][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec50[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc51[29][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec51[6][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc52[32][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec52[7][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc53[37][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec53[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc54[39][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec54[9][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc55[46][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec55[10][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc56[55][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec56[12][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc57[65][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec57[14][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc58[77][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec58[17][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc59[91][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec59[20][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc60[109][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec60[24][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc61[129][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec61[33][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc62[153][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec62[41][16]; #endif extern const uint32_t c_aauiCQMFHuffEnc63[181][2]; #ifndef ROM_TO_RAM extern const uint32_t c_aauiCQMFHuffDec63[39][16]; #endif extern const uint32_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; #ifndef ROM_TO_RAM extern const uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE]; #else extern const uint32_t num_row_aauiCQMFHuff[2 * ALLOC_TABLE_SIZE]; #endif #ifdef USE_DEMOD_TABLES extern const int32_t c_aaiHuffDemod1[16][2]; Loading
lib_rend/ivas_Tables.h +3 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,9 @@ extern "C" #define MIN_ALLOC_OFFSET ( -128 ) #define MAX_ALLOC_OFFSET ( 127 ) #ifdef ROM_TO_RAM #define READ_LENGTH ( 4 ) #endif #define ALLOC_TABLE_SIZE ( 32 ) Loading