Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,7 @@ /* ################## End DEVELOPMENT switches ######################### */ #define FIX_867 #define FIX_867_DBG /* clang-format on */ #define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO Loading lib_dec/ivas_dirac_dec.c +29 −6 Original line number Diff line number Diff line Loading @@ -3752,7 +3752,7 @@ void ivas_dirac_dec_render_sf_fx( Word16 tmp1; push_wmops( "ivas_dirac_dec_render" ); #ifdef FIX_876 #ifdef FIX_867 set16_fx( q_reference_power_smooth, Q31, CLDFB_SLOTS_PER_SUBFRAME * MAX_OUTPUT_CHANNELS ); #endif Loading Loading @@ -3831,6 +3831,7 @@ void ivas_dirac_dec_render_sf_fx( FOR( Word16 kk = 0; kk < imult1616( num_channels_dir, hSpatParamRendCom->num_freq_bands ); kk++ ) { tmp1 = norm_l( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk] ); h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk] = L_shl( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk], sub( tmp1, h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[kk] ) ); // tmp1 h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[kk] = tmp1; move16(); Loading Loading @@ -4893,7 +4894,6 @@ void ivas_dirac_dec_render_sf_fx( IF( LT_16( q_reference_power_smooth[i], DirAC_mem.reference_power_q[i] ) ) { Word32 temp; temp = L_shl( reference_power_fx[i], sub( q_reference_power_smooth[i], DirAC_mem.reference_power_q[i] ) ); test(); IF( temp == 0 && ( reference_power_fx[i] != 0 ) ) Loading Loading @@ -4927,8 +4927,14 @@ void ivas_dirac_dec_render_sf_fx( move16(); } q_reference_power_smooth[i] = sub( q_reference_power_smooth[i], 1 ); reference_power_smooth_fx[i] = L_add(L_shr(reference_power_smooth_fx[i],1), L_shr(reference_power_fx[i],1) ); Word16 shift; shift = norm_l(reference_power_smooth_fx[i]); reference_power_smooth_fx[i] = L_shl(reference_power_smooth_fx[i], shift); q_reference_power_smooth[i] = add(q_reference_power_smooth[i], shift); } v_add_fixed( reference_power_fx, reference_power_smooth_fx, reference_power_smooth_fx, hSpatParamRendCom->num_freq_bands, 1 ); #else IF( LT_16( q_reference_power_smooth, DirAC_mem.reference_power_q ) ) { Loading Loading @@ -4973,6 +4979,23 @@ void ivas_dirac_dec_render_sf_fx( v_add_fixed( reference_power_fx, reference_power_smooth_fx, reference_power_smooth_fx, hSpatParamRendCom->num_freq_bands, 1 ); q_reference_power_smooth = sub( q_reference_power_smooth, 1 ); #endif #ifdef FIX_867_DBG FOR(i = 0; i < hSpatParamRendCom->num_freq_bands; i++) { static FILE *f = 0; if (f == 0) f = fopen("reference_power_smooth_fx", "w"); Word32 m = reference_power_smooth_fx[i]; Word16 e = q_reference_power_smooth[i]; float f1_m = (float)m; float f1_e = powf(2, e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", i, m, e, f1); } #endif } } Loading lib_rend/ivas_dirac_output_synthesis_dec.c +18 −1 Original line number Diff line number Diff line Loading @@ -4112,8 +4112,25 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx( move32(); } #ifdef FIX_867_DBG { static FILE *f = 0; if (f == 0) f = fopen("gains", "w"); Word32 m = *p_gains_dir; Word16 e = h_dirac_output_synthesis_state->gains_dir_prev_q[k*num_freq_bands + l]; float f1_m = (float)m; float f1_e = powf(2, e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", l, m, e, f1); } #endif p_gains_dir++; /*diffuse*/ *( p_cy_auto_diff_smooth_prev ) = L_add( Mpy_32_32( g1, ( *( p_cy_auto_diff_smooth ) ) ), Mpy_32_32( g2, ( *( p_cy_auto_diff_smooth_prev ) ) ) ); // (Q31, q_cy_auto_diff_smooth_prev) -> q_cy_auto_diff_smooth_prev Loading lib_rend/ivas_dirac_rend.c +17 −1 Original line number Diff line number Diff line Loading @@ -3667,7 +3667,6 @@ void protoSignalComputation2_fx( #ifdef FIX_867 FOR( l = 0; l < num_freq_bands; l++ ) { norm_shift = W_norm( reference_power_64fx[l] ); reference_power_fx[l] = W_extract_h( W_shl( reference_power_64fx[l], norm_shift ) ); // q_reference_power_64fx+norm_shift-32 Loading @@ -3691,6 +3690,23 @@ void protoSignalComputation2_fx( move16(); #endif #ifdef FIX_867_DBG FOR(l = 0; l < num_freq_bands; l++) { static FILE *f = 0; if (f == 0) f = fopen("reference_power_fx", "w"); Word32 m = reference_power_fx[l]; Word16 e = q_reference_power[l]; float f1_m = (float)m; float f1_e = powf(2,e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", l, m, e, f1); } #endif *q_proto_frame_f = add( q_cldfb, min_q_shift ); move16(); *q_proto_direct_buffer_f = add( q_cldfb, min_q_shift ); Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,7 @@ /* ################## End DEVELOPMENT switches ######################### */ #define FIX_867 #define FIX_867_DBG /* clang-format on */ #define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO Loading
lib_dec/ivas_dirac_dec.c +29 −6 Original line number Diff line number Diff line Loading @@ -3752,7 +3752,7 @@ void ivas_dirac_dec_render_sf_fx( Word16 tmp1; push_wmops( "ivas_dirac_dec_render" ); #ifdef FIX_876 #ifdef FIX_867 set16_fx( q_reference_power_smooth, Q31, CLDFB_SLOTS_PER_SUBFRAME * MAX_OUTPUT_CHANNELS ); #endif Loading Loading @@ -3831,6 +3831,7 @@ void ivas_dirac_dec_render_sf_fx( FOR( Word16 kk = 0; kk < imult1616( num_channels_dir, hSpatParamRendCom->num_freq_bands ); kk++ ) { tmp1 = norm_l( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk] ); h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk] = L_shl( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[kk], sub( tmp1, h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[kk] ) ); // tmp1 h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[kk] = tmp1; move16(); Loading Loading @@ -4893,7 +4894,6 @@ void ivas_dirac_dec_render_sf_fx( IF( LT_16( q_reference_power_smooth[i], DirAC_mem.reference_power_q[i] ) ) { Word32 temp; temp = L_shl( reference_power_fx[i], sub( q_reference_power_smooth[i], DirAC_mem.reference_power_q[i] ) ); test(); IF( temp == 0 && ( reference_power_fx[i] != 0 ) ) Loading Loading @@ -4927,8 +4927,14 @@ void ivas_dirac_dec_render_sf_fx( move16(); } q_reference_power_smooth[i] = sub( q_reference_power_smooth[i], 1 ); reference_power_smooth_fx[i] = L_add(L_shr(reference_power_smooth_fx[i],1), L_shr(reference_power_fx[i],1) ); Word16 shift; shift = norm_l(reference_power_smooth_fx[i]); reference_power_smooth_fx[i] = L_shl(reference_power_smooth_fx[i], shift); q_reference_power_smooth[i] = add(q_reference_power_smooth[i], shift); } v_add_fixed( reference_power_fx, reference_power_smooth_fx, reference_power_smooth_fx, hSpatParamRendCom->num_freq_bands, 1 ); #else IF( LT_16( q_reference_power_smooth, DirAC_mem.reference_power_q ) ) { Loading Loading @@ -4973,6 +4979,23 @@ void ivas_dirac_dec_render_sf_fx( v_add_fixed( reference_power_fx, reference_power_smooth_fx, reference_power_smooth_fx, hSpatParamRendCom->num_freq_bands, 1 ); q_reference_power_smooth = sub( q_reference_power_smooth, 1 ); #endif #ifdef FIX_867_DBG FOR(i = 0; i < hSpatParamRendCom->num_freq_bands; i++) { static FILE *f = 0; if (f == 0) f = fopen("reference_power_smooth_fx", "w"); Word32 m = reference_power_smooth_fx[i]; Word16 e = q_reference_power_smooth[i]; float f1_m = (float)m; float f1_e = powf(2, e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", i, m, e, f1); } #endif } } Loading
lib_rend/ivas_dirac_output_synthesis_dec.c +18 −1 Original line number Diff line number Diff line Loading @@ -4112,8 +4112,25 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx( move32(); } #ifdef FIX_867_DBG { static FILE *f = 0; if (f == 0) f = fopen("gains", "w"); Word32 m = *p_gains_dir; Word16 e = h_dirac_output_synthesis_state->gains_dir_prev_q[k*num_freq_bands + l]; float f1_m = (float)m; float f1_e = powf(2, e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", l, m, e, f1); } #endif p_gains_dir++; /*diffuse*/ *( p_cy_auto_diff_smooth_prev ) = L_add( Mpy_32_32( g1, ( *( p_cy_auto_diff_smooth ) ) ), Mpy_32_32( g2, ( *( p_cy_auto_diff_smooth_prev ) ) ) ); // (Q31, q_cy_auto_diff_smooth_prev) -> q_cy_auto_diff_smooth_prev Loading
lib_rend/ivas_dirac_rend.c +17 −1 Original line number Diff line number Diff line Loading @@ -3667,7 +3667,6 @@ void protoSignalComputation2_fx( #ifdef FIX_867 FOR( l = 0; l < num_freq_bands; l++ ) { norm_shift = W_norm( reference_power_64fx[l] ); reference_power_fx[l] = W_extract_h( W_shl( reference_power_64fx[l], norm_shift ) ); // q_reference_power_64fx+norm_shift-32 Loading @@ -3691,6 +3690,23 @@ void protoSignalComputation2_fx( move16(); #endif #ifdef FIX_867_DBG FOR(l = 0; l < num_freq_bands; l++) { static FILE *f = 0; if (f == 0) f = fopen("reference_power_fx", "w"); Word32 m = reference_power_fx[l]; Word16 e = q_reference_power[l]; float f1_m = (float)m; float f1_e = powf(2,e); float f1 = f1_m / f1_e; fprintf(f, "%d %d %d %f\n", l, m, e, f1); } #endif *q_proto_frame_f = add( q_cldfb, min_q_shift ); move16(); *q_proto_direct_buffer_f = add( q_cldfb, min_q_shift ); Loading