Commit 0083bfba authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Warning fixes for EVS changes

[x] Few of the warnings are fixed. Includes few changes to BASOP
function parameter datatypes.
[x] Tested for EVS "26444_ce0_da0_e60_f40_g50-TestSeq_BASOP_26442" bit exactness with EVS fixed code.
  978 out of 979 bit exact. One stream bit-inexactness to be debugged.
[x] With EVS_FLOAT, one file additional failure observed with pytest as compared to previous version.
parent 79135d46
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@
    <ClCompile>
      <Optimization>Disabled</Optimization>
      <AdditionalIncludeDirectories>..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DEBUGGING;DBG_WAV_WRITER;$(Macros);%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DBG_WAV_WRITER;$(Macros);%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MinimalRebuild>false</MinimalRebuild>
      <ExceptionHandling />
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+11 −11
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ typedef enum
 */
void BITS_ALLOC_init_config_acelp(
    const Word32 bit_rate,
    const Word8 narrowBand,
    const Word16 narrowBand,
    const Word16 nb_subfr,
    ACELP_config *pConfigAcelp        /*o:  configuration structure of ACELP*/
)
@@ -499,11 +499,11 @@ static ivas_error acelp_FCB_allocator(
#if defined  DEBUGGING 
    if (cdbk < 0 && coder_type != TRANSITION)
    {
        return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bit-budget for fixed innovation codebook (frame = %d). Exiting! \n", frame);
        return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bit-budget for fixed innovation codebook (frame = %d). Exiting! \n");
    }
    if ((L_subfr == L_SUBFR && cdbk >= ACELP_FIXED_CDK_NB) || (L_subfr == 2 * L_SUBFR && fcb_table(cdbk, L_subfr) == 128 /*stop value*/))
    {
        return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too high bit-budget for fixed innovation codebook (frame = %d). Exiting! \n", frame);
        return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too high bit-budget for fixed innovation codebook (frame = %d). Exiting! \n");
    }
#endif

@@ -646,12 +646,12 @@ ivas_error config_acelp1(
#if defined DEBUGGING 
        if (((core_brate_inp < 5900 && coder_type > UNVOICED) && !(core_brate_inp < MIN_TC_BRATE && coder_type == TRANSITION)) && !(idchan > 0 && element_mode == IVAS_CPE_TD) && !(element_mode == IVAS_SCE && tdm_low_rate_mode))
        {
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bitrate (%d bps) for ACELP@12k8 in frame %d. Exiting!\n", core_brate_inpI, frame);
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bitrate (%d bps) for ACELP@12k8 in frame %d. Exiting!\n", core_brate_inpI);
        }

        if (core_brate_inp > ACELP_12k8_HIGH_LIMIT && core == ACELP_CORE)
        {
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too high bitrate (%d bps) for ACELP@12k8 in frame %d. Exiting!\n", core_brate_inpI, frame);
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too high bitrate (%d bps) for ACELP@12k8 in frame %d. Exiting!\n", core_brate_inpI);
        }
#endif
    }
@@ -662,7 +662,7 @@ ivas_error config_acelp1(
#if defined DEBUGGING 
        if (core_brate_inp < ACELP_16k_LOW_LIMIT && core == ACELP_CORE)
        {
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bitrate (%d bps) for ACELP@16k in frame %d. Exiting!\n", core_brate_inpI, frame);
            return IVAS_ERROR(IVAS_ERR_INTERNAL_FATAL, "Error: Too low bitrate (%d bps) for ACELP@16k in frame %d. Exiting!\n", core_brate_inpI);
        }
#endif
    }
@@ -1183,7 +1183,7 @@ ivas_error config_acelp1(
                i = s_min(i, 13);
#ifdef DEBUG_MODE_TD
                if (i < 0)
                    IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR::: UC negative index should not happen at frame %d\n", frame);
                    IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR::: UC negative index should not happen at frame %d\n");
#endif
                i = s_max(i, 0); /* If i == 0-> random noise generator will be used as FCB */
                set16_fx(acelp_cfg->fixed_cdk_index, i, NB_SUBFR);
@@ -1222,7 +1222,7 @@ ivas_error config_acelp1(
                    else /* No FCB */
                    {
#if defined  DEBUGGING 
                        IVAS_ERROR(IVAS_ERR_INTERNAL, "WARNING!!!, No bit allocated to FCB, check frame %d\n", frame);
                        IVAS_ERROR(IVAS_ERR_INTERNAL, "WARNING!!!, No bit allocated to FCB, check frame %d\n");
#endif
                        acelp_cfg->fixed_cdk_index[0] = -1;
                        acelp_cfg->fixed_cdk_index[1] = -1;
@@ -1378,7 +1378,7 @@ ivas_error config_acelp1(
        else if (flag_hardcoded && core == ACELP_CORE && bits != 0)
        {
#if defined  DEBUGGING 
            IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR: bit-budget incorrect (%d bits) in frame %d.\n", (Word32)bits, frame);
            IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR: bit-budget incorrect (%d bits) in frame %d.\n", (Word32)bits);
#endif
        }
        else if (bits > 0 && !(coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD))
@@ -1444,7 +1444,7 @@ ivas_error config_acelp1(
#if defined  DEBUGGING 
                if (idchan > 0 && bits > 0 && (coder_type > UNVOICED || tdm_low_rate_mode == 0))
                {
                    IVAS_ERROR(IVAS_ERR_INTERNAL, "WARNING !! Unused bits in secondary channel at frame %d\n", frame);
                    IVAS_ERROR(IVAS_ERR_INTERNAL, "WARNING !! Unused bits in secondary channel at frame %d\n");
                }
#endif
            }
@@ -1472,7 +1472,7 @@ ivas_error config_acelp1(
        else if (bits < 0 && !(coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD))
        {
#if defined  DEBUGGING 
            IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR: bit-budget incorrect (%d bits) in frame %d.\n", (Word32)bits, frame);
            IVAS_ERROR(IVAS_ERR_INTERNAL, "ERROR: bit-budget incorrect (%d bits) in frame %d.\n", (Word32)bits);
#endif
        }
    }
+4 −4
Original line number Diff line number Diff line
@@ -862,7 +862,7 @@ ivas_error check_ind_list_limits(
        }
        else
        {
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n", frame, hBstr->ind_list[hBstr->nb_ind_tot].id, hBstr->ind_list[hBstr->nb_ind_tot].value, hBstr->ind_list[hBstr->nb_ind_tot].nb_bits );
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n", hBstr->ind_list[hBstr->nb_ind_tot].id, hBstr->ind_list[hBstr->nb_ind_tot].value, hBstr->ind_list[hBstr->nb_ind_tot].nb_bits );
        }
    }

@@ -893,7 +893,7 @@ ivas_error push_indice(
    /* check the limits of the list of indices */
    if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
    {
        return IVAS_ERROR( error, "Error occured in push_indice() while re-allocating the list of indices (frame %d) !\n", frame );
        return IVAS_ERROR( error, "Error occured in push_indice() while re-allocating the list of indices (frame %d) !\n" );
    }

    /* find the location in the list of indices based on ID */
@@ -1013,7 +1013,7 @@ ivas_error push_next_bits(
        /* check the limits of the list of indices */
        if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
        {
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n", frame );
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n" );
        }
        ptr = &hBstr->ind_list[hBstr->nb_ind_tot];

@@ -1029,7 +1029,7 @@ ivas_error push_next_bits(
        /* check the limits of the list of indices */
        if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
        {
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n", frame );
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n" );
        }
        ptr = &hBstr->ind_list[hBstr->nb_ind_tot];

+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ extern int currCounter;

/* ================================ New Complex Basops ========================= */

cmplx CL_shr (cmplx inp, Word32 shift_val) {
cmplx CL_shr (cmplx inp, Word16 shift_val) {
  cmplx out;
  out.re = L_shr (inp.re, shift_val);
  out.im = L_shr (inp.im, shift_val);
@@ -44,7 +44,7 @@ cmplx CL_shr (cmplx inp, Word32 shift_val) {
  return out;
}

cmplx CL_shl (cmplx inp, Word32 shift_val) {
cmplx CL_shl (cmplx inp, Word16 shift_val) {
  cmplx out;
  out.re = L_shl (inp.re, shift_val);
  out.im = L_shl (inp.im, shift_val);
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ typedef struct
 |___________________________________________________________________________|
*/

cmplx CL_shr (cmplx inp, Word32 shift_val);
cmplx CL_shl (cmplx inp, Word32 shift_val);
cmplx CL_shr (cmplx inp, Word16 shift_val);
cmplx CL_shl (cmplx inp, Word16 shift_val);
cmplx CL_add (cmplx inp1, cmplx inp2);
cmplx CL_sub (cmplx inp1, cmplx inp2);
cmplx CL_scale (cmplx x, Word16 y);
Loading