Commit 6319091f authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

resolving overflow for hoa_mtx

parent a5332f90
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ ivas_error ivas_sba_get_hoa_dec_matrix_fx(
                FOR( k = 0; k < num_harm; k++ )
                {
                    dec_mtx_temp = Mpy_32_32( G_td_int[j], Y_td_int[k] );       // Q29
                    *p_dec_mtx = L_add( *p_dec_mtx, L_shr( dec_mtx_temp, 3 ) ); // Q26
                    *p_dec_mtx = L_add( *p_dec_mtx, L_shr( dec_mtx_temp, 4 ) ); // Q25
                    // printf( "\n%f", ((float)*p_dec_mtx)/ ONE_IN_Q25 );
                    p_dec_mtx++;
                }
@@ -267,7 +267,7 @@ ivas_error ivas_sba_get_hoa_dec_matrix_fx(
            FOR( j = 0; j < num_harm; j++ )
            {
                dec_mtx_temp_scale = Mpy_32_32( tmp_val, norm_sn3d_hoa3_int[j] ); // Q35
                *p_dec_mtx = L_shl(Mpy_32_32( *p_dec_mtx, dec_mtx_temp_scale ),1);         // Q31
                *p_dec_mtx = L_shl(Mpy_32_32( *p_dec_mtx, dec_mtx_temp_scale ),2);         // Q31
                p_dec_mtx++;
            }
            p_dec_mtx += ( SBA_NHARM_HOA3 - num_harm );