Commit d3e1905f authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into discISM_DTX

- fix compilation when DISCRETE_ISM_DTX_CNG is disabled
- temporarily disable DISCRETE_ISM_DTX_CNG
parents b4c3b563 4365a5e3
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -983,6 +983,9 @@ void ivas_param_ism_metadata_dtx_enc(
    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

@@ -2805,7 +2808,9 @@ void ivas_mct_core_enc(
    CPE_ENC_HANDLE hCPE[MCT_MAX_BLOCKS],                        /* i/o: CPE encoder structures                  */
    const int16_t nChannels,                                    /* i  : number of channels to be coded          */
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
#ifndef DISABLE_BWD_MCT
    const int16_t switch_bw,                                    /* i  : flag bandwidth switch occurance         */
#endif
    const int16_t lfe_bits,                                     /* i  : bits spent for LFE                      */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
+3 −2
Original line number Diff line number Diff line
@@ -159,8 +159,9 @@
#endif

#define FIX_380_BFI_PARAMISM                            /* VA: issue 380 - fix metadata recovery in ParamISM BFI */
#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_MDCT_BASED_BWD                              /* FhG: fixes for BWD for issues with reaction to transients for MDCT-stereo and MCT */
//#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 */


/* ################## End DEVELOPMENT switches ######################### */
+5 −0
Original line number Diff line number Diff line
@@ -3827,8 +3827,13 @@ void bw_detect(
    const float signal_in[], /* i  : input signal                                */
    float *spectrum,         /* i  : MDCT spectrum                               */
    const float *enerBuffer  /* i  : energy buffer                               */
#ifdef FIX_MDCT_BASED_BWD
    ,
    const int16_t mct_on /* i  : flag MCT mode */
#endif
);


void set_bw(
    const int16_t element_mode,  /* i  : element mode                                */
    const int32_t element_brate, /* i  : element bitrate                             */
+8 −0
Original line number Diff line number Diff line
@@ -159,8 +159,12 @@ ivas_error ivas_dec(
            {
                return error;
            }
#else
#ifdef NCHAN_ISM_PARAMETER
            ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm );
#else
            ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm );
#endif
#endif
        }
        else /* ISM_MODE_DISC */
@@ -174,8 +178,12 @@ ivas_error ivas_dec(
            {
                return error;
            }
#else
#ifdef NCHAN_ISM_PARAMETER
            ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, NULL );
#else
            ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, NULL );
#endif
#endif
        }

+16 −2
Original line number Diff line number Diff line
@@ -123,8 +123,12 @@ ivas_error ivas_dec_setup(
            {
                return error;
            }
#else
#ifdef NCHAN_ISM_PARAMETER
            ivas_ism_dec_config( st_ivas );
#else
            ivas_ism_dec_config( st_ivas, nchan_ism );
#endif
#endif
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT )
@@ -425,12 +429,22 @@ static ivas_error ivas_read_format(
#ifndef DISCRETE_ISM_DTX_CNG
                if ( st_ivas->ism_mode == ISM_MODE_DISC )
                {
                    ivas_ism_dec_config( st_ivas, 1 ); /* currently DTX supported for 1 ISM when ISM Mode is DISC_ISM */
                    ivas_ism_dec_config( st_ivas
#ifndef NCHAN_ISM_PARAMETER
                                         ,
                                         1
#endif
                    ); /* currently DTX supported for 1 ISM when ISM Mode is DISC_ISM */
                }

                if ( st_ivas->ism_mode == ISM_MODE_PARAM )
                {
                    ivas_ism_dec_config( st_ivas, st_ivas->nSCE ); /* for Param-ISM, we need to generate 2 TCs */
                    ivas_ism_dec_config( st_ivas
#ifndef NCHAN_ISM_PARAMETER
                                         ,
                                         st_ivas->nSCE
#endif
                    ); /* for Param-ISM, we need to generate 2 TCs */
                }
#endif
                break;
Loading