Commit 5fe3418e authored by vaclav's avatar vaclav
Browse files

HARM_COREDECODER_FUNCTIONS

parent 3eace83d
Loading
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ static Word16 PutIntoBitstream_fx(

    return value;
}
#ifndef HARM_COREDECODER_FUNCTIONS
static Word16 PutIntoBitstream_ivas_fx(
    const Word16 **pStream,
    TEncodeValue EncodeValue,
@@ -43,6 +44,7 @@ static Word16 PutIntoBitstream_ivas_fx(

    return value;
}
#endif

static Word16 FixedWidthEncoding( Word16 value, Word16 index )
{
@@ -252,6 +254,8 @@ void SetParameters_fx(
            }
        }
    }

    return;
}


@@ -266,13 +270,11 @@ void WriteToBitstream_fx(
    Word16 index;
    Word16 iParam, nParams;


    assert( ( paramsBitMap != NULL ) && ( nArrayLength > 0 ) && ( pStream != NULL ) && ( pnSize != NULL ) && ( hBstr != NULL ) && ( pnBits != NULL ) );
    nParams = paramsBitMap->nParams;

    FOR( index = 0; index < nArrayLength; index++ )
    {

        FOR( iParam = 0; iParam < nParams; iParam++ )
        {
            ParamBitMap const *param;
@@ -321,7 +323,11 @@ void WriteToBitstream_fx(
            }
        }
    }

    return;
}

#ifndef HARM_COREDECODER_FUNCTIONS
void WriteToBitstream_ivas_fx(
    ParamsBitMap const *paramsBitMap,
    const Word16 nArrayLength,
@@ -389,6 +395,7 @@ void WriteToBitstream_ivas_fx(
        }
    }
}
#endif

/** Get nBits long value from bitstream into *pStream. */
static Word16 GetFromBitstream(
@@ -457,6 +464,9 @@ void ReadFromBitstream_fx(
            }
        }
    }

    move16();
    *pnSize = add( *pnSize, i_mult( nParams, nArrayLength ) );

    return;
}
+2 −1
Original line number Diff line number Diff line
@@ -10869,6 +10869,7 @@ void WriteToBitstream_fx(
    BSTR_ENC_HANDLE hBstr,
    Word16 *pnBits );
#ifndef HARM_COREDECODER_FUNCTIONS
void WriteToBitstream_ivas_fx(
    ParamsBitMap const *paramsBitMap,
    const Word16 nArrayLength,
@@ -10876,7 +10877,7 @@ void WriteToBitstream_ivas_fx(
    Word16 *pnSize,
    BSTR_ENC_HANDLE hBstr,
    Word16 *pnBits );
#endif
/*===========================================================================================*/
/*----------------------------------------------------------------------------------*
+21 −0
Original line number Diff line number Diff line
@@ -791,32 +791,53 @@ Word16 WriteTnsData_ivas_fx( STnsConfig const *pTnsConfig, Word16 const *stream,
        {
            IF( LT_16( pTnsConfig->iFilterBorders[0], 512 ) )
            {
#ifdef HARM_COREDECODER_FUNCTIONS
                WriteToBitstream_fx( &tnsEnabledOnWhiteSWBTCX10BitMap, 1, &stream, pnSize, hBstr, pnBits );
#else
                WriteToBitstream_ivas_fx( &tnsEnabledOnWhiteSWBTCX10BitMap, 1, &stream, pnSize, hBstr, pnBits );
#endif
            }
            ELSE
            {
#ifdef HARM_COREDECODER_FUNCTIONS
                WriteToBitstream_fx( &tnsEnabledOnWhiteSWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#else
                WriteToBitstream_ivas_fx( &tnsEnabledOnWhiteSWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#endif
            }
        }
        ELSE
        {
            IF( LT_16( pTnsConfig->iFilterBorders[0], 512 ) )
            {
#ifdef HARM_COREDECODER_FUNCTIONS
                WriteToBitstream_fx( &tnsEnabledSWBTCX10BitMap, 1, &stream, pnSize, hBstr, pnBits );
#else
                WriteToBitstream_ivas_fx( &tnsEnabledSWBTCX10BitMap, 1, &stream, pnSize, hBstr, pnBits );
#endif
            }
            ELSE
            {
#ifdef HARM_COREDECODER_FUNCTIONS
                WriteToBitstream_fx( &tnsEnabledSWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#else
                WriteToBitstream_ivas_fx( &tnsEnabledSWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#endif
            }
        }
    }
    ELSE
    {
#ifdef HARM_COREDECODER_FUNCTIONS
        WriteToBitstream_fx( &tnsEnabledWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#else
        WriteToBitstream_ivas_fx( &tnsEnabledWBTCX20BitMap, 1, &stream, pnSize, hBstr, pnBits );
#endif
    }

    return TNS_NO_ERROR;
}

/*********************************************************************************************/
/*  Definitions of functions used in the mapping between TNS parameters and a bitstream.     */
/*********************************************************************************************/