Commit 4106b421 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER

parent 935c16c2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@
/* #################### Start BASOP porting switches ############################ */

#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_FIX_1128_OSBA_EXT_OUTPUT_ORDER            /* FhG: issue 1128: set output ambisonics order to input order for EXT output  */
#define FIX_1138_SBA_EXT_ERROR_PRINTOUT                 /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */
#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 FIX_745_FIX_DATA_TYPE_CONVERSION                /* VA: issue 745: implicit data type conversion when calling IVAS_DEC_Configure() */
+0 −36
Original line number Diff line number Diff line
@@ -54,14 +54,9 @@ static ivas_error ivas_read_format( Decoder_Struct *st_ivas, int16_t *num_bits_r

static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas );

#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
static AUDIO_CONFIG ivas_set_audio_config_from_sba_order( const int16_t sba_order );
#else
static AUDIO_CONFIG ivas_set_output_config_from_sba_order( const int16_t sba_order );
#endif


#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
/*-------------------------------------------------------------------*
 * ivas_set_audio_config_from_sba_order()
 *
@@ -72,9 +67,6 @@ static AUDIO_CONFIG ivas_set_output_config_from_sba_order( const int16_t sba_ord
static AUDIO_CONFIG ivas_set_audio_config_from_sba_order(
    const int16_t sba_order /* i  : Ambisonic (SBA) order           */
)
#else
static AUDIO_CONFIG ivas_set_output_config_from_sba_order( const int16_t sba_order )
#endif
{
    AUDIO_CONFIG output_config;

@@ -92,12 +84,8 @@ static AUDIO_CONFIG ivas_set_output_config_from_sba_order( const int16_t sba_ord
            output_config = IVAS_AUDIO_CONFIG_HOA3;
            break;
        default:
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
            output_config = IVAS_AUDIO_CONFIG_INVALID;
            break;
#else
            assert( 0 );
#endif
    }

    return output_config;
@@ -559,11 +547,7 @@ ivas_error ivas_dec_setup(
#ifndef NONBE_FIX_1052_SBA_EXT_FIX
            if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
            {
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
                st_ivas->hDecoderConfig->output_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
#else
                st_ivas->hDecoderConfig->output_config = ivas_set_output_config_from_sba_order( st_ivas->sba_order );
#endif
                st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config );
            }
#endif
@@ -807,11 +791,7 @@ ivas_error ivas_dec_setup(
#ifndef NONBE_FIX_1052_SBA_EXT_FIX
        if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
            st_ivas->hDecoderConfig->output_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
#else
            st_ivas->hDecoderConfig->output_config = ivas_set_output_config_from_sba_order( st_ivas->sba_order );
#endif
            st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config );
        }
#endif
@@ -1361,11 +1341,7 @@ ivas_error ivas_init_decoder(
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
#endif
        {
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
            hDecoderConfig->nchan_out = audioCfg2channels( ivas_set_audio_config_from_sba_order( st_ivas->sba_order ) );
#else
            hDecoderConfig->nchan_out = audioCfg2channels( IVAS_AUDIO_CONFIG_HOA3 );
#endif
            hDecoderConfig->nchan_out += st_ivas->nchan_ism;
        }
        else if ( st_ivas->ivas_format == MASA_ISM_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
@@ -1391,7 +1367,6 @@ ivas_error ivas_init_decoder(
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config );
        st_ivas->intern_config = st_ivas->transport_config;
    }
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
#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
@@ -1401,7 +1376,6 @@ ivas_error ivas_init_decoder(
        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 );
    }
#endif
    else
    {
        ivas_output_init( &( st_ivas->hOutSetup ), output_config );
@@ -1415,16 +1389,6 @@ ivas_error ivas_init_decoder(
        st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config );
    }

#ifndef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
    if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER;
        st_ivas->intern_config = IVAS_AUDIO_CONFIG_HOA3;
        st_ivas->hOutSetup.output_config = IVAS_AUDIO_CONFIG_HOA3;
        st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( IVAS_AUDIO_CONFIG_HOA3 );
    }

#endif
    /* Only initialize transport setup if it is used */
    if ( st_ivas->transport_config != IVAS_AUDIO_CONFIG_INVALID )
    {
+0 −4
Original line number Diff line number Diff line
@@ -344,11 +344,7 @@ void ivas_renderer_select(
            {
                *internal_config = IVAS_AUDIO_CONFIG_FOA;
            }
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
            else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#else
            if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
            {
                *internal_config = IVAS_AUDIO_CONFIG_HOA3;
            }