Commit 8732fd3a authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1052_SBA_EXT_FIX

parent b26190ce
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3617,13 +3617,9 @@ ivas_error ivas_masa_encode_fx(
void ivas_write_format_sid_fx(
    const IVAS_FORMAT ivas_format,                      /* i  : IVAS format                             */
    const Word16 element_mode,                          /* i  : element bitrate                         */
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
    BSTR_ENC_HANDLE hBstr,                              /* i/o: encoder bitstream handle                */
    const Word16 sba_order,                             /* i  : Ambisonic (SBA) order                   */
    const Word16 sba_planar                             /* i  : SBA planar flag                         */
#else
BSTR_ENC_HANDLE hBstr          /* i/o: encoder bitstream handle                */
#endif
);

void ivas_write_format_fx( 
+0 −1
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@
/* #################### Start BASOP porting switches ############################ */

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */

#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1289_STEREO_SW_TO_MONO                    /* VA: issue 1289: Fix glitch when stereo signal is decoded to mono n TD->DFT switching */
+0 −28
Original line number Diff line number Diff line
@@ -619,13 +619,6 @@ ivas_error ivas_dec_setup(
            move16();
            st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) );
            move16();
#ifndef NONBE_FIX_1052_SBA_EXT_FIX
            IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
            {
                st_ivas->hDecoderConfig->output_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
                st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config );
            }
#endif
            num_bits_read = add( num_bits_read, SBA_ORDER_BITS );

            test();
@@ -917,13 +910,6 @@ ivas_error ivas_dec_setup(
                BREAK;
        }

#ifndef NONBE_FIX_1052_SBA_EXT_FIX
        IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
            st_ivas->hDecoderConfig->output_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
            st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config );
        }
#endif
        test();
        IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
        {
@@ -1389,10 +1375,8 @@ ivas_error ivas_init_decoder_front(
    move16();
    st_ivas->nCPE = 0;
    move16();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
    st_ivas->nchan_ism = 0;
    move16();
#endif
    st_ivas->nCPE_old = 0;
    move16();
    st_ivas->nchan_transport = -1;
@@ -1570,11 +1554,7 @@ ivas_error ivas_init_decoder_fx(
        {
            hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config );
        }
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
#else
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
#endif
        {
            hDecoderConfig->nchan_out = audioCfg2channels( ivas_set_audio_config_from_sba_order( st_ivas->sba_order ) );
            move16();
@@ -1611,11 +1591,7 @@ ivas_error ivas_init_decoder_fx(
        st_ivas->intern_config = st_ivas->transport_config;
        move32();
    }
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
    ELSE IF( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && ( st_ivas->ivas_format == SBA_ISM_FORMAT || st_ivas->ivas_format == SBA_FORMAT ) )
#else
    ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
#endif
    {
        st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config );
@@ -1880,12 +1856,8 @@ ivas_error ivas_init_decoder_fx(

        test();
        test();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
        test();
        IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) && !( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_FOA ) ) )
#else
        IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) )
#endif
        {
            IF( NE_32( ( error = ivas_dirac_dec_config_fx( st_ivas, DIRAC_OPEN ) ), IVAS_ERR_OK ) )
            {
+0 −4
Original line number Diff line number Diff line
@@ -396,15 +396,11 @@ void ivas_renderer_select(
        {
            test();
            test();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
            {
                /* 'internal_config' was already set in ivas_set_audio_config_from_sba_order() */
            }
            ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_HOA2 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_FOA ) )
#else
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_HOA2 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_FOA ) )
#endif
            {
                *internal_config = output_config;
                move16();
+0 −12
Original line number Diff line number Diff line
@@ -1857,11 +1857,7 @@ void ivas_spar_dec_upmixer_sf_fx(

    test();
    test();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
    IF( LT_32( hDecoderConfig->ivas_total_brate, IVAS_24k4 ) && ( EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_HOA2 ) || EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_HOA3 ) ) )
#else
    IF( ( LT_32( hDecoderConfig->ivas_total_brate, IVAS_24k4 ) ) && ( ( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_HOA2 ) ) || ( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_HOA3 ) ) ) )
#endif
    {
        Word16 q_cldfb = 6;
        move16();
@@ -1881,11 +1877,7 @@ void ivas_spar_dec_upmixer_sf_fx(

        test();
        test();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
        IF( LT_32( hDecoderConfig->ivas_total_brate, IVAS_24k4 ) && ( EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_HOA2 ) || EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_HOA3 ) ) )
#else
        IF( ( LT_32( hDecoderConfig->ivas_total_brate, IVAS_24k4 ) ) && ( ( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_HOA2 ) ) || ( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_HOA3 ) ) ) )
#endif
        {
            FOR( spar_band = 0; spar_band < num_spar_bands; spar_band++ )
            {
@@ -2028,13 +2020,9 @@ void ivas_spar_dec_upmixer_sf_fx(

    test();
    test();
#ifdef NONBE_FIX_1052_SBA_EXT_FIX
    test();
    test();
    IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) && !( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_FOA ) ) )
#else
    IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) )
#endif
    {
        ivas_dirac_dec_render_sf_fx( st_ivas, output_fx, nchan_internal, cldfb_in_ts_re_fx, cldfb_in_ts_im_fx );
    }
Loading