Commit 3df31973 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into 1700_basop_PortFlpMR1511

parents a453868d 86dffae6
Loading
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 ) )
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,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 ) */
@@ -112,6 +111,7 @@
#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_1065_ISM_MD_HANDLE                    /* VA: issue 1065: Allocate only the necessary number of ISM MD decoder handles. */

+15 −4
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 ) )
@@ -2690,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 ) )
        {
+0 −12
Original line number Diff line number Diff line
@@ -288,12 +288,8 @@ ivas_error ivas_jbm_dec_tc_fx(
                return error;
            }

#ifdef FIX_1043_JBM_MD_BUFFER
            test();
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
            {
                ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas );
            }
@@ -831,9 +827,7 @@ ivas_error ivas_jbm_dec_tc_fx(

            ivas_omasa_rearrange_channels_fx( p_output_fx, nchan_transport_ism, output_frame );
#endif
#ifdef FIX_1043_JBM_MD_BUFFER
            IF( st_ivas->hDecoderConfig->Opt_tsm )
#endif
            {
                ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas );
            }
@@ -1623,12 +1617,8 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(

        test();
        test();
#ifdef FIX_1043_JBM_MD_BUFFER
        test();
        IF( ( EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
        IF( ( EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
        {
            ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
        }
@@ -1749,9 +1739,7 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(
        IF( EQ_32( st_ivas->renderer_type, RENDERER_OMASA_MIX_EXT ) || EQ_32( st_ivas->renderer_type, RENDERER_OMASA_OBJECT_EXT ) )
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
#ifdef FIX_1043_JBM_MD_BUFFER
            IF( st_ivas->hDecoderConfig->Opt_tsm )
#endif
            {
                ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
            }
+8 −0
Original line number Diff line number Diff line
@@ -700,10 +700,18 @@ void ivas_mct_core_enc_fx(
        nAvailBits = sub( nAvailBits, IVAS_FORMAT_SIGNALING_NBITS_EXTENDED );
        nAvailBits = sub( nAvailBits, SBA_ORDER_BITS + SBA_PLANAR_BITS );
        test();
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
        /*MCT is used at bitrates > 80 kbps and additional 1 bit is present at these bitrates*/
        if ( EQ_32( ivas_format, SBA_ISM_FORMAT ) )
        {
            nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS;
        }
#else
        if ( EQ_32( ivas_format, SBA_ISM_FORMAT ) && GT_16( nChannels, 4 ) )
        {
            nAvailBits = sub( nAvailBits, IVAS_COMBINED_FORMAT_SIGNALLING_BITS );
        }
#endif
    }

    FOR( ( cpe_id = 0, i = 0 ); cpe_id < nCPE; cpe_id++ )
Loading