Commit 3b9b748c authored by vaclav's avatar vaclav
Browse files

formatting

parent a23b682c
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -357,6 +357,7 @@ ivas_error ivas_core_enc_fx(

            Scale_sig( old_inp_12k8_fx[n], L_INP_12k8, sub( Q1, Q_new[n] ) ); // Q0
            Scale_sig( old_inp_16k_fx[n], L_INP, sub( Q1, Q_new[n] ) );       // Q0

            Scale_sig( st->hTcxEnc->Txnq, L_FRAME32k / 2 + 64, sub( negate( 1 ), st->hTcxEnc->q_Txnq ) ); /* Q(-1) */
            st->hTcxEnc->q_Txnq = -Q1;
            move16();
@@ -535,6 +536,7 @@ ivas_error ivas_core_enc_fx(
                {
                    st = sts[i];
                    Scale_sig( old_inp_16k_fx[i], L_INP, sub( Q1, Q_new[i] ) ); // Q0

                    test();
                    IF( NE_16( st->element_mode, IVAS_CPE_DFT ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
                    {
@@ -652,6 +654,7 @@ ivas_error ivas_core_enc_fx(
        Copy( st->input_fx, tmp_input_fx, input_frame );
        q_inp[0] = st->q_old_inp;
        q_inp[1] = st->q_inp;

        Scale_sig( st->input_fx - input_frame, shl( input_frame, 1 ), sub( -1, st->q_inp ) );
        st->q_inp = -1;
        move16();
+4 −16
Original line number Diff line number Diff line
@@ -1117,7 +1117,7 @@ void enc_prm_igf_mdct(

void ivas_mdct_core_whitening_enc_fx(
    CPE_ENC_HANDLE hCPE,                            /* i/o: CPE encoder structure                 */
    Word16 new_samples_fx[CPE_CHANNELS][L_INP], /* i  : new samples                     Qnew-1*/
    Word16 new_samples_fx[CPE_CHANNELS][L_INP],     /* i  : new samples                           Q0*/
    Word16 old_wsp_fx[CPE_CHANNELS][L_WSP],         /* i  : 12.8kHz weighted speech (for LTP      Qx*/
    Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k], /* o  : floating pitch for each subframe      Q6*/
    Word32 *mdst_spectrum_long_fx[CPE_CHANNELS],    /* o  : buffer for MDST spectrum              mdst_spectrum_e*/
@@ -1222,7 +1222,6 @@ void ivas_mdct_core_whitening_enc_fx(

    windowedSignal_fx[0] = orig_spectrum_long[0]; /* NOTE temporarily available */
    windowedSignal_fx[1] = temp_buffer;           /* orig_spectrum_long isn't long enough */

    /*--------------------------------------------------------------*
     * TCX20/TCX10 switching decision
     *---------------------------------------------------------------*/
@@ -1322,7 +1321,6 @@ void ivas_mdct_core_whitening_enc_fx(
            move32();
        }
    }

    /*--------------------------------------------------------------*
     * Transform Kernel Switching, Stereo Pre-Processing, and TNS
     *---------------------------------------------------------------*/
@@ -1524,7 +1522,6 @@ void ivas_mdct_core_whitening_enc_fx(
            move16();
            move16();
        }

        FOR( n = 0; n < nSubframes; n++ )
        {
            test();
@@ -1711,6 +1708,7 @@ void ivas_mdct_core_whitening_enc_fx(

            init_tcx_enc_info_fx( sts[ch], &L_subframe, &L_subframeTCX, &tcx_subframe_coded_lines );


            nSubframes = NB_DIV;
            move16();
            shift = 1;
@@ -1760,7 +1758,6 @@ void ivas_mdct_core_whitening_enc_fx(
            }
        }
    }

    TCX_ENC_HANDLE hTcxEnc = NULL;
    q_min = 0;
    move16();
@@ -1813,11 +1810,9 @@ void ivas_mdct_core_whitening_enc_fx(
        }
    }
    TNSAnalysisStereo_fx( sts, mdst_spectrum_fx, 0, tnsSize, tnsBits, param_core, mct_on );

    /*--------------------------------------------------------------*
     * Envelope Quantization and FDNS
     *---------------------------------------------------------------*/

    /* Common q for spectrum and mdst */
    q_min = 0;
    move16();
@@ -2067,6 +2062,7 @@ void ivas_mdct_core_whitening_enc_fx(

        init_tcx_enc_info_fx( st, &L_subframe, &L_subframeTCX, &tcx_subframe_coded_lines );


        IF( NE_16( st->hTcxEnc->tcxMode, TCX_20 ) )
        {
            /* nSubframes = NB_DIV = 2 */
@@ -2095,7 +2091,6 @@ void ivas_mdct_core_whitening_enc_fx(
            Scale_sig32( st->hTcxEnc->spectrum_fx[n] + L_subframe, sub( L_subframeTCX, L_subframe ), sub( exp_tmp, st->hTcxEnc->spectrum_e[n] ) );
        }
    }

    /*--------------------------------------------------------------*
     * TNS
     *---------------------------------------------------------------*/
@@ -2318,7 +2313,6 @@ void ivas_mdct_core_whitening_enc_fx(
    /*--------------------------------------------------------------------------------*
     * SNS parameters
     *--------------------------------------------------------------------------------*/

    test();
    test();
    test();
@@ -2485,12 +2479,6 @@ void ivas_mdct_core_whitening_enc_fx(
}


/*--------------------------------------------------------------*
 * ivas_mdct_quant_coder()
 *
 * Spectrum quantization and coding
 *---------------------------------------------------------------*/

void ivas_mdct_quant_coder_fx(
    CPE_ENC_HANDLE hCPE,                  /* i/o: Encoder CPE handle                   */
    Word16 tnsBits[CPE_CHANNELS][NB_DIV], /* i  : bits needed for TNS parameters       */
+10 −11
Original line number Diff line number Diff line
@@ -160,8 +160,7 @@ void stereo_tcx_core_enc(
    Word16 pitch_buf_fx[NB_SUBFR16k], /* o  : pitch for each subframe, Q6                */
    const Word16 last_element_mode,   /* i  : last element mode, Q0                      */
    const Word16 vad_hover_flag,      /* i  : VAD hangover flag, Q0                      */
    Word16 Q_new
)
    Word16 Q_new )
{
    TCX_ENC_HANDLE hTcxEnc;
    Word16 i, n;
@@ -174,8 +173,7 @@ void stereo_tcx_core_enc(
    Word16 last_core_orig;

    /*Bits*/
    Word16 nbits_start,
        total_nbbits, nbits_header;
    Word16 nbits_start, total_nbbits, nbits_header;
    Word16 target_bits[2], bitsAvailable;
    Word16 nbits_lpc[2];
    Word16 tnsSize[2]; /* number of tns parameters put into prm */
@@ -204,12 +202,15 @@ void stereo_tcx_core_enc(

    /*HM*/
    Word16 indexBuffer[2 * ( ( N_MAX / 2 ) + 1 )];

    Word16 s;

    CONTEXT_HM_CONFIG hm_cfg[2];

    /* bitstream */
    BSTR_ENC_HANDLE hBstr = st->hBstr;


    push_wmops( "stereo_tcx_core_enc" );

    /*Sanity check*/
@@ -299,11 +300,11 @@ void stereo_tcx_core_enc(

    IF( EQ_16( st->L_frame, L_FRAME ) )
    {
        p_new_samples = new_samples_12k8; /* Q0 */
        p_new_samples = new_samples_12k8; /* Q_new */
    }
    ELSE
    {
        p_new_samples = new_samples_16k; /* Q0 */
        p_new_samples = new_samples_16k; /* Q_new */
    }

    /*--------------------------------------------------------------*
@@ -679,7 +680,6 @@ void stereo_tcx_core_enc(
    /*--------------------------------------------------------------------------------*
     * Encode TCX20/10 parameters
     *--------------------------------------------------------------------------------*/

    writeTCXparam_fx( st, hBstr, hm_cfg, param_core, nbits_header, nbits_start, add( nbits_lpc[0], nbits_lpc[1] ), NULL, NULL, NULL, -1 );

    total_nbbits = sub( hBstr->nb_bits_tot, nbits_start );
@@ -704,7 +704,6 @@ void stereo_tcx_core_enc(
            move16();
        }
    }

    Scale_sig( st->synth, st->L_frame, -Q_new );
    IF( st->tcxonly == 0 )
    {