From 1a238b276674da5149090cfee6873e13edd86a13 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 26 Feb 2024 14:46:43 +0100 Subject: [PATCH 1/5] The function IVAS_DEC_TSM_SetQuality() is put under DEBUGGING --- lib_dec/lib_dec.c | 12 ++++++++---- lib_dec/lib_dec.h | 11 ++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 61d452d9da..4e511c4aba 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -531,13 +531,13 @@ ivas_error IVAS_DEC_EnableSplitRendering( * 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 ) ) ); } - +#ifdef SPLIT_REND_WITH_HEAD_ROT /*---------------------------------------------------------------------* * IVAS_DEC_SetRenderFramesize( ) * @@ -558,6 +558,7 @@ ivas_error IVAS_DEC_SetRenderFramesize( return IVAS_ERR_OK; } +#endif /*---------------------------------------------------------------------* * IVAS_DEC_GetGetRenderFramesize( ) @@ -2572,8 +2573,10 @@ ivas_error IVAS_DEC_VoIP_SetScale( return error; } +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING /*---------------------------------------------------------------------* - * IVAS_DEC_VoIP_SetScale( ) + * IVAS_DEC_TSM_SetQuality( ) * * Set the TSM scale *---------------------------------------------------------------------*/ @@ -2598,7 +2601,8 @@ ivas_error IVAS_DEC_TSM_SetQuality( return error; } - +#endif +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 2dccb45525..85817a2c56 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -262,11 +262,14 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set */ ); +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING ivas_error IVAS_DEC_TSM_SetQuality( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const float quality /* i : target TSM quality */ ); - +#endif +#endif /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -312,11 +315,13 @@ ivas_error IVAS_DEC_EnableSplitRendering( ); #endif +#ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_SetRenderFramesize( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_FRAMESIZE render_framesize /* i : render framesize */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_FRAMESIZE render_framesize/* i : render framesize */ ); +#endif ivas_error IVAS_DEC_GetRenderFramesize( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_RENDER_FRAMESIZE *render_framesize /* o : render framesize */ -- GitLab From 99f7047cd75513b831b72cfe2439e15be9d02943 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 7 Mar 2024 10:00:06 +0100 Subject: [PATCH 2/5] improve on function description for IVAS_DEC_TSM_SetQuality, remove DEBUGGING ifdefs around the function --- lib_dec/lib_dec.c | 13 ++++++++++--- lib_dec/lib_dec.h | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 4e511c4aba..8146a3c31a 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2573,12 +2573,20 @@ ivas_error IVAS_DEC_VoIP_SetScale( return error; } -#ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING /*---------------------------------------------------------------------* * IVAS_DEC_TSM_SetQuality( ) * - * Set the TSM scale + * 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 + * *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_TSM_SetQuality( @@ -2602,7 +2610,6 @@ ivas_error IVAS_DEC_TSM_SetQuality( return error; } #endif -#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 85817a2c56..d124a90f4f 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -262,14 +262,13 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set */ ); -#ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING ivas_error IVAS_DEC_TSM_SetQuality( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const float quality /* i : target TSM quality */ ); #endif -#endif + /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ -- GitLab From 93a991e0d637b1f8927621eb81da604dde455034 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 20 Jun 2024 09:57:52 +0200 Subject: [PATCH 3/5] fix merge issues --- lib_dec/lib_dec.c | 4 ++-- lib_dec/lib_dec.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 83fbf375ad..1353914f2a 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -562,7 +562,7 @@ static int16_t get_render_frame_size_ms( return (int16_t) ( render_framesize * ( 1000 / ( FRAMES_PER_SEC * IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) ) ); } -#ifdef SPLIT_REND_WITH_HEAD_ROT + /*---------------------------------------------------------------------* * IVAS_DEC_SetRenderFramesize( ) * @@ -592,7 +592,7 @@ ivas_error IVAS_DEC_SetRenderFramesize( return IVAS_ERR_OK; } -#endif + /*---------------------------------------------------------------------* * IVAS_DEC_GetGetRenderFramesize( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index e3e20dd820..8dbcf4cf16 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -308,13 +308,11 @@ ivas_error IVAS_DEC_EnableSplitRendering( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ ); -#ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_SetRenderFramesize( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const IVAS_RENDER_FRAMESIZE render_framesize/* i : render framesize */ ); -#endif ivas_error IVAS_DEC_GetRenderFramesize( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_RENDER_FRAMESIZE *render_framesize /* o : render framesize */ -- GitLab From 4184bee821499a0a506fa214163fc1ac7eb1b16e Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 20 Jun 2024 10:00:34 +0200 Subject: [PATCH 4/5] formatting --- lib_dec/lib_dec.c | 1 + lib_dec/lib_dec.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 1353914f2a..58586c517c 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -550,6 +550,7 @@ ivas_error IVAS_DEC_EnableSplitRendering( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * get_render_framesize_ms( ) * diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 8dbcf4cf16..44d61acd4d 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -309,8 +309,8 @@ ivas_error IVAS_DEC_EnableSplitRendering( ); ivas_error IVAS_DEC_SetRenderFramesize( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_FRAMESIZE render_framesize/* i : render framesize */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_FRAMESIZE render_framesize /* i : render framesize */ ); ivas_error IVAS_DEC_GetRenderFramesize( -- GitLab From 99fb75162d9fb0b2b760070815b16d8dc02fddb0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 15 Jul 2024 14:11:35 +0200 Subject: [PATCH 5/5] remove #ifdef VARIABLE_SPEED_DECODING around IVAS_DEC_TSM_SetQuality --- lib_dec/lib_dec.c | 16 ++++++---------- lib_dec/lib_dec.h | 7 +++---- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 58586c517c..58d4c619b9 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2509,7 +2509,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( return error; } -#ifdef VARIABLE_SPEED_DECODING + /*---------------------------------------------------------------------* * IVAS_DEC_TSM_SetQuality( ) * @@ -2526,15 +2526,11 @@ ivas_error IVAS_DEC_VoIP_SetScale( *---------------------------------------------------------------------*/ 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; } @@ -2543,9 +2539,9 @@ ivas_error IVAS_DEC_TSM_SetQuality( hIvasDec->tsm_quality = quality; } - return error; + return IVAS_ERR_OK; } -#endif + /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 44d61acd4d..c2a20c2232 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -266,12 +266,11 @@ ivas_error IVAS_DEC_VoIP_SetScale( const int16_t scale /* i : TSM scale to set */ ); -#ifdef VARIABLE_SPEED_DECODING +/*! 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 */ ); -#endif /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( -- GitLab