Commit 804da895 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh Committed by Fabian Bauer
Browse files

LTV crash fix, few bug fixes and Q-documentation for lib_enc files

parent df47f6ba
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -286,8 +286,6 @@
    <ClCompile Include="..\lib_enc\find_wsp.c" />
    <ClCompile Include="..\lib_enc\frame_spec_dif_cor_rate.c" />
    <ClCompile Include="..\lib_enc\gain_enc.c" />
    <ClCompile Include="..\lib_enc\gaus_enc.c" />
    <ClCompile Include="..\lib_enc\gp_clip.c" />
    <ClCompile Include="..\lib_enc\gs_enc.c" />
    <ClCompile Include="..\lib_enc\guided_plc_enc.c" />
    <ClCompile Include="..\lib_enc\hf_cod_amrwb.c" />
@@ -401,11 +399,7 @@
    <ClCompile Include="..\lib_enc\pvq_core_enc.c" />
    <ClCompile Include="..\lib_enc\pvq_encode.c" />
    <ClCompile Include="..\lib_enc\qlpc_avq.c" />
    <ClCompile Include="..\lib_enc\qlpc_stoch.c" />
    <ClCompile Include="..\lib_enc\q_gain2p.c" />
    <ClCompile Include="..\lib_enc\range_enc.c" />
    <ClCompile Include="..\lib_enc\re8_cod.c" />
    <ClCompile Include="..\lib_enc\reordernorm.c" />
    <ClCompile Include="..\lib_enc\rom_enc.c" />
    <ClCompile Include="..\lib_enc\rst_enc.c" />
    <ClCompile Include="..\lib_enc\setmodeindex.c" />
+0 −18
Original line number Diff line number Diff line
@@ -199,12 +199,6 @@
    <ClCompile Include="..\lib_enc\gain_enc.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\gaus_enc.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\gp_clip.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\gs_enc.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
@@ -295,18 +289,6 @@
    <ClCompile Include="..\lib_enc\qlpc_avq.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\qlpc_stoch.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\range_enc.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\re8_cod.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\reordernorm.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_enc\rom_enc.c">
      <Filter>enc_all_c</Filter>
    </ClCompile>
+39 −33
Original line number Diff line number Diff line
@@ -3680,58 +3680,64 @@ gp_clips_fx.c
/========================================================================================================*/
void init_gp_clip_fx(
    Word16 mem[] /* o  : memory of gain of pitch clipping algorithm */
    Word16 mem[] /* o  : memory of gain of pitch clipping algorithm		[2.56x,Q14,Q8,Q0,Q14,Q14]*/
);
Word16 gp_clip_fx(
    const Word16 element_mode, /* i  : element mode                               */
    const Word32 core_brate,   /* i  : core bitrate                               */
    const Word16 *voicing,     /* i  : normalized correlations (from OL pitch)    */
    const Word16 i_subfr,      /* i  : subframe index                             */
    const Word16 coder_type,   /* i  : type of coder                              */
    const Word16 xn[],         /* i  : target vector                              */
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm */
    const Word16 element_mode, /* i  : element mode                               Q0*/
    const Word32 core_brate,   /* i  : core bitrate                               Q0*/
    const Word16 *voicing,     /* i  : normalized correlations (from OL pitch)    Q15*/
    const Word16 i_subfr,      /* i  : subframe index                             Q0*/
    const Word16 coder_type,   /* i  : type of coder                              Q0*/
    const Word16 xn[],         /* i  : target vector                              Q_new*/
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm [2.56x,Q14,Q8,Q0,Q14,Q14]*/
    const Word16 Q_new         /* i  : scaling factor                             */
);
void gp_clip_test_isf_fx(
    const Word16 element_mode, /* i  : element mode                               */
    const Word32 core_brate,   /* i  : core bitrate                               */
    const Word16 isf[],        /* i  : isf values (in frequency domain)           */
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm */
    const Word16 Opt_AMR_WB    /* i  : flag indicating AMR-WB IO mode             */
    const Word16 element_mode, /* i  : element mode                               Q0*/
    const Word32 core_brate,   /* i  : core bitrate                               Q0*/
    const Word16 isf[],        /* i  : isf values (in frequency domain)           Q2.56*/
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm Q15*/
    const Word16 Opt_AMR_WB    /* i  : flag indicating AMR-WB IO mode             Q0*/
);
void gp_clip_test_gain_pit_fx(
    const Word16 element_mode, /* i  : element mode                               */
    const Word32 core_brate,   /* i  : core bitrate                               */
    const Word16 element_mode, /* i  : element mode									Q0*/
    const Word32 core_brate,   /* i  : core bitrate									Q0*/
    const Word16 gain_pit,     /* i  : gain of quantized pitch						Q14*/
    Word16 mem[]               /* i/o: memory of gain of pitch clipping algorithm	1Q14*/
);
Word16 Mode2_gp_clip(
    const Word16 *voicing,   /* i  : normalized correlations (from OL pitch)    */
    const Word16 i_subfr,    /* i  : subframe index                             */
    const Word16 coder_type, /* i  : type of coder                              */
    const Word16 xn[],       /* i  : target vector                              */
Word16 Mode2_gp_clip_fx(
    const Word16 *voicing,   /* i  : normalized correlations from OL pitch  Q15 */
    const Word16 i_subfr,    /* i  : subframe index                         Q0  */
    const Word16 coder_type, /* i  : type of coder                          Q0  */
    const Word16 xn[],       /* i  : target vector                         Q_xn */
    Word16 mem[],            /* i/o: memory of gain of pitch clipping algorithm */
    const Word16 L_subfr,
    const Word16 Q_xn /* i  : xn data format */
    /*      mem[0]:      Q0                            */
    /*      mem[1]:     1Q14                           */
    /*      mem[2]:     8Q7                            */
    /*      mem[3]:      Q0   (integer)                */
    /*      mem[4]:      Q14                           */
    /*      mem[5]:      Q14                           */
    const Word16 L_subfr, /* Q0 */
    const Word16 Q_xn     /* i  : scaling factor of vector xn[]              */
);
void gp_clip_test_lsf_fx(
    const Word16 element_mode, /* i  : element mode                               */
    const Word16 element_mode, /* i  : element mode									Q0*/
    const Word16 lsf[],        /* i  : lsf values (in frequency domain)				14Q1*1.28*/
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm  */
    const Word16 m             /* i  : dimension of lsf							*/
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm	[2.56x,Q14,Q8,Q0,Q14,Q14]*/
    const Word16 m             /* i  : dimension of lsf								Q0*/
);
void gp_clip_test_lsf_ivas_fx(
    const Word16 element_mode, /* i  : element mode                               */
    const Word32 core_brate,   /* i  : core bitrate                               */
    const Word16 lsf[],        /* i  : LSF vector                                 */
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm */
    const Word16 Opt_AMR_WB    /* i  : flag indicating AMR-WB IO mode             */
    const Word16 element_mode, /* i  : element mode                               Q0*/
    const Word32 core_brate,   /* i  : core bitrate                               Q0*/
    const Word16 lsf[],        /* i  : LSF vector                                 14Q1*1.28*/
    Word16 mem[],              /* i/o: memory of gain of pitch clipping algorithm [2.56x,Q14,Q8,Q0,Q14,Q14]*/
    const Word16 Opt_AMR_WB    /* i  : flag indicating AMR-WB IO mode             Q0*/
);
/*========================================================================================================/
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ Word16 coder_acelp_fx( /* o : SEGSNR for CL decision *
         * or in case of floating point encoder & fixed p. decoder
         *-----------------------------------------------------------------*/

        clip_gain = Mode2_gp_clip( st->voicing_fx, i_subfr, st->coder_type, xn, st->clip_var_fx, L_SUBFR, Q_xn );
        clip_gain = Mode2_gp_clip_fx( st->voicing_fx, i_subfr, st->coder_type, xn, st->clip_var_fx, L_SUBFR, Q_xn );

        /*-----------------------------------------------------------------*
         * - find unity gain pitch excitation (adaptive codebook entry)    *
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ void coder_acelp_rf_fx(
        }
        ELSE
        {
            clip_gain = Mode2_gp_clip( voicing, i_subfr, coder_type, xn, hRF->rf_clip_var, L_SUBFR, Q_xn );
            clip_gain = Mode2_gp_clip_fx( voicing, i_subfr, coder_type, xn, hRF->rf_clip_var, L_SUBFR, Q_xn );

            /*-----------------------------------------------------------------*
             * - find unity gain pitch excitation (adaptive codebook entry)    *
Loading