Commit 4e6c6d71 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'enc_flt_struct_cleanup_ltv_crash_fixes_q_info_upd' into 'main'

Float structure elements cleanup in encoder, Q-info updates for lib_com

See merge request !744
parents 8a35289e cd14d0c5
Loading
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -42,15 +42,14 @@
#include "ivas_rom_com.h"
#include "wmc_auto.h"

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * Local function prototypes
 *--------------------------------------------------------------------*/

static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk( const int16_t bits_frame, int16_t *fixed_cdk_index, const int16_t nb_subfr );

#ifndef IVAS_FLOAT_FIXED
static int16_t allocate_unused( const int32_t core_brate, const int16_t coder_type, const int16_t unused_bits, const int16_t nb_prm, const int16_t subfr, const int16_t prm_type, int16_t *prm_bit_mode );
#endif

typedef enum
{
@@ -358,7 +357,6 @@ static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk(
 * Selection of fixed innovation codebook bitbudget table
 *--------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
static int16_t fcb_table(
    const int16_t n,
    const int16_t L_subfr )
@@ -373,7 +371,6 @@ static int16_t fcb_table(

    return ( out );
}
#endif

/*-------------------------------------------------------------------*
 * acelp_FCB_allocator()
@@ -381,7 +378,6 @@ static int16_t fcb_table(
 * Routine to allocate fixed innovation codebook bit-budget
 *--------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
static ivas_error acelp_FCB_allocator(
    int16_t *nBits,            /* i/o: available bit-budget    */
    int16_t fixed_cdk_index[], /* o  : codebook index          */
@@ -512,7 +508,6 @@ static ivas_error acelp_FCB_allocator(

    return error;
}
#endif


/*-------------------------------------------------------------------*
@@ -523,7 +518,6 @@ static ivas_error acelp_FCB_allocator(
 *   - per channel bitrate minimum is 13250 kbps for ACELP@16kHz
 *--------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
ivas_error config_acelp1_IVAS(
    const int16_t enc_dec,              /* i  : encoder/decoder flag            */
    const int32_t total_brate,          /* i  : total bitrate                   */
@@ -1341,7 +1335,6 @@ ivas_error config_acelp1_IVAS(

    return error;
}
#endif

/*-------------------------------------------------------------------*
 * allocate_unused()
@@ -1349,7 +1342,6 @@ ivas_error config_acelp1_IVAS(
 * Allocate unused bits
 *--------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
static int16_t allocate_unused(
    const int32_t core_brate,
    const int16_t coder_type,
@@ -1426,7 +1418,6 @@ static int16_t allocate_unused(

    return bit_added + max_bit_per_pos;
}
#endif


/*-------------------------------------------------------------------*
@@ -1436,8 +1427,6 @@ static int16_t allocate_unused(
 *--------------------------------------------------------------------*/

/*! r: ACELP16k flag */

#ifndef IVAS_FLOAT_FIXED
int16_t set_ACELP_flag_IVAS(
    const int16_t element_mode,  /* i  : element mode                */
    const int32_t element_brate, /* i  : element bitrate             */
+2 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ void cng_params_postupd(
 *
 * update CNG parameters
 *-------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
void cng_params_upd(
    const float lsp_new[],           /* i  : LSP parameters                                      */
    const float exc2[],              /* i  : current enhanced excitation                         */
@@ -581,6 +581,7 @@ void cng_params_upd(

    return;
}
#endif


/*---------------------------------------------------------------------*
+151 −151

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -117,7 +117,11 @@ void initFdCngCom_flt(
    hFdCngCom->active_frame_counter = 0;
    hFdCngCom->frame_type_previous = ACTIVE_FRAME;
    hFdCngCom->flag_noisy_speech = 0;
#ifndef IVAS_FLOAT_FIXED
    hFdCngCom->likelihood_noisy_speech_flt = 0.f;
#else
    hFdCngCom->likelihood_noisy_speech = 0;
#endif
    hFdCngCom->numCoreBands = 0;
    hFdCngCom->stopBand = 0;
    hFdCngCom->startBand = 0;
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#include "rom_com.h"
#include "wmc_auto.h"

#ifndef IVAS_FLOAT_FIXED
/*---------------------------------------------------------------------*
 * IGF_ApplyTransFac_flt()
 *
@@ -63,6 +64,7 @@ int16_t IGF_ApplyTransFac_flt(

    return ret;
}
#endif


/*---------------------------------------------------------------------*
@@ -357,6 +359,7 @@ int16_t IGF_MapBitRateToIndex_flt(
    return bitRateIndex;
}

#ifndef IVAS_FLOAT_FIXED
/*---------------------------------------------------------------------*
 * IGF_gridSetUp_flt()
 *
@@ -567,6 +570,7 @@ int16_t IGFCommonFuncsIGFConfiguration_flt(

    return retValue;
}
#endif


/*---------------------------------------------------------------------*
Loading