Loading apps/decoder.c +18 −7 Original line number Diff line number Diff line Loading @@ -81,7 +81,11 @@ static #define MAX_FRAME_SIZE ( 48000 / 50 ) #endif #define MAX_NUM_OUTPUT_CHANNELS 16 #ifdef OSBA_EXT_OUT #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( MAX_NUM_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * MAX_FRAME_SIZE ) #else #define MAX_OUTPUT_PCM_BUFFER_SIZE ( MAX_NUM_OUTPUT_CHANNELS * MAX_FRAME_SIZE ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_SPLIT_REND_BITRATE ( 1792000 ) /* TODO tmu: unify with SPLIT_REND_MAX_BRATE ?*/ #define MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES ( ( ( (int32_t) MAX_SPLIT_REND_BITRATE / NUM_FRAMES_PER_SEC ) + 7 ) >> 3 ) Loading Loading @@ -1680,9 +1684,12 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); return error; } /* If outputting ISM, get number of objects, open output files and write zero metadata for initial bad frames */ #ifdef OSBA_EXT_OUT if ( *pBsFormat == IVAS_DEC_BS_OBJ || *pBsFormat == IVAS_DEC_BS_SBA_ISM ) #else if ( *pBsFormat == IVAS_DEC_BS_OBJ ) #endif { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, pNumObj ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2078,7 +2085,11 @@ static ivas_error decodeG192( /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { #ifdef OSBA_EXT_OUT if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_SBA_ISM ) #else if ( bsFormat == IVAS_DEC_BS_OBJ ) #endif { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) { Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ #ifdef SBA_AND_OBJECTS #define OSBA_DISC_OBJ_MCT #define ENABLE_ISM_MD_CODING #define OSBA_EXT_OUT #endif /* ################## End BE DEVELOPMENT switches ######################### */ Loading lib_dec/ivas_dec.c +20 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,11 @@ ivas_error ivas_dec( { int16_t n, output_frame, nchan_out; Decoder_State *st; /* used for bitstream handling */ #ifdef OSBA_EXT_OUT float output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ #else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ #endif int16_t nchan_remapped; float output_lfe_ch[L_FRAME48k]; #ifndef OSBA_DISC_OBJ_MCT Loading @@ -74,7 +78,11 @@ ivas_error ivas_dec( AUDIO_CONFIG output_config; float pan_left, pan_right; ivas_error error; #ifdef OSBA_EXT_OUT float *p_output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; #else float *p_output[MAX_OUTPUT_CHANNELS]; #endif #ifdef VLBR_20MS_MD int16_t num_md_sub_frames; #endif Loading Loading @@ -110,7 +118,11 @@ ivas_error ivas_dec( output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); #ifdef OSBA_EXT_OUT for ( n = 0; n < nchan_out; n++ ) #else for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) #endif { p_output[n] = &output[n][0]; } Loading Loading @@ -567,9 +579,11 @@ ivas_error ivas_dec( return error; } } else else /*HOA3 rendering for now*/ { /* Todo OSBA: Implement other outputs. */ #ifdef OSBA_EXT_OUT ivas_sba_upmixer_renderer( st_ivas, &output[st_ivas->nchan_ism], output_frame ); #endif } } #endif Loading lib_dec/ivas_init_dec.c +25 −7 Original line number Diff line number Diff line Loading @@ -779,6 +779,14 @@ ivas_error ivas_init_decoder( if ( output_config == AUDIO_CONFIG_EXTERNAL ) { #ifdef OSBA_EXT_OUT if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { hDecoderConfig->nchan_out = audioCfg2channels( AUDIO_CONFIG_HOA3 ); /*TODOfto: only hoa3 ouput for now*/ hDecoderConfig->nchan_out += st_ivas->nchan_ism; } else #endif if ( !( st_ivas->ism_mode == ISM_MODE_PARAM ) ) { hDecoderConfig->nchan_out = st_ivas->nchan_transport; Loading @@ -794,6 +802,16 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); #ifdef OSBA_EXT_OUT if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_EXTERNAL ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; st_ivas->intern_config = AUDIO_CONFIG_HOA3; st_ivas->hOutSetup.output_config = AUDIO_CONFIG_HOA3; st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( AUDIO_CONFIG_HOA3 ); } #endif /* Only initialize transport setup if it is used */ if ( st_ivas->transport_config != AUDIO_CONFIG_INVALID ) { Loading lib_dec/ivas_output_config.c +4 −0 Original line number Diff line number Diff line Loading @@ -397,7 +397,11 @@ void ivas_renderer_select( #endif { *renderer_type = RENDERER_DIRAC; #ifdef OSBA_EXT_OUT if ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && #else if ( st_ivas->ivas_format == SBA_FORMAT && #endif ( output_config != AUDIO_CONFIG_5_1 && output_config != AUDIO_CONFIG_5_1_2 && output_config != AUDIO_CONFIG_5_1_4 && output_config != AUDIO_CONFIG_7_1 && output_config != AUDIO_CONFIG_7_1_4 && output_config != AUDIO_CONFIG_LS_CUSTOM && output_config != AUDIO_CONFIG_MONO && output_config != AUDIO_CONFIG_STEREO ) ) { if ( output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_FOA ) Loading Loading
apps/decoder.c +18 −7 Original line number Diff line number Diff line Loading @@ -81,7 +81,11 @@ static #define MAX_FRAME_SIZE ( 48000 / 50 ) #endif #define MAX_NUM_OUTPUT_CHANNELS 16 #ifdef OSBA_EXT_OUT #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( MAX_NUM_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * MAX_FRAME_SIZE ) #else #define MAX_OUTPUT_PCM_BUFFER_SIZE ( MAX_NUM_OUTPUT_CHANNELS * MAX_FRAME_SIZE ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_SPLIT_REND_BITRATE ( 1792000 ) /* TODO tmu: unify with SPLIT_REND_MAX_BRATE ?*/ #define MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES ( ( ( (int32_t) MAX_SPLIT_REND_BITRATE / NUM_FRAMES_PER_SEC ) + 7 ) >> 3 ) Loading Loading @@ -1680,9 +1684,12 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); return error; } /* If outputting ISM, get number of objects, open output files and write zero metadata for initial bad frames */ #ifdef OSBA_EXT_OUT if ( *pBsFormat == IVAS_DEC_BS_OBJ || *pBsFormat == IVAS_DEC_BS_SBA_ISM ) #else if ( *pBsFormat == IVAS_DEC_BS_OBJ ) #endif { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, pNumObj ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2078,7 +2085,11 @@ static ivas_error decodeG192( /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { #ifdef OSBA_EXT_OUT if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_SBA_ISM ) #else if ( bsFormat == IVAS_DEC_BS_OBJ ) #endif { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) { Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ #ifdef SBA_AND_OBJECTS #define OSBA_DISC_OBJ_MCT #define ENABLE_ISM_MD_CODING #define OSBA_EXT_OUT #endif /* ################## End BE DEVELOPMENT switches ######################### */ Loading
lib_dec/ivas_dec.c +20 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,11 @@ ivas_error ivas_dec( { int16_t n, output_frame, nchan_out; Decoder_State *st; /* used for bitstream handling */ #ifdef OSBA_EXT_OUT float output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ #else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ #endif int16_t nchan_remapped; float output_lfe_ch[L_FRAME48k]; #ifndef OSBA_DISC_OBJ_MCT Loading @@ -74,7 +78,11 @@ ivas_error ivas_dec( AUDIO_CONFIG output_config; float pan_left, pan_right; ivas_error error; #ifdef OSBA_EXT_OUT float *p_output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; #else float *p_output[MAX_OUTPUT_CHANNELS]; #endif #ifdef VLBR_20MS_MD int16_t num_md_sub_frames; #endif Loading Loading @@ -110,7 +118,11 @@ ivas_error ivas_dec( output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); #ifdef OSBA_EXT_OUT for ( n = 0; n < nchan_out; n++ ) #else for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) #endif { p_output[n] = &output[n][0]; } Loading Loading @@ -567,9 +579,11 @@ ivas_error ivas_dec( return error; } } else else /*HOA3 rendering for now*/ { /* Todo OSBA: Implement other outputs. */ #ifdef OSBA_EXT_OUT ivas_sba_upmixer_renderer( st_ivas, &output[st_ivas->nchan_ism], output_frame ); #endif } } #endif Loading
lib_dec/ivas_init_dec.c +25 −7 Original line number Diff line number Diff line Loading @@ -779,6 +779,14 @@ ivas_error ivas_init_decoder( if ( output_config == AUDIO_CONFIG_EXTERNAL ) { #ifdef OSBA_EXT_OUT if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { hDecoderConfig->nchan_out = audioCfg2channels( AUDIO_CONFIG_HOA3 ); /*TODOfto: only hoa3 ouput for now*/ hDecoderConfig->nchan_out += st_ivas->nchan_ism; } else #endif if ( !( st_ivas->ism_mode == ISM_MODE_PARAM ) ) { hDecoderConfig->nchan_out = st_ivas->nchan_transport; Loading @@ -794,6 +802,16 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); #ifdef OSBA_EXT_OUT if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_EXTERNAL ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; st_ivas->intern_config = AUDIO_CONFIG_HOA3; st_ivas->hOutSetup.output_config = AUDIO_CONFIG_HOA3; st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( AUDIO_CONFIG_HOA3 ); } #endif /* Only initialize transport setup if it is used */ if ( st_ivas->transport_config != AUDIO_CONFIG_INVALID ) { Loading
lib_dec/ivas_output_config.c +4 −0 Original line number Diff line number Diff line Loading @@ -397,7 +397,11 @@ void ivas_renderer_select( #endif { *renderer_type = RENDERER_DIRAC; #ifdef OSBA_EXT_OUT if ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && #else if ( st_ivas->ivas_format == SBA_FORMAT && #endif ( output_config != AUDIO_CONFIG_5_1 && output_config != AUDIO_CONFIG_5_1_2 && output_config != AUDIO_CONFIG_5_1_4 && output_config != AUDIO_CONFIG_7_1 && output_config != AUDIO_CONFIG_7_1_4 && output_config != AUDIO_CONFIG_LS_CUSTOM && output_config != AUDIO_CONFIG_MONO && output_config != AUDIO_CONFIG_STEREO ) ) { if ( output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_FOA ) Loading