Commit a035b93b authored by Shikha Shetgeri's avatar Shikha Shetgeri
Browse files

pipeline_fixes_set-1

parent 8a3be442
Loading
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ struct CQMF_DECODER
#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 void DeleteTableList( TableList *ptable_list, 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 );
@@ -151,15 +151,15 @@ static TableNode *CreateTableList( int32_t iReadLength )

    return ptable_top;
}
static void DeleteTableList( TableList *ptable_list, int32_t iReadLength, int32_t iTables )
static void DeleteTableList( TableList *ptable_list, int32_t iTables )
{

    TableNode *node;
    int32_t iMaxTables;
    //int32_t iMaxTables;
    node = ptable_list->poOrderedTop;


    iMaxTables = 1 << iReadLength;
    //iMaxTables = 1 << iReadLength;
    while ( ( iTables ) )
    {

@@ -282,11 +282,11 @@ static void AddcodeTableList( TableList *ptable_list, int32_t iLength, int32_t i
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;
    //int32_t iMaxTables;
    uint32_t **ppsort_enc_table;
    TableList *ptable_list;
    ptable_list = (TableList *) malloc( sizeof( TableList ) );
    iMaxTables = 1 << iReadLength;
    //iMaxTables = 1 << iReadLength;

    ppsort_enc_table = (uint32_t **) malloc( iSize * sizeof( int32_t * ) );
    for ( n = 0; n < iSize; n++ )
@@ -350,7 +350,7 @@ static void CreateDecodeTable( CQMFDecoder *psCQMFDecoder, int32_t num, const ui
    }

    CompleteTables( psCQMFDecoder, num, ptable_list, iReadLength, *iTables );
    DeleteTableList( ptable_list, iReadLength, *iTables );
    DeleteTableList( ptable_list, *iTables );
    for ( n = 0; n < iSize; n++ )
    {
        free( ppsort_enc_table[n] );
@@ -780,14 +780,12 @@ 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 +=
@@ -1558,10 +1556,14 @@ ReadCQMFData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int
#ifdef USE_DEMOD_TABLES
                    const int32_t( *paiDemodTable )[2] = NULL;
#endif

#ifdef ROM_TO_RAM
                    pauiHuffmanTable = (const uint32_t( * )[HUFF_DEC_TABLE_SIZE]) c_apauiHuffDecTables[iAlloc];
                    pauiHuffmanTableDPCM = (const uint32_t( * )[HUFF_DEC_TABLE_SIZE]) c_apauiHuffDecTables[ALLOC_TABLE_SIZE + iAlloc];
#else
                    pauiHuffmanTable = c_apauiHuffDecTables[iAlloc];
                    pauiHuffmanTableDPCM =
                        c_apauiHuffDecTables[ALLOC_TABLE_SIZE + iAlloc];
#endif
#ifdef USE_DEMOD_TABLES
                    paiDemodTable = c_apaiDemodTables[iAlloc];
#endif