Commit afa476ca authored by multrus's avatar multrus
Browse files

[cleanup] accept SBA_AND_OBJECTS, OSBA_BR_SWITCHING, FIX_691_OSBA_NULL_META

parent 0bdd149a
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -69,11 +69,7 @@ static

#define MIN_NUM_BITS_ACTIVE_FRAME 56
#define NUM_BITS_SID_IVAS_5K2     104
#ifdef SBA_AND_OBJECTS
#define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( IVAS_MAX_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * IVAS_MAX_FRAME_SIZE )
#else
#define MAX_OUTPUT_PCM_BUFFER_SIZE ( IVAS_MAX_OUTPUT_CHANNELS * IVAS_MAX_FRAME_SIZE )
#endif


#define IVAS_PUBLIC_ORIENT_TRK_NONE        ( 0 )
@@ -1790,10 +1786,8 @@ static ivas_error initOnFirstGoodFrame(
        }
        /* If outputting ISM, get number of objects, open output files and write zero metadata for initial bad frames */
        if ( *pBsFormat == IVAS_DEC_BS_OBJ || *pBsFormat == IVAS_DEC_BS_MASA_ISM
#ifdef SBA_AND_OBJECTS

             || *pBsFormat == IVAS_DEC_BS_SBA_ISM
#endif
        )
        {
            if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, pNumObj ) ) != IVAS_ERR_OK )
@@ -2170,9 +2164,7 @@ static ivas_error decodeG192(
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM
#ifdef SBA_AND_OBJECTS
                 || bsFormat == IVAS_DEC_BS_SBA_ISM
#endif
            )
            {
                if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK )
+0 −14
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ typedef union _EncInputFormatConfig
        IVAS_ENC_MASA_VARIANT masaVariant;
    } masa_ism;

#ifdef SBA_AND_OBJECTS
    struct EncSbaIsmConfig
    {
        int16_t numObjects;
@@ -103,7 +102,6 @@ typedef union _EncInputFormatConfig
        IVAS_ENC_SBA_ORDER order;
        bool isPlanar;
    } sba_ism;
#endif

} EncInputFormatConfig;

@@ -253,11 +251,7 @@ int main(
     * Print out file names
     *------------------------------------------------------------------------------------------*/

#ifdef SBA_AND_OBJECTS
    if ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM )
#else
    if ( arg.inputFormat == IVAS_ENC_INPUT_ISM )
#endif
    {
        for ( i = 0; i < arg.inputFormatConfig.ism.numObjects; i++ )
        {
@@ -452,7 +446,6 @@ int main(
            }
            break;

#ifdef SBA_AND_OBJECTS
        case IVAS_ENC_INPUT_SBA_ISM:
            if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca ) ) != IVAS_ERR_OK )
            {
@@ -460,7 +453,6 @@ int main(
                exit( -1 );
            }
            break;
#endif

        case IVAS_ENC_INPUT_MASA_ISM:
            if ( ( error = IVAS_ENC_ConfigureForMASAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.masa_ism.numObjects, arg.inputFormatConfig.masa_ism.masaVariant ) ) != IVAS_ERR_OK )
@@ -555,9 +547,7 @@ int main(
    }

    const int16_t numIsmInputs = ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_MASA_ISM
#ifdef SBA_AND_OBJECTS
                                   || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM
#endif
                                   )
                                     ? arg.inputFormatConfig.ism.numObjects
                                     : 0;
@@ -1632,7 +1622,6 @@ static bool parseCmdlIVAS_enc(
            }
        }

#ifdef SBA_AND_OBJECTS
        else if ( strcmp( to_upper( argv[i] ), "-ISM_SBA" ) == 0 )
        {
            arg->inputFormat = IVAS_ENC_INPUT_SBA_ISM;
@@ -1721,7 +1710,6 @@ static bool parseCmdlIVAS_enc(
                }
            }
        }
#endif

        else if ( strcmp( argv_to_upper, "-STEREO_DMX_EVS" ) == 0 )
        {
@@ -1927,12 +1915,10 @@ static void usage_enc( void )
    fprintf( stdout, "-masa Ch File       : MASA format \n" );
    fprintf( stdout, "                      where Ch specifies the number of MASA input/transport channels (1 or 2): \n" );
    fprintf( stdout, "                      and File specifies input file containing parametric MASA metadata \n" );
#ifdef SBA_AND_OBJECTS
    fprintf( stdout, "-ism_sba IsmCh +/-Order IsmFiles : SBA and ISM combined format\n" );
    fprintf( stdout, "                      where IsmCh specifies the number of ISMs (1-4)\n" );
    fprintf( stdout, "                      and Order specifies the SBA order (1 to 3) \n" );
    fprintf( stdout, "                      and IsmFiles specify input files containing ISM metadata, one file per object \n" );
#endif
    fprintf( stdout, "-ism_masa IsmCh MasaCh IsmFiles MasaFile : MASA and ISM combined format \n" );
    fprintf( stdout, "                      where IsmCh specifies the number of ISMs (1-4),\n" );
    fprintf( stdout, "                      MasaCh specifies the number of MASA input/transport channels (1-2), \n" );
+0 −12
Original line number Diff line number Diff line
@@ -394,11 +394,7 @@ int16_t get_ivas_max_num_indices(
            return 1650;
        }
    }
#ifdef SBA_AND_OBJECTS
    else if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT )
#else
    else if ( ivas_format == SBA_FORMAT )
#endif
    {
        if ( ivas_total_brate <= IVAS_16k4 )
        {
@@ -641,11 +637,7 @@ int16_t get_ivas_max_num_indices_metadata(
            return 80;
        }
    }
#ifdef SBA_AND_OBJECTS
    else if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT )
#else
    else if ( ivas_format == SBA_FORMAT )
#endif
    {
        if ( ivas_total_brate <= IVAS_16k4 )
        {
@@ -2566,9 +2558,7 @@ ivas_error preview_indices(
                    {
                        if ( bit_stream[3] )
                        {
#ifdef SBA_AND_OBJECTS
                            st_ivas->ivas_format = SBA_ISM_FORMAT;
#endif
                        }
                        else
                        {
@@ -2738,7 +2728,6 @@ ivas_error preview_indices(

            ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ) );
        }
#ifdef SBA_AND_OBJECTS
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
        {
            /* read number of objects from the bitstream */
@@ -2765,7 +2754,6 @@ ivas_error preview_indices(

            ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ) );
        }
#endif
        else if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
        {
            /* read number of objects from the bitstream */
+0 −4
Original line number Diff line number Diff line
@@ -78,11 +78,7 @@ int32_t get_delay(
                delay = 0; /* All delay is compensated in the decoder with MASA */
            }
        }
#ifdef SBA_AND_OBJECTS
        if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT )
#else
        if ( ivas_format == SBA_FORMAT )
#endif
        {
            /* compensate for DirAC/SPAR filterbank delay */
            delay += IVAS_FB_ENC_DELAY_NS;
+0 −10
Original line number Diff line number Diff line
@@ -70,9 +70,7 @@ typedef enum
    MASA_FORMAT,                                /* IVAS MASA format                 */
    MC_FORMAT,                                  /* IVAS multi-channel format        */
    MASA_ISM_FORMAT,                            /* IVAS combined MASA + objects format*/
#ifdef SBA_AND_OBJECTS
    SBA_ISM_FORMAT                              /* IVAS combined SBA + objects format */
#endif
} IVAS_FORMAT;


@@ -118,15 +116,9 @@ typedef enum
    RENDERER_BINAURAL_MIXER_CONV,
    RENDERER_BINAURAL_MIXER_CONV_ROOM,
    RENDERER_NON_DIEGETIC_DOWNMIX
#ifdef SBA_AND_OBJECTS
    , RENDERER_OSBA_STEREO
#endif
#ifdef SBA_AND_OBJECTS
    , RENDERER_OSBA_AMBI
#endif
#ifdef SBA_AND_OBJECTS
    , RENDERER_OSBA_LS
#endif
} RENDERER_TYPE;

#ifdef DEBUGGING
@@ -380,10 +372,8 @@ typedef enum
    ISM_MASA_MODE_MASA_ONE_OBJ,                /* MASA ISM mode when one object is encoded separately and remainder using MASA parameters */
    ISM_MASA_MODE_PARAM_ONE_OBJ,               /* MASA ISM mode when one object is encoded separately and remainder using parametric object model */
    ISM_MASA_MODE_DISC                         /* MASA ISM mode when all objects are encoded separarately   */
#ifdef SBA_AND_OBJECTS
    ,
    ISM_SBA_MODE_DISC                          /* MASA ISM mode when all objects are encoded separarately   */
#endif
} ISM_MODE;


Loading