Commit a441b316 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

fixed changes for getTCXparam added.

[x] Added fixed changes for all subfunctions related to getTCXparam.
[x] The fixed implementation has _fx suffix added to function name
[x] Updated the function call for getTCXparam in dec_prm_tcx to test the same.
parent ae456aa4
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@
    <ClCompile Include="..\lib_com\nelp_fx.c" />
    <ClCompile Include="..\lib_com\oper_32b.c" />
    <ClCompile Include="..\lib_com\parameter_bitmaping.c" />
    <ClCompile Include="..\lib_com\parameter_bitmaping_fx.c" />
    <ClCompile Include="..\lib_com\phase_dispersion.c" />
    <ClCompile Include="..\lib_com\phase_dispersion_fx.c" />
    <ClCompile Include="..\lib_com\ppp.c" />
+1 −0
Original line number Diff line number Diff line
@@ -346,6 +346,7 @@
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\float_to_fix_ops.c" />
    <ClCompile Include="..\lib_com\parameter_bitmaping_fx.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop32.h" />
+10 −10
Original line number Diff line number Diff line
@@ -14,10 +14,10 @@

#define GET_ADJ2(T,L,F) (((L) << (F)) - (T))
void UnmapIndex(
    Word16 PeriodicityIndex,
    Word16  Bandwidth,
    Word16 LtpPitchLag,
    Word8  SmallerLags,
    const Word16 PeriodicityIndex,
    const Word16  Bandwidth,
    const Word16 LtpPitchLag,
    const Word16  SmallerLags,
    Word16 *FractionalResolution,
    Word32 *Lag
)
@@ -79,10 +79,10 @@ void UnmapIndex(


void ConfigureContextHm(
    Word16 NumCoeffs,                   /* (I) Number of coefficients                         */
    Word16 TargetBits,                  /* (I) Target bit budget (excl. Done flag)            */
    Word16 PeriodicityIndex,            /* (I) Pitch related index                            */
    Word16 LtpPitchLag,                 /* (I) TCX-LTP pitch in F.D.                          */
    const Word16 NumCoeffs,                   /* (I) Number of coefficients                         */
    const Word16 TargetBits,                  /* (I) Target bit budget (excl. Done flag)            */
    const Word16 PeriodicityIndex,            /* (I) Pitch related index                            */
    const Word16 LtpPitchLag,                 /* (I) TCX-LTP pitch in F.D.                          */
    CONTEXT_HM_CONFIG *hm_cfg           /* (O) Context-based harmonic model configuration     */
)
{
@@ -94,7 +94,7 @@ void ConfigureContextHm(

    Bandwidth = 0;
    move16();
    if (GE_16(NumCoeffs, 256))
    IF (GE_16(NumCoeffs, 256))
    {
        Bandwidth = 1;
        move16();
@@ -103,7 +103,7 @@ void ConfigureContextHm(
    SmallerLags = 0;
    move16();
    test();
    if ((LE_16(TargetBits, kSmallerLagsTargetBitsThreshold))||(Bandwidth==0))
    IF ((LE_16(TargetBits, kSmallerLagsTargetBitsThreshold))||(Bandwidth==0))
    {
        SmallerLags = 1;
        move16();
+3 −1
Original line number Diff line number Diff line
@@ -505,8 +505,10 @@ UWord16 get_indice_1_fx( /* o : value of the indice */
	Word16 pos              /* i  : absolute position in the bitstream (update after the read) */
)
{
	Word16 nbits_total;
	nbits_total = (Word16)(st_fx->total_brate / FRAMES_PER_SEC);
	/* detect corrupted bitstream */
	IF(GT_16(add(pos, 1), st_fx->total_num_bits))
	IF(GT_16(add(pos, 1), nbits_total))
	{
		st_fx->BER_detect = 1;
		move16();
+16 −0
Original line number Diff line number Diff line
@@ -1738,6 +1738,11 @@ void rc_uni_dec_init(
    uint16_t *bit_buffer,                                       /* i  : Bit buffer                          */
    const int16_t max_available_bits                            /* i  : Total maximum bits available        */
);
void rc_uni_dec_init_fx(
	RangeUniDecState *rc_st_dec,                                /* i/o: RC state handle                     */
	UWord16 *bit_buffer,                                       /* i  : Bit buffer                          */
	const Word16 max_available_bits                            /* i  : Total maximum bits available        */
);

/*! r: Read symbol */
uint16_t rc_uni_dec_read_symbol_fastS(
@@ -1747,6 +1752,14 @@ uint16_t rc_uni_dec_read_symbol_fastS(
    const uint16_t alphabet_size,                               /* i  : Number of symbols in the alphabet   */
    const uint16_t tot_shift                                    /* i  : Total frequency as a power of 2     */
);
/*! r: Read symbol */
UWord16 rc_uni_dec_read_symbol_fastS_fx(
	RangeUniDecState *rc_st_dec,                                /* i/o: Decoder State                       */
	const UWord16 cum_freq_table[],                            /* i  : Cumulative frequency up to symbol   */
	const UWord16 sym_freq_table[],                            /* i  : Symbol frequency                    */
	const UWord16 alphabet_size,                               /* i  : Number of symbols in the alphabet   */
	const UWord16 tot_shift                                    /* i  : Total frequency as a power of 2     */
);

/*! r: Read bit */
uint16_t rc_uni_dec_read_bit(
@@ -1771,6 +1784,9 @@ int16_t rc_uni_dec_virtual_finish(
    RangeUniDecState *rc_st_dec                                 /* i/o: RC state handle                     */
);

Word16 rc_uni_dec_virtual_finish_fx(
    RangeUniDecState *rc_st_dec                                 /* i/o: RC state handle                     */
);
/*! r: Total number of bits consumed */
int16_t rc_uni_dec_finish(
    RangeUniDecState *rc_st_dec                                 /* i/o: RC state handle                     */
Loading