Commit 8089ab9f authored by vaillancour's avatar vaillancour
Browse files

more cleaning and fixed something in inov_enc

parent e9921b91
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -90,4 +90,8 @@
#define REUSE_EVS_ACELP_SHIFT
#define REUSE_EVS_ACELP_TC

#if 0  // To be activated when everything is completed
#define REUSE_EVS_ACELP_2t32
#define REUSE_EVS_ACELP_1t64
#endif
#endif
+4 −2
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ void acelp_2t32_fx(
    }
    return;
}

#ifndef REUSE_EVS_ACELP_2t32
void acelp_2t32_ivas_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle                      */
    const Word16 dn[],     /* i  : corr. between target and h[].                 Qx*/
@@ -568,6 +568,7 @@ void acelp_2t32_ivas_fx(
    }
    return;
}
#endif
/*----------------------------------------------------------------------------------
 * Function  acelp_1t64()
 *
@@ -645,7 +646,7 @@ void acelp_1t64_fx(

    return;
}

#ifndef REUSE_EVS_ACELP_1t64
void acelp_1t64_ivas_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle                      */
    const Word16 dn[],     /* i  : corr. between target and h[].                Qx */
@@ -714,3 +715,4 @@ void acelp_1t64_ivas_fx(

    return;
}
#endif
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ Word16 encod_tran_fx(
                                      res_fx, L_SUBFR, p_Aw, st_fx->preemph_fac, xn, cn, h1 );
            q_h1 = sub( 14, norm_s( h1[0] ) );
            Copy_Scale_sig( h1, h2_fx, L_SUBFR, sub( 11, q_h1 ) ); /*Q11*/
            Scale_sig( h1, L_SUBFR, sub( 14, q_h1 ) + shift );     /* set h1[] in Q14 with scaling for convolution Q14*/
            Scale_sig( h1, L_SUBFR, add( sub( 14, q_h1 ), shift ) );     /* set h1[] in Q14 with scaling for convolution Q14*/
        }
        ELSE
#endif
+83 −82
Original line number Diff line number Diff line
@@ -166,7 +166,9 @@ Word16 inov_encode_fx(
            move16();
        }
    }
    ELSE IF( EQ_16( L_frame, L_FRAME ) && EQ_16( coder_type, TRANSITION ) )
    ELSE
    {
        IF( EQ_16( L_frame, L_FRAME ) && EQ_16( coder_type, TRANSITION ) )
        {
            test();
            test();
@@ -268,7 +270,7 @@ Word16 inov_encode_fx(
                cmpl_flag = sub( cmpl_flag, 1 );
            }
        }

    }
    /*-----------------------------------------------------------------*
     * Find and encode the algebraic innovation
     *-----------------------------------------------------------------*/
@@ -307,7 +309,7 @@ Word16 inov_encode_fx(

                        IF( EQ_16( nBits, 8 ) )
                        {
                            acelp_1t64_ivas_fx( hBstr, dn, h2, code, y2, L_subfr );
                            acelp_1t64_fx( hBstr, dn, h2, code, y2, L_subfr );
                        }
                        ELSE
                        {
@@ -318,7 +320,7 @@ Word16 inov_encode_fx(
                    {
                        IF( st_fx->acelp_cfg.fixed_cdk_index[i_subfr / L_SUBFR] == 0 )
                        {
                            acelp_1t64_ivas_fx( hBstr, dn, h2, code, y2, L_subfr );
                            acelp_1t64_fx( hBstr, dn, h2, code, y2, L_subfr );
                        }
                        ELSE
                        {
@@ -441,7 +443,6 @@ Word16 inov_encode_fx(

    return stack_pulses;
}

Word16 inov_encode_ivas_fx(
    Encoder_State *st_fx,      /* i/o: encoder state structure */
    const Word32 core_brate,   /* i  : core bitrate                                    */