Commit 719d11f2 authored by Jan Kiene's avatar Jan Kiene
Browse files

allow max scaling in tsm scale file part as well

parent 9614da83
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2586,7 +2586,11 @@ static ivas_error decodeG192(
                    }
                    int16_t maxScaling;
                    /* max scaling as abs diff to the normal frame size in samples */
#ifdef NONBE_FIX_1105_TSM_IN_SILENCE
                    maxScaling = arg.tsmScale >= 100 ? nOutSamples * vec_pos_len : 0; /* always allow the maximum possible scaling */
#else
                    maxScaling = (int16_t) ceilf( (float) abs( arg.tsmScale - 100 ) / 100.0f * (float) ( nOutSamples * vec_pos_len ) );
#endif
                    if ( ( error = IVAS_DEC_VoIP_SetScale( hIvasDec, maxScaling, arg.tsmScale ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nIVAS_DEC_VoIP_SetScale failed: %s \n", IVAS_DEC_GetErrorMessage( error ) );