Loading apps/decoder.c +0 −4 Original line number Diff line number Diff line Loading @@ -570,15 +570,11 @@ int main( } } #else #ifdef FIX_VOIP_FUNCTIONS if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif #endif /*-------------------------------------------------------------------* Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_587_DEFAULT_REVERB /* Philips: issue 587: inconsistent default reverb parameters across renderers */ #define FIX_VOIP_FUNCTIONS /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */ /* #################### End BE switches ################################## */ Loading lib_dec/lib_dec.c +0 −58 Original line number Diff line number Diff line Loading @@ -444,9 +444,6 @@ ivas_error IVAS_DEC_Configure( DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; #ifndef FIX_VOIP_FUNCTIONS error = IVAS_ERR_OK; #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; Loading Loading @@ -549,11 +546,7 @@ ivas_error IVAS_DEC_Configure( } #endif #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading Loading @@ -749,9 +742,6 @@ ivas_error IVAS_DEC_EnableVoIP( { DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; #ifndef FIX_VOIP_FUNCTIONS error = IVAS_ERR_OK; #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { Loading Loading @@ -819,11 +809,7 @@ ivas_error IVAS_DEC_EnableVoIP( } #endif #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading Loading @@ -1679,13 +1665,11 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int16_t ro_md_flag; IVAS_QUATERNION Quaternion; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif error = IVAS_ERR_OK; st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; Loading Loading @@ -2129,13 +2113,11 @@ ivas_error IVAS_DEC_GetFormat( IVAS_DEC_BS_FORMAT *format /* o : format detected from bitstream fed to the decoder */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif if ( hIvasDec->hasDecodedFirstGoodFrame ) { *format = mapIvasFormat( hIvasDec->st_ivas->ivas_format ); Loading Loading @@ -2229,13 +2211,11 @@ ivas_error IVAS_DEC_GetNumOutputChannels( int16_t *numOutputChannels /* o : number of PCM output channels */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif if ( hIvasDec->hasDecodedFirstGoodFrame ) { *numOutputChannels = hIvasDec->st_ivas->hDecoderConfig->nchan_out; Loading Loading @@ -3113,13 +3093,11 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( int16_t partialCopyFrameType, partialCopyOffset; int16_t result; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL || au == NULL ) { 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 */ Loading Loading @@ -3198,22 +3176,12 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set in percent of the default frame size */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #else ivas_error error; error = IVAS_ERR_OK; #endif #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == 0 ) #else if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == false ) #endif { return IVAS_ERR_TSM_NOT_ENABLED; } Loading @@ -3223,11 +3191,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( hIvasDec->tsm_max_scaling = maxScaling; } #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading @@ -3251,13 +3215,11 @@ ivas_error IVAS_DEC_TSM_SetQuality( const float quality /* i : target TSM quality */ ) { #ifdef FIX_VOIP_FUNCTIONS 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; Loading Loading @@ -3308,13 +3270,11 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #endif uint8_t nOutChannels; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->hVoIP == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; hVoIP = hIvasDec->hVoIP; Loading Loading @@ -3585,13 +3545,11 @@ ivas_error IVAS_DEC_Flush( uint16_t nSamplesToRender; uint16_t nSamplesFlushedLocal; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); nSamplesToRender = (uint16_t) *nSamplesFlushed; Loading Loading @@ -3620,13 +3578,11 @@ bool IVAS_DEC_VoIP_IsEmpty( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->nSamplesAvailableNext < nSamplesAsked ) ); } Loading Loading @@ -3733,11 +3689,7 @@ ivas_error IVAS_DEC_GetJbmData( ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL || JbmTraceData == NULL ) #else if ( hIvasDec->hVoIP == NULL ) #endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } Loading Loading @@ -4049,29 +4001,19 @@ 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 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 } Loading lib_dec/lib_dec.h +0 −4 Original line number Diff line number Diff line Loading @@ -513,11 +513,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 Loading Loading
apps/decoder.c +0 −4 Original line number Diff line number Diff line Loading @@ -570,15 +570,11 @@ int main( } } #else #ifdef FIX_VOIP_FUNCTIONS if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif #endif /*-------------------------------------------------------------------* Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_587_DEFAULT_REVERB /* Philips: issue 587: inconsistent default reverb parameters across renderers */ #define FIX_VOIP_FUNCTIONS /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */ /* #################### End BE switches ################################## */ Loading
lib_dec/lib_dec.c +0 −58 Original line number Diff line number Diff line Loading @@ -444,9 +444,6 @@ ivas_error IVAS_DEC_Configure( DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; #ifndef FIX_VOIP_FUNCTIONS error = IVAS_ERR_OK; #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; Loading Loading @@ -549,11 +546,7 @@ ivas_error IVAS_DEC_Configure( } #endif #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading Loading @@ -749,9 +742,6 @@ ivas_error IVAS_DEC_EnableVoIP( { DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; #ifndef FIX_VOIP_FUNCTIONS error = IVAS_ERR_OK; #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { Loading Loading @@ -819,11 +809,7 @@ ivas_error IVAS_DEC_EnableVoIP( } #endif #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading Loading @@ -1679,13 +1665,11 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int16_t ro_md_flag; IVAS_QUATERNION Quaternion; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif error = IVAS_ERR_OK; st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; Loading Loading @@ -2129,13 +2113,11 @@ ivas_error IVAS_DEC_GetFormat( IVAS_DEC_BS_FORMAT *format /* o : format detected from bitstream fed to the decoder */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif if ( hIvasDec->hasDecodedFirstGoodFrame ) { *format = mapIvasFormat( hIvasDec->st_ivas->ivas_format ); Loading Loading @@ -2229,13 +2211,11 @@ ivas_error IVAS_DEC_GetNumOutputChannels( int16_t *numOutputChannels /* o : number of PCM output channels */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif if ( hIvasDec->hasDecodedFirstGoodFrame ) { *numOutputChannels = hIvasDec->st_ivas->hDecoderConfig->nchan_out; Loading Loading @@ -3113,13 +3093,11 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( int16_t partialCopyFrameType, partialCopyOffset; int16_t result; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL || au == NULL ) { 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 */ Loading Loading @@ -3198,22 +3176,12 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set in percent of the default frame size */ ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #else ivas_error error; error = IVAS_ERR_OK; #endif #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == 0 ) #else if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == false ) #endif { return IVAS_ERR_TSM_NOT_ENABLED; } Loading @@ -3223,11 +3191,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( hIvasDec->tsm_max_scaling = maxScaling; } #ifdef FIX_VOIP_FUNCTIONS return IVAS_ERR_OK; #else return error; #endif } Loading @@ -3251,13 +3215,11 @@ ivas_error IVAS_DEC_TSM_SetQuality( const float quality /* i : target TSM quality */ ) { #ifdef FIX_VOIP_FUNCTIONS 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; Loading Loading @@ -3308,13 +3270,11 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #endif uint8_t nOutChannels; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->hVoIP == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; hVoIP = hIvasDec->hVoIP; Loading Loading @@ -3585,13 +3545,11 @@ ivas_error IVAS_DEC_Flush( uint16_t nSamplesToRender; uint16_t nSamplesFlushedLocal; #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); nSamplesToRender = (uint16_t) *nSamplesFlushed; Loading Loading @@ -3620,13 +3578,11 @@ bool IVAS_DEC_VoIP_IsEmpty( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } #endif return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->nSamplesAvailableNext < nSamplesAsked ) ); } Loading Loading @@ -3733,11 +3689,7 @@ ivas_error IVAS_DEC_GetJbmData( ) { #ifdef FIX_VOIP_FUNCTIONS if ( hIvasDec == NULL || hIvasDec->hVoIP == NULL || JbmTraceData == NULL ) #else if ( hIvasDec->hVoIP == NULL ) #endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } Loading Loading @@ -4049,29 +4001,19 @@ 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 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 } Loading
lib_dec/lib_dec.h +0 −4 Original line number Diff line number Diff line Loading @@ -513,11 +513,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 Loading