Commit eeddea40 authored by emerit's avatar emerit
Browse files

Merge branch 'main' into update_crend_v2

parents 97661b87 d74de338
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3044,11 +3044,11 @@ void lsf_syn_mem_backup_ivas_fx(
    /* back-up memories */
    FOR( i = 0; i < M; i++ )
    {
        mem_syn_bck[i] = hLPDmem->mem_syn[i]; // Q: ( 15 - st_fx->hLPDmem->e_mem_syn )
        mem_syn_bck[i] = hLPDmem->mem_syn[i]; // Q( st_fx->hLPDmem->q_mem_syn )
        move16();
    }

    *mem_w0_bck = hLPDmem->mem_w0; // ( 15 - st_fx->hLPDmem->e_mem_syn )
    *mem_w0_bck = hLPDmem->mem_w0; // Q( st_fx->hLPDmem->q_mem_syn )
    move16();


@@ -3263,12 +3263,12 @@ void lsf_syn_mem_restore_ivas_fx(
    }

    /* restoring memories */
    hLPDmem->mem_w0 = mem_w0_bck; // Q(15 - st_fx->hLPDmem->e_mem_syn )
    hLPDmem->mem_w0 = mem_w0_bck; // Q( st_fx->hLPDmem->q_mem_syn )
    move16();

    FOR( i = 0; i < M; i++ )
    {
        hLPDmem->mem_syn[i] = mem_syn_bck[i]; // Q(15 - st_fx->hLPDmem->e_mem_syn )
        hLPDmem->mem_syn[i] = mem_syn_bck[i]; // Q( st_fx->hLPDmem->q_mem_syn )
        move16();
    }

+22 −22
Original line number Diff line number Diff line
@@ -22038,27 +22038,8 @@ const Word32 sigma_BWE_fx[] = {//Q31
40792208 }; /* for 3 bits first stage */
const Word16 inv_modified_sigma_BWE_fx[] = {//Q1
  259,
254,
267,
266,
293,
315,
598,
622,
288,
288,
297,
297,
319,
346,
598,
622
};
const Word16 modified_sigma_BWE_fx[] =//Q(log2(2.56)
{ 323,
const Word16 inv_modified_sigma_BWE_fx[] = {//x2.56
323,
329,
313,
314,
@@ -22073,7 +22054,26 @@ const Word16 modified_sigma_BWE_fx[] =//Q(log2(2.56)
262,
242,
140,
134 };
134
};
const Word16 modified_sigma_BWE_fx[] =//Q15
{  259,
254,
267,
266,
293,
315,
598,
622,
288,
288,
297,
297,
319,
346,
598,
622 };
 
const Word16 SHB_LSF_mean_fx[10] = {//Q15
+1 −1
Original line number Diff line number Diff line
@@ -660,7 +660,7 @@ ivas_error acelp_core_dec_ivas_fx(
                                                                                 STEREO_DFT_FD_FILT_COMP_Q31, st->hFdCngDec->hFdCngCom->sidNoiseEst[i] );
                        move32();
                    }
                    ApplyFdCng_ivas_fx( psyn_fx, st->Q_syn, NULL, 0, realBuffer_fx, imagBuffer_fx, NULL, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );

                    Word16 new_sidNoiseEstExp = 31 - Q4;
                    move16();
                    Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, sub( st->hFdCngDec->hFdCngCom->sidNoiseEstExp, new_sidNoiseEstExp ) ); // Q(31-sidNoiseEstExp)
+2 −2
Original line number Diff line number Diff line
@@ -3743,7 +3743,7 @@ void QuantizeTCXSpectrum_fx(
            }

            /* Quantize original spectrum */
            sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e );
            sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, ( mult( hTcxEnc->tcx_target_bits_fac, shl( sqTargetBits, 1 ) ) ), L_spec, &sqGain_e );

            tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly );

@@ -4730,7 +4730,7 @@ void InternalTCXDecoder_fx(
    }
    ELSE
    {
        mdct_shaping( spectrum_fx, L_frame, gainlpc_fx, gainlpc_e );
        mdct_noiseShaping_ivas_fx( spectrum_fx, spectrum_e, L_frame, gainlpc_fx, gainlpc_e );
    }
    /*-----------------------------------------------------------*
     * Apply gain                                                *
+6 −0
Original line number Diff line number Diff line
@@ -1561,6 +1561,10 @@ static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, Word16 sh
        {
            set16_fx( hLPDmem->syn, 0, 1 + M );
            set16_fx( hLPDmem->mem_syn_r, 0, L_SYN_MEM );
            hLPDmem->q_lpd_syn = Q15;
            hLPDmem->q_mem_syn = Q15;
            move16();
            move16();
        }

        IF( st->hTcxEnc != NULL )
@@ -1591,6 +1595,8 @@ static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, Word16 sh
                Copy( hLPDmem->mem_syn1_fx, hLPDmem->mem_syn2, M );
                set16_fx( hLPDmem->syn, 0, M );
                hLPDmem->q_lpd_syn = Q15;
                hLPDmem->q_mem_syn = Q15;
                move16();
                move16();
            }
            IF( st->hTcxEnc != NULL )
Loading