diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index dcf01c66eefbb2e67d46248117f169ae53e5c581..284cac1570ef57bb8a703116a0a43324738d0e61 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -552,13 +552,14 @@ ivas_error IVAS_DEC_EnableSplitRendering( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * get_render_framesize_ms( ) * * Get the 5ms flag *---------------------------------------------------------------------*/ -int16_t get_render_frame_size_ms( +static int16_t get_render_frame_size_ms( const IVAS_RENDER_FRAMESIZE render_framesize ) { return (int16_t) ( render_framesize * ( 1000 / ( FRAMES_PER_SEC * IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) ) ); @@ -595,6 +596,7 @@ ivas_error IVAS_DEC_SetRenderFramesize( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * IVAS_DEC_GetGetRenderFramesize( ) * @@ -2512,22 +2514,28 @@ ivas_error IVAS_DEC_VoIP_SetScale( return error; } + /*---------------------------------------------------------------------* - * IVAS_DEC_VoIP_SetScale( ) + * IVAS_DEC_TSM_SetQuality( ) + * + * set the quality theshold for the time scale modiciation that is used + * to determine if the TSM yielded a signal that satisfies the minimum + * quality requirements. + * quality is lower limit for minimum quality + * Range is [-2;2] - where positive values allow + * only pasting with same phase information + * Negative values would yield cross phased pasting + * When not setting the minimum quality with this function the default + * value used is 1.0f * - * Set the TSM scale *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_TSM_SetQuality( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const float quality /* i : target TSM quality */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const float quality /* i : target TSM quality */ ) { - ivas_error error; - - error = IVAS_ERR_OK; - - if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == false ) + if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { return IVAS_ERR_TSM_NOT_ENABLED; } @@ -2536,7 +2544,7 @@ ivas_error IVAS_DEC_TSM_SetQuality( hIvasDec->tsm_quality = quality; } - return error; + return IVAS_ERR_OK; } diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 3d20bee0962fb476b0fe9d38cde1ed3d84f76a11..8390671276fac806adacf6dadb74e1d0cfd35250 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -266,9 +266,10 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set */ ); +/*! r: error code */ ivas_error IVAS_DEC_TSM_SetQuality( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const float quality /* i : target TSM quality */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const float quality /* i : target TSM quality */ ); /*! r: error code */