Commit 6f22a699 authored by vaclav's avatar vaclav
Browse files

keep only ISM_25k6_HZ_CORE switch

- correct FB -> SWB decision logic
parent efa365ca
Loading
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1477,9 +1477,6 @@ static int16_t allocate_unused(

/*! r: ACELP16k flag */
int16_t set_ACELP_flag(
#ifdef ISM_16_KHZ_CORE
    const ISM_MODE ism_mode, /* i  : ISM mode                    */
#endif
    const int16_t element_mode,  /* i  : element mode                */
    const int32_t element_brate, /* i  : element bitrate             */
    const int32_t total_brate,   /* i  : total bitrate per channel   */
@@ -1518,12 +1515,6 @@ int16_t set_ACELP_flag(
    }
    else if ( element_mode == IVAS_SCE )
    {
#ifdef ISM_16_KHZ_CORE
        if ( ism_mode == ISM_MODE_DISC && element_brate >= SCE_CORE_16k_LOW_LIMIT_ISM )
        {
            return 1;
        }
#endif
        if ( element_brate >= SCE_CORE_16k_LOW_LIMIT )
        {
            return 1;
+1 −1
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ int32_t getCoreSamplerateMode2(
    const int16_t rf_mode        /* i  : flag to signal the RF mode     */
#ifdef ISM_25k6_HZ_CORE
    ,
    const IVAS_FORMAT is_ism_format
    const IVAS_FORMAT is_ism_format /* i  : flag indicating ISM format     */
#endif
)
{
+0 −10
Original line number Diff line number Diff line
@@ -291,9 +291,6 @@ typedef enum
#define ACELP_12k8_HIGH_LIMIT                   24350                       /* max. per channel bitrate where the ACELP@12.8kHz is supported */
#define ACELP_16k_LOW_LIMIT                     13250                       /* min. per channel bitrate where the ACELP@16kHz is supported */
#define SCE_CORE_16k_LOW_LIMIT                  17000                       /* min. SCE bitrate where the ACELP@16kHz is supported; must be >= (ACELP_16k_LOW_LIMIT + SWB_TBE_1k6) */
#ifdef ISM_16_KHZ_CORE
#define SCE_CORE_16k_LOW_LIMIT_ISM              15900                       /* min. SCE bitrate where the ACELP@16kHz is supported; must be >= (ACELP_16k_LOW_LIMIT + SWB_TBE_1k6) */
#endif
#define MIN_BRATE_AVQ_EXC                       ACELP_29k00                 /* min. per channel bitrate where the AVQ excitation stage is supported */
#define MAX_BRATE_AVQ_EXC_TD                    40000                       /* max. per channel bitrate where the AVQ excitation stage in time domain is supported */

@@ -314,9 +311,6 @@ typedef enum
#define MIN_BRATE_SWB_SCE                       ACELP_9k60                  /* min. SCE bitrate where SWB is supported */
#define MIN_BRATE_SWB_STEREO                    IVAS_13k2                   /* min. stereo bitrate where SWB is supported */
#define MIN_BRATE_FB_STEREO                     IVAS_32k                    /* min. SCE and stereo bitrate where FB is supported */
#ifdef ISM_FB
#define MIN_BRATE_FB_STEREO_ISM                 24000                       /* min. SCE bitrate where FB is supported in ISM format */
#endif

#define MIN_TDM_BRATE_WB_TBE_1k05               12000                       /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */
#define MIN_BRATE_WB_TBE_1k05                   9650                        /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */
@@ -334,11 +328,7 @@ typedef enum
 * ISM Constants
 *----------------------------------------------------------------------------------*/

#ifdef ISM_16_KHZ_CORE
#define ISM_NB_BITS_METADATA_NOMINAL            ( ( SCE_CORE_16k_LOW_LIMIT_ISM - ACELP_16k_LOW_LIMIT ) / FRAMES_PER_SEC ) /* nominal number of metadata bits - used for configuration of Core-Coder modules */
#else
#define ISM_NB_BITS_METADATA_NOMINAL            ( ( SCE_CORE_16k_LOW_LIMIT - ACELP_16k_LOW_LIMIT ) / FRAMES_PER_SEC ) /* nominal number of metadata bits - used for configuration of Core-Coder modules */
#endif

#define ISM_METADATA_VAD_FLAG_BITS              1
#define ISM_METADATA_FLAG_BITS                  2
+4 −30
Original line number Diff line number Diff line
@@ -92,9 +92,6 @@ ivas_error ivas_ism_config(
    const int16_t nchan_transport,            /* i  : number of transport channels   */
    const int16_t nchan_ism,                  /* i  : number of objects              */
    ISM_METADATA_HANDLE hIsmMeta[],           /* i/o: ISM metadata handles           */
#ifdef ISM_16_KHZ_CORE
    const ISM_MODE ism_mode, /* i  : ISM mode                       */
#endif
    const int16_t ism_extended_metadata_flag, /* i  : extended metadata flag         */
    const int16_t localVAD[MAX_NUM_OBJECTS],  /* i  : local VAD flag                 */
    const int16_t ism_imp[],                  /* i  : ISM importance flags           */
@@ -110,23 +107,12 @@ ivas_error ivas_ism_config(
    int16_t tmp;
    int16_t ism_metadata_flag_global;
    int16_t n_ISms;
#ifdef ISM_16_KHZ_CORE
    int32_t sce_core_16k_limit;
#endif
    ivas_error error;

    error = IVAS_ERR_OK;

    n_ISms = nchan_transport;

#ifdef ISM_16_KHZ_CORE
    sce_core_16k_limit = SCE_CORE_16k_LOW_LIMIT_ISM;
    if ( ism_mode == ISM_MODE_PARAM || ism_extended_metadata_flag )
    {
        sce_core_16k_limit = SCE_CORE_16k_LOW_LIMIT;
    }
#endif

    /* initialization */
    ism_metadata_flag_global = 0;
    bits_side = 0;
@@ -231,17 +217,9 @@ ivas_error ivas_ism_config(
            {
                limit = MIN_BRATE_WB_BWE / FRMS_PER_SECOND;
            }
#ifdef ISM_16_KHZ_CORE
            else if ( element_brate[ch] >= sce_core_16k_limit ) /* replicate function set_ACELP_flag() -> it is not intended to switch the ACELP internal sampling rate within an object */
#else
            else if ( element_brate[ch] >= SCE_CORE_16k_LOW_LIMIT ) /* replicate function set_ACELP_flag() -> it is not intended to switch the ACELP internal sampling rate within an object */
#endif
            {
#ifdef ISM_16_KHZ_CORE
                /*limit = sce_core_16k_limit;*/
#else
                /*limit = SCE_CORE_16k_LOW_LIMIT;*/
#endif
                limit = ( ACELP_16k_LOW_LIMIT + SWB_TBE_1k6 ) / FRMS_PER_SECOND;
            }

@@ -293,11 +271,7 @@ ivas_error ivas_ism_config(
        for ( ch = 0; ch < n_ISms; ch++ )
        {
            limit_high = IVAS_512k / FRMS_PER_SECOND;
#ifdef ISM_16_KHZ_CORE
            if ( element_brate[ch] < sce_core_16k_limit ) /* replicate function set_ACELP_flag() -> it is not intended to switch the ACELP internal sampling rate within an object */
#else
            if ( element_brate[ch] < SCE_CORE_16k_LOW_LIMIT ) /* replicate function set_ACELP_flag() -> it is not intended to switch the ACELP internal sampling rate within an object */
#endif
            {
                limit_high = ACELP_12k8_HIGH_LIMIT / FRMS_PER_SECOND;
            }
+0 −10
Original line number Diff line number Diff line
@@ -214,9 +214,6 @@ ivas_error pre_proc_front_ivas(
    const int16_t force_front_vad,                              /* i  : flag to force VAD decision                 */
    const int16_t front_vad_dtx_flag,                           /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const int32_t ivas_total_brate                             /* i  : IVAS total bitrate                         */
#ifdef ISM_FB
    ,const ISM_MODE ism_mode
#endif
);

ivas_error pre_proc_ivas(
@@ -591,10 +588,6 @@ void ivas_signaling_enc(
    const int32_t element_brate,                                /* i  : element bitrate                         */
    const int16_t tdm_SM_flag,                                  /* i  : channel combination scheme flag in TD stereo */
    const int16_t tdm_Pitch_reuse_flag                          /* i  : primary channel pitch reuse flag in TD stereo*/
#ifdef ISM_FB
    ,
    const ISM_MODE ism_mode
#endif
);

void ivas_decision_matrix_dec(
@@ -879,9 +872,6 @@ ivas_error ivas_ism_config(
    const int16_t nchan_transport,                              /* i  : number of transport channels                */
    const int16_t nchan_ism,                                    /* i  : number of objects                           */
    ISM_METADATA_HANDLE hIsmMeta[],                             /* i/o: ISM metadata handles                        */
#ifdef ISM_16_KHZ_CORE
    const ISM_MODE ism_mode,                                    /* i  : ISM mode                                    */
#endif
    const int16_t ism_extended_metadata_flag,                   /* i  : extended metadata flag                      */
    const int16_t localVAD[MAX_NUM_OBJECTS],                    /* i  : local VAD flag                              */
    const int16_t ism_imp[],                                    /* i  : ISM importance flags                        */
Loading