Commit f0ace4b7 authored by kulgod's avatar kulgod
Browse files

changes in pit_encode_ivas_fx

parent b4a8a48f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1536,6 +1536,7 @@ enum
#define SHB_OVERLAP_LEN                     ( L_FRAME16k - L_SHB_LAHEAD ) / ( NUM_SHB_SUBFR - 1 )
#define QUANT_DIST_INIT                     ( 10000000000.0f )      /* Quantiser search distance initialisation */
#define HIBND_ACB_L_FAC                     5 / 2                   /* SHB Interpolation Factor */
#define HIBND_ACB_L_FAC_Q1                  ( 5 )                   /* SHB Interpolation Factor Q1 */
#define NUM_HILBERTS                        2
#define HILBERT_ORDER1                      5
#define HILBERT_ORDER2                      4
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@
#define FIX_ISSUE_1214                          /* Ittiam: Fix for issue 1214: Energy leakage in IGF tiles for MDCT-stereo @64kbps SWB*/
#define FIX_881_HILBERT_FILTER                  /* VA: improve the precision of the Hilbert filter to remove 2kHz unwanted tone */
#define FIX_ISSUE_1245                          /* Ittiam: Fix for issue 1245: Basop Encoder: Audible noise for silent Stereo input DTX on @24.4 kbps, @32 kbps*/
#define FIX_ISSUE_1291                          /* Ittiam: Wrong use of imult1616() in ACELP rescaling */
#define FIX_920_IGF_INIT_ERROR                  /* FhG: issue 920: fix bitrate mismatch in initial IGF config to avoid error message in same cases */
#define FIX_MINOR_SVD_WMOPS_MR1010X             /* FhG: Minor WMOPS tuning, bit-exact to previous version, saves about 8.2 WMOPS for MR1010 */
#define SVD_WMOPS_OPT                           /* Ittiam : SVD related optimizations */
+5 −1
Original line number Diff line number Diff line
@@ -748,7 +748,11 @@ ivas_error acelp_core_dec_ivas_fx(
            IF( st->hMusicPF && st->hGSCDec )
            {
                Rescale_exc( st->hMusicPF->dct_post_old_exc_fx, exc_fx, bwe_exc_fx, st->hGSCDec->last_exc_dct_in_fx, st->L_frame,
#ifdef FIX_ISSUE_1291
                             shr( imult1616( st->L_frame, HIBND_ACB_L_FAC_Q1 ), 1 ), 0, &( st->Q_exc ), st->Q_subfr, NULL, 0, INACTIVE );
#else
                             imult1616( st->L_frame, HIBND_ACB_L_FAC ), 0, &( st->Q_exc ), st->Q_subfr, NULL, 0, INACTIVE );
#endif
            }
            IF( st->hPFstat != NULL )
            {
@@ -799,7 +803,7 @@ ivas_error acelp_core_dec_ivas_fx(
            Copy( syn1_fx + st->L_frame - L_SYN_MEM_CLAS_ESTIM, st->mem_syn_clas_estim_fx, L_SYN_MEM_CLAS_ESTIM );

            /* save and delay synthesis to be used by SWB BWE */
            Copy_Scale_sig( syn1_fx, temp_buf_fx, st->L_frame, sub( -1, st->Q_syn ) ); // Q_syn
            Copy_Scale_sig( syn1_fx, temp_buf_fx, st->L_frame, sub( -1, st->Q_syn ) ); // Q_syn -> Q(-1)
            IF( st->hBWE_FD != NULL )
            {
#ifdef FIX_ISSUE_1290
+5 −1
Original line number Diff line number Diff line
@@ -1259,6 +1259,10 @@ void ivas_sba_dirac_stereo_dec_fx(
    move16();

#ifdef MSAN_FIX
    FOR( int i = 0; i < CPE_CHANNELS; i++ )
    {
        set32_fx( DFT[i], 0, STEREO_DFT_BUF_MAX );
    }
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), negate( sub( Q11, hCPE->hStereoDft->q_dft ) ) ); /*hSCE->q_prev_hb_synth_fx + hCPE->hStereoDft->q_dft - Q11*/
#else
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( 48000, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), -( Q11 - hCPE->hStereoDft->q_dft ) );
+3 −1
Original line number Diff line number Diff line
@@ -646,8 +646,10 @@ static void encod_gen_voic_core_switch_ivas_fx(
     * Adaptive exc. construction
     *----------------------------------------------------------------*/
    set16_fx( dummyF, -1, NB_SUBFR16k ); /* hack to signal ACELP->HQ switching frame */
    scale_sig(h2, L_SUBFR, 2); //Q13
    pitch = pit_encode_ivas_fx( hBstr,
                                st_fx->acelp_cfg.pitch_bits, core_bitrate, 0, L_frame, GENERIC, &pitch_limit_flag, 0, exc, L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h1, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, dummyF /*hStereoTD->tdm_Pri_pitch_buf*/ ); /* Q6 */
                                st_fx->acelp_cfg.pitch_bits, core_bitrate, 0, L_frame, GENERIC, &pitch_limit_flag, 0, exc, L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h2, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, dummyF /*hStereoTD->tdm_Pri_pitch_buf*/, Q_new ); /* Q6 */
    scale_sig(h2, L_SUBFR, -2); //Q11

    /*-----------------------------------------------------------------*
     * Find adaptive exitation
Loading