From 6c7480006b0e7128d39b3d980550d8f8a145a13d Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 24 Oct 2025 09:35:08 +0200 Subject: [PATCH 1/3] fixes --- lib_com/ivas_prot.h | 2 +- lib_dec/ivas_ism_param_dec.c | 10 +++++----- lib_dec/ivas_mc_param_dec.c | 12 +++--------- lib_dec/lib_dec.c | 11 ----------- 4 files changed, 9 insertions(+), 26 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index bd168207f0..a9a64ff434 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1136,7 +1136,7 @@ void ivas_param_ism_dec_render( const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + float *output_f[] /* i/o: synthesized core-coder TCs / rendered signal*/ ); void ivas_param_ism_params_to_masa_param_mapping( diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 0c51b5216b..0e27f96377 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1165,11 +1165,11 @@ static void ivas_ism_param_dec_render_sf( *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* i/o: synthesized core-coder TCs / rendered signal */ ) { int16_t ch, slots_to_render, first_sf, last_sf, subframe_idx; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index b0ce85ce51..59025d3df4 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -650,7 +650,6 @@ ivas_error ivas_param_mc_dec_reconfig( float *ild_q_old = hParamMC->icld_q; float *icc_q_old = hParamMC->icc_q; - /* init arrays for the quantized parameters */ if ( ( hParamMC->icc_q = (float *) malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe * sizeof( float ) ) ) == NULL ) { @@ -720,7 +719,6 @@ ivas_error ivas_param_mc_dec_reconfig( *-----------------------------------------------------------------*/ /* prototype signal computation */ - if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { if ( nchan_transport_old != nchan_transport ) @@ -746,8 +744,8 @@ ivas_error ivas_param_mc_dec_reconfig( mvr2r( st_ivas->hLsSetUpConversion->dmxMtx[k], &hParamMC->ls_conv_dmx_matrix[k * nchan_out_cov], nchan_out_cov ); } } - /* convert ParamMC parameter bands to SFB */ + /* convert ParamMC parameter bands to SFB */ st_ivas->hLsSetUpConversion->sfbCnt = hParamMC->num_param_bands_synth; for ( k = 0; k <= hParamMC->num_param_bands_synth; k++ ) { @@ -952,7 +950,6 @@ ivas_error ivas_param_mc_dec_reconfig( set_zero( hParamMC->proto_frame_f, 2 * hParamMC->diff_proto_info->num_protos_diff * hParamMC->num_freq_bands ); } - if ( nchan_transport_old != nchan_transport ) { if ( hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) @@ -1001,6 +998,7 @@ ivas_error ivas_param_mc_dec_reconfig( } } } + return error; } @@ -1387,8 +1385,6 @@ void ivas_param_mc_dec_prepare_renderer( hParamMC = st_ivas->hParamMC; assert( hParamMC ); - push_wmops( "param_mc_dec_digest_tc" ); - set_s( channel_active, 0, MAX_LS_CHANNELS ); nchan_transport = st_ivas->nchan_transport; nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; @@ -1504,7 +1500,6 @@ void ivas_param_mc_dec_prepare_renderer( mvr2r( cx, cx_next_band, nchan_transport * nchan_transport ); } - for ( is_next_band = 0; is_next_band < 2; is_next_band++ ) { if ( is_next_band && skip_next_band ) @@ -1526,8 +1521,6 @@ void ivas_param_mc_dec_prepare_renderer( } } - pop_wmops(); - return; } @@ -2430,6 +2423,7 @@ static void ivas_param_mc_get_mixing_matrices( diag_matrix_product( Cy_diag, nY_band, proto_matrix_ptr, nY_band, nX, 0, mixing_matrix_local ); } + if ( remove_lfe ) { set_zero( mixing_matrix[param_band_idx], nX * nY_cov ); diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index fc63961eda..359f2a6839 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1396,12 +1396,10 @@ ivas_error IVAS_DEC_GetEditableParameters( { hIvasEditableParameters->num_obj = 0; } -#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } -#endif } else if ( st_ivas->ivas_format == MASA_ISM_FORMAT || ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) ) { @@ -1453,12 +1451,10 @@ ivas_error IVAS_DEC_GetEditableParameters( { hIvasEditableParameters->num_obj = 0; } -#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } -#endif } return IVAS_ERR_OK; @@ -1501,11 +1497,6 @@ ivas_error IVAS_DEC_SetEditableParameters( return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Object editing no supported in this operation mode." ); } - if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) - { - return IVAS_ERR_UNEXPECTED_NULL_POINTER; - } - if ( st_ivas->ivas_format == ISM_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) { if ( ism_mode == ISM_MODE_DISC || ism_mode == ISM_SBA_MODE_DISC ) @@ -1579,12 +1570,10 @@ ivas_error IVAS_DEC_SetEditableParameters( return IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED; } } -#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } -#endif } else if ( st_ivas->ivas_format == MASA_ISM_FORMAT && ( ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || ism_mode == ISM_MASA_MODE_DISC ) ) { -- GitLab From 3301e15a97f6ef9edff5b95a9312f93c74a05205 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 6 Nov 2025 13:31:28 +0100 Subject: [PATCH 2/3] fix DEBUGGING --- lib_dec/lib_dec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 188397365b..14591ae702 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1396,10 +1396,12 @@ ivas_error IVAS_DEC_GetEditableParameters( { hIvasEditableParameters->num_obj = 0; } +#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } +#endif } else if ( st_ivas->ivas_format == MASA_ISM_FORMAT || ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) ) { @@ -1451,10 +1453,12 @@ ivas_error IVAS_DEC_GetEditableParameters( { hIvasEditableParameters->num_obj = 0; } +#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } +#endif } return IVAS_ERR_OK; -- GitLab From c47d72a6ac5934ab33386e522b88a97be7dffd77 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 6 Nov 2025 13:33:10 +0100 Subject: [PATCH 3/3] fix DEBUGGING --- lib_dec/lib_dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 14591ae702..ff312ddfe4 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1574,10 +1574,12 @@ ivas_error IVAS_DEC_SetEditableParameters( return IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED; } } +#ifdef DEBUGGING else { assert( 0 && "This should never happen!" ); } +#endif } else if ( st_ivas->ivas_format == MASA_ISM_FORMAT && ( ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || ism_mode == ISM_MASA_MODE_DISC ) ) { -- GitLab