Commit a516e3ec authored by Vidhya V P's avatar Vidhya V P
Browse files

Accepting the switches related to split rendering

[x] Accepting ROM_TO_RAM & SPLIT_REND_PRED_QUANT_63_PNTS
parent 82cfd242
Loading
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -1492,9 +1492,7 @@ typedef enum
    PITCH_ONLY,
    ANY_ROLL,
    PRED_ONLY,
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
    PRED_ROLL_ONLY,
#endif
    COM_GAIN_ONLY,
    LR_GAIN_ONLY
} IVAS_SPLIT_REND_POSE_TYPE;
@@ -1566,18 +1564,10 @@ typedef enum
#define COMPLEX_MD_BAND_THRESH                  MAX_SPLIT_REND_MD_BANDS
#define COMPLEX_MD_BAND_THRESH_LOW              5

#ifndef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_NUM_QUANT_STRATS        3
#else
#define IVAS_SPLIT_REND_NUM_QUANT_STRATS        4
#endif
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_PRED_63QUANT_PNTS       63
#define IVAS_SPLIT_REND_PRED_31QUANT_PNTS       31
#define IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS    31
#else
#define IVAS_SPLIT_REND_PRED_QUANT_PNTS         31
#endif
#define IVAS_SPLIT_REND_D_QUANT_PNTS            15
#define IVAS_SPLIT_REND_PRED_MIN_VAL            -1.4f
#define IVAS_SPLIT_REND_PRED_MAX_VAL            1.4f
@@ -1588,17 +1578,12 @@ typedef enum
#define IVAS_SPLIT_REND_D_MIN_VAL               0.0f
#define IVAS_SPLIT_REND_D_MAX_VAL               1.0f

#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_PRED_ROLL_Q_STEP        (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED_ROLL_1BYQ_STEP     (( IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#define IVAS_SPLIT_REND_PRED31_Q_STEP           (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_31QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED31_1BYQ_STEP        (( IVAS_SPLIT_REND_PRED_31QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#define IVAS_SPLIT_REND_PRED63_Q_STEP           (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_63QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED63_1BYQ_STEP        (( IVAS_SPLIT_REND_PRED_63QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#else
#define IVAS_SPLIT_REND_PRED_Q_STEP             (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED_1BYQ_STEP          (( IVAS_SPLIT_REND_PRED_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#endif

#define IVAS_SPLIT_REND_D_Q_STEP                (( IVAS_SPLIT_REND_D_MAX_VAL - IVAS_SPLIT_REND_D_MIN_VAL ) / ( IVAS_SPLIT_REND_D_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_D_1BYQ_STEP             (( IVAS_SPLIT_REND_D_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_D_MAX_VAL - IVAS_SPLIT_REND_D_MIN_VAL )) 
+0 −2
Original line number Diff line number Diff line
@@ -151,11 +151,9 @@

/*#define SPLIT_REND_WITH_HEAD_ROT*/                    /* Dlb,FhG: Split Rendering contributions 21 and 35 */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#define SPLIT_REND_PRED_QUANT_63_PNTS
#define SPLIT_REND_WITH_HEAD_ROT_PARAMBIN               /* Nokia: Issue 623: Split rendering support for parambin renderer */
#define FIX_658_SPLIT_REND_MASA                         /*Dlb : Fix for issue 658, uninitialized memory access in MASA in Split rendering 0DOF mode*/
#define OSBA_SPLIT_RENDERING
#define ROM_TO_RAM                                     /*Dlb : ROM optimization in SR mode*/     
#define FIX_712_713_SPLIT_REND_MASA_MC                 /*Dlb : Fix for issue 712 and 713*/
#endif

+0 −13
Original line number Diff line number Diff line
@@ -585,7 +585,6 @@ const int32_t ivas_split_rend_huff_d_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3] =
    { 12, 13, 8190 },{ 13, 14, 16382 },{ 14, 14, 16383 }
};

#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
const int32_t ivas_split_rend_huff_pred63_consts[IVAS_SPLIT_REND_PRED_63QUANT_PNTS][3] = 
{
    {-31,11,2040},
@@ -677,18 +676,6 @@ const int32_t ivas_split_rend_huff_roll_pred_consts[IVAS_SPLIT_REND_ROLL_PRED_QU
{14,10,1022},{15,10,1023},
};

#else
const int32_t ivas_split_rend_huff_pred_consts[IVAS_SPLIT_REND_PRED_QUANT_PNTS][3] = {
{-15,10,1020},{-14,10,1021},{-13,9,506},{-12,9,507},
{-11,8,250},{-10,8,251},{-9,7,120},{-8,7,121},
{-7,6,56},{-6,6,57},{-5,5,24},{-4,5,25},{-3,4,8},
{-2,4,9},{-1,3,2},{0,2,0},{1,3,3},
{2,4,10},{3,4,11},{4,5,26},{5,5,27},
{6,6,58},{7,6,59},{8,7,122},{9,7,123},
{10,7,124},{11,8,252},{12,9,508},{13,9,509},
{14,10,1022},{15,10,1023},
};
#endif
#endif


+0 −6
Original line number Diff line number Diff line
@@ -139,15 +139,9 @@ extern const float ivas_split_rend_relative_roll_pos_angles_hq[SPLIT_REND_MAX_PI
extern const float ivas_split_rend_relative_pos_angles[MAX_HEAD_ROT_POSES][3];
extern const int16_t ivas_split_rend_band_grouping[MAX_SPLIT_REND_MD_BANDS + 1];
extern const int32_t ivas_split_rend_huff_d_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3];
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
extern const int32_t ivas_split_rend_huff_pred63_consts[IVAS_SPLIT_REND_PRED_31QUANT_PNTS][3];
extern const int32_t ivas_split_rend_huff_pred31_consts[IVAS_SPLIT_REND_PRED_31QUANT_PNTS][3];
#else
extern const int32_t ivas_split_rend_huff_pred_consts[IVAS_SPLIT_REND_PRED_QUANT_PNTS][3];
#endif
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
extern const int32_t ivas_split_rend_huff_roll_pred_consts[IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS][3];
#endif
extern const int32_t ivas_split_rend_huff_p_d_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3];
extern const int32_t ivas_split_rend_huff_p_d_diff_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3];
extern const int32_t split_rend_brate_tbl[];
+4 −43
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@
 * Local structures
 *------------------------------------------------------------------------------------------*/

#ifdef ROM_TO_RAM
typedef struct TableNode
{
    struct TableNode **ppoNextTable;
@@ -68,7 +67,6 @@ typedef struct TableList
    TableNode *poOrderedBottom;

} TableList;
#endif

struct LCLD_DECODER
{
@@ -81,11 +79,9 @@ struct LCLD_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
    int32_t piMSPredCoefs[MAX_BANDS];
    int32_t piLRPhaseDiffs[MAX_BANDS];
#ifdef ENABLE_PMOD_ADJUST
@@ -113,7 +109,6 @@ struct LCLD_DECODER
    NoiseGen *psNoiseGen;
};

#ifdef ROM_TO_RAM
static void CreateDecodeTable( LCLDDecoder *psLCLDDecoder, int32_t num, const uint16_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 iTables );
@@ -342,7 +337,6 @@ static void CreateDecodeTable( LCLDDecoder *psLCLDDecoder, int32_t num, const ui
    }
    free( ppsort_enc_table );
}
#endif


/*------------------------------------------------------------------------------------------*
@@ -357,9 +351,7 @@ ivas_error CreateLCLDDecoder(
    const int32_t iChannels )
{
    int32_t n;
#ifdef ROM_TO_RAM
    int32_t read_length;
#endif
    ivas_error error;
    LCLDDecoder *psLCLDDecoder = NULL;

@@ -519,7 +511,6 @@ ivas_error CreateLCLDDecoder(
        }
    }

#ifdef ROM_TO_RAM
    read_length = READ_LENGTH;
    for ( n = 0; n < ALLOC_TABLE_SIZE * 2; n++ )
    {
@@ -534,7 +525,7 @@ ivas_error CreateLCLDDecoder(
            psLCLDDecoder->c_apauiHuffDecTable_RAM[n] = NULL;
        }
    }
#endif

    if ( ( error = CreatePredictionDecoder( &psLCLDDecoder->psPredictionDecoder, iChannels, psLCLDDecoder->iNumBlocks ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -692,7 +683,6 @@ void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder )
            free( psLCLDDecoder->pppiQLCLDImag );
        }

#ifdef ROM_TO_RAM
        for ( n = 0; n < ALLOC_TABLE_SIZE * 2; n++ )
        {
            if ( psLCLDDecoder->num_decode_table[n] > 1 )
@@ -704,7 +694,6 @@ void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder )
                }
            }
        }
#endif

        if ( psLCLDDecoder->psPredictionDecoder != NULL )
        {
@@ -747,13 +736,8 @@ static int32_t ReadRMSEnvelope( const int32_t iChannels, const int32_t *piNumGro

static int32_t ReadAllocInformation( int32_t *piAllocOffset, ivas_split_rend_bits_t *pBits );

#ifdef ROM_TO_RAM
static int32_t
ReadLCLDData( 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
ReadLCLDData( 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, const int32_t iNumBands, int32_t ***pppiSMR, const int32_t iAllocOffset, int32_t ***pppiAlloc );

@@ -828,12 +812,8 @@ int32_t DecodeLCLDFrame(
            psLCLDDecoder->pppiAlloc[n],
            psLCLDDecoder->pppiLCLDSignReal[n], psLCLDDecoder->pppiLCLDSignImag[n],
            psLCLDDecoder->pppiQLCLDReal[n], psLCLDDecoder->pppiQLCLDImag[n],
            pBits
#ifdef ROM_TO_RAM
            ,
            psLCLDDecoder->c_apauiHuffDecTable_RAM
#endif
        );
            pBits,
            psLCLDDecoder->c_apauiHuffDecTable_RAM );
    }

    for ( n = 0; n < psLCLDDecoder->iChannels; n++ )
@@ -1509,7 +1489,7 @@ static int32_t ReadAllocInformation(

    return iBitsRead;
}
#ifdef ROM_TO_RAM

static int32_t ReadLCLDData(
    const int32_t iNumGroups,
    const int32_t *piGroupLengths,
@@ -1523,20 +1503,6 @@ static int32_t ReadLCLDData(
    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 ReadLCLDData(
    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 b, k, m, n;
    int32_t iBitsRead, iBlockOffest, iFBOffset;
@@ -1563,13 +1529,8 @@ static int32_t ReadLCLDData(
#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
Loading