Commit 44617da9 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

address formating related comments

parent 487a5ebd
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -259,7 +259,6 @@ static ivas_error ivas_dec_init_split_rend(
    }
#endif


#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
+3 −44
Original line number Diff line number Diff line
@@ -400,13 +400,12 @@ void DeletePredictionEncoder(
}


//#define USE_RXX_WINDOW

/*-------------------------------------------------------------------*
 * Function ComputePredictors()
 *
 *
 *-------------------------------------------------------------------*/

#ifdef SPLIT_REND_LCLD_5MS
void ComputePredictors(
    PredictionEncoder *psPredictionEncoder,
@@ -470,36 +469,15 @@ void ComputePredictors(
            pfRxxImag[0] = 0.0;
            for ( n = 0; n < LCLD_PRED_WIN_LEN; n++ )
            {
#ifdef USE_RXX_WINDOW
                float fReal;
                float fImag;
                fReal = psPredictionEncoder->pfWindow[n] * pppfRealBuf[c][n][b];
                fImag = psPredictionEncoder->pfWindow[n] * pppfImagBuf[c][n][b];
                pfRxxReal[0] += ( fReal * fReal + fImag * fImag );
#else
                pfRxxReal[0] += ( pppfRealBuf[c][n][b] * pppfRealBuf[c][n][b] + pppfImagBuf[c][n][b] * pppfImagBuf[c][n][b] );
#endif
            }

            pfRxxReal[1] = 0.0;
            pfRxxImag[1] = 0.0;
            for ( n = 1; n < LCLD_PRED_WIN_LEN; n++ )
            {
#ifdef USE_RXX_WINDOW
                float fReal1;
                float fImag1;
                float fReal2;
                float fImag2;
                fReal1 = psPredictionEncoder->pfWindow[n] * pppfRealBuf[c][n][b];
                fImag1 = psPredictionEncoder->pfWindow[n] * pppfImagBuf[c][n][b];
                fReal2 = psPredictionEncoder->pfWindow[n - 1] * pppfRealBuf[c][n - 1][b];
                fImag2 = psPredictionEncoder->pfWindow[n - 1] * pppfImagBuf[c][n - 1][b];
                pfRxxReal[1] += ( fReal1 * fReal2 + fImag1 * fImag2 );
                pfRxxImag[1] += ( fImag1 * fReal2 - fReal1 * fImag2 );
#else
                pfRxxReal[1] += ( pppfRealBuf[c][n][b] * pppfRealBuf[c][n - 1][b] + pppfImagBuf[c][n][b] * pppfImagBuf[c][n - 1][b] );
                pfRxxImag[1] += ( pppfImagBuf[c][n][b] * pppfRealBuf[c][n - 1][b] - pppfRealBuf[c][n][b] * pppfImagBuf[c][n - 1][b] );
#endif
            }

            if ( pfRxxReal[0] > 1e-12f )
@@ -651,36 +629,15 @@ int32_t ComputePredictors(
            pfRxxImag[0] = 0.0;
            for ( n = 0; n < iNumBlocks; n++ )
            {
#ifdef USE_RXX_WINDOW
                float fReal;
                float fImag;
                fReal = psPredictionEncoder->pfWindow[n] * pppfReal[c][n][b];
                fImag = psPredictionEncoder->pfWindow[n] * pppfImag[c][n][b];
                pfRxxReal[0] += ( fReal * fReal + fImag * fImag );
#else
                pfRxxReal[0] += ( pppfReal[c][n][b] * pppfReal[c][n][b] + pppfImag[c][n][b] * pppfImag[c][n][b] );
#endif
            }

            pfRxxReal[1] = 0.0;
            pfRxxImag[1] = 0.0;
            for ( n = 1; n < iNumBlocks; n++ )
            {
#ifdef USE_RXX_WINDOW
                float fReal1;
                float fImag1;
                float fReal2;
                float fImag2;
                fReal1 = psPredictionEncoder->pfWindow[n] * pppfReal[c][n][b];
                fImag1 = psPredictionEncoder->pfWindow[n] * pppfImag[c][n][b];
                fReal2 = psPredictionEncoder->pfWindow[n - 1] * pppfReal[c][n - 1][b];
                fImag2 = psPredictionEncoder->pfWindow[n - 1] * pppfImag[c][n - 1][b];
                pfRxxReal[1] += ( fReal1 * fReal2 + fImag1 * fImag2 );
                pfRxxImag[1] += ( fImag1 * fReal2 - fReal1 * fImag2 );
#else
                pfRxxReal[1] += ( pppfReal[c][n][b] * pppfReal[c][n - 1][b] + pppfImag[c][n][b] * pppfImag[c][n - 1][b] );
                pfRxxImag[1] += ( pppfImag[c][n][b] * pppfReal[c][n - 1][b] - pppfReal[c][n][b] * pppfImag[c][n - 1][b] );
#endif
            }

            if ( pfRxxReal[0] > 1e-12f )
@@ -843,6 +800,7 @@ int32_t ComputePredictors(
 *
 *
 *-------------------------------------------------------------------*/

#ifdef SPLIT_REND_LCLD_5MS
void ApplyForwardPredictors(
    PredictionEncoder *psPredictionEncoder,
@@ -952,6 +910,7 @@ void ApplyForwardPredictors(
 *
 *
 *-------------------------------------------------------------------*/

#ifdef SPLIT_REND_LCLD_5MS
int32_t WritePredictors(
    PredictionEncoder *psPredictionEncoder,
+6 −6
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ ivas_error CreateLCLDDecoder(
    ivas_error error;
    LCLDDecoder *psLCLDDecoder = NULL;

    assert( iSampleRate == 48000 ); // Fix
    assert( iSampleRate == 48000 ); /* Fix */
#ifdef SPLIT_REND_LCLD_5MS
    assert( iNumBlocks == 16 || iNumBlocks == 8 || iNumBlocks == 4 );
#endif
@@ -377,11 +377,11 @@ ivas_error CreateLCLDDecoder(
    psLCLDDecoder->iAllocOffset = 0;

#ifdef SPLIT_REND_LCLD_5MS
    psLCLDDecoder->iNumBands = 0; // read from bitstream
    psLCLDDecoder->iNumBands = 0; /* read from bitstream*/
#else
    psLCLDDecoder->iNumBands = MAX_BANDS_48; // Fix
    psLCLDDecoder->iNumBands = MAX_BANDS_48; /* Fix */
#endif
    psLCLDDecoder->piBandwidths = c_aiBandwidths48; // Fix
    psLCLDDecoder->piBandwidths = c_aiBandwidths48; /* Fix */

    psLCLDDecoder->iMSMode = 0;
    if ( ( psLCLDDecoder->piMSFlags = (int32_t *) malloc( MAX_BANDS * sizeof( int32_t ) ) ) == NULL )
@@ -535,7 +535,7 @@ ivas_error CreateLCLDDecoder(
    {
        return error;
    }
    psLCLDDecoder->psNoiseGen = NULL; // CreateNoiseGen(); // No noise fill for now
    psLCLDDecoder->psNoiseGen = NULL; /* CreateNoiseGen(); No noise fill for now*/
    *psLCLDDecoder_out = psLCLDDecoder;

    return IVAS_ERR_OK;
@@ -783,7 +783,7 @@ int32_t DecodeLCLDFrame(
    else
    {
        for ( n = 0; n < psLCLDDecoder->iChannels; n++ )
        { // This will be updated to support multiple sample rates
        { /* This will be updated to support multiple sample rates*/
            for ( k = 0; k < psLCLDDecoder->piNumGroups[n]; k++ )
            {
                PerceptualModel( psLCLDDecoder->iNumBands, psLCLDDecoder->pppiRMSEnvelope[n][k], psLCLDDecoder->pppiExcitation[n][k], psLCLDDecoder->pppiSMR[n][k] );
+4 −4
Original line number Diff line number Diff line
@@ -134,8 +134,8 @@ ivas_error CreateLCLDEncoder(
    const int32_t iChannels,
    const int32_t iTargetBitRate,
    const int32_t iAllowSidePred,
    const int32_t iNumBlocks,
    const int32_t iNumSubSets )
    const int16_t iNumBlocks,
    const int16_t iNumSubSets )
#else
ivas_error CreateLCLDEncoder(
    LCLDEncoder **psLCLDEncoder_out,
@@ -166,7 +166,7 @@ ivas_error CreateLCLDEncoder(
    psLCLDEncoder->iSampleRate = iSampleRate;
    psLCLDEncoder->iChannels = iChannels;
#ifdef SPLIT_REND_LCLD_5MS
    psLCLDEncoder->iNumBlocks = iNumBlocks;
    psLCLDEncoder->iNumBlocks = (int32_t) iNumBlocks;
#else
    psLCLDEncoder->iNumBlocks = LCLD_BLOCKS_PER_FRAME;
#endif
@@ -352,7 +352,7 @@ ivas_error CreateLCLDEncoder(
    }

#ifdef SPLIT_REND_LCLD_5MS
    if ( ( error = CreatePredictionEncoder( &( psLCLDEncoder->psPredictionEncoder ), iChannels, psLCLDEncoder->iNumBlocks, iNumSubSets, iMaxNumPredBands ) ) != IVAS_ERR_OK )
    if ( ( error = CreatePredictionEncoder( &( psLCLDEncoder->psPredictionEncoder ), iChannels, psLCLDEncoder->iNumBlocks, (int32_t) iNumSubSets, iMaxNumPredBands ) ) != IVAS_ERR_OK )
    {
        return error;
    }
+2 −2
Original line number Diff line number Diff line
@@ -49,8 +49,8 @@ ivas_error CreateLCLDEncoder(
    const int32_t iChannels,
    const int32_t iTargetBitRate,
    const int32_t iAllowSidePred,
    const int32_t iNumBlocks,
    const int32_t iNumSubSets );
    const int16_t iNumBlocks,
    const int16_t iNumSubSets );
#else
ivas_error CreateLCLDEncoder(
    LCLDEncoder **psLCLDEncoder,
Loading