Commit a6621c0d authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

ASAN and MSAN error fix for decoder pipeline

parent 8b975f14
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1030,7 +1030,7 @@ ivas_error ivas_core_dec_fx(
        /* Memories  Re-Scaling */
        Copy_Scale_sig_16_32_no_sat( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, sub( Q11, Q_hb_synth_fx ) ); // Q11
        Copy_Scale_sig_16_32_no_sat( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_input ) );           // Q11    // Q_input can get value <= -5
        Copy_Scale_sig_16_32_no_sat( synth_16_fx[n], synth_32_fx[n], L_FRAME48k, sub( Q11, Q_synth_fx ) );          // Q11
        Copy_Scale_sig_16_32_no_sat( synth_16_fx[n], synth_32_fx[n], output_frame, sub( Q11, Q_synth_fx ) );        // Q11

        IF( hBWE_FD != NULL )
        {
+17 −2
Original line number Diff line number Diff line
@@ -1511,10 +1511,25 @@ void ivas_qmetadata_to_dirac_fx(
                {
                    FOR( b = MASA_band_grouping_24[band_mapping[band]]; b < MASA_band_grouping_24[band_mapping[band + 1]]; ++b )
                    {
                        hSpatParamRendCom->azimuth2[meta_write_index][b] = extract_h( L_shr( q_direction->band_data[band].azimuth_fx[block], 6 ) );
                        /* Right shifting -1 -> -1, Hence this change is done */
                        Word32 L_tmp = L_abs( q_direction->band_data[band].azimuth_fx[block] );
                        hSpatParamRendCom->azimuth2[meta_write_index][b] = extract_h( L_shr( L_tmp, 6 ) );
                        move16();
                        hSpatParamRendCom->elevation2[meta_write_index][b] = extract_h( L_shr( q_direction->band_data[band].elevation_fx[block], 6 ) );
                        IF( q_direction->band_data[band].azimuth_fx[block] < 0 )
                        {
                            hSpatParamRendCom->azimuth2[meta_write_index][b] = negate( hSpatParamRendCom->azimuth2[meta_write_index][b] );
                            move16();
                        }

                        L_tmp = L_abs( q_direction->band_data[band].elevation_fx[block] );
                        hSpatParamRendCom->elevation2[meta_write_index][b] = extract_h( L_shr( L_tmp, 6 ) );
                        move16();
                        IF( q_direction->band_data[band].elevation_fx[block] < 0 )
                        {
                            hSpatParamRendCom->elevation2[meta_write_index][b] = negate( hSpatParamRendCom->elevation2[meta_write_index][b] );
                            move16();
                        }

                        hSpatParamRendCom->energy_ratio2_fx[meta_write_index][b] = q_direction->band_data[band].energy_ratio_fx[block];
                        move32();
                        hSpatParamRendCom->diffuseness_vector_fx[meta_write_index][b] = L_sub( hSpatParamRendCom->diffuseness_vector_fx[meta_write_index][b], q_direction->band_data[band].energy_ratio_fx[block] );