Commit 139aca91 authored by multrus's avatar multrus
Browse files

[cleanup] accept DISCRETE_ISM_DTX_CNG

parent 1cfc2212
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -343,12 +343,7 @@ typedef enum
#define PARAM_ISM_HYS_BUF_SIZE                  10

/* ISM DTX */
#ifdef DISCRETE_ISM_DTX_CNG
#define ISM_DTX_COH_SCA_BITS                    4
#else
#define PARAM_ISM_DTX_COH_SCA_BITS              4
#endif
#ifdef DISCRETE_ISM_DTX_CNG
#define ISM_DTX_AZI_BITS_HIGH                   8
#define ISM_DTX_ELE_BITS_HIGH                   7
#define ISM_Q_STEP_HIGH                         (ISM_Q_STEP / 2)
@@ -357,10 +352,6 @@ typedef enum
#define ISM_DTX_ELE_BITS_LOW                    5
#define ISM_Q_STEP_LOW                          (ISM_Q_STEP * 2)
#define ISM_Q_STEP_BORDER_LOW                   (ISM_Q_STEP_BORDER * 2)
#else
#define PARAM_ISM_DTX_AZI_BITS                  5
#define PARAM_ISM_DTX_ELE_BITS                  4
#endif


typedef enum 
@@ -382,13 +373,8 @@ enum
    IND_ISM_METADATA_FLAG = IND_ISM_EXTENDED_FLAG + MAX_NUM_OBJECTS, /* EN2VE: Is this not supposed to be in the loop part below, since it is one per ISM? */
#endif
    IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS,
#ifdef DISCRETE_ISM_DTX_CNG
    IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS,
    IND_ISM_SCE_ID_DTX,
#else
    IND_ISM_SCE_ID_DTX = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS,
    IND_ISM_NOISY_SPEECH_FLAG,
#endif
    IND_ISM_DTX_COH_SCA,

    /* ------------- loop for objects -------------- */
+0 −2
Original line number Diff line number Diff line
@@ -551,7 +551,6 @@ void ivas_ism_metadata_close(
}


#ifdef DISCRETE_ISM_DTX_CNG
/*-------------------------------------------------------------------*
 * update_last_metadata()
 *
@@ -613,4 +612,3 @@ void ivas_get_ism_sid_quan_bitbudget(

    return;
}
#endif
+0 −35
Original line number Diff line number Diff line
@@ -501,9 +501,6 @@ void stereo_tcx_core_dec(
    STEREO_CNG_DEC_HANDLE hStereoCng,                           /* i  : Stereo CNG handle                       */
    const int16_t nchan_out,                                    /* i  : number of output channels               */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                             */
#ifndef DISCRETE_ISM_DTX_CNG
   ,const ISM_MODE ism_mode                                     /* i  : ISM mode (only needed if format is ISM) */
#endif
);

void stereo_tcx_init_dec(
@@ -838,9 +835,7 @@ ivas_error ivas_ism_metadata_dec(
    const int16_t bfi,                                          /* i  : bfi flag                                    */
    int16_t nb_bits_metadata[],                                 /* o  : number of metadata bits                     */
    ISM_MODE ism_mode,                                          /* i  : ISM mode                                    */
#ifdef DISCRETE_ISM_DTX_CNG
    ISM_DTX_DATA_DEC hISMDTX,                                   /* i/o: ISM DTX structure                           */
#endif
#ifdef FIX_379_EXT_METADATA 
    const PARAM_ISM_CONFIG_HANDLE hParamIsm,                    /* i  : Param ISM Config Handle                     */
    int16_t *ism_extended_metadata_flag,                        /* i/o: Extended metadata active in renderer        */
@@ -900,10 +895,8 @@ ivas_error ivas_ism_enc_config(

ivas_error ivas_ism_dec_config(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
#ifdef DISCRETE_ISM_DTX_CNG
    ,
    const ISM_MODE last_ism_mode                                /* i/o: last ISM mode                               */
#endif
#ifndef NCHAN_ISM_PARAMETER
    ,const int16_t num_obj                                       /* i  : number of objects in the bitstream          */
#endif
@@ -936,7 +929,6 @@ ivas_error ivas_ism_dtx_open(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                      */
);

#ifdef DISCRETE_ISM_DTX_CNG
/*! r: indication of DTX frame */
int16_t ivas_ism_dtx_enc(
    ISM_DTX_HANDLE hISMDTX,                                     /* i/o: ISM DTX handle                              */
@@ -949,20 +941,12 @@ int16_t ivas_ism_dtx_enc(
    int16_t md_diff_flag[],                                     /* o  : metadata differential flag                  */
    int16_t *sid_flag                                           /* o  : indication of SID frame                     */
);
#else
/*! r: indication of DTX frame */
int16_t ivas_ism_dtx_enc(
    Encoder_Struct *st_ivas,                                    /* i/o: IVAS encoder structure                      */
    int16_t *sid_flag                                           /* o  : indication of SID frame                     */
);
#endif

ivas_error ivas_ism_dtx_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    int16_t *nb_bits_metadata                                   /* o  : number of metadata bits                     */
);

#ifdef DISCRETE_ISM_DTX_CNG
void ivas_ism_metadata_sid_enc(
    ISM_DTX_HANDLE hISMDTX,                                     /* i/o: ISM DTX handle                              */
    const int16_t flag_noisy_speech,                            /* i  : noisy speech flag                           */
@@ -975,19 +959,7 @@ void ivas_ism_metadata_sid_enc(
    BSTR_ENC_HANDLE hBstr,                                      /* i/o: bitstream handle                            */
    int16_t nb_bits_metadata[]                                  /* o  : number of metadata bits                     */
);
#else
void ivas_param_ism_metadata_dtx_enc(
    BSTR_ENC_HANDLE hBstr,                                      /* i/o: bitstream handle                            */
    ISM_METADATA_HANDLE hIsmMeta[],                             /* i  : ISM metadata handles                        */
    ISM_DTX_HANDLE hISMDTX,                                     /* i/o: ISM DTX handle                              */
    PARAM_ISM_CONFIG_HANDLE hParamIsm                           /* i  : Param ISM Enc Handle                        */
#ifdef NCHAN_ISM_PARAMETER
   ,const int16_t nchan_ism                                     /* i  : number of ISM channels                      */
#endif
);
#endif

#ifdef DISCRETE_ISM_DTX_CNG
void ivas_ism_metadata_sid_dec(
    SCE_DEC_HANDLE hSCE[MAX_SCE],                               /* i/o: SCE encoder structure                       */
    const int32_t ism_total_brate,                              /* i  : ISms total bitrate                          */
@@ -1000,11 +972,6 @@ void ivas_ism_metadata_sid_dec(
    ISM_METADATA_HANDLE hIsmMeta[],                             /* i/o: ISM metadata handles                        */
    int16_t nb_bits_metadata[]                                  /* o  : number of metadata bits                     */
);
#else
void ivas_param_ism_metadata_dtx_dec(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
);
#endif

void ivas_ism_get_sce_id_dtx(
    ISM_DTX_HANDLE hISMDTX,                                     /* i/o: ISM DTX handle                              */
@@ -1024,7 +991,6 @@ void ivas_ism_coh_estim_dtx_enc(
    const int16_t input_frame                                   /* i  : input frame length                          */
);

#ifdef DISCRETE_ISM_DTX_CNG
void update_last_metadata(
    const int16_t nchan_ism,                                    /* i  : number of objects                           */
    ISM_METADATA_HANDLE hIsmMeta[],                             /* i/o: ISM metadata handles                        */
@@ -1040,7 +1006,6 @@ void ivas_get_ism_sid_quan_bitbudget(
    int16_t *nBits_coh,                                         /* o  : number of Q bits for coherence              */
    int16_t *nBits_sce_id                                       /* o  : number of Q bits for sce_id_dtx             */
);
#endif


/*----------------------------------------------------------------------------------*
+0 −2
Original line number Diff line number Diff line
@@ -81,12 +81,10 @@ typedef struct
    int16_t last_radius_idx; /* last frame index of coded radius */
    int16_t radius_diff_cnt; /* FEC counter of consecutive differentially radius coded frames */

#ifdef DISCRETE_ISM_DTX_CNG
    float last_azimuth;        /* MD smoothing in DTX- last Q azimuth value */
    float last_elevation;      /* MD smoothing in DTX - last Q elevation value */
    float last_true_azimuth;   /* MD smoothing in DTX- last true Q azimuth value */
    float last_true_elevation; /* MD smoothing in DTX- last true Q elevation value */
#endif

} ISM_METADATA_FRAME, *ISM_METADATA_HANDLE;

+0 −1
Original line number Diff line number Diff line
@@ -141,7 +141,6 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */

#define DISCRETE_ISM_DTX_CNG                            /* FhG/VA: contribution 15 - DTX/CNG for (discrete) ISM */
#define NCHAN_ISM_PARAMETER                             /* VA: make 'nchan_ism' parameter part of st_ivas/hEncoderConfig */
#define FIX_382_MASA_META_FRAMING_ASYNC                 /* Nokia: Issue 382: detect potential MASA metadata framing offset */
#define FIX_386_CORECODER_RECONFIG                      /* VA: Issue 386: Resolve ToDo comments in CoreCoder reconfig. */
Loading