Commit aba8928a authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_VOIP_FUNCTIONS

parent 56ef5e09
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -430,7 +430,6 @@ int main(
        }
    }

#ifdef FIX_VOIP_FUNCTIONS
    /*-----------------------------------------------------------------*
     * Print config information
     *-----------------------------------------------------------------*/
@@ -440,9 +439,6 @@ int main(
        fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }
#else
    IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode );
#endif

    /*-------------------------------------------------------------------*
     * Load renderer configuration from file
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@

#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1360_LFE_DELAY                            /* Dlb: LFE delay alignment when rendering in CLDFB domain*/
#define FIX_VOIP_FUNCTIONS                              /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */
#define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC               /* VA: issue 1298: Memory saving in ivas_core_enc() */
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
#define NONBE_1214_PLC_LSF_MEMORY                       /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */
+0 −4
Original line number Diff line number Diff line
@@ -436,11 +436,7 @@ const char *IVAS_DEC_GetErrorMessage(
    ivas_error error                                        /* i  : decoder error code enum                                                 */
);

#ifdef FIX_VOIP_FUNCTIONS
ivas_error IVAS_DEC_PrintConfig(
#else
void IVAS_DEC_PrintConfig(
#endif
    const IVAS_DEC_HANDLE hIvasDec,                         /* i  : IVAS decoder handle                                                     */
    const bool quietModeEnabled,                            /* i  : quiet mode flag: if true, reduces the amount of config info printed     */
    const bool voipMode
+0 −32
Original line number Diff line number Diff line
@@ -1318,14 +1318,12 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
    Word16 ro_md_flag;
    IVAS_QUATERNION Quaternion;

#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    st_ivas = hIvasDec->st_ivas;
    output_config = st_ivas->hDecoderConfig->output_config;
    output_Fs = st_ivas->hDecoderConfig->output_Fs;
@@ -2042,14 +2040,12 @@ ivas_error IVAS_DEC_GetFormat(
    IVAS_DEC_BS_FORMAT *format /* o  : format detected from bitstream fed to the decoder */
)
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    IF( hIvasDec->hasDecodedFirstGoodFrame )
    {
        *format = mapIvasFormat( hIvasDec->st_ivas->ivas_format );
@@ -2149,14 +2145,12 @@ ivas_error IVAS_DEC_GetNumOutputChannels(
    Word16 *numOutputChannels /* o  : number of PCM output channels   */
)
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    IF( hIvasDec->hasDecodedFirstGoodFrame )
    {
        *numOutputChannels = hIvasDec->st_ivas->hDecoderConfig->nchan_out;
@@ -3105,7 +3099,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame(
    Word16 partialCopyFrameType, partialCopyOffset;
    Word16 result;

#ifdef FIX_VOIP_FUNCTIONS
    test();
    test();
    IF( hIvasDec == NULL || hIvasDec->hVoIP == NULL || au == NULL )
@@ -3113,7 +3106,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame(
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    IF( auSize == 0 )
    {
        return IVAS_ERR_OK; /* ignore empty/NO_DATA frame - shouldn't be transmitted in RTP */
@@ -3216,14 +3208,12 @@ ivas_error IVAS_DEC_VoIP_SetScale(
    const Word16 scale        /* i  : TSM scale to set in percent of the default frame size                       */
)
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    IF( !hIvasDec->st_ivas->hDecoderConfig->Opt_tsm )
    {
        return IVAS_ERR_TSM_NOT_ENABLED;
@@ -3260,14 +3250,12 @@ ivas_error IVAS_DEC_TSM_SetQuality(
    const Word16 quality      /* i  : target TSM quality Q14    */
)
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    IF( !hIvasDec->st_ivas->hDecoderConfig->Opt_tsm )
    {
        return IVAS_ERR_TSM_NOT_ENABLED;
@@ -3311,7 +3299,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
    Word16 nSamplesRendered;
    UWord8 nOutChannels;

#ifdef FIX_VOIP_FUNCTIONS
    test();
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->hVoIP == NULL )
@@ -3319,7 +3306,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    st_ivas = hIvasDec->st_ivas;
    hDecoderConfig = st_ivas->hDecoderConfig;
    hVoIP = hIvasDec->hVoIP;
@@ -3554,14 +3540,12 @@ ivas_error IVAS_DEC_Flush(
    UWord16 nSamplesToRender;
    UWord16 nSamplesFlushedLocal;

#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    *nSamplesFlushed = s_min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext );
    move16();

@@ -3597,14 +3581,12 @@ bool IVAS_DEC_VoIP_IsEmpty(
    IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
    const Word16 nSamplesAsked )
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->hVoIP == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    test();
    return ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 && LT_16( hIvasDec->nSamplesAvailableNext, nSamplesAsked ) );
}
@@ -3726,13 +3708,9 @@ ivas_error IVAS_DEC_GetJbmData(

)
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    test();
    IF( hIvasDec == NULL || hIvasDec->hVoIP == NULL || JbmTraceData == NULL )
#else
    IF( hIvasDec->hVoIP == NULL )
#endif
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }
@@ -3962,30 +3940,20 @@ static ivas_error printConfigInfo_dec(
 * Print decoder set-up info
 *---------------------------------------------------------------------*/

#ifdef FIX_VOIP_FUNCTIONS
ivas_error IVAS_DEC_PrintConfig(
#else
void IVAS_DEC_PrintConfig(
#endif
    const IVAS_DEC_HANDLE hIvasDec,
    const bool quietModeEnabled,
    const bool voipMode )
{
#ifdef FIX_VOIP_FUNCTIONS
    test();
    IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif
    printConfigInfo_dec( hIvasDec->st_ivas, hIvasDec->bitstreamformat, voipMode, quietModeEnabled );

#ifdef FIX_VOIP_FUNCTIONS
    return IVAS_ERR_OK;
#else
    return;
#endif
}