Commit 83965989 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/ivas-float-update' into 1701_ref_PortFlpMR1516

parents dd830387 2e2b8692
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -346,7 +346,11 @@ void ivas_get_dirac_sba_max_md_bits(
        /* OSBA needs an additional 2-bits safety margin to avoid acelp crashes */
        if ( ivas_format == SBA_ISM_FORMAT )
        {
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
            ( *metadata_max_bits ) -= 7;
#else
            ( *metadata_max_bits ) -= 3;
#endif
        }
    }
    else if ( sba_total_brate <= IVAS_32k )
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,6 @@
#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM   /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */
#ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM
#endif
#define FIX_1043_JBM_MD_BUFFER                          /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */

#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
@@ -194,6 +193,7 @@
#define FIX_1044_ISM_REND_MEMORY                        /* VA: issue 1044: Lower the memory of the ISM renderer handle. */
#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_984_OMASA_EXT_OUTPUT                  /* Nok: issue 1497 - porting OMASA EXT MR   */
#define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP               /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */
+15 −5
Original line number Diff line number Diff line
@@ -415,22 +415,36 @@ ivas_error ivas_dec_setup(
            /* the number of objects is written at the end of the bitstream, in the SBA metadata */
            st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1;

#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
            if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_256k )
            {
#endif
                /* read Ambisonic (SBA) planar flag */
                st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read];
                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];
            st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
            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 ( 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 ( ivas_total_brate < IVAS_256k )
            {
                st_ivas->sba_order = 3;
            }
#endif

            if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate )
            {
@@ -2202,11 +2216,7 @@ ivas_error ivas_init_decoder(
    }


#ifdef FIX_1043_JBM_MD_BUFFER
    if ( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm )
#else
    if ( st_ivas->hJbmMetadata == NULL )
#endif
    {
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
+0 −12
Original line number Diff line number Diff line
@@ -214,11 +214,7 @@ ivas_error ivas_jbm_dec_tc(
                return error;
            }

#ifdef FIX_1043_JBM_MD_BUFFER
            if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm )
#else
            if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
            {
                ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas );
            }
@@ -427,9 +423,7 @@ ivas_error ivas_jbm_dec_tc(

            ivas_omasa_rearrange_channels( p_output, 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 );
            }
@@ -831,11 +825,7 @@ void ivas_jbm_dec_feed_tc_to_renderer(
    {
        ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );

#ifdef FIX_1043_JBM_MD_BUFFER
        if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm )
#else
        if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
        {
            ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
        }
@@ -916,9 +906,7 @@ void ivas_jbm_dec_feed_tc_to_renderer(
        {
            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 );
            }
+12 −0
Original line number Diff line number Diff line
@@ -497,10 +497,18 @@ void ivas_mct_core_enc(
    {
        nAvailBits -= IVAS_FORMAT_SIGNALING_NBITS_EXTENDED;
        nAvailBits -= SBA_ORDER_BITS + SBA_PLANAR_BITS;
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
        /*MCT is used at bitrates > 80 kbps and additional 1 bit is present at these bitrates*/
        if ( ivas_format == SBA_ISM_FORMAT )
        {
            nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS;
        }
#else
        if ( ivas_format == SBA_ISM_FORMAT && nChannels > 4 )
        {
            nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS;
        }
#endif
    }

    for ( cpe_id = 0, i = 0; cpe_id < nCPE; cpe_id++ )
@@ -574,7 +582,11 @@ void ivas_mct_core_enc(

#ifdef DEBUGGING
    format_bits = ( ivas_format == MC_FORMAT ? IVAS_FORMAT_SIGNALING_NBITS + MC_LS_SETUP_BITS : IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + SBA_ORDER_BITS + SBA_PLANAR_BITS );
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
    format_bits += ( ivas_format == SBA_ISM_FORMAT );
#else
    format_bits += ( ivas_format == SBA_ISM_FORMAT && nChannels > FOA_CHANNELS );
#endif
    mct_bits += hMCT->nBitsMCT + hMCT->nchan_out_woLFE;
    assert( ( total_brate + ( NBITS_BWIDTH + format_bits + mct_bits + sba_meta + lfe_bits ) * FRAMES_PER_SEC ) == ivas_total_brate );
#endif
Loading