Commit 7d93be99 authored by korse's avatar korse
Browse files

ParamISM DTX/CNG Contribution

parent 92ee6e06
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -336,6 +336,12 @@ typedef enum
#define PARAM_ISM_MAX_CHAN                      16
#define PARAM_ISM_HYS_BUF_SIZE                  10

#ifdef PARAM_ISM_DTX_CNG
#define PARAM_ISM_DTX_COH_SCA_BITS              4
#define PARAM_ISM_DTX_AZI_BITS                  5 
#define PARAM_ISM_DTX_ELE_BITS                  4
#endif

typedef enum 
{
    ISM_MODE_NONE,
+30 −0
Original line number Diff line number Diff line
@@ -841,6 +841,36 @@ void ivas_param_ism_params_to_masa_param_mapping(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
);

#ifdef PARAM_ISM_DTX_CNG
void ivas_param_ism_metadata_dtx_enc(
    BSTR_ENC_HANDLE hBstr,               /* i/o  : bitstream handle                */
    ISM_METADATA_HANDLE hIsmMeta[],      /* i    : ISM metadata handles            */
    PARAM_ISM_CONFIG_HANDLE hParamIsm   /* i     : Param ISM Enc Handle            */
);

void ivas_param_ism_metadata_dtx_dec(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
);

void ivas_param_ism_get_sce_id_dtx(
    Encoder_Struct *st_ivas,  /* i/o: IVAS encoder structure          */
    const int16_t input_frame /* i  : input frame length per channel  */
);

void ivas_param_ism_compute_noisy_speech_flag( 
    Encoder_Struct *st_ivas /* i/o: IVAS encoder structure          */ 
);

void ivas_param_ism_get_DTX_flag( 
        Encoder_Struct *st_ivas /* i/o: IVAS encoder structure          */
);

void ivas_param_ism_coh_estim_dtx_enc(
    Encoder_Struct *st_ivas,                 /* i/o: IVAS encoder structure          */
    const int16_t input_frame               /* i  : input frame length per channel  */
);
#endif

/*----------------------------------------------------------------------------------*
 * DFT Stereo prototypes
 *----------------------------------------------------------------------------------*/
+10 −0
Original line number Diff line number Diff line
@@ -145,6 +145,16 @@ typedef struct ivas_param_ism_data_structure
    int16_t flag_noisy_speech;
    int16_t noisy_speech_buffer[PARAM_ISM_HYS_BUF_SIZE];

#ifdef PARAM_ISM_DTX_CNG
    int16_t paramISM_DTX_CNG_FLAG;
    int16_t sce_id_dtx;
    int16_t dtx_speech_buffer_enc[PARAM_ISM_HYS_BUF_SIZE];

    float long_term_energy_stereo_dmx_enc[PARAM_ISM_MAX_DMX][PARAM_ISM_HYS_BUF_SIZE];
    float coh;
    float ene_ratio;
#endif

} PARAM_ISM_CONFIG_DATA, *PARAM_ISM_CONFIG_HANDLE;


+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@
#define SBA_INTERN_CONFIG_FIX_HOA2                      /* Issue 99 : Fix for incorrect internal_config when output format is HOA2 or FOA*/
#define FIX_I98_HANDLES_TO_NULL                         /* Issue 98: do the setting of all handles to NULL in one place */

#define PARAM_ISM_DTX_CNG                               /* Support of DTX/CNG for Param-ISM */ 

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+6 −0
Original line number Diff line number Diff line
@@ -2263,6 +2263,9 @@ ivas_error init_encoder(
    const int16_t var_SID_rate_flag, /* i  : flag for variable SID update rate */
    const int16_t interval_SID,      /* i  : interval for SID update                */
    const int16_t vad_only_flag      /* i  : flag to indicate front-VAD structure   */
#ifdef PARAM_ISM_DTX_CNG
    , const IVAS_FORMAT ivas_format
#endif
);

void LPDmem_enc_init(
@@ -8561,6 +8564,9 @@ void generate_comfort_noise_dec_hf(
    float **bufferReal,         /* o  : Real part of input bands                                */
    float **bufferImag,         /* o  : Imaginary part of input bands                           */
    HANDLE_FD_CNG_COM hFdCngCom /* i/o: FD_CNG structure containing all buffers and variables   */
#ifdef PARAM_ISM_DTX_CNG
    , int16_t cng_flag          /*i: CNG Flag */
#endif 
);

void generate_masking_noise(
Loading