Commit 47547af6 authored by JÜRGEN Gerstacker's avatar JÜRGEN Gerstacker
Browse files

Merge branch 'main' into 1811-w_shl-w_shr-called-with-exceeding-shift-values

parents facc81e0 14823b69
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -397,8 +397,13 @@ void ivas_get_dirac_sba_max_md_bits_fx(
        /* OSBA needs an additional 2-bits safety margin to avoid acelp crashes */
        IF( EQ_32( ivas_format, SBA_ISM_FORMAT ) )
        {
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
            ( *metadata_max_bits ) = sub( ( *metadata_max_bits ), 7 );
            move16();
#else
            ( *metadata_max_bits ) = sub( ( *metadata_max_bits ), 3 );
            move16();
#endif
        }
    }
    ELSE IF( LE_32( sba_total_brate, IVAS_32k ) )
+14 −2
Original line number Diff line number Diff line
@@ -2376,9 +2376,20 @@ ivas_error ivas_ism_dec_config_fx(

ivas_error ivas_ism_metadata_dec_create_fx(
    Decoder_Struct *st_ivas,    /* i/o: IVAS decoder structure                      */
#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
    const Word16 n_ISms,        /* i  : number of separately coded objects          */
#else
    const Word16 n_ISms,       /* i  : number of objects           */
#endif
    Word32 element_brate_tmp[] /* o  : element bitrate per object                   */
);

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
void ivas_ism_reset_metadata_handle_dec_fx(
    ISM_METADATA_HANDLE hIsmMeta /* i/o: ISM metadata handle                         */
);

#endif
ivas_error ivas_sba_dec_reconfigure_fx(
    Decoder_Struct *st_ivas,  /* i/o: IVAS decoder structure              */
    UWord16 *nSamplesFlushed, /* o  : number of samples flushed           */
@@ -2394,6 +2405,7 @@ void ivas_spar_md_dec_matrix_close_fx(
    ivas_spar_md_dec_state_t *hMdDecoder, /* i/o: SPAR MD decoder handle      */
    const Word16 num_channels             /* i  : number of internal channels */
);

ivas_error ivas_spar_dec_open_fx(
    Decoder_Struct *st_ivas,        /* i/o: IVAS decoder handle        */
    const Word16 spar_reconfig_flag /* i  : SPAR reconfiguration flag  */
+4 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@
#define FIX_1044_ISM_REND_MEMORY                        /* VA: issue 1044: Lower the memory of the ISM renderer handle. */

#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define FIX_1043_JBM_MD_BUFFER                          /* VA: issue  1043: JBM MD handle allocation is avoided in non-JBM EXT operations */

#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
@@ -114,6 +113,10 @@
#define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB     /* FhG: fix bug in TD MDCT-Stereo concealment */
#define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG               /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */
#define FIX_1060_USAN_ARRAY_BOUNDS                      /* FhG: issue 1060: USAN array-bounds errors */
#define NONBE_FIX_SBA_SIGNALING_BITS_B                  /* FhG: issue 1061: option B: signal sba order additionally in OSBA */
#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING            /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */
#define NONBE_FIX_1065_ISM_MD_HANDLE                    /* VA: issue 1065: Allocate only the necessary number of ISM MD decoder handles. */
#define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP               /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */

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

+4 −0
Original line number Diff line number Diff line
@@ -1287,7 +1287,11 @@ void open_decoder_LPD_ivas_fx(
        st->inv_gamma = GAMMA16k_INV;
        move16();
    }
#ifdef NONBE_FIX_1028_1DB_TCX_LEVEL_DROP
    ELSE IF( GT_16( st->element_mode, EVS_MONO ) && GT_32( st->sr_core, INT_FS_16k ) )
#else
    ELSE IF( GT_32( st->sr_core, INT_FS_16k ) && EQ_16( st->element_mode, IVAS_CPE_MDCT ) )
#endif
    {
        st->gamma = GAMMA16k;
        move16();
+36 −6
Original line number Diff line number Diff line
@@ -477,14 +477,19 @@ ivas_error ivas_dec_setup(
            move16();

            test();
#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
            IF( LT_32( ivas_total_brate, IVAS_24k4 ) || GE_32( ivas_total_brate, IVAS_256k ) )
            {
#endif
                /* read Ambisonic (SBA) planar flag */
                st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read];
                move16();
                num_bits_read = add( num_bits_read, SBA_PLANAR_BITS );
#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
            }
#endif

            /* read Ambisonic (SBA) order (0 for signaling OSBA format at low bitrates)*/
            st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1];
            move16();
            st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) );
@@ -492,11 +497,21 @@ ivas_error ivas_dec_setup(
            num_bits_read = add( num_bits_read, SBA_ORDER_BITS );

            /* read Ambisonic (SBA) order */
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
            /* read the real Ambisonic order when the above bits are used to signal OSBA format */
            if ( LT_32( ivas_total_brate, IVAS_24k4 ) )
            {
                st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1];
                st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
                num_bits_read += SBA_ORDER_BITS;
            }
#else
            if ( LT_32( ivas_total_brate, IVAS_256k ) )
            {
                st_ivas->sba_order = 3;
                move16();
            }
#endif

            test();
            IF( st_ivas->ini_frame > 0 && NE_32( ivas_total_brate, st_ivas->last_active_ivas_total_brate ) )
@@ -1493,7 +1508,11 @@ ivas_error ivas_init_decoder_fx(
            }
        }

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
        IF( ( error = ivas_ism_metadata_dec_create_fx( st_ivas, st_ivas->nchan_ism, element_brate_tmp ) ) != IVAS_ERR_OK )
#else
        IF( NE_32( ( error = ivas_ism_metadata_dec_create_fx( st_ivas, st_ivas->nSCE, element_brate_tmp ) ), IVAS_ERR_OK ) )
#endif
        {
            return error;
        }
@@ -1892,6 +1911,7 @@ ivas_error ivas_init_decoder_fx(
            move16();
            ism_total_brate = sep_object_brate[k - 2][0];
            move32();

            IF( NE_32( ( error = create_sce_dec( st_ivas, 0, ism_total_brate ) ), IVAS_ERR_OK ) )
            {
                return error;
@@ -1899,10 +1919,24 @@ ivas_error ivas_init_decoder_fx(

            reset_indices_dec( st_ivas->hSCE[0]->hCoreCoder[0] );

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
            {
                if ( ( error = ivas_ism_metadata_dec_create_fx( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
            else
            {
#endif
                IF( NE_32( ( error = ivas_ism_metadata_dec_create_fx( st_ivas, 1, NULL ) ), IVAS_ERR_OK ) )
                {
                    return error;
                }
#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
            }
#endif
        }
        ELSE IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
        {
@@ -2671,12 +2705,8 @@ ivas_error ivas_init_decoder_fx(
            return error;
        }
    }
#ifdef FIX_1043_JBM_MD_BUFFER
    test();
    IF( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm )
#else
    IF( st_ivas->hJbmMetadata == NULL )
#endif
    {
        IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
Loading