Loading apps/decoder.c +0 −6 Original line number Diff line number Diff line Loading @@ -3070,14 +3070,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 @@ -3086,7 +3082,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3166,7 +3161,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,6 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ #define FIX_1762_COMPILER_ISSUE_NEW /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */ #define ISSUE_1796_replace_shl_o /* FhG: replace shl_ro by overflow-free alternatives - BE*/ Loading lib_dec/lib_dec_fx.c +0 −48 Original line number Diff line number Diff line Loading @@ -60,9 +60,7 @@ struct IVAS_DEC_VOIP UWord16 lastDecodedWasActive; JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ UWord16 *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 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 @@ -84,9 +82,7 @@ struct IVAS_DEC bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ Word16 tsm_scale; /* scale for TSM operation */ Word16 tsm_max_scaling; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 timeScalingDone; /* have we done already one TSM in a 20ms frame? */ #endif Word16 tsm_quality; /*Q14*/ Word32 *apaExecBuffer_fx; /* Buffer for APA scaling */ PCMDSP_APA_HANDLE hTimeScaler; Loading Loading @@ -120,9 +116,7 @@ static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, cons static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const UWord16 nSamplesForRendering, UWord16 *nSamplesRendered, UWord16 *nSamplesAvailableNext, Word16 *pcmBuf ); static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, Word16 *nSamplesBuffered ); static Word16 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 Word16 nSamplesRendered ); #endif static ivas_error isar_set_split_rend_setup( ISAR_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, const ISAR_SPLIT_REND_CONFIG_DATA *hSplitBinConfig, const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, ISAR_SPLIT_REND_BITS_DATA *splitRendBits ); static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas ); static ivas_error ivas_dec_init_split_rend( Decoder_Struct *st_ivas ); Loading Loading @@ -165,9 +159,7 @@ ivas_error IVAS_DEC_Open( hIvasDec->tsm_scale = 100; hIvasDec->tsm_max_scaling = 0; hIvasDec->tsm_quality = ONE_IN_Q14; /*1.f Q14*/ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 0; #endif hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; hIvasDec->nSamplesAvailableNext = 0; Loading @@ -190,9 +182,7 @@ ivas_error IVAS_DEC_Open( move16(); move16(); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE move16(); #endif hIvasDec->mode = mode; move16(); Loading Loading @@ -920,10 +910,8 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->hCurrentDataUnit = NULL; hIvasDec->hVoIP->nSamplesFrame = (UWord16) Mpy_32_16_1( hDecoderConfig->output_Fs, INV_FRAME_PER_SEC_Q15 ); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->hVoIP->nSamplesRendered20ms = 0; move16(); #endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ Loading Loading @@ -1239,10 +1227,8 @@ ivas_error IVAS_DEC_GetSamples( } assert( LE_32( (Word32) nTimeScalerOutSamples, APA_BUF ) ); nSamplesTcsScaled = idiv1616U( extract_l( nTimeScalerOutSamples ), nTransportChannels ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 1; move16(); #endif } ELSE { Loading Loading @@ -1983,9 +1969,7 @@ static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( if ( hIvasDec->st_ivas->hTcBuffer != NULL ) { *nSamplesBuffered = sub( hIvasDec->st_ivas->hTcBuffer->n_samples_buffered, hIvasDec->st_ivas->hTcBuffer->n_samples_rendered ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE *nSamplesBuffered = add( *nSamplesBuffered, hIvasDec->hVoIP->nSamplesRendered20ms ); #endif move16(); } Loading Loading @@ -3285,9 +3269,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( UWord32 extBufferedTime_ms, scale, maxScaling; JB4_DATAUNIT_HANDLE dataUnit; UWord16 extBufferedSamples; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 timeScalingDone; #endif Word16 result; ivas_error error; Word16 nSamplesRendered; Loading @@ -3296,9 +3277,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 = (UWord8) st_ivas->hDecoderConfig->nchan_out; nSamplesRendered = 0; move16(); Loading Loading @@ -3326,12 +3304,8 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE extBufferedSamples = nSamplesBuffered; move16(); #else extBufferedSamples = add( nSamplesRendered, nSamplesBuffered ); #endif Word16 exp; extBufferedTime_ms = BASOP_Util_Divide3232_Scale( imult3216( extBufferedSamples, 1000 ), hDecoderConfig->output_Fs, &exp ); extBufferedTime_ms = (UWord32) W_shr( extBufferedTime_ms, sub( 15, exp ) ); // Q0 Loading Loading @@ -3363,24 +3337,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* avoid time scaling multiple times in one sound card slot */ IF( NE_64( scale, 100U ) ) #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE { IF( hIvasDec->timeScalingDone ) #else { IF( timeScalingDone ) #endif { scale = 100; move32(); } #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE ELSE { timeScalingDone = 1; move16(); } #endif } /* limit scale to range supported by time scaler */ Loading Loading @@ -3473,9 +3435,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesAvailableNext = sub( hIvasDec->nSamplesAvailableNext, nSamplesToZero ); move16(); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesToZero ); #endif } ELSE { Loading @@ -3490,16 +3450,13 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } nSamplesRendered = add( 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 Loading @@ -3528,7 +3485,6 @@ static void update_voip_rendered20ms( } } #endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) Loading @@ -3554,22 +3510,18 @@ ivas_error IVAS_DEC_Flush( move16(); /* render IVAS frames */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE error = IVAS_ERR_OK; test(); IF( GT_16( nSamplesToRender, 0 ) && NE_16( (Word16) hIvasDec->st_ivas->ivas_format, (Word16) MONO_FORMAT ) ) { #endif error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE } ELSE { *nSamplesFlushed = 0; move16(); } #endif return error; } Loading Loading
apps/decoder.c +0 −6 Original line number Diff line number Diff line Loading @@ -3070,14 +3070,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 @@ -3086,7 +3082,6 @@ static ivas_error decodeVoIP( } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ Loading Loading @@ -3166,7 +3161,6 @@ static ivas_error decodeVoIP( } } } #endif /*------------------------------------------------------------------------------------------* Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,6 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ #define FIX_1762_COMPILER_ISSUE_NEW /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */ #define ISSUE_1796_replace_shl_o /* FhG: replace shl_ro by overflow-free alternatives - BE*/ Loading
lib_dec/lib_dec_fx.c +0 −48 Original line number Diff line number Diff line Loading @@ -60,9 +60,7 @@ struct IVAS_DEC_VOIP UWord16 lastDecodedWasActive; JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ UWord16 *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 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 @@ -84,9 +82,7 @@ struct IVAS_DEC bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ Word16 tsm_scale; /* scale for TSM operation */ Word16 tsm_max_scaling; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 timeScalingDone; /* have we done already one TSM in a 20ms frame? */ #endif Word16 tsm_quality; /*Q14*/ Word32 *apaExecBuffer_fx; /* Buffer for APA scaling */ PCMDSP_APA_HANDLE hTimeScaler; Loading Loading @@ -120,9 +116,7 @@ static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, cons static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const UWord16 nSamplesForRendering, UWord16 *nSamplesRendered, UWord16 *nSamplesAvailableNext, Word16 *pcmBuf ); static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, Word16 *nSamplesBuffered ); static Word16 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 Word16 nSamplesRendered ); #endif static ivas_error isar_set_split_rend_setup( ISAR_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, const ISAR_SPLIT_REND_CONFIG_DATA *hSplitBinConfig, const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, ISAR_SPLIT_REND_BITS_DATA *splitRendBits ); static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas ); static ivas_error ivas_dec_init_split_rend( Decoder_Struct *st_ivas ); Loading Loading @@ -165,9 +159,7 @@ ivas_error IVAS_DEC_Open( hIvasDec->tsm_scale = 100; hIvasDec->tsm_max_scaling = 0; hIvasDec->tsm_quality = ONE_IN_Q14; /*1.f Q14*/ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 0; #endif hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; hIvasDec->nSamplesAvailableNext = 0; Loading @@ -190,9 +182,7 @@ ivas_error IVAS_DEC_Open( move16(); move16(); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE move16(); #endif hIvasDec->mode = mode; move16(); Loading Loading @@ -920,10 +910,8 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->hCurrentDataUnit = NULL; hIvasDec->hVoIP->nSamplesFrame = (UWord16) Mpy_32_16_1( hDecoderConfig->output_Fs, INV_FRAME_PER_SEC_Q15 ); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->hVoIP->nSamplesRendered20ms = 0; move16(); #endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ Loading Loading @@ -1239,10 +1227,8 @@ ivas_error IVAS_DEC_GetSamples( } assert( LE_32( (Word32) nTimeScalerOutSamples, APA_BUF ) ); nSamplesTcsScaled = idiv1616U( extract_l( nTimeScalerOutSamples ), nTransportChannels ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE hIvasDec->timeScalingDone = 1; move16(); #endif } ELSE { Loading Loading @@ -1983,9 +1969,7 @@ static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( if ( hIvasDec->st_ivas->hTcBuffer != NULL ) { *nSamplesBuffered = sub( hIvasDec->st_ivas->hTcBuffer->n_samples_buffered, hIvasDec->st_ivas->hTcBuffer->n_samples_rendered ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE *nSamplesBuffered = add( *nSamplesBuffered, hIvasDec->hVoIP->nSamplesRendered20ms ); #endif move16(); } Loading Loading @@ -3285,9 +3269,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( UWord32 extBufferedTime_ms, scale, maxScaling; JB4_DATAUNIT_HANDLE dataUnit; UWord16 extBufferedSamples; #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE Word16 timeScalingDone; #endif Word16 result; ivas_error error; Word16 nSamplesRendered; Loading @@ -3296,9 +3277,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 = (UWord8) st_ivas->hDecoderConfig->nchan_out; nSamplesRendered = 0; move16(); Loading Loading @@ -3326,12 +3304,8 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE extBufferedSamples = nSamplesBuffered; move16(); #else extBufferedSamples = add( nSamplesRendered, nSamplesBuffered ); #endif Word16 exp; extBufferedTime_ms = BASOP_Util_Divide3232_Scale( imult3216( extBufferedSamples, 1000 ), hDecoderConfig->output_Fs, &exp ); extBufferedTime_ms = (UWord32) W_shr( extBufferedTime_ms, sub( 15, exp ) ); // Q0 Loading Loading @@ -3363,24 +3337,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* avoid time scaling multiple times in one sound card slot */ IF( NE_64( scale, 100U ) ) #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE { IF( hIvasDec->timeScalingDone ) #else { IF( timeScalingDone ) #endif { scale = 100; move32(); } #ifndef NONBE_FIX_864_JBM_RENDER_FRAMESIZE ELSE { timeScalingDone = 1; move16(); } #endif } /* limit scale to range supported by time scaler */ Loading Loading @@ -3473,9 +3435,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesAvailableNext = sub( hIvasDec->nSamplesAvailableNext, nSamplesToZero ); move16(); move16(); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE update_voip_rendered20ms( hIvasDec, nSamplesToZero ); #endif } ELSE { Loading @@ -3490,16 +3450,13 @@ ivas_error IVAS_DEC_VoIP_GetSamples( } nSamplesRendered = add( 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 Loading @@ -3528,7 +3485,6 @@ static void update_voip_rendered20ms( } } #endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) Loading @@ -3554,22 +3510,18 @@ ivas_error IVAS_DEC_Flush( move16(); /* render IVAS frames */ #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE error = IVAS_ERR_OK; test(); IF( GT_16( nSamplesToRender, 0 ) && NE_16( (Word16) hIvasDec->st_ivas->ivas_format, (Word16) MONO_FORMAT ) ) { #endif error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ); #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE } ELSE { *nSamplesFlushed = 0; move16(); } #endif return error; } Loading