Commit a5332f90 authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

resolving issues with ivas_allrad_dec.c

parent c3463a17
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, 2 ) ); // Q27
                    *p_dec_mtx = L_add( *p_dec_mtx, L_shr( dec_mtx_temp, 3 ) ); // Q26
                    // 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 = Mpy_32_32( *p_dec_mtx, dec_mtx_temp_scale );         // Q31
                *p_dec_mtx = L_shl(Mpy_32_32( *p_dec_mtx, dec_mtx_temp_scale ),1);         // Q31
                p_dec_mtx++;
            }
            p_dec_mtx += ( SBA_NHARM_HOA3 - num_harm );
+5 −4
Original line number Diff line number Diff line
@@ -1578,6 +1578,7 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                            h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[L_add( i_mult( ch_idx, num_freq_bands ), k )] = L_add( h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[L_add( i_mult( ch_idx, num_freq_bands ), k )], sqr );
                            Q_temp_cy_cross_dir_smooth_fx[L_add( i_mult( ch_idx, num_freq_bands ), k )] = sub( 31, sqr_exp );
                        }
                        //printf("\n%f", (float)h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[L_add(i_mult(ch_idx, num_freq_bands), k)] / pow(2, Q_temp_cy_cross_dir_smooth_fx[L_add(i_mult(ch_idx, num_freq_bands), k)]));
                    }
                }
                ELSE
@@ -4367,8 +4368,8 @@ void ivas_dirac_dec_compute_directional_responses_fx(
            /* HOA3 PANNING */
            IF( EQ_16( hDirACRend->panningConf, DIRAC_PANNING_HOA3 ) )
            {
                set32_fx( direct_response_hoa_fx, ONE_IN_Q29, MAX_OUTPUT_CHANNELS );
                set32_fx( direct_response_dir2_fx, ONE_IN_Q29, MAX_OUTPUT_CHANNELS );
                set32_fx( direct_response_hoa_fx, MAX_32, MAX_OUTPUT_CHANNELS );
                set32_fx( direct_response_dir2_fx, MAX_32, MAX_OUTPUT_CHANNELS );

                Q_direct_response_hoa = Q31;
                move16();
@@ -4411,14 +4412,14 @@ void ivas_dirac_dec_compute_directional_responses_fx(
                         EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_PSD_SHD ) || EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_MONO ) )
                {
                    /* Synthesize the first direction */
                    /*IF( GT_16( Q_direct_response_hoa, Q29 ) )
                    IF( GT_16( Q_direct_response_hoa, Q29 ) )
                    {
                        Scale_sig32( direct_response_hoa_fx, MAX_OUTPUT_CHANNELS, sub( Q_direct_response_hoa, Q29 ) );
                        Q_direct_response_hoa = Q29;
                        move16();
                        exp_direct_response_hoa = sub( 31, Q_direct_response_hoa );
                        move16();
                    }*/
                    }
                    spreadCoherencePanningHoa_fx( azimuth[k], elevation[k], hSpatParamRendCom->spreadCoherence_fx[md_idx][k],
                                                  direct_response_hoa_fx, &Q_direct_response_hoa, num_channels_dir, hDirACRend->hOutSetup.ambisonics_order );