Loading apps/decoder.c +0 −6 Original line number Diff line number Diff line Loading @@ -3366,14 +3366,10 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3382,7 +3378,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3460,7 +3455,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* * Add zeros at the end to have equal length of synthesized signals Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ #define NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER /* FhG: issues #1012, 1013: JBM flush function uses wrong output buffer */ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ #define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */ Loading lib_dec/lib_dec.c +0 −44 Original line number Diff line number Diff line Loading @@ -57,9 +57,7 @@ struct IVAS_DEC_VOIP uint16_t lastDecodedWasActive; JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesRendered20ms; /* how many samples have been rendered since the last 20ms render border*/ #endif #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif Loading @@ -81,9 +79,7 @@ struct IVAS_DEC bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ int16_t tsm_scale; /* scale for TSM operation */ int16_t tsm_max_scaling; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t timeScalingDone; /* have we done already one TSM in a 20ms frame? */ #endif float tsm_quality; float *apaExecBuffer; /* Buffer for APA scaling */ PCMDSP_APA_HANDLE hTimeScaler; Loading Loading @@ -131,9 +127,7 @@ static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, c static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, const int16_t nZeroSamples ); #endif static int16_t get_render_frame_size_ms( IVAS_RENDER_FRAMESIZE render_framesize ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesRendered ); #endif /*---------------------------------------------------------------------* * IVAS_DEC_Open() Loading Loading @@ -170,9 +164,7 @@ ivas_error IVAS_DEC_Open( hIvasDec->tsm_scale = 100; hIvasDec->tsm_max_scaling = 0; hIvasDec->tsm_quality = 1.0f; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 0; #endif hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; hIvasDec->nSamplesAvailableNext = 0; Loading Loading @@ -718,9 +710,7 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->lastDecodedWasActive = 0; hIvasDec->hVoIP->hCurrentDataUnit = NULL; hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->hVoIP->nSamplesRendered20ms = 0; #endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ Loading Loading @@ -979,9 +969,7 @@ ivas_error IVAS_DEC_GetSamples( assert( nTimeScalerOutSamples <= APA_BUF ); nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 1; #endif } else { Loading Loading @@ -1416,9 +1404,7 @@ static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( if ( hIvasDec->st_ivas->hTcBuffer != NULL ) { *nSamplesBuffered = hIvasDec->st_ivas->hTcBuffer->n_samples_buffered - hIvasDec->st_ivas->hTcBuffer->n_samples_rendered; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE *nSamplesBuffered += hIvasDec->hVoIP->nSamplesRendered20ms; #endif } return IVAS_ERR_OK; Loading Loading @@ -2502,9 +2488,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( uint32_t extBufferedTime_ms, scale, maxScaling; JB4_DATAUNIT_HANDLE dataUnit; uint16_t extBufferedSamples; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t timeScalingDone; #endif int16_t result; ivas_error error; int16_t nSamplesRendered; Loading @@ -2513,9 +2496,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; hVoIP = hIvasDec->hVoIP; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE timeScalingDone = 0; #endif nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; nSamplesRendered = 0; Loading @@ -2539,11 +2519,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE extBufferedSamples = nSamplesBuffered; #else extBufferedSamples = nSamplesRendered + nSamplesBuffered; #endif extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; dataUnit = NULL; Loading @@ -2566,20 +2542,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* avoid time scaling multiple times within one 20ms frame*/ if ( scale != 100U ) { #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( hIvasDec->timeScalingDone ) #else if ( timeScalingDone ) #endif { scale = 100; } #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE else { timeScalingDone = 1; } #endif } /* limit scale to range supported by time scaler */ Loading Loading @@ -2668,9 +2634,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesAvailableNext -= nSamplesToZero; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesToZero ); #endif } else { Loading @@ -2689,16 +2653,13 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } nSamplesRendered += nSamplesRendered_loop; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesRendered_loop ); #endif } } return IVAS_ERR_OK; } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE /*---------------------------------------------------------------------* * update_voip_rendered20ms( ) * Loading @@ -2719,7 +2680,6 @@ static void update_voip_rendered20ms( hIvasDec->hVoIP->nSamplesRendered20ms = nSamplesRenderedTotal % hIvasDec->hVoIP->nSamplesFrame; } #endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) Loading Loading @@ -2748,23 +2708,19 @@ ivas_error IVAS_DEC_Flush( nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE error = IVAS_ERR_OK; if ( nSamplesToRender > 0 && hIvasDec->st_ivas->ivas_format != MONO_FORMAT ) { #endif #ifdef SPLIT_REND_WITH_HEAD_ROT error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmType, pcmBuf ); #else error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ); #endif #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE } else { *nSamplesFlushed = 0; } #endif return error; } Loading Loading
apps/decoder.c +0 −6 Original line number Diff line number Diff line Loading @@ -3366,14 +3366,10 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3382,7 +3378,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3460,7 +3455,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* * Add zeros at the end to have equal length of synthesized signals Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ #define NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER /* FhG: issues #1012, 1013: JBM flush function uses wrong output buffer */ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ #define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */ Loading
lib_dec/lib_dec.c +0 −44 Original line number Diff line number Diff line Loading @@ -57,9 +57,7 @@ struct IVAS_DEC_VOIP uint16_t lastDecodedWasActive; JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesRendered20ms; /* how many samples have been rendered since the last 20ms render border*/ #endif #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif Loading @@ -81,9 +79,7 @@ struct IVAS_DEC bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ int16_t tsm_scale; /* scale for TSM operation */ int16_t tsm_max_scaling; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t timeScalingDone; /* have we done already one TSM in a 20ms frame? */ #endif float tsm_quality; float *apaExecBuffer; /* Buffer for APA scaling */ PCMDSP_APA_HANDLE hTimeScaler; Loading Loading @@ -131,9 +127,7 @@ static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, c static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, const int16_t nZeroSamples ); #endif static int16_t get_render_frame_size_ms( IVAS_RENDER_FRAMESIZE render_framesize ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesRendered ); #endif /*---------------------------------------------------------------------* * IVAS_DEC_Open() Loading Loading @@ -170,9 +164,7 @@ ivas_error IVAS_DEC_Open( hIvasDec->tsm_scale = 100; hIvasDec->tsm_max_scaling = 0; hIvasDec->tsm_quality = 1.0f; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 0; #endif hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; hIvasDec->nSamplesAvailableNext = 0; Loading Loading @@ -718,9 +710,7 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->lastDecodedWasActive = 0; hIvasDec->hVoIP->hCurrentDataUnit = NULL; hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->hVoIP->nSamplesRendered20ms = 0; #endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ Loading Loading @@ -979,9 +969,7 @@ ivas_error IVAS_DEC_GetSamples( assert( nTimeScalerOutSamples <= APA_BUF ); nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 1; #endif } else { Loading Loading @@ -1416,9 +1404,7 @@ static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( if ( hIvasDec->st_ivas->hTcBuffer != NULL ) { *nSamplesBuffered = hIvasDec->st_ivas->hTcBuffer->n_samples_buffered - hIvasDec->st_ivas->hTcBuffer->n_samples_rendered; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE *nSamplesBuffered += hIvasDec->hVoIP->nSamplesRendered20ms; #endif } return IVAS_ERR_OK; Loading Loading @@ -2502,9 +2488,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( uint32_t extBufferedTime_ms, scale, maxScaling; JB4_DATAUNIT_HANDLE dataUnit; uint16_t extBufferedSamples; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t timeScalingDone; #endif int16_t result; ivas_error error; int16_t nSamplesRendered; Loading @@ -2513,9 +2496,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; hVoIP = hIvasDec->hVoIP; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE timeScalingDone = 0; #endif nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; nSamplesRendered = 0; Loading @@ -2539,11 +2519,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE extBufferedSamples = nSamplesBuffered; #else extBufferedSamples = nSamplesRendered + nSamplesBuffered; #endif extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; dataUnit = NULL; Loading @@ -2566,20 +2542,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* avoid time scaling multiple times within one 20ms frame*/ if ( scale != 100U ) { #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( hIvasDec->timeScalingDone ) #else if ( timeScalingDone ) #endif { scale = 100; } #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE else { timeScalingDone = 1; } #endif } /* limit scale to range supported by time scaler */ Loading Loading @@ -2668,9 +2634,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesAvailableNext -= nSamplesToZero; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesToZero ); #endif } else { Loading @@ -2689,16 +2653,13 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } nSamplesRendered += nSamplesRendered_loop; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesRendered_loop ); #endif } } return IVAS_ERR_OK; } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE /*---------------------------------------------------------------------* * update_voip_rendered20ms( ) * Loading @@ -2719,7 +2680,6 @@ static void update_voip_rendered20ms( hIvasDec->hVoIP->nSamplesRendered20ms = nSamplesRenderedTotal % hIvasDec->hVoIP->nSamplesFrame; } #endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) Loading Loading @@ -2748,23 +2708,19 @@ ivas_error IVAS_DEC_Flush( nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE error = IVAS_ERR_OK; if ( nSamplesToRender > 0 && hIvasDec->st_ivas->ivas_format != MONO_FORMAT ) { #endif #ifdef SPLIT_REND_WITH_HEAD_ROT error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmType, pcmBuf ); #else error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ); #endif #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE } else { *nSamplesFlushed = 0; } #endif return error; } Loading