Commit 0086bc10 authored by emerit's avatar emerit
Browse files

Merge branch 'main' into 1963_basop_portFltMR-1568-1471-1690

parents 5b380fc5 8c2c66c7
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1415,10 +1415,15 @@ typedef enum
#define LFE_CHANNEL                             3

#define MIN_LFE_NRG                             0.5f
#ifdef ADJUST_MCT_CHANNELS_MAX   
#define MCT_MAX_CHANNELS                        11                          /* == 7.1.4 LS channels without the LFE channel */
#define MCT_MAX_BLOCKS                          ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/
#else
#define MCT_MAX_CHANNELS                        MAX_TRANSPORT_CHANNELS
#define MCT_MAX_BLOCKS                          ( MCT_MAX_CHANNELS / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/

#define MAX_NUM_DATA                            max( MCT_MAX_CHANNELS, 4 )
#endif

#define NBBITS_MCT_RATIO                        4
#define BITRATE_MCT_RATIO_RANGE                 ( 1 << NBBITS_MCT_RATIO )   /* Range of the coded bitrate distribution ratio */
+2 −1
Original line number Diff line number Diff line
@@ -126,7 +126,8 @@
#define USE_FASTCONV_PARAMBIN_16BIT_ROM                 /* if desactivated old rom hrtf tables is used */
#endif
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */

#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK       /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
#define ADJUST_MCT_CHANNELS_MAX                         /* FhG: set correct max mct channels constant*/

/* #################### End BASOP porting switches ############################ */

+21 −5
Original line number Diff line number Diff line
@@ -75,9 +75,16 @@ void ivas_mct_side_bits_fx(
    {
        FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
        {
#ifdef ADJUST_MCT_CHANNELS_MAX
            IF( LT_16( i, MCT_MAX_CHANNELS ) )
            {
#endif
                sts[i] = hCPE[cpe_id]->hCoreCoder[ch];
                i = add( i, 1 );
                move16();
#ifdef ADJUST_MCT_CHANNELS_MAX
            }
#endif
        }
    }

@@ -218,10 +225,19 @@ void ivas_mct_core_dec(
    {
        FOR( ch = 0; ch < CPE_CHANNELS; ( ch++, i++ ) )
        {
#ifdef ADJUST_MCT_CHANNELS_MAX
            IF( LT_16( i, MCT_MAX_CHANNELS ) )
            {
#endif
                sts[i] = hCPE[cpe_id]->hCoreCoder[ch];
#ifdef ADJUST_MCT_CHANNELS_MAX
            }
#endif
        }
    }

#ifndef ADJUST_MCT_CHANNELS_MAX
    /*seems like obsolete code*/
    i = 0;
    move16();
    FOR( ch = 0; ch < nChannels; ch++ )
@@ -232,7 +248,7 @@ void ivas_mct_core_dec(
        }
        i = add( i, 1 );
    }

#endif
    bfi = sts[0]->bfi;
    move16();

+10 −1
Original line number Diff line number Diff line
@@ -3537,7 +3537,11 @@ void QuantizeTCXSpectrum_fx(
            move16();
        }

#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
        tmp32 = L_deposit_l( 0 );
#else
        Word64 tmp64 = 0;
#endif
        FOR( i = 0; i < L_spec; i++ )
        {
            spectrum_fx[i] = L_mult( sqQ[i], 1 << ( 30 - SPEC_EXP_DEC ) );
@@ -3546,13 +3550,18 @@ void QuantizeTCXSpectrum_fx(
#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
            tmp32 = L_macNs_co( tmp32, abs_s( sqQ[i] ), i, &Carry, &Overflow );
#else
            tmp32 = L_macNs( tmp32, abs_s( sqQ[i] ), i );
            tmp64 = W_mac_16_16( tmp64, abs_s( sqQ[i] ), i );
#endif
        }
        *spectrum_e = SPEC_EXP_DEC;
        move16();

#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
        *nf_seed = extract_l( tmp32 );
#else
        assert( W_extract_h( tmp64 ) == 0 );
        *nf_seed = extract_l( W_extract_l( tmp64 ) );
#endif
    }
    ELSE
    {
+10 −1
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ void ivas_mct_core_enc_fx(
        inv_spectrum_fx[ch][1] = inv_spectrum_long_cpe0_fx[ch] + N_TCX10_MAX;
        powerSpec_fx[ch] = powerSpec_long_cpe0_fx[ch];
    }

    FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
    {
        q_powSpec[ch] = 0;
@@ -332,7 +333,15 @@ void ivas_mct_core_enc_fx(
    {
        FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
        {
#ifdef ADJUST_MCT_CHANNELS_MAX
            IF( LT_16( add( i_mult( cpe_id, CPE_CHANNELS ), ch ), nChannels ) )
            {
#endif
                sts[i] = hCPE[cpe_id]->hCoreCoder[ch];
#ifdef ADJUST_MCT_CHANNELS_MAX
            }
#endif

            IF( EQ_32( hCPE[cpe_id]->hCoreCoder[ch]->mct_chan_mode, MCT_CHAN_MODE_IGNORE ) )
            {
                i = add( i, 1 );
Loading