Loading lib_dec/ivas_jbm_dec_fx.c +7 −7 Original line number Diff line number Diff line Loading @@ -4066,16 +4066,16 @@ void ivas_jbm_dec_copy_tc_no_tsm_fx( &cldfb_real_buffer_fx[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer_fx[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch], &Q_tc ); } } IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) MC_FORMAT ) ) { st_ivas->hParamMC->Cldfb_RealBuffer_tc_e = sub( 31, Q_tc ); st_ivas->hParamMC->Cldfb_ImagBuffer_tc_e = sub( 31, Q_tc ); st_ivas->hParamMC->Cldfb_RealBuffer_tc_e = 25; // 31-Q_tc = 31-(11-5) st_ivas->hParamMC->Cldfb_ImagBuffer_tc_e = 25; // 31-Q_tc = 31-(11-5) move16(); move16(); } } } } hTcBuffer->n_samples_rendered = 0; move16(); hTcBuffer->subframes_rendered = 0; Loading lib_dec/ivas_mc_param_dec_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -528,12 +528,15 @@ ivas_error ivas_param_mc_dec_open_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); } set32_fx( hParamMC->Cldfb_RealBuffer_tc_fx, 0, cldfb_buf_size ); hParamMC->Cldfb_RealBuffer_tc_e = 25; // Q6 , Initialised with Q6 to match non jbm and jbm cases move16(); IF( ( hParamMC->Cldfb_ImagBuffer_tc_fx = (Word32 *) malloc( cldfb_buf_size * sizeof( Word32 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); } set32_fx( hParamMC->Cldfb_ImagBuffer_tc_fx, 0, cldfb_buf_size ); hParamMC->Cldfb_ImagBuffer_tc_e = 25; // Q6 , Initialised with Q6 to match non jbm and jbm cases move16(); hParamMC->sz = imult1616( imult1616( n_cldfb_slots, nchan_transport ), hParamMC->num_freq_bands ); move16(); Loading lib_dec/jbm_pcmdsp_apa_fx.c +62 −54 Original line number Diff line number Diff line Loading @@ -962,6 +962,19 @@ UWord8 apa_exec_ivas_fx( } ELSE { IF( EQ_32( ps->scale, 100 ) ) { FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ ) { a_out[i] = a_in[i]; // Q11 move32(); } l_frm_out = ps->l_frm; move16(); } ELSE { Word16 a_tmp[APA_BUF]; Word16 *buf_out_ptr = &( ps->buf_out_fx[ps->l_buf_out - ps->l_frm] ); Word16 *frm_in_ptr = &( frm_in[ps->l_frm] ); Loading @@ -987,13 +1000,8 @@ UWord8 apa_exec_ivas_fx( frm_in_ptr[i] = a_tmp[i]; move16(); } /* no scaling */ IF( EQ_32( ps->scale, 100 ) ) { copy_frm_fx( ps, frm_in, a_tmp, &l_frm_out ); } /* shrink */ ELSE IF( LT_32( ps->scale, 100 ) ) IF( LT_32( ps->scale, 100 ) ) { shrink_frm_ivas_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out ); } Loading Loading @@ -1030,6 +1038,7 @@ UWord8 apa_exec_ivas_fx( move32(); } } } /* copy output to internal buffer */ /* avoid buffer overflow: */ Loading Loading @@ -1532,7 +1541,6 @@ static bool copy_frm_fx( return 0; } /* ******************************************************************************** * Loading Loading
lib_dec/ivas_jbm_dec_fx.c +7 −7 Original line number Diff line number Diff line Loading @@ -4066,16 +4066,16 @@ void ivas_jbm_dec_copy_tc_no_tsm_fx( &cldfb_real_buffer_fx[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer_fx[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch], &Q_tc ); } } IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) MC_FORMAT ) ) { st_ivas->hParamMC->Cldfb_RealBuffer_tc_e = sub( 31, Q_tc ); st_ivas->hParamMC->Cldfb_ImagBuffer_tc_e = sub( 31, Q_tc ); st_ivas->hParamMC->Cldfb_RealBuffer_tc_e = 25; // 31-Q_tc = 31-(11-5) st_ivas->hParamMC->Cldfb_ImagBuffer_tc_e = 25; // 31-Q_tc = 31-(11-5) move16(); move16(); } } } } hTcBuffer->n_samples_rendered = 0; move16(); hTcBuffer->subframes_rendered = 0; Loading
lib_dec/ivas_mc_param_dec_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -528,12 +528,15 @@ ivas_error ivas_param_mc_dec_open_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); } set32_fx( hParamMC->Cldfb_RealBuffer_tc_fx, 0, cldfb_buf_size ); hParamMC->Cldfb_RealBuffer_tc_e = 25; // Q6 , Initialised with Q6 to match non jbm and jbm cases move16(); IF( ( hParamMC->Cldfb_ImagBuffer_tc_fx = (Word32 *) malloc( cldfb_buf_size * sizeof( Word32 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); } set32_fx( hParamMC->Cldfb_ImagBuffer_tc_fx, 0, cldfb_buf_size ); hParamMC->Cldfb_ImagBuffer_tc_e = 25; // Q6 , Initialised with Q6 to match non jbm and jbm cases move16(); hParamMC->sz = imult1616( imult1616( n_cldfb_slots, nchan_transport ), hParamMC->num_freq_bands ); move16(); Loading
lib_dec/jbm_pcmdsp_apa_fx.c +62 −54 Original line number Diff line number Diff line Loading @@ -962,6 +962,19 @@ UWord8 apa_exec_ivas_fx( } ELSE { IF( EQ_32( ps->scale, 100 ) ) { FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ ) { a_out[i] = a_in[i]; // Q11 move32(); } l_frm_out = ps->l_frm; move16(); } ELSE { Word16 a_tmp[APA_BUF]; Word16 *buf_out_ptr = &( ps->buf_out_fx[ps->l_buf_out - ps->l_frm] ); Word16 *frm_in_ptr = &( frm_in[ps->l_frm] ); Loading @@ -987,13 +1000,8 @@ UWord8 apa_exec_ivas_fx( frm_in_ptr[i] = a_tmp[i]; move16(); } /* no scaling */ IF( EQ_32( ps->scale, 100 ) ) { copy_frm_fx( ps, frm_in, a_tmp, &l_frm_out ); } /* shrink */ ELSE IF( LT_32( ps->scale, 100 ) ) IF( LT_32( ps->scale, 100 ) ) { shrink_frm_ivas_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out ); } Loading Loading @@ -1030,6 +1038,7 @@ UWord8 apa_exec_ivas_fx( move32(); } } } /* copy output to internal buffer */ /* avoid buffer overflow: */ Loading Loading @@ -1532,7 +1541,6 @@ static bool copy_frm_fx( return 0; } /* ******************************************************************************** * Loading