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

rebase #2

parent 321899f2
Loading
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -4646,13 +4646,11 @@ void ivas_spar_dec_upmixer(
);

/* MD module */
#ifndef IVAS_FLOAT_FIXED
ivas_error ivas_spar_md_enc_open(
    ivas_spar_md_enc_state_t **hMdEnc,                          /* i/o: SPAR MD encoder handle                  */
    const ENCODER_CONFIG_HANDLE hEncoderConfig,                 /* i  : configuration structure                 */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
#endif

void ivas_spar_md_enc_close(
    ivas_spar_md_enc_state_t **hMdEnc                           /* i/o: SPAR MD encoder handle                  */
+3 −5
Original line number Diff line number Diff line
@@ -5997,10 +5997,8 @@ float env_stab_smo(
void core_switching_pre_enc(
    Encoder_State *st,              /* i/o: encoder state structure                 */
#ifndef IVAS_FLOAT_FIXED
    const float *old_inp_12k8,      /* i  : old input signal @12.8kHz               */
    const float *old_inp_16k,       /* i  : old input signal @16kHz                 */
#endif
    const int16_t active_cnt,       /* i  : Active frame counter                    */
    const int16_t last_element_mode /* i  : last_element_mode                       */
);
+5 −16
Original line number Diff line number Diff line
@@ -1304,25 +1304,14 @@ void ShapeSpectrum_ivas_fx(
        {
            Word16 fac;
            fac = divide3232( max_low2, max_high );
            IF( GE_16( norm_s( fac ), max_fac_s ) )
            {
            fac = shl( mult_r( fac, max_fac_m ), max_fac_s );
                FOR( i = 0; i < ( L_spec - L_frame ); i++ )

            FOR( i = 0; i < sub( L_spec, L_frame ); i++ )
            {
                spectrum[L_frame + i] = Mpy_32_16_1( spectrum[L_frame + i], fac );
                move32();
            }
        }
            ELSE
            {
                fac = mult_r( fac, max_fac_m );
                FOR( i = 0; i < ( L_spec - L_frame ); i++ )
                {
                    spectrum[L_frame + i] = L_shl( Mpy_32_16_1( spectrum[L_frame + i], fac ), max_fac_s );
                    move32();
                }
            }
        }
    }


+11 −20
Original line number Diff line number Diff line
@@ -57,21 +57,14 @@

void core_switching_pre_enc(
    Encoder_State *st,              /* i/o: encoder state structure           */
#ifndef IVAS_FLOAT_FIXED
    const float *old_inp_12k8,      /* i  : old input signal @12.8kHz         */
    const float *old_inp_16k,       /* i  : old input signal @16kHz           */
#endif
    const int16_t active_cnt,       /* i  : active frame counter              */
    const int16_t last_element_mode /* i  : last_element_mode                 */
)
{
    int16_t Sample_Delay_HP
#ifndef IVAS_FLOAT_FIXED
        ,
        Sample_Delay_LP;
#else
        ;
#endif
    int16_t Sample_Delay_HP, Sample_Delay_LP;

    HQ_ENC_HANDLE hHQ_core = st->hHQ_core;
    LPD_state_HANDLE hLPDmem = st->hLPDmem;

@@ -371,9 +364,7 @@ void core_switching_pre_enc(
        if ( st->L_frame == L_FRAME )
        {
            Sample_Delay_HP = NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS );
#ifndef IVAS_FLOAT_FIXED
            Sample_Delay_LP = NS2SA( 12800, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS );
#endif

            if ( st->element_mode > EVS_MONO )
            {
@@ -384,16 +375,12 @@ void core_switching_pre_enc(
                Sample_Delay_HP -= NS2SA( 16000, DELAY_FIR_RESAMPL_NS );
            }

#ifndef IVAS_FLOAT_FIXED
            mvr2r( old_inp_12k8 + L_INP_MEM + L_FRAME - Sample_Delay_LP, st->hBWE_FD->old_input_lp, Sample_Delay_LP );
#endif
        }
        else
        {
            Sample_Delay_HP = NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_16k_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS );
#ifndef IVAS_FLOAT_FIXED
            Sample_Delay_LP = NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_16k_NS );
#endif

            if ( st->element_mode > EVS_MONO )
            {
@@ -404,15 +391,19 @@ void core_switching_pre_enc(
                Sample_Delay_HP -= NS2SA( 16000, DELAY_FIR_RESAMPL_NS );
            }

#ifndef IVAS_FLOAT_FIXED
            mvr2r( old_inp_16k + L_INP_MEM + L_FRAME - Sample_Delay_LP, st->hBWE_FD->old_input_lp, Sample_Delay_LP );
#endif
        }

#ifndef IVAS_FLOAT_FIXED
        mvr2r( st->hBWE_TD->old_speech_shb + L_LOOK_16k + L_SUBFR16k - Sample_Delay_HP, st->hBWE_FD->new_input_hp, Sample_Delay_HP );
#else
#ifdef IVAS_FLOAT_FIXED_CONVERSIONS
        floatToFixed_arr( st->hBWE_FD->new_input_hp, st->hBWE_FD->new_input_hp_fx, 0, NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS ) );
#endif
        Copy( st->hBWE_TD->old_speech_shb_fx + L_LOOK_16k + L_SUBFR16k - Sample_Delay_HP, st->hBWE_FD->new_input_hp_fx, Sample_Delay_HP );
#ifdef IVAS_FLOAT_FIXED_CONVERSIONS
        fixedToFloat_arr( st->hBWE_FD->new_input_hp_fx, st->hBWE_FD->new_input_hp, 0, NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS ) );
#endif
#endif

        if ( st->last_extl != WB_BWE )
+3 −2
Original line number Diff line number Diff line
@@ -870,9 +870,7 @@ ivas_error init_encoder(
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) );
        }

#ifndef IVAS_FLOAT_FIXED
        fd_bwe_enc_init( st->hBWE_FD );
#endif
    }
    else
    {
@@ -2015,6 +2013,9 @@ ivas_error init_encoder_ivas_fx(
        }

        fd_bwe_enc_init_fx( st->hBWE_FD );
#if 1
        fd_bwe_enc_init( st->hBWE_FD );
#endif
    }
    ELSE
    {
Loading