From 46a44754d07c9452a594044771c4d133533192f7 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 17 Aug 2023 11:57:13 +0200 Subject: [PATCH 01/89] add ISM_SBA_FORMAT condition to ivas_jbm_dec_tc and ivas_jbm_dec_render --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 150 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 144 insertions(+), 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index b556709497..96da3c6e2d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,6 +158,7 @@ #define OSBA_SPLIT_RENDERING #endif +#define JBM_FOR_OSBA /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 419cd56195..8009d943f0 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -96,7 +96,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -402,6 +402,121 @@ ivas_error ivas_jbm_dec_tc( ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } } +#ifdef JBM_FOR_OSBA + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + int16_t nchan_ism, sba_ch_idx; + + set_s( nb_bits_metadata, 0, MAX_SCE + 1 ); + nchan_ism = st_ivas->nchan_ism; + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + /* set ISM parameters and decode ISM metadata in OSBA format */ + if ( ( error = ivas_osba_ism_metadata_dec( st_ivas, ivas_total_brate, &nchan_ism, &nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + { + return error; + } + sba_ch_idx = st_ivas->nchan_ism; + } + else + { + nb_bits_metadata[1] += NO_BITS_MASA_ISM_NO_OBJ; + sba_ch_idx = 0; + } + + /* SBA metadata decoding */ + if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( st_ivas->nchan_transport == CPE_CHANNELS && st_ivas->nCPE >= 1 ) + { + st_ivas->hCPE[0]->element_brate = ivas_total_brate; + } + + /* core-decoding of transport channels */ + if ( st_ivas->nSCE == 1 ) + { + st = st_ivas->hSCE[0]->hCoreCoder[0]; + if ( ( error = ivas_sce_dec( st_ivas, 0, &output[0], output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE == 1 ) + { + st = st_ivas->hCPE[0]->hCoreCoder[0]; + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE > 1 ) + { + st = st_ivas->hCPE[0]->hCoreCoder[0]; + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( st_ivas->sba_dirac_stereo_flag ) + { + ivas_agc_dec_process( st_ivas->hSpar->hAgcDec, &output[sba_ch_idx], &output[sba_ch_idx], st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, output_frame ); + + if ( st_ivas->hSpar->hPCA != NULL ) + { + ivas_pca_dec( st_ivas->hSpar->hPCA, output_frame, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, &output[sba_ch_idx] ); + } + + ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, + ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, + st_ivas->last_active_ivas_total_brate ) ); + + ivas_sba_dirac_stereo_dec( st_ivas, &output[sba_ch_idx], output_frame, 0 ); + } + + /* HP filtering */ + for ( n = 0; n < getNumChanSynthesis( st_ivas ); n++ ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + + nchan_remapped = ivas_sba_remapTCs( &output[sba_ch_idx], st_ivas, output_frame ); + +#ifdef DEBUG_OSBA + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + int16_t nchan = st_ivas->nchan_transport + st_ivas->nchan_ism; + for ( int16_t t = 0; t < output_frame; t++ ) + { + for ( int16_t c = 0; c < nchan; c++ ) + { + int16_t val = ( int16_t )( output[c][t] + 0.5f ); + dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); + } + } + } +#endif + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + { + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ); + + ivas_sba_mix_matrix_determiner( st_ivas->hSpar, &output[sba_ch_idx], st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames ); + } + else if ( st_ivas->renderer_type != RENDERER_DISABLE ) + { + ivas_spar_dec_agc_pca( st_ivas, &output[sba_ch_idx], output_frame ); + } + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + { + /* loudness correction */ + ivas_dirac_dec_binaural_sba_gain( &output[sba_ch_idx], nchan_remapped, output_frame ); + } + } +#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; @@ -962,6 +1077,27 @@ ivas_error ivas_jbm_dec_render( ivas_omasa_dirac_rend_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } } +#ifdef JBM_FOR_OSBA + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + nchan_remapped = nchan_transport; + + /* Loudspeakers, Ambisonics or Binaural rendering */ + + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + assert( 0 && "This is not supported!" ); + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + { + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + } + else /* SBA_MODE_SPAR */ + { + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + } +#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( st_ivas->mc_mode == MC_MODE_MCT ) @@ -1309,7 +1445,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1351,7 +1487,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -1828,7 +1964,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -1911,9 +2047,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2066,7 +2202,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; -- GitLab From 7c32b5176a1c22724a4d022b102d8bbc96b74dfa Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 17 Aug 2023 14:00:51 +0200 Subject: [PATCH 02/89] add support for ISB_SBA_FORMAT to ivas_jbm_dec_feed_tc_to_renderer and ivas_sba_dec_digest_tc --- lib_dec/ivas_jbm_dec.c | 13 +++++++++++++ lib_dec/ivas_sba_dec.c | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 8009d943f0..7cd50dbdf9 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -819,6 +819,19 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } +#ifdef JBM_FOR_OSBA + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + ivas_ism_dec_digest_tc( st_ivas ); + } + else + { + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + } + } +#endif else if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 5a76aa885d..71715c9847 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -561,7 +561,11 @@ ivas_error ivas_sba_dec_digest_tc( ivas_dirac_dec_set_md_map( st_ivas, nCldfbSlots ); } - if ( st_ivas->ivas_format == SBA_FORMAT ) + if ( st_ivas->ivas_format == SBA_FORMAT +#ifdef JBM_FOR_OSBA + || st_ivas->ivas_format == SBA_ISM_FORMAT +#endif + ) { ivas_spar_dec_digest_tc( st_ivas, st_ivas->nchan_transport, nCldfbSlots, nSamplesForRendering ); } -- GitLab From 6886e261a01523dbaf98c17c78ba25f6a2aa110d Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 17 Aug 2023 16:21:58 +0200 Subject: [PATCH 03/89] add code for ISM_SBA_MODE_DISC n the JBM path --- lib_com/ivas_prot.h | 10 +++++ lib_dec/ivas_jbm_dec.c | 8 +++- lib_dec/ivas_osba_dec.c | 73 +++++++++++++++++++++++++++++++++++-- lib_dec/ivas_spar_decoder.c | 35 +++++++++++++----- 4 files changed, 113 insertions(+), 13 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a0d220df2a..90937574b9 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5625,6 +5625,16 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +#ifdef JBM_FOR_OSBA +ivas_error ivas_osba_dirac_td_binaural_jbm( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +); +#endif + ivas_error ivas_osba_dirac_td_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 7cd50dbdf9..ddcec57713 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1099,7 +1099,13 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - assert( 0 && "This is not supported!" ); + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV) + { + if ( ( error = ivas_osba_dirac_td_binaural_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) + { + return error; + } + } } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 47ef0efbe0..0b13b4ded9 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -111,7 +111,7 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( int16_t i; st_ivas->hMasaIsmData->delayBuffer_nchan = st_ivas->nchan_ism; - st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( ( st_ivas->hMasaIsmData->delayBuffer = (float **) malloc( st_ivas->hMasaIsmData->delayBuffer_nchan * sizeof( float * ) ) ) == NULL ) { @@ -138,6 +138,73 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( * Binaural rendering in OMASA format *--------------------------------------------------------------------------*/ +#ifdef JBM_FOR_OSBA +ivas_error ivas_osba_dirac_td_binaural_jbm( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +) +{ + int16_t n; + float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; + + ivas_error error; + float *p_sepobj[MAX_NUM_OBJECTS]; + int16_t channel_offset; + + for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) + { + p_sepobj[n] = &data_separated_objects[n][0]; + } + + channel_offset = st_ivas->nchan_ism; + + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); + + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + mvr2r( output_f[n], data_separated_objects[n], nSamplesAsked ); + } + + { + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + delay_signal( data_separated_objects[n], nSamplesAsked, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + } + } + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[channel_offset], nSamplesAsked ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output_f[channel_offset], st_ivas->nchan_transport ); + } + + if ( ( error = ivas_td_binaural_renderer( st_ivas, p_sepobj, nSamplesAsked ) ) != IVAS_ERR_OK ) + { + return error; + } + + for ( n = 0; n < BINAURAL_CHANNELS; n++ ) + { + int16_t i; + for ( i = 0; i < nSamplesAsked; i++ ) + { + output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; + } + } + + return IVAS_ERR_OK; +} +#endif + ivas_error ivas_osba_dirac_td_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ @@ -192,7 +259,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = (int16_t) ( output[channel_offset + c][t] + 0.5f ); + int16_t val = ( int16_t )( output[channel_offset + c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/sba_fast_conv_out.raw" ); } } @@ -244,7 +311,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = (int16_t) ( p_sepobj[c][t] + 0.5f ); + int16_t val = ( int16_t )( p_sepobj[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/ism_td_bin_out.raw" ); } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index f5131535a5..fbfec73355 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -322,7 +322,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -338,11 +338,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -375,7 +375,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -556,7 +556,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -860,7 +860,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1254,17 +1254,35 @@ void ivas_spar_dec_digest_tc( float *pPcm_tmp[MAX_SPAR_INTERNAL_CHANNELS]; float *p_tc[MAX_SPAR_INTERNAL_CHANNELS]; int16_t nchan_internal, ch; +#ifdef JBM_FOR_OSBA + int16_t ch_sba_idx; +#endif int16_t nSamplesLeftForTD, default_frame; +#ifdef JBM_FOR_OSBA + ch_sba_idx = 0; + if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + if ( st_ivas->ism_mode == SBA_ISM_FORMAT ) + { + ch_sba_idx = st_ivas->nchan_ism; + } + } +#endif + /* TD decorrelator */ - default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); for ( ch = 0; ch < nchan_internal; ch++ ) { pPcm_tmp[ch] = Pcm_tmp[ch]; +#ifdef JBM_FOR_OSBA + p_tc[ch] = st_ivas->hTcBuffer->tc[ch + ch_sba_idx]; +#else p_tc[ch] = st_ivas->hTcBuffer->tc[ch]; +#endif } while ( nSamplesLeftForTD ) @@ -1477,8 +1495,7 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B - : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } -- GitLab From 1942d94b628aa3e360d815a2965eb4610663f32b Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 17 Aug 2023 16:46:13 +0200 Subject: [PATCH 04/89] fix formatting --- lib_dec/ivas_jbm_dec.c | 42 ++++++++++++++++++------------------- lib_dec/ivas_osba_dec.c | 8 +++---- lib_dec/ivas_sba_dec.c | 4 ++-- lib_dec/ivas_spar_decoder.c | 17 ++++++++------- scripts/check-format.sh | 2 +- 5 files changed, 37 insertions(+), 36 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index ddcec57713..0da5e7ed56 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -96,7 +96,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); + output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -493,7 +493,7 @@ ivas_error ivas_jbm_dec_tc( { for ( int16_t c = 0; c < nchan; c++ ) { - int16_t val = ( int16_t )( output[c][t] + 0.5f ); + int16_t val = (int16_t) ( output[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); } } @@ -822,14 +822,14 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( #ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + ivas_ism_dec_digest_tc( st_ivas ); + } + else { - ivas_ism_dec_digest_tc( st_ivas ); - } - else - { - ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); - } + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + } } #endif else if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) @@ -1097,17 +1097,17 @@ ivas_error ivas_jbm_dec_render( /* Loudspeakers, Ambisonics or Binaural rendering */ - if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { if ( ( error = ivas_osba_dirac_td_binaural_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { return error; } - } - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + } + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } @@ -1115,7 +1115,7 @@ ivas_error ivas_jbm_dec_render( { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } - } + } #endif else if ( st_ivas->ivas_format == MC_FORMAT ) { @@ -1464,7 +1464,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1506,7 +1506,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -1983,7 +1983,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -2066,9 +2066,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2221,7 +2221,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 0b13b4ded9..b281a249b5 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -111,7 +111,7 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( int16_t i; st_ivas->hMasaIsmData->delayBuffer_nchan = st_ivas->nchan_ism; - st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( ( st_ivas->hMasaIsmData->delayBuffer = (float **) malloc( st_ivas->hMasaIsmData->delayBuffer_nchan * sizeof( float * ) ) ) == NULL ) { @@ -161,7 +161,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( channel_offset = st_ivas->nchan_ism; - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -259,7 +259,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = ( int16_t )( output[channel_offset + c][t] + 0.5f ); + int16_t val = (int16_t) ( output[channel_offset + c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/sba_fast_conv_out.raw" ); } } @@ -311,7 +311,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = ( int16_t )( p_sepobj[c][t] + 0.5f ); + int16_t val = (int16_t) ( p_sepobj[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/ism_td_bin_out.raw" ); } } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 71715c9847..b59adc1441 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -563,9 +563,9 @@ ivas_error ivas_sba_dec_digest_tc( if ( st_ivas->ivas_format == SBA_FORMAT #ifdef JBM_FOR_OSBA - || st_ivas->ivas_format == SBA_ISM_FORMAT + || st_ivas->ivas_format == SBA_ISM_FORMAT #endif - ) + ) { ivas_spar_dec_digest_tc( st_ivas, st_ivas->nchan_transport, nCldfbSlots, nSamplesForRendering ); } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index fbfec73355..65078e7aeb 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -322,7 +322,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -338,11 +338,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -375,7 +375,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -556,7 +556,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -860,7 +860,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1271,7 +1271,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1495,7 +1495,8 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B + : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 8ec2991cda..659657dfea 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -38,7 +38,7 @@ if [ ! -d "lib_com" ]; then exit 255 fi -CLANG_FORMAT=clang-format +CLANG_FORMAT=./clang-format.exe CLANG_FORMAT_REQUIRED_VERSION="13.0" # list (with space between entries) of substrings that are excluded from the file list, e.g. very large files -- GitLab From 8478ee1a7297aeb1a467a1e3546079d3700660c6 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 17 Aug 2023 16:50:47 +0200 Subject: [PATCH 05/89] fix if condition --- lib_dec/ivas_spar_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 65078e7aeb..78a50ff360 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1263,7 +1263,7 @@ void ivas_spar_dec_digest_tc( ch_sba_idx = 0; if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - if ( st_ivas->ism_mode == SBA_ISM_FORMAT ) + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { ch_sba_idx = st_ivas->nchan_ism; } -- GitLab From 3e5106f182bbed2dbbb78fc68d9106ecff9cb2b5 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 09:38:15 +0200 Subject: [PATCH 06/89] process ism and sba channels in ISM_SBA_MODE_DISC --- lib_dec/ivas_jbm_dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 0da5e7ed56..4cdfb7194c 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -825,6 +825,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { ivas_ism_dec_digest_tc( st_ivas ); + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } else { -- GitLab From ea250bf98ba23481680c2cad7b02b21206faa2c3 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 12:36:04 +0200 Subject: [PATCH 07/89] fix merge conflict and sba output buffer setup --- lib_dec/ivas_osba_dec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 162ffac6ef..4723ccd382 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -161,7 +161,6 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( channel_offset = st_ivas->nchan_ism; - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -175,6 +174,9 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( } } + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[channel_offset], nSamplesAsked ) ) != IVAS_ERR_OK ) @@ -184,7 +186,12 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( } else { - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output_f[channel_offset], st_ivas->nchan_transport ); + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output_f[channel_offset], st_ivas->nchan_transport +#ifdef API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } if ( ( error = ivas_td_binaural_renderer( st_ivas, p_sepobj, nSamplesAsked ) ) != IVAS_ERR_OK ) -- GitLab From e5b7a25618649e3986ea081df8796f65b46a2c26 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 12:36:36 +0200 Subject: [PATCH 08/89] allocate additional buffer channels for objects --- lib_dec/ivas_jbm_dec.c | 16 +++++++++++++++- lib_dec/ivas_spar_decoder.c | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 483d1287bd..281ac7c435 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -865,7 +865,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - ivas_ism_dec_digest_tc( st_ivas ); + //ivas_ism_dec_digest_tc( st_ivas ); ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } else @@ -1919,6 +1919,20 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } +#ifdef JBM_FOR_OSBA + else if (st_ivas->ivas_format == SBA_ISM_FORMAT) + { + if ( st_ivas->sba_dirac_stereo_flag ) + { + num_tc = CPE_CHANNELS; + } + if ( ( st_ivas->sba_planar && num_tc >= 3 ) || ( num_tc == 3 ) ) + { + num_tc++; + } + num_tc += st_ivas->nchan_ism; + } +#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index cf3f74161d..de9a347395 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -233,6 +233,12 @@ ivas_error ivas_spar_dec_open( buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = num_channels_internal; +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + nchan_to_allocate += st_ivas->nchan_ism; + } +#endif if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) { buffer_mode = TC_BUFFER_MODE_BUFFER; -- GitLab From 13123ec21c994a3422f333c6f154154ebebba7a5 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 14:47:21 +0200 Subject: [PATCH 09/89] extend buffer size --- lib_dec/ivas_jbm_dec.c | 6 +++++- lib_dec/ivas_osba_dec.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 281ac7c435..d7d1be705e 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -934,7 +934,11 @@ ivas_error ivas_jbm_dec_render( { int16_t n, nchan_out; int16_t nchan_transport; - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ + float output[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 4723ccd382..98b376a2e6 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -175,8 +175,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( } ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); - - +#if 0 if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[channel_offset], nSamplesAsked ) ) != IVAS_ERR_OK ) @@ -207,6 +206,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; } } +#endif return IVAS_ERR_OK; } -- GitLab From e5602f077d31b3804591a5686cee0626469b879c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 14:58:43 +0200 Subject: [PATCH 10/89] set correct no of objects in ivas_td_binaural_renderer_sf --- lib_dec/ivas_objectRenderer_internal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 342cb86539..74bcac4487 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -145,7 +145,11 @@ ivas_error ivas_td_binaural_renderer_sf( int16_t nchan_ism_internal, nchan_ism, ch_offset; /* Set the number of ISMs */ - if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) + if ( st_ivas->ivas_format == MASA_ISM_FORMAT +#ifdef JBM_FOR_OSBA + || st_ivas->ivas_format == SBA_ISM_FORMAT +#endif + ) { nchan_ism_internal = st_ivas->nchan_ism; nchan_ism = st_ivas->nchan_ism; -- GitLab From 35c124f9cce07792c8c30ac9f2961ad7d52e1743 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 21 Aug 2023 15:04:17 +0200 Subject: [PATCH 11/89] enable object rendering in OSBA JBM path --- lib_dec/ivas_jbm_dec.c | 30 +++++++++++++------------- lib_dec/ivas_objectRenderer_internal.c | 6 +++--- lib_dec/ivas_osba_dec.c | 18 +++++++++++++++- lib_dec/ivas_spar_decoder.c | 2 +- 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index d7d1be705e..d14f007490 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -865,7 +865,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - //ivas_ism_dec_digest_tc( st_ivas ); + // ivas_ism_dec_digest_tc( st_ivas ); ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } else @@ -936,9 +936,9 @@ ivas_error ivas_jbm_dec_render( int16_t nchan_transport; float output[MAX_OUTPUT_CHANNELS #ifdef JBM_FOR_OSBA - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif - ][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ + ][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; @@ -1924,18 +1924,18 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } #ifdef JBM_FOR_OSBA - else if (st_ivas->ivas_format == SBA_ISM_FORMAT) - { - if ( st_ivas->sba_dirac_stereo_flag ) - { - num_tc = CPE_CHANNELS; - } - if ( ( st_ivas->sba_planar && num_tc >= 3 ) || ( num_tc == 3 ) ) - { - num_tc++; - } - num_tc += st_ivas->nchan_ism; - } + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + if ( st_ivas->sba_dirac_stereo_flag ) + { + num_tc = CPE_CHANNELS; + } + if ( ( st_ivas->sba_planar && num_tc >= 3 ) || ( num_tc == 3 ) ) + { + num_tc++; + } + num_tc += st_ivas->nchan_ism; + } #endif else if ( st_ivas->ivas_format == MC_FORMAT ) { diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 74bcac4487..93d523e27e 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -145,11 +145,11 @@ ivas_error ivas_td_binaural_renderer_sf( int16_t nchan_ism_internal, nchan_ism, ch_offset; /* Set the number of ISMs */ - if ( st_ivas->ivas_format == MASA_ISM_FORMAT + if ( st_ivas->ivas_format == MASA_ISM_FORMAT #ifdef JBM_FOR_OSBA - || st_ivas->ivas_format == SBA_ISM_FORMAT + || st_ivas->ivas_format == SBA_ISM_FORMAT #endif - ) + ) { nchan_ism_internal = st_ivas->nchan_ism; nchan_ism = st_ivas->nchan_ism; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 98b376a2e6..ade9bb654b 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -174,7 +174,23 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( } } - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); + + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_sepobj, *nSamplesRendered ) ) != IVAS_ERR_OK ) + { + return error; + } + + + for ( n = 0; n < BINAURAL_CHANNELS; n++ ) + { + int16_t i; + for ( i = 0; i < nSamplesAsked; i++ ) + { + output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; + } + } + #if 0 if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index de9a347395..fb3da0397f 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -237,7 +237,7 @@ ivas_error ivas_spar_dec_open( if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { nchan_to_allocate += st_ivas->nchan_ism; - } + } #endif if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) { -- GitLab From 028d8d3e510bf0f9225f59f71485d6880e1d72c3 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Tue, 22 Aug 2023 15:52:52 +0200 Subject: [PATCH 12/89] enable object rendering in OSBA JBM path --- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_objectRenderer_internal.c | 14 ++++++---- lib_dec/ivas_osba_dec.c | 31 +++------------------ lib_dec/ivas_spar_decoder.c | 37 ++++++++++++++++++-------- 4 files changed, 39 insertions(+), 45 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index d14f007490..b4815407e9 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -865,7 +865,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - // ivas_ism_dec_digest_tc( st_ivas ); + ivas_ism_dec_digest_tc( st_ivas ); ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } else diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 93d523e27e..83591cff81 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -145,16 +145,20 @@ ivas_error ivas_td_binaural_renderer_sf( int16_t nchan_ism_internal, nchan_ism, ch_offset; /* Set the number of ISMs */ - if ( st_ivas->ivas_format == MASA_ISM_FORMAT -#ifdef JBM_FOR_OSBA - || st_ivas->ivas_format == SBA_ISM_FORMAT -#endif - ) + if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { nchan_ism_internal = st_ivas->nchan_ism; nchan_ism = st_ivas->nchan_ism; ch_offset = 2; } +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + nchan_ism_internal = st_ivas->nchan_ism; + nchan_ism = st_ivas->nchan_ism; + ch_offset = 0; + } +#endif else { nchan_ism_internal = st_ivas->hTcBuffer->nchan_transport_internal; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index ade9bb654b..5f4f0d3c0d 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -148,46 +148,21 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( ) { int16_t n; - float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; - ivas_error error; - float *p_sepobj[MAX_NUM_OBJECTS]; - int16_t channel_offset; - - for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) - { - p_sepobj[n] = &data_separated_objects[n][0]; - } - - channel_offset = st_ivas->nchan_ism; - - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - mvr2r( output_f[n], data_separated_objects[n], nSamplesAsked ); - } - - { - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - delay_signal( data_separated_objects[n], nSamplesAsked, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); - } - } + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, output_f ); - - if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_sepobj, *nSamplesRendered ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } - for ( n = 0; n < BINAURAL_CHANNELS; n++ ) { int16_t i; for ( i = 0; i < nSamplesAsked; i++ ) { - output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; + output_f[n][i] = 0.5f * output_f[2 + n][i] + 0.5f * output_f[n][i]; } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index fb3da0397f..52fa8adf9b 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -336,7 +336,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -352,11 +352,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -389,7 +389,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -570,7 +570,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -874,7 +874,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1289,7 +1289,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1497,9 +1497,25 @@ void ivas_spar_dec_upmixer_sf( st_ivas->last_active_ivas_total_brate ); slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); slot_idx_start = hSpar->slots_rendered; - for ( i = 0; i < nchan_internal; i++ ) +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + int16_t nchan_ism; + + nchan_ism = st_ivas->nchan_ism; + + for ( i = 0; i < nchan_internal; i++ ) + { + p_tc[i] = st_ivas->hTcBuffer->tc[i + nchan_ism] + slot_idx_start * slot_size; + } + } + else +#endif { - p_tc[i] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; + for ( i = 0; i < nchan_internal; i++ ) + { + p_tc[i] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; + } } #ifdef DEBUG_SPAR_BYPASS_EVS_CODEC @@ -1513,8 +1529,7 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B - : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } -- GitLab From a1cfc5e97e58c49387254f17ebf9280ef522d559 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 24 Aug 2023 13:17:55 +0200 Subject: [PATCH 13/89] implment delay line for object audio channels as in OMASA --- lib_dec/ivas_osba_dec.c | 41 ++++++++++--------------------------- lib_dec/ivas_spar_decoder.c | 17 +++++++-------- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 5f4f0d3c0d..990106298e 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -150,41 +150,23 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t n; ivas_error error; - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); - - if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) + /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ + if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { - return error; - } + int16_t tcBufferSize; - for ( n = 0; n < BINAURAL_CHANNELS; n++ ) - { - int16_t i; - for ( i = 0; i < nSamplesAsked; i++ ) - { - output_f[n][i] = 0.5f * output_f[2 + n][i] + 0.5f * output_f[n][i]; - } - } + tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; -#if 0 - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) - { - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[channel_offset], nSamplesAsked ) ) != IVAS_ERR_OK ) + for ( n = 0; n < st_ivas->nchan_ism; n++ ) { - return error; + float *tc_local_n = st_ivas->hTcBuffer->tc[n]; + delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } - else - { - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output_f[channel_offset], st_ivas->nchan_transport -#ifdef API_5MS - , - MAX_PARAM_SPATIAL_SUBFRAMES -#endif - ); - } - if ( ( error = ivas_td_binaural_renderer( st_ivas, p_sepobj, nSamplesAsked ) ) != IVAS_ERR_OK ) + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); + + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } @@ -194,10 +176,9 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t i; for ( i = 0; i < nSamplesAsked; i++ ) { - output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; + output_f[n][i] = 0.5f * output_f[2 + n][i] + 0.5f * output_f[n][i]; } } -#endif return IVAS_ERR_OK; } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 52fa8adf9b..5b7b6e14cc 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -336,7 +336,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -352,11 +352,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -389,7 +389,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -570,7 +570,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -874,7 +874,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1289,7 +1289,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1529,7 +1529,8 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B + : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } -- GitLab From 35cccbdfdb15f02e111abb8816ae0cfb5eaac97a Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 25 Aug 2023 08:59:11 +0200 Subject: [PATCH 14/89] set correct grannularity for td renderer --- lib_dec/ivas_dirac_dec.c | 6 ++++- lib_dec/ivas_jbm_dec.c | 14 +++++++++-- lib_dec/ivas_spar_decoder.c | 46 +++++++++++++++++++++++++++++-------- 3 files changed, 53 insertions(+), 13 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 853e51631c..0c7aa3d918 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1559,7 +1559,11 @@ void ivas_dirac_dec_set_md_map( #ifdef API_5MS /* copy also to tc buffer */ /* only for non-combined formats and combinded formats w/o discrete objects */ - if ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) + if ( (st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) +#ifdef JBM_FOR_OSBA + && !(st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) +#endif + ) { st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index b4815407e9..3422af4a54 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -863,9 +863,16 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( #ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { ivas_ism_dec_digest_tc( st_ivas ); + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + n_render_timeslots *= ( st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size ); + } + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } else @@ -1125,7 +1132,9 @@ ivas_error ivas_jbm_dec_render( { nchan_remapped = st_ivas->nchan_transport; - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || + st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ) { @@ -1161,7 +1170,8 @@ ivas_error ivas_jbm_dec_render( } } } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 5b7b6e14cc..95d3609a9b 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -229,6 +229,9 @@ ivas_error ivas_spar_dec_open( int16_t nchan_to_allocate; int16_t nchan_tc; TC_BUFFER_MODE buffer_mode; +#ifdef JBM_FOR_OSBA + int16_t granularity; +#endif buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -239,6 +242,11 @@ ivas_error ivas_spar_dec_open( nchan_to_allocate += st_ivas->nchan_ism; } #endif + +#ifdef JBM_FOR_OSBA + granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); +#endif + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) { buffer_mode = TC_BUFFER_MODE_BUFFER; @@ -249,7 +257,26 @@ ivas_error ivas_spar_dec_open( { nchan_to_allocate = 2 * BINAURAL_CHANNELS; } - if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) + { + /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ + granularity = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / (FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); + } +#endif + + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, + buffer_mode, + nchan_tc, + nchan_to_allocate, + nchan_to_allocate, +#ifdef JBM_FOR_OSBA + granularity +#else + NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -336,7 +363,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -352,11 +379,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -389,7 +416,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -570,7 +597,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -874,7 +901,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1289,7 +1316,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1529,8 +1556,7 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B - : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } -- GitLab From e144d6371987ded58491f59146952b308717e6a1 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 25 Aug 2023 09:31:41 +0200 Subject: [PATCH 15/89] fix variable speed decoding, fix OSBA binaural rendering (prevent overwriting of subframe info in the main TC buffer) --- apps/decoder.c | 6 +++++- lib_com/options.h | 2 +- lib_dec/ivas_spar_decoder.c | 40 ++++++++++++++++++++++--------------- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index a63d8e9f4b..bce14d8c61 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1604,7 +1604,11 @@ static bool parseCmdlIVAS_dec( } #ifdef API_5MS_BASELINE - if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) ) + if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) +#ifdef VARIABLE_SPEED_DECODING + && ( !arg->tsmEnabled ) +#endif + ) { arg->enable5ms = false; } diff --git a/lib_com/options.h b/lib_com/options.h index 79c7b033c3..95cb6d1f19 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,7 +128,7 @@ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ /*#define DEBUG_AGC_ENCODER_CMD_OPTION*/ /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ /*#define DEBUG_JBM_CMD_OPTION*/ /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ -/*#define VARIABLE_SPEED_DECODING*/ /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ +#define VARIABLE_SPEED_DECODING /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ /*Split Rendering Debug switches*/ /*#define DBG_WAV_WRITER*/ /* add debugging function dbgwrite_wav() */ diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 95d3609a9b..e609516f66 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -262,21 +262,21 @@ ivas_error ivas_spar_dec_open( if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ - granularity = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / (FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); + granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); } #endif if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, - buffer_mode, - nchan_tc, + buffer_mode, + nchan_tc, + nchan_to_allocate, nchan_to_allocate, - nchan_to_allocate, #ifdef JBM_FOR_OSBA - granularity + granularity #else NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -363,7 +363,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -379,11 +379,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -416,7 +416,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -597,7 +597,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -901,7 +901,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1235,8 +1235,15 @@ void ivas_spar_dec_set_render_map( set_s( hSpar->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpar->subframe_nbslots, &hSpar->nb_subframes ); #ifdef API_5MS - st_ivas->hTcBuffer->nb_subframes = hSpar->nb_subframes; - mvs2s( hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpar->nb_subframes ); + /* copy also to tc buffer */ + /* only for non-combined formats and combinded formats w/o discrete objects */ +#ifdef JBM_FOR_OSBA + if ( !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) +#endif + { + st_ivas->hTcBuffer->nb_subframes = hSpar->nb_subframes; + mvs2s( hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpar->nb_subframes ); + } #endif ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, 1, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hSpar->render_to_md_map ); @@ -1316,7 +1323,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1556,7 +1563,8 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B + : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } -- GitLab From 0e9b559960e1ae23200c5415e826d568ce5b2091 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 25 Aug 2023 15:41:42 +0200 Subject: [PATCH 16/89] implement output to STEREO in OSBA JBM path --- lib_dec/ivas_dec.c | 5 +- lib_dec/ivas_jbm_dec.c | 92 +++++++++++++++++++++++++++++++------ lib_dec/ivas_osba_dec.c | 29 ++++++------ lib_dec/ivas_spar_decoder.c | 6 ++- 4 files changed, 101 insertions(+), 31 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index eff9a11c06..3b9a2dea71 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -779,7 +779,10 @@ ivas_error ivas_dec( } /* Loudspeakers, Ambisonics or Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || + st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC + ) { ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output[sba_ch_idx], nchan_remapped #ifdef API_5MS diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 3422af4a54..9f0df1835b 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -94,7 +94,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -490,7 +490,7 @@ ivas_error ivas_jbm_dec_tc( { for ( int16_t c = 0; c < nchan; c++ ) { - int16_t val = (int16_t) ( output[c][t] + 0.5f ); + int16_t val = ( int16_t )( output[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); } } @@ -1132,9 +1132,9 @@ ivas_error ivas_jbm_dec_render( { nchan_remapped = st_ivas->nchan_transport; - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || - st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || - st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || + st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ) { @@ -1169,9 +1169,71 @@ ivas_error ivas_jbm_dec_render( return error; } } - } + else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO || + st_ivas->renderer_type == RENDERER_MONO_DOWNMIX + ) + { + int16_t slots_to_render, first_sf, last_sf, subframe_idx, ch; + uint16_t slot_size, slot_idx_start; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] = p_output[ch]; + } + + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + slots_to_render = min( st_ivas->hSpar->num_slots - st_ivas->hSpar->slots_rendered, nSamplesAsked / slot_size ); + *nSamplesRendered = slots_to_render * slot_size; + first_sf = st_ivas->hSpar->subframes_rendered; + last_sf = first_sf; + + while ( slots_to_render > 0 ) + { + slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; + last_sf++; + } + + st_ivas->hSpar->slots_rendered += st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; + + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + int16_t nchan_ism; + int16_t n_samples_sf = slot_size * st_ivas->hSpar->subframe_nbslots[subframe_idx]; + + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + slot_idx_start = st_ivas->hSpar->slots_rendered; + + nchan_ism = st_ivas->nchan_ism; + + p_tc[0] = st_ivas->hTcBuffer->tc[0 + nchan_ism] + slot_idx_start * slot_size; + p_tc[1] = st_ivas->hTcBuffer->tc[1 + nchan_ism] + slot_idx_start * slot_size; + + for ( n = 0; n < BINAURAL_CHANNELS; n++ ) + { + int16_t i; + for ( i = 0; i < slot_size; i++ ) + { + output_f_local[n][i] = p_tc[n][i]; + } + } + + st_ivas->hSpar->slots_rendered += st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; + st_ivas->hSpar->subframes_rendered++; + + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] += n_samples_sf; + } + } + } + else + { + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || - st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } @@ -1562,7 +1624,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1637,7 +1699,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -2146,7 +2208,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -2176,7 +2238,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { - n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } #endif @@ -2261,9 +2323,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2307,7 +2369,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { - n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } #else @@ -2429,7 +2491,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 990106298e..05fd9c8460 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -111,7 +111,7 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( int16_t i; st_ivas->hMasaIsmData->delayBuffer_nchan = st_ivas->nchan_ism; - st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( ( st_ivas->hMasaIsmData->delayBuffer = (float **) malloc( st_ivas->hMasaIsmData->delayBuffer_nchan * sizeof( float * ) ) ) == NULL ) { @@ -150,21 +150,22 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t n; ivas_error error; - /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ - if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) - { - int16_t tcBufferSize; + /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ + if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) + { + int16_t tcBufferSize; - tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; + tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - float *tc_local_n = st_ivas->hTcBuffer->tc[n]; - delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + float *tc_local_n = st_ivas->hTcBuffer->tc[n]; + delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + } } - } - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) { @@ -243,7 +244,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = (int16_t) ( output[channel_offset + c][t] + 0.5f ); + int16_t val = ( int16_t )( output[channel_offset + c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/sba_fast_conv_out.raw" ); } } @@ -295,7 +296,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = (int16_t) ( p_sepobj[c][t] + 0.5f ); + int16_t val = ( int16_t )( p_sepobj[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/ism_td_bin_out.raw" ); } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index e609516f66..5fb956d21e 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -247,7 +247,11 @@ ivas_error ivas_spar_dec_open( granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #endif - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) +#ifdef JBM_FOR_OSBA + && !(st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) +#endif + ) { buffer_mode = TC_BUFFER_MODE_BUFFER; nchan_tc = st_ivas->hDecoderConfig->nchan_out; -- GitLab From 2c8ac85f147850d8d5074f5e2b8825e515e98834 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 09:55:15 +0200 Subject: [PATCH 17/89] preliminarily save zeros in stereo output buffer for debugging --- lib_dec/ivas_jbm_dec.c | 24 +++++++++--------------- lib_dec/ivas_spar_decoder.c | 8 +++++++- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9f0df1835b..78196c7781 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1175,12 +1175,6 @@ ivas_error ivas_jbm_dec_render( { int16_t slots_to_render, first_sf, last_sf, subframe_idx, ch; uint16_t slot_size, slot_idx_start; - float *output_f_local[MAX_OUTPUT_CHANNELS]; - - for ( ch = 0; ch < nchan_out; ch++ ) - { - output_f_local[ch] = p_output[ch]; - } slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); slots_to_render = min( st_ivas->hSpar->num_slots - st_ivas->hSpar->slots_rendered, nSamplesAsked / slot_size ); @@ -1209,22 +1203,22 @@ ivas_error ivas_jbm_dec_render( p_tc[0] = st_ivas->hTcBuffer->tc[0 + nchan_ism] + slot_idx_start * slot_size; p_tc[1] = st_ivas->hTcBuffer->tc[1 + nchan_ism] + slot_idx_start * slot_size; + for ( n = 0; n < BINAURAL_CHANNELS; n++ ) { - int16_t i; - for ( i = 0; i < slot_size; i++ ) + int16_t ts; + for ( ts = 0; ts < st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; ts++ ) { - output_f_local[n][i] = p_tc[n][i]; - } + int16_t i; + for ( i = 0; i < slot_size; i++ ) + { + p_output[n][i + subframe_idx * slot_size] = 0; + } + } } st_ivas->hSpar->slots_rendered += st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; st_ivas->hSpar->subframes_rendered++; - - for ( ch = 0; ch < nchan_out; ch++ ) - { - output_f_local[ch] += n_samples_sf; - } } } else diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 5fb956d21e..db69c6c618 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1667,7 +1667,13 @@ void ivas_spar_dec_upmixer_sf( { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { - cldfbAnalysis_ts( &p_tc[in_ch][ts * num_cldfb_bands], cldfb_in_ts_re[in_ch][ts], cldfb_in_ts_im[in_ch][ts], num_cldfb_bands, st_ivas->cldfbAnaDec[in_ch] ); + cldfbAnalysis_ts( + &p_tc[in_ch][ts * num_cldfb_bands], + cldfb_in_ts_re[in_ch][ts], + cldfb_in_ts_im[in_ch][ts], + num_cldfb_bands, + st_ivas->cldfbAnaDec[in_ch] + ); } } -- GitLab From d8aff2551f78841412cd885de435e8413823f024 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 10:37:21 +0200 Subject: [PATCH 18/89] fix crash in stereo output due to wrong counting of slots rendered --- lib_dec/ivas_jbm_dec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 78196c7781..efba801599 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1188,8 +1188,6 @@ ivas_error ivas_jbm_dec_render( last_sf++; } - st_ivas->hSpar->slots_rendered += st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; - for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { int16_t nchan_ism; @@ -1212,7 +1210,7 @@ ivas_error ivas_jbm_dec_render( int16_t i; for ( i = 0; i < slot_size; i++ ) { - p_output[n][i + subframe_idx * slot_size] = 0; + p_output[n][i + ts * slot_size] = p_tc[n][i + ts * slot_size]; } } } -- GitLab From ae599c67b0dca8b29bb7ede5a0142e519a49d8db Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 10:46:07 +0200 Subject: [PATCH 19/89] fix offset in output buffer --- lib_dec/ivas_jbm_dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index efba801599..ee1d6f3bec 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1201,7 +1201,6 @@ ivas_error ivas_jbm_dec_render( p_tc[0] = st_ivas->hTcBuffer->tc[0 + nchan_ism] + slot_idx_start * slot_size; p_tc[1] = st_ivas->hTcBuffer->tc[1 + nchan_ism] + slot_idx_start * slot_size; - for ( n = 0; n < BINAURAL_CHANNELS; n++ ) { int16_t ts; @@ -1210,7 +1209,7 @@ ivas_error ivas_jbm_dec_render( int16_t i; for ( i = 0; i < slot_size; i++ ) { - p_output[n][i + ts * slot_size] = p_tc[n][i + ts * slot_size]; + p_output[n][i + ts * slot_size + slot_idx_start*slot_size] = p_tc[n][i + ts * slot_size]; } } } -- GitLab From aeaeb64892a8bf3b118351314c017a4ef9cc8d3b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 28 Aug 2023 11:57:01 +0200 Subject: [PATCH 20/89] fix OSBA stereo JBM output --- lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 9 +++- lib_dec/ivas_ism_param_dec.c | 11 ++++- lib_dec/ivas_jbm_dec.c | 91 +++++++++++------------------------- lib_dec/ivas_spar_decoder.c | 40 ++++++++-------- 5 files changed, 68 insertions(+), 84 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 95cb6d1f19..bd9dafa9b4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,6 +159,7 @@ #endif #define JBM_FOR_OSBA +#define FIX_COMBINED_FORMATS_ISM_GAINS /* ### API_5MS switches start ### */ #define API_5MS /* FhG: 5ms rendering capability */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 7c5642a5e9..db40042561 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -899,6 +899,12 @@ int16_t getNumChanSynthesis( if ( st_ivas->sba_dirac_stereo_flag ) { n = CPE_CHANNELS; +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + n += st_ivas->nchan_ism; + } +#endif } else if ( ( st_ivas->hMCT != NULL || st_ivas->ivas_format == SBA_FORMAT ) && st_ivas->ivas_format != SBA_ISM_FORMAT ) { @@ -1471,6 +1477,8 @@ ivas_error ivas_init_decoder( st_ivas->ism_extmeta_active = -1; st_ivas->ism_extmeta_cnt = 0; + st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); + if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) { return error; @@ -1519,7 +1527,6 @@ ivas_error ivas_init_decoder( ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); } - st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 1d76765193..6cf2010a7a 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1071,7 +1071,12 @@ void ivas_ism_dec_digest_tc( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || - ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) + ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) +#ifdef JBM_FOR_OSBA + || + st_ivas->renderer_type == RENDERER_OSBA_STEREO +#endif + ) { int16_t i, num_objects; int16_t azimuth, elevation; @@ -1102,7 +1107,11 @@ void ivas_ism_dec_digest_tc( ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ +#ifdef FIX_COMBINED_FORMATS_ISM_GAINS + num_objects = st_ivas->nchan_ism; +#else num_objects = st_ivas->nchan_transport; +#endif for ( i = 0; i < num_objects; i++ ) { mvr2r( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmRendererData->prev_gains[i], MAX_OUTPUT_CHANNELS ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index efba801599..b73dced7d8 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -94,7 +94,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); + output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -490,7 +490,7 @@ ivas_error ivas_jbm_dec_tc( { for ( int16_t c = 0; c < nchan; c++ ) { - int16_t val = ( int16_t )( output[c][t] + 0.5f ); + int16_t val = (int16_t) ( output[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); } } @@ -502,7 +502,7 @@ ivas_error ivas_jbm_dec_tc( ivas_sba_mix_matrix_determiner( st_ivas->hSpar, &output[sba_ch_idx], st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames ); } - else if ( st_ivas->renderer_type != RENDERER_DISABLE ) + else if ( st_ivas->renderer_type != RENDERER_DISABLE && !st_ivas->sba_dirac_stereo_flag ) { ivas_spar_dec_agc_pca( st_ivas, &output[sba_ch_idx], output_frame ); } @@ -868,12 +868,15 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { ivas_ism_dec_digest_tc( st_ivas ); - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + if ( !st_ivas->sba_dirac_stereo_flag ) { - n_render_timeslots *= ( st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size ); - } + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + n_render_timeslots *= ( st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size ); + } - ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + } } else { @@ -1169,61 +1172,23 @@ ivas_error ivas_jbm_dec_render( return error; } } - else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO || - st_ivas->renderer_type == RENDERER_MONO_DOWNMIX - ) + else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO || + st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { - int16_t slots_to_render, first_sf, last_sf, subframe_idx, ch; - uint16_t slot_size, slot_idx_start; - - slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); - slots_to_render = min( st_ivas->hSpar->num_slots - st_ivas->hSpar->slots_rendered, nSamplesAsked / slot_size ); - *nSamplesRendered = slots_to_render * slot_size; - first_sf = st_ivas->hSpar->subframes_rendered; - last_sf = first_sf; - - while ( slots_to_render > 0 ) - { - slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; - last_sf++; - } - - for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + /* render objects */ + ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); + /* add already rendererd SBA part */ + for ( n = 0; n < nchan_out; n++ ) { - int16_t nchan_ism; - int16_t n_samples_sf = slot_size * st_ivas->hSpar->subframe_nbslots[subframe_idx]; - - slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); - slot_idx_start = st_ivas->hSpar->slots_rendered; - - nchan_ism = st_ivas->nchan_ism; - - p_tc[0] = st_ivas->hTcBuffer->tc[0 + nchan_ism] + slot_idx_start * slot_size; - p_tc[1] = st_ivas->hTcBuffer->tc[1 + nchan_ism] + slot_idx_start * slot_size; - - - for ( n = 0; n < BINAURAL_CHANNELS; n++ ) - { - int16_t ts; - for ( ts = 0; ts < st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; ts++ ) - { - int16_t i; - for ( i = 0; i < slot_size; i++ ) - { - p_output[n][i + ts * slot_size] = p_tc[n][i + ts * slot_size]; - } - } - } - - st_ivas->hSpar->slots_rendered += st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; - st_ivas->hSpar->subframes_rendered++; + v_add( p_output[n], p_tc[n+st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } } else { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - } - } + } + } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { @@ -1616,7 +1581,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1691,7 +1656,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -2200,7 +2165,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -2230,7 +2195,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { - n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } #endif @@ -2315,9 +2280,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2361,7 +2326,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { - n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } #else @@ -2483,7 +2448,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index db69c6c618..a9bf0bd8bd 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -236,26 +236,29 @@ ivas_error ivas_spar_dec_open( buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = num_channels_internal; -#ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) - { - nchan_to_allocate += st_ivas->nchan_ism; - } -#endif #ifdef JBM_FOR_OSBA granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #endif if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + + ) + { #ifdef JBM_FOR_OSBA - && !(st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; + nchan_to_allocate = nchan_tc; + } + else #endif - ) - { - buffer_mode = TC_BUFFER_MODE_BUFFER; - nchan_tc = st_ivas->hDecoderConfig->nchan_out; - nchan_to_allocate = nchan_tc; + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + nchan_tc = st_ivas->hDecoderConfig->nchan_out; + nchan_to_allocate = nchan_tc; + } } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { @@ -1667,13 +1670,12 @@ void ivas_spar_dec_upmixer_sf( { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { - cldfbAnalysis_ts( - &p_tc[in_ch][ts * num_cldfb_bands], - cldfb_in_ts_re[in_ch][ts], - cldfb_in_ts_im[in_ch][ts], - num_cldfb_bands, - st_ivas->cldfbAnaDec[in_ch] - ); + cldfbAnalysis_ts( + &p_tc[in_ch][ts * num_cldfb_bands], + cldfb_in_ts_re[in_ch][ts], + cldfb_in_ts_im[in_ch][ts], + num_cldfb_bands, + st_ivas->cldfbAnaDec[in_ch] ); } } -- GitLab From a3466cf5c1d0ec8362cd87a23371105feb4b1016 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 14:16:23 +0200 Subject: [PATCH 21/89] fix crash in binaural decoding --- lib_dec/ivas_spar_decoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index a9bf0bd8bd..86b4adf138 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -236,6 +236,13 @@ ivas_error ivas_spar_dec_open( buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = num_channels_internal; +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + nchan_to_allocate += st_ivas->nchan_ism; + } +#endif + #ifdef JBM_FOR_OSBA granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); -- GitLab From b23addb090160a7f640ed395748e1fe788549362 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 15:41:58 +0200 Subject: [PATCH 22/89] fix number of objects in ivas_ism_render_sf --- lib_dec/ivas_ism_renderer.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index b8b7fa0a0d..3845000724 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -89,11 +89,11 @@ ivas_error ivas_ism_renderer_open( #endif { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); - interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + interpolator_length = ( uint16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); } else { - init_interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + init_interpolator_length = ( uint16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); interpolator_length = init_interpolator_length; } @@ -238,6 +238,12 @@ void ivas_ism_render_sf( float gain, prev_gain; num_objects = st_ivas->nchan_transport; +#ifdef JBM_FOR_OSBA + if (st_ivas->ivas_format == SBA_ISM_FORMAT) + { + num_objects = st_ivas->nchan_ism; + } +#endif nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; tc_offset = st_ivas->hTcBuffer->n_samples_rendered; @@ -380,12 +386,12 @@ ivas_error ivas_omasa_separate_object_renderer_open( if ( st_ivas->hDecoderConfig->voip_active ) { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); - interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); } else { #endif - init_interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + init_interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); interpolator_length = init_interpolator_length; #ifndef API_5MS } @@ -398,7 +404,7 @@ ivas_error ivas_omasa_separate_object_renderer_open( } st_ivas->hIsmRendererData->interpolator_length = interpolator_length; - st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { -- GitLab From 29e3d6bb45c2d75022c360e0db68627a60a27a9f Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 15:49:41 +0200 Subject: [PATCH 23/89] fix formatting --- lib_dec/ivas_dec.c | 7 +++---- lib_dec/ivas_dirac_dec.c | 6 +++--- lib_dec/ivas_ism_renderer.c | 18 +++++++++--------- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_osba_dec.c | 28 ++++++++++++++-------------- lib_dec/ivas_spar_decoder.c | 2 +- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 3b9a2dea71..cf71c8ab1e 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -779,10 +779,9 @@ ivas_error ivas_dec( } /* Loudspeakers, Ambisonics or Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || - st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || - st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC - ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || + st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || + st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, &output[sba_ch_idx], nchan_remapped #ifdef API_5MS diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 0c7aa3d918..f1e470b275 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1559,11 +1559,11 @@ void ivas_dirac_dec_set_md_map( #ifdef API_5MS /* copy also to tc buffer */ /* only for non-combined formats and combinded formats w/o discrete objects */ - if ( (st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) + if ( ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) #ifdef JBM_FOR_OSBA - && !(st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) #endif - ) + ) { st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 3845000724..2aaccd8f21 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -89,11 +89,11 @@ ivas_error ivas_ism_renderer_open( #endif { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); - interpolator_length = ( uint16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); } else { - init_interpolator_length = ( uint16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + init_interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); interpolator_length = init_interpolator_length; } @@ -239,10 +239,10 @@ void ivas_ism_render_sf( num_objects = st_ivas->nchan_transport; #ifdef JBM_FOR_OSBA - if (st_ivas->ivas_format == SBA_ISM_FORMAT) - { - num_objects = st_ivas->nchan_ism; - } + if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + num_objects = st_ivas->nchan_ism; + } #endif nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; @@ -386,12 +386,12 @@ ivas_error ivas_omasa_separate_object_renderer_open( if ( st_ivas->hDecoderConfig->voip_active ) { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); - interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); } else { #endif - init_interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + init_interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); interpolator_length = init_interpolator_length; #ifndef API_5MS } @@ -404,7 +404,7 @@ ivas_error ivas_omasa_separate_object_renderer_open( } st_ivas->hIsmRendererData->interpolator_length = interpolator_length; - st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index b73dced7d8..fa42506b60 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1181,7 +1181,7 @@ ivas_error ivas_jbm_dec_render( /* add already rendererd SBA part */ for ( n = 0; n < nchan_out; n++ ) { - v_add( p_output[n], p_tc[n+st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); + v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } } else diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 05fd9c8460..0728c6f115 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -111,7 +111,7 @@ ivas_error ivas_sba_ism_separate_object_renderer_open( int16_t i; st_ivas->hMasaIsmData->delayBuffer_nchan = st_ivas->nchan_ism; - st_ivas->hMasaIsmData->delayBuffer_size = ( int16_t )( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hMasaIsmData->delayBuffer_size = (int16_t) ( ( st_ivas->hDecoderConfig->output_Fs / 50 ) / MAX_PARAM_SPATIAL_SUBFRAMES ); if ( ( st_ivas->hMasaIsmData->delayBuffer = (float **) malloc( st_ivas->hMasaIsmData->delayBuffer_nchan * sizeof( float * ) ) ) == NULL ) { @@ -150,21 +150,21 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t n; ivas_error error; - /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ - if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) - { - int16_t tcBufferSize; + /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ + if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) + { + int16_t tcBufferSize; - tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; + tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - float *tc_local_n = st_ivas->hTcBuffer->tc[n]; - delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); - } + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + float *tc_local_n = st_ivas->hTcBuffer->tc[n]; + delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } + } - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); + ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) @@ -244,7 +244,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = ( int16_t )( output[channel_offset + c][t] + 0.5f ); + int16_t val = (int16_t) ( output[channel_offset + c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/sba_fast_conv_out.raw" ); } } @@ -296,7 +296,7 @@ ivas_error ivas_osba_dirac_td_binaural( { for ( int16_t c = 0; c < BINAURAL_CHANNELS; c++ ) { - int16_t val = ( int16_t )( p_sepobj[c][t] + 0.5f ); + int16_t val = (int16_t) ( p_sepobj[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/ism_td_bin_out.raw" ); } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 86b4adf138..93d9712989 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -237,7 +237,7 @@ ivas_error ivas_spar_dec_open( nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = num_channels_internal; #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { nchan_to_allocate += st_ivas->nchan_ism; } -- GitLab From 4611d2294746f5dac1346bb80c39015b21253fac Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 16:34:17 +0200 Subject: [PATCH 24/89] fix number of TCs in stereo case --- lib_dec/ivas_spar_decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 93d9712989..430fcd76f8 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -253,11 +253,10 @@ ivas_error ivas_spar_dec_open( ) { #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) { - buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; - nchan_to_allocate = nchan_tc; + nchan_to_allocate = nchan_tc + st_ivas->nchan_ism; } else #endif -- GitLab From 12aa3387429261408048222c8f092dbeb6c457e0 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Mon, 28 Aug 2023 16:34:17 +0200 Subject: [PATCH 25/89] fix number of TCs in stereo case --- lib_dec/ivas_spar_decoder.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 93d9712989..b6f4dca6cc 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -248,14 +248,15 @@ ivas_error ivas_spar_dec_open( granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #endif - if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) - - ) + if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO +#ifndef JBM_FOR_OSBA + || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO +#endif + ) ) { #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) { - buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; nchan_to_allocate = nchan_tc; } @@ -267,6 +268,21 @@ ivas_error ivas_spar_dec_open( nchan_to_allocate = nchan_tc; } } +#ifdef JBM_FOR_OSBA + else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + { + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) + { + nchan_tc += st_ivas->nchan_ism; + } + else + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + nchan_tc = st_ivas->hDecoderConfig->nchan_out; + nchan_to_allocate = nchan_tc; + } + } +#endif else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { nchan_to_allocate = 2 * BINAURAL_CHANNELS; -- GitLab From 47989d1cc505a6673d468a380615ccb8dcb8fbad Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 29 Aug 2023 13:53:04 +0200 Subject: [PATCH 26/89] fix OSBA JBM MONO output --- lib_dec/ivas_jbm_dec.c | 14 ++++++++++++-- lib_dec/ivas_spar_decoder.c | 24 +++--------------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index fa42506b60..78859d3708 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -512,6 +512,17 @@ ivas_error ivas_jbm_dec_tc( /* loudness correction */ ivas_dirac_dec_binaural_sba_gain( &output[sba_ch_idx], nchan_remapped, output_frame ); } + else if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + + ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); + + /* add W */ + for ( n = 0; n < nchan_out; n++ ) + { + v_add( output[n], output[n + max( nchan_out, nchan_ism )], output[n], output_frame ); + } + } } #endif else if ( st_ivas->ivas_format == MC_FORMAT ) @@ -1172,8 +1183,7 @@ ivas_error ivas_jbm_dec_render( return error; } } - else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO || - st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) + else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* render objects */ diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 13584a24b9..921ccd2e49 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -248,14 +248,10 @@ ivas_error ivas_spar_dec_open( granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #endif - if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO -#ifndef JBM_FOR_OSBA - || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO -#endif - ) ) + if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) ) { #ifdef JBM_FOR_OSBA - if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; nchan_to_allocate = nchan_tc + st_ivas->nchan_ism; @@ -268,21 +264,7 @@ ivas_error ivas_spar_dec_open( nchan_to_allocate = nchan_tc; } } -#ifdef JBM_FOR_OSBA - else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) - { - if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) - { - nchan_tc += st_ivas->nchan_ism; - } - else - { - buffer_mode = TC_BUFFER_MODE_BUFFER; - nchan_tc = st_ivas->hDecoderConfig->nchan_out; - nchan_to_allocate = nchan_tc; - } - } -#endif + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { nchan_to_allocate = 2 * BINAURAL_CHANNELS; -- GitLab From daf47c506006ad5ec2723f4a4627a0ad9bb0ef8c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Tue, 29 Aug 2023 15:01:11 +0200 Subject: [PATCH 27/89] add support for HOA output in JBM OSBA path --- lib_dec/ivas_ism_param_dec.c | 24 ++++++++++++++---------- lib_dec/ivas_jbm_dec.c | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 6cf2010a7a..e7f08c4c7f 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -489,7 +489,7 @@ ivas_error ivas_param_ism_dec_open( * set input parameters *-----------------------------------------------------------------*/ - hSpatParamRendCom->slot_size = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); + hSpatParamRendCom->slot_size = ( int16_t )( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); hDirAC->hConfig = NULL; set_s( hSpatParamRendCom->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hSpatParamRendCom->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); @@ -497,7 +497,7 @@ ivas_error ivas_param_ism_dec_open( hSpatParamRendCom->subframes_rendered = 0; hSpatParamRendCom->slots_rendered = 0; hSpatParamRendCom->num_slots = DEFAULT_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME; - hSpatParamRendCom->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); + hSpatParamRendCom->num_freq_bands = ( int16_t )( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); hDirAC->hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; @@ -820,7 +820,7 @@ void ivas_param_ism_dec( ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; #endif - output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + output_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nchan_transport = st_ivas->nchan_transport; if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) @@ -1073,10 +1073,10 @@ void ivas_ism_dec_digest_tc( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) #ifdef JBM_FOR_OSBA - || - st_ivas->renderer_type == RENDERER_OSBA_STEREO -#endif - ) + || st_ivas->renderer_type == RENDERER_OSBA_STEREO + || st_ivas->renderer_type == RENDERER_OSBA_AMBI +#endif + ) { int16_t i, num_objects; int16_t azimuth, elevation; @@ -1085,7 +1085,7 @@ void ivas_ism_dec_digest_tc( /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available ) { - int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + int16_t interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { st_ivas->hIsmRendererData->interpolator[0] = 0.0f; @@ -1104,7 +1104,7 @@ void ivas_ism_dec_digest_tc( } else { - ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); + ivas_jbm_dec_get_adapted_linear_interpolator( ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ #ifdef FIX_COMBINED_FORMATS_ISM_GAINS @@ -1143,7 +1143,11 @@ void ivas_ism_dec_digest_tc( efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); } } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV +#ifdef JBM_FOR_OSBA + || st_ivas->renderer_type == RENDERER_OSBA_AMBI +#endif + ) { /*get HOA gets for direction (ACN/SN3D)*/ ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index fa42506b60..869e8f30e3 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1184,6 +1184,24 @@ ivas_error ivas_jbm_dec_render( v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } } + else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS ) + { + float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; + float *p_output_ism[MAX_OUTPUT_CHANNELS]; + + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output_ism[n] = &output_ism[n][0]; + } + + //ivas_osba_render_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + ivas_ism_render_sf( st_ivas, p_output_ism, nSamplesAsked ); + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + for ( n = 0; n < nchan_out; n++ ) + { + v_add( p_output[n],output_ism[n], p_output[n], nSamplesAsked ); + } + } else { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -- GitLab From c5aea3b6ae564ad9bca4d0ae8ce2b3f48c0b6d87 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Tue, 29 Aug 2023 15:30:06 +0200 Subject: [PATCH 28/89] enable ISM gain calculation for LS output --- lib_dec/ivas_ism_param_dec.c | 10 ++++++++-- lib_dec/ivas_jbm_dec.c | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index e7f08c4c7f..a485cd056d 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1075,6 +1075,7 @@ void ivas_ism_dec_digest_tc( #ifdef JBM_FOR_OSBA || st_ivas->renderer_type == RENDERER_OSBA_STEREO || st_ivas->renderer_type == RENDERER_OSBA_AMBI + || st_ivas->renderer_type == RENDERER_OSBA_LS #endif ) { @@ -1129,8 +1130,13 @@ void ivas_ism_dec_digest_tc( azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); - if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && - st_ivas->hCombinedOrientationData == NULL ) + if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM +#ifdef JBM_FOR_OSBA + || st_ivas->renderer_type == RENDERER_OSBA_LS +#endif + ) && + st_ivas->hCombinedOrientationData == NULL + ) { if ( st_ivas->hIntSetup.is_planar_setup ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 0d554b41a0..d68848285c 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1204,7 +1204,6 @@ ivas_error ivas_jbm_dec_render( p_output_ism[n] = &output_ism[n][0]; } - //ivas_osba_render_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); ivas_ism_render_sf( st_ivas, p_output_ism, nSamplesAsked ); ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); for ( n = 0; n < nchan_out; n++ ) -- GitLab From 2ab0f5f6d543dc6675bcf9dd6ed1e2091ba81506 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Tue, 29 Aug 2023 15:53:28 +0200 Subject: [PATCH 29/89] add delay line for objects in OSBA HOA and LS otuput path --- lib_dec/ivas_jbm_dec.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index d68848285c..1a6c68f146 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1204,6 +1204,19 @@ ivas_error ivas_jbm_dec_render( p_output_ism[n] = &output_ism[n][0]; } + if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) + { + int16_t tcBufferSize; + + tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; + + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + float *tc_local_n = st_ivas->hTcBuffer->tc[n]; + delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + } + } + ivas_ism_render_sf( st_ivas, p_output_ism, nSamplesAsked ); ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); for ( n = 0; n < nchan_out; n++ ) -- GitLab From d31aaf10cb949f5db7f23af92b427b4933a774eb Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Tue, 29 Aug 2023 16:20:57 +0200 Subject: [PATCH 30/89] increase MAX_CLDFB_DIGEST_CHANNELS to FOA_CHANNELS + MAX_NUM_OBJECTS --- lib_com/ivas_cnst.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 29473c091c..d5449bea47 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -190,7 +190,12 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH +#ifdef JBM_FOR_OSBA +#define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) +#else #define MAX_CLDFB_DIGEST_CHANNELS 4 +#endif + #define MASA_JBM_RINGBUFFER_FRAMES 3 typedef enum -- GitLab From 30733d95357bef939f68c38095e02cdbea664dc8 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 30 Aug 2023 11:30:58 +0200 Subject: [PATCH 31/89] fix OSBA JBM ambi and LS output, add OSBA JBM EXT output, temporary fix for wrong allocation of float buffers for some OSBA cases --- apps/decoder.c | 31 +++++++++--------- lib_com/options.h | 2 +- lib_dec/ivas_dec.c | 8 +++++ lib_dec/ivas_jbm_dec.c | 63 +++++++++++++++++++++++++++---------- lib_dec/ivas_osba_dec.c | 19 +++-------- lib_dec/ivas_spar_decoder.c | 35 ++++++++++++++++++++- lib_rend/ivas_output_init.c | 16 ++++++++++ 7 files changed, 123 insertions(+), 51 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index bce14d8c61..2349eef9b0 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2067,6 +2067,9 @@ static ivas_error decodeG192( uint16_t nOutSamples = 0; #else int16_t nOutSamples = 0; +#endif +#ifdef API_5MS + int16_t num_subframes; #endif int32_t delayTimeScale = 0; ivas_error error = IVAS_ERR_UNKNOWN; @@ -2116,7 +2119,7 @@ static ivas_error decodeG192( } else { - IVAS_DEC_VoIP_SetScale( hIvasDec, arg.tsmScale, arg.tsmScale ); + IVAS_DEC_VoIP_SetScale( hIvasDec, INT16_MAX, arg.tsmScale ); } } #endif @@ -2211,7 +2214,7 @@ static ivas_error decodeG192( goto cleanup; } } -#ifdef API_5MS +#ifdef API_5MS_NO int16_t enable5ms, num_subframes; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; @@ -2336,7 +2339,7 @@ static ivas_error decodeG192( fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); goto cleanup; } - IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); + IVAS_DEC_VoIP_SetScale( hIvasDec, INT16_MAX, scale ); } #endif #endif @@ -2566,24 +2569,18 @@ static ivas_error decodeG192( } } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; -#ifdef API_5MS - if ( needNewFrame ) + frame++; + if ( !arg.quietModeEnabled ) { -#endif - frame++; - if ( !arg.quietModeEnabled ) - { - fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); #ifdef DEBUGGING - if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) - { - fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); - } -#endif + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); } -#ifdef API_5MS - } #endif + } + #ifdef WMOPS if ( vec_pos_update == 0 ) { diff --git a/lib_com/options.h b/lib_com/options.h index bd9dafa9b4..5085db1e29 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -184,7 +184,7 @@ #define CR_FIX_586_BPF_DFT_MEM /* FhG: issue 586: set input memory of DFT analysis of BPF signal to zero for HQ core to fix issue with PLC and bitrate switching */ #define CR_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE /* FhG: fix for cng in ISM DTX on sudden silence periods */ #define CR_FIX_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA init */ - +#define CR_FIX_OSBA_FLOAT_BUFFER_INIT /* ##################### End NON-BE CR switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index cf71c8ab1e..5c253ad0e7 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -801,7 +801,11 @@ ivas_error ivas_dec( } else { +#ifdef JBM_FOR_OSBA + ivas_sba_upmixer_renderer( st_ivas, output, output_frame ); +#else ivas_sba_upmixer_renderer( st_ivas, &output[sba_ch_idx], output_frame ); +#endif } } else if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC && ( st_ivas->renderer_type == RENDERER_OSBA_STEREO || st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) ) @@ -850,7 +854,11 @@ ivas_error ivas_dec( } } +#ifdef JBM_FOR_OSBA + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1a6c68f146..a608f6b99f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -879,6 +879,15 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { ivas_ism_dec_digest_tc( st_ivas ); + /* delay the objects here for all renderers where it is needed */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + { + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + delay_signal( st_ivas->hTcBuffer->tc[n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + } + } + if ( !st_ivas->sba_dirac_stereo_flag ) { if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) @@ -966,7 +975,11 @@ ivas_error ivas_jbm_dec_render( float pan_left, pan_right; int16_t nSamplesAskedLocal; ivas_error error; - float *p_output[MAX_OUTPUT_CHANNELS]; + float *p_output[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ]; float *p_tc[MAX_TRANSPORT_CHANNELS]; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; @@ -986,7 +999,12 @@ ivas_error ivas_jbm_dec_render( nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + for ( n = 0; n < MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; + n++ ) { p_output[n] = &output[n][0]; } @@ -1199,29 +1217,26 @@ ivas_error ivas_jbm_dec_render( float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_output_ism[MAX_OUTPUT_CHANNELS]; - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { p_output_ism[n] = &output_ism[n][0]; } - if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); + for ( n = 0; n < nchan_out; n++ ) { - int16_t tcBufferSize; - - tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; - - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - float *tc_local_n = st_ivas->hTcBuffer->tc[n]; - delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); - } + v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); + v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); } + } + else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ + { - ivas_ism_render_sf( st_ivas, p_output_ism, nSamplesAsked ); - ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - for ( n = 0; n < nchan_out; n++ ) + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, &p_output[st_ivas->nchan_ism] ); + for ( n = 0; n < st_ivas->nchan_ism; n++ ) { - v_add( p_output[n],output_ism[n], p_output[n], nSamplesAsked ); + mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); } } else @@ -1237,6 +1252,20 @@ ivas_error ivas_jbm_dec_render( else /* SBA_MODE_SPAR */ { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + { +#ifdef DEBUGGING + assert( st_ivas->ism_mode == ISM_MODE_NONE ); +#endif + for ( n = st_ivas->hIntSetup.nchan_out_woLFE - 1; n >= 0; n-- ) + { + mvr2r( output[n], output[n + st_ivas->nchan_ism], *nSamplesRendered ); + } + for ( n = 0; n < st_ivas->nchan_ism; n++ ) + { + set_zero( output[n], *nSamplesRendered ); + } + } } } #endif diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 0728c6f115..6cd39eb447 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -150,23 +150,8 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t n; ivas_error error; - /* Delay the object signals to match the CLDFB delay on the first ts, taken from OMASA path */ - if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) - { - int16_t tcBufferSize; - - tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; - - for ( n = 0; n < st_ivas->nchan_ism; n++ ) - { - float *tc_local_n = st_ivas->hTcBuffer->tc[n]; - delay_signal( tc_local_n, tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); - } - } - ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, &output_f[2] ); - if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, output_f, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; @@ -393,7 +378,11 @@ ivas_error ivas_osba_render( } } +#ifdef JBM_FOR_OSBA + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output_f, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 921ccd2e49..61f95c24e7 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1411,18 +1411,39 @@ void ivas_spar_dec_upmixer( float *output_f_local[MAX_OUTPUT_CHANNELS]; float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; +#ifdef JBM_FOR_OSBA + int16_t nchan_internal_total; + int16_t sba_ch_offset; + float *p_tddecorr_in[MAX_OUTPUT_CHANNELS]; +#endif hSpar = st_ivas->hSpar; nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); - +#ifdef JBM_FOR_OSBA + nchan_internal_total = nchan_internal; + sba_ch_offset = 0; + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + nchan_internal_total += st_ivas->nchan_ism; + sba_ch_offset = st_ivas->nchan_ism; + } +#endif for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { +#ifdef JBM_FOR_OSBA + output_f_local[n] = output[n + sba_ch_offset]; +#else output_f_local[n] = output[n]; +#endif } +#ifdef JBM_FOR_OSBA + for ( n = 0; n < nchan_internal_total; n++ ) +#else for ( n = 0; n < nchan_internal; n++ ) +#endif { st_ivas->hTcBuffer->tc[n] = output[n]; } @@ -1440,12 +1461,20 @@ void ivas_spar_dec_upmixer( { if ( hSpar->hTdDecorr ) { +#ifdef JBM_FOR_OSBA + ivas_td_decorr_process( hSpar->hTdDecorr, output_f_local, pPcm_tmp, output_frame ); +#else ivas_td_decorr_process( hSpar->hTdDecorr, st_ivas->hTcBuffer->tc, pPcm_tmp, output_frame ); +#endif if ( hSpar->hTdDecorr->num_apd_outputs >= ( nchan_internal - nchan_transport ) ) { for ( i = 0; i < nchan_internal - nchan_transport; i++ ) { +#ifdef JBM_FOR_OSBA + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); +#else mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); +#endif } } else @@ -1456,7 +1485,11 @@ void ivas_spar_dec_upmixer( } for ( i = 0; i < hSpar->hTdDecorr->num_apd_outputs; i++ ) { +#ifdef JBM_FOR_OSBA + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); +#else mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); +#endif } } } diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index 3c4bf2d2aa..28a4dec3ea 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -36,6 +36,9 @@ #include "prot.h" #include "ivas_prot_rend.h" #include "ivas_rom_com.h" +#ifdef CR_FIX_OSBA_FLOAT_BUFFER_INIT +#include "ivas_prot.h" +#endif #ifdef DEBUGGING #include "debug.h" #include @@ -369,6 +372,19 @@ int16_t ivas_get_nchan_buffers_dec( nchan_out_buff = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; /*take into account sba_ch_idx' in ivas_dec() */ } +#ifdef CR_FIX_OSBA_FLOAT_BUFFER_INIT + if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) + { + int16_t nchan_internal; + nchan_internal = ivas_sba_get_nchan_metadata( min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ), st_ivas->hDecoderConfig->ivas_total_brate ); + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + nchan_internal += st_ivas->nchan_ism; + } + nchan_out_buff = max( nchan_out_buff, nchan_internal ); + } +#endif + nchan_out_buff = min( nchan_out_buff, MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); } else if ( st_ivas->ivas_format == MC_FORMAT ) -- GitLab From 59266d92b25322901a757d06d1df300c13bd69f6 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 30 Aug 2023 16:11:20 +0200 Subject: [PATCH 32/89] add OSBA to pyivastest framework --- scripts/config/ivas_modes.json | 1384 +++++++++++++++++- scripts/prepare_combined_format_inputs.py | 26 + scripts/pyaudio3dtools/spatialaudioformat.py | 145 ++ scripts/pyivastest/IvasModeRunner.py | 7 + 4 files changed, 1561 insertions(+), 1 deletion(-) diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index 5e8c7e8249..15bb4f6a4a 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -2121,7 +2121,7 @@ "EXT": [] }, "in_config": "ISM1", - "table_name": "ISM1@{table_bitrate} RS kbps {bandwidth}", + "table_name": "ISM1@{table_bitrate} RS {bandwidth}", "nummetadata": 1, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -4839,5 +4839,1387 @@ ] } } + }, + "OSBA": { + "OSBA_ISM1_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA3", + "table_name": "OSBA ISM1 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM1_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA2", + "table_name": "OSBA ISM1 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM1_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_FOA", + "table_name": "OSBA ISM1 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA3", + "table_name": "OSBA ISM2 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA2", + "table_name": "OSBA ISM2 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_FOA", + "table_name": "OSBA ISM2 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM3_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_HOA3", + "table_name": "OSBA ISM3 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM3_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_HOA2", + "table_name": "OSBA ISM3 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM3_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_FOA", + "table_name": "OSBA ISM3 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM4_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_HOA3", + "table_name": "OSBA ISM4 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM4_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_HOA2", + "table_name": "OSBA ISM4 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM4_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_FOA", + "table_name": "OSBA ISM4 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM1_HOA3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA3", + "table_name": "OSBA ISM1 HOA3 RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM1_HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA2", + "table_name": "OSBA ISM1 HOA2 RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM1_FOA_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "1", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_FOA", + "table_name": "OSBA ISM1 FOA RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM2_HOA3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA3", + "table_name": "OSBA ISM2 HOA RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM2_HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA2", + "table_name": "OSBA ISM2 HOA2 RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM2_FOA_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "2", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_FOA", + "table_name": "OSBA ISM2 FOA RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM3_HOA3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_HOA3", + "table_name": "OSBA ISM3 HOA3 RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM3_HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_HOA2", + "table_name": "OSBA ISM3 HOA2 RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM3_FOA_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "3", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM3_FOA", + "table_name": "OSBA ISM3 FOA RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM4_HOA3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_HOA3", + "table_name": "OSBA ISM4 HOA3 RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM4_HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_HOA2", + "table_name": "OSBA ISM4 HOA2 RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM4_FOA_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "4", + "{ambi_order}" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM4_FOA", + "table_name": "OSBA ISM4 FOA RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } } } diff --git a/scripts/prepare_combined_format_inputs.py b/scripts/prepare_combined_format_inputs.py index b8ad685579..f51da80db9 100755 --- a/scripts/prepare_combined_format_inputs.py +++ b/scripts/prepare_combined_format_inputs.py @@ -65,6 +65,13 @@ masa_alts = ({'masa_meta_file': 'stv2MASA2TC48c.met', 'masa_audio_file': 'stv1MASA1TC48c.wav', 'masa_tag': '1MASA1TC'}) +sba_alts = ({'sba_audio_file': 'stvFOA48c.wav', + 'sba_tag': 'FOA'}, + {'sba_audio_file': 'stv2OA48c.wav', + 'sba_tag': '2OA'}, + {'sba_audio_file': 'stv3OA48c.wav', + 'sba_tag': '3OA'}) + # files containing 1-4 ISMs as channels ism_files = ('stv1ISM48s.wav', 'stv2ISM48s.wav', 'stv3ISM48s.wav', 'stv4ISM48s.wav') # per-object metadata @@ -100,6 +107,25 @@ for enum_idx, (ism_audio_file, ism_meta_file) in enumerate(zip(ism_files, ism_me if not os.path.exists(masa_meta_name) or force_overwrite: shutil.copyfile(os.path.join(input_dir, masa_item['masa_meta_file']), masa_meta_name) wrote_files.append(masa_meta_name) + for sba_item in sba_alts: + sba_tag = sba_item['sba_tag'] + + osba_file_body = f'stvOSBA_{n_isms}ISM_{sba_tag}48c' + osba_file = os.path.join(output_dir, f'{osba_file_body}.wav') + + if not os.path.exists(osba_file) or force_overwrite: + audiofile.combinefiles(in_filenames=[os.path.join(input_dir, ism_audio_file), + os.path.join(input_dir, sba_item['sba_audio_file'])], + out_file=osba_file) + wrote_files.append(osba_file) + + # copy ISM metadata files under names matching the combined file + for ism_idx in range(n_isms): + ism_file_name = os.path.join(output_dir, f'{osba_file_body}_ISM{ism_idx+1}{os.path.splitext(ism_meta_file)[1]}') + if not os.path.exists(ism_file_name) or force_overwrite: + shutil.copyfile(os.path.join(input_dir, ism_meta_file), ism_file_name) + wrote_files.append(ism_file_name) + # info print. helps setting up .gitignore if len(wrote_files) > 0: diff --git a/scripts/pyaudio3dtools/spatialaudioformat.py b/scripts/pyaudio3dtools/spatialaudioformat.py index 524e4d61f5..0375063cc6 100644 --- a/scripts/pyaudio3dtools/spatialaudioformat.py +++ b/scripts/pyaudio3dtools/spatialaudioformat.py @@ -356,6 +356,151 @@ _format_configs = { "lfe_index": [], "altname": "meta", }, + # OSBA Formats + "OSBA_ISM1_HOA3": + { + "name": "OSBA_ISM1_HOA3", + "ambi_order": 3, + "isplanar": False, + "nchannels": 17, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba3_ism1", + + }, + "OSBA_ISM1_HOA2": + { + "name": "OSBA_ISM1_HOA2", + "ambi_order": 2, + "isplanar": False, + "nchannels": 10, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba2_ism1", + + }, + "OSBA_ISM1_FOA": + { + "name": "OSBA_ISM1_FOA", + "ambi_order": 1, + "isplanar": False, + "nchannels": 5, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba1_ism1", + + }, + "OSBA_ISM2_HOA3": + { + "name": "OSBA_ISM2_HOA3", + "ambi_order": 3, + "isplanar": False, + "nchannels": 18, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba3_ism2", + + }, + "OSBA_ISM2_HOA2": + { + "name": "OSBA_ISM2_HOA2", + "ambi_order": 2, + "isplanar": False, + "nchannels": 11, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba2_ism2", + + }, + "OSBA_ISM2_FOA": + { + "name": "OSBA_ISM2_FOA", + "ambi_order": 1, + "isplanar": False, + "nchannels": 6, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba1_ism2", + + }, + "OSBA_ISM3_HOA3": + { + "name": "OSBA_ISM3_HOA3", + "ambi_order": 3, + "isplanar": False, + "nchannels": 19, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba3_ism3", + + }, + "OSBA_ISM3_HOA2": + { + "name": "OSBA_ISM3_HOA2", + "ambi_order": 2, + "isplanar": False, + "nchannels": 12, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba2_ism3", + + }, + "OSBA_ISM3_FOA": + { + "name": "OSBA_ISM3_FOA", + "ambi_order": 1, + "isplanar": False, + "nchannels": 7, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba1_ism3", + + }, + "OSBA_ISM4_HOA3": + { + "name": "OSBA_ISM4_HOA3", + "ambi_order": 3, + "isplanar": False, + "nchannels": 20, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba3_ism4", + + }, + "OSBA_ISM4_HOA2": + { + "name": "OSBA_ISM4_HOA2", + "ambi_order": 2, + "isplanar": False, + "nchannels": 13, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba2_ism4", + + }, + "OSBA_ISM4_FOA": + { + "name": "OSBA_ISM4_FOA", + "ambi_order": 1, + "isplanar": False, + "nchannels": 8, + "isloudspeaker": False, + "isheadphones": False, + "lfe_index": [], + "altname": "osba1_ism4", + + }, } # Channel indices of planar Ambisonic components of ACN diff --git a/scripts/pyivastest/IvasModeRunner.py b/scripts/pyivastest/IvasModeRunner.py index 85515e824d..44957ff6e2 100644 --- a/scripts/pyivastest/IvasModeRunner.py +++ b/scripts/pyivastest/IvasModeRunner.py @@ -592,6 +592,13 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector): if config["cmd"]["in_config"] == "SBA": wav_info = af.get_wav_file_info(in_file_name_transformed) in_format = spformat.detect_format(wav_info["channels"]) + elif config["cmd"]["in_config"][0:4] == "OSBA": + # get number of ISMs expected + osba_ism_config = config["cmd"]["in_config"][5:9] + osba_ism_format_dict = spformat.get_format_dict(osba_ism_config) + wav_info = af.get_wav_file_info(in_file_name_transformed) + osba_ambi_config = spformat.detect_format(wav_info["channels"] - osba_ism_format_dict["nchannels"]) + in_format = f"OSBA_{osba_ism_config}_{osba_ambi_config}" # save in config as json file in_format_dict = spformat.get_format_dict(in_format) -- GitLab From b78fe039d88ee22fd9dfbecddd8deeb0e2d1e968 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 30 Aug 2023 16:31:31 +0200 Subject: [PATCH 33/89] use explicit ambisonic order for OSBA modes --- scripts/config/ivas_modes.json | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index 15bb4f6a4a..09cbf04dde 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -4845,7 +4845,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -4919,7 +4919,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -4993,7 +4993,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5067,7 +5067,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -5142,7 +5142,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -5217,7 +5217,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5292,7 +5292,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -5368,7 +5368,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -5444,7 +5444,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5520,7 +5520,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -5597,7 +5597,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -5674,7 +5674,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5751,7 +5751,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -5789,7 +5789,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -5827,7 +5827,7 @@ "encmodeoption": [ "-ism_sba", "1", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5865,7 +5865,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -5904,7 +5904,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -5943,7 +5943,7 @@ "encmodeoption": [ "-ism_sba", "2", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -5982,7 +5982,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -6022,7 +6022,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -6062,7 +6062,7 @@ "encmodeoption": [ "-ism_sba", "3", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -6102,7 +6102,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -6143,7 +6143,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -6184,7 +6184,7 @@ "encmodeoption": [ "-ism_sba", "4", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", -- GitLab From 2200e004df44b7f79fe725ee41001b784e955cf0 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 31 Aug 2023 09:35:53 +0200 Subject: [PATCH 34/89] fix sanitizer problems with OSBA high bit rate binaural rendering --- lib_com/options.h | 2 +- lib_dec/ivas_osba_dec.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5085db1e29..f6a2d3f047 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -184,7 +184,7 @@ #define CR_FIX_586_BPF_DFT_MEM /* FhG: issue 586: set input memory of DFT analysis of BPF signal to zero for HQ core to fix issue with PLC and bitrate switching */ #define CR_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE /* FhG: fix for cng in ISM DTX on sudden silence periods */ #define CR_FIX_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA init */ -#define CR_FIX_OSBA_FLOAT_BUFFER_INIT +#define CR_FIX_OSBA_FLOAT_BUFFER_INIT /* FhG: */ /* ##################### End NON-BE CR switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 6cd39eb447..bcac3947bd 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -208,7 +208,13 @@ ivas_error ivas_osba_dirac_td_binaural( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output[channel_offset], output_frame ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, +#ifdef JBM_FOR_OSBA + output, +#else + &output[channel_offset], +#endif + output_frame ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From 069d6b47553bcf0105c9881b729d5c5fc95c5afe Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 31 Aug 2023 10:11:17 +0200 Subject: [PATCH 35/89] fix low bit rate OSBA JBM binaural rendering --- lib_dec/ivas_spar_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 910d43da45..6d926bf057 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -265,7 +265,7 @@ ivas_error ivas_spar_dec_open( } #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); -- GitLab From 9af20c83b5d0f3f759f6e13280500af6e671a91f Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 31 Aug 2023 13:47:31 +0200 Subject: [PATCH 36/89] add OSBA test vectors to ci_linux.json --- scripts/config/ci_linux.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/config/ci_linux.json b/scripts/config/ci_linux.json index f7d6c4ec4b..33d46408b4 100644 --- a/scripts/config/ci_linux.json +++ b/scripts/config/ci_linux.json @@ -36,6 +36,18 @@ "OMASA_ISM4_1TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA1TC48c.wav", "OMASA_ISM4_1TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA1TC48c.wav", "OMASA_ISM4_2TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA2TC48c.wav", - "OMASA_ISM4_2TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA2TC48c.wav" + "OMASA_ISM4_2TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA2TC48c.wav", + "OSBA_ISM1_FOA": "/usr/local/testv/stvOSBA_1ISM_FOA48c.wav", + "OSBA_ISM1_HOA2": "/usr/local/testv/stvOSBA_1ISM_2OA48c.wav", + "OSBA_ISM1_HOA3": "/usr/local/testv/stvOSBA_1ISM_3OA48c.wav", + "OSBA_ISM2_FOA": "/usr/local/testv/stvOSBA_2ISM_FOA48c.wav", + "OSBA_ISM2_HOA2": "/usr/local/testv/stvOSBA_2ISM_2OA48c.wav", + "OSBA_ISM2_HOA3": "/usr/local/testv/stvOSBA_2ISM_3OA48c.wav", + "OSBA_ISM3_FOA": "/usr/local/testv/stvOSBA_3ISM_FOA48c.wav", + "OSBA_ISM3_HOA2": "/usr/local/testv/stvOSBA_3ISM_2OA48c.wav", + "OSBA_ISM3_HOA3": "/usr/local/testv/stvOSBA_3ISM_3OA48c.wav", + "OSBA_ISM4_FOA": "/usr/local/testv/stvOSBA_4ISM_FOA48c.wav", + "OSBA_ISM4_HOA2": "/usr/local/testv/stvOSBA_4ISM_2OA48c.wav", + "OSBA_ISM4_HOA3": "/usr/local/testv/stvOSBA_4ISM_3OA48c.wav" } } -- GitLab From 915e1540b4f3ba6f676586d3eeb24baeada15755 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 31 Aug 2023 13:59:58 +0200 Subject: [PATCH 37/89] fix compiler warnings --- lib_dec/ivas_osba_dec.c | 10 +--------- lib_dec/ivas_spar_decoder.c | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 0efd0eab60..821fa73fb6 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -343,19 +343,11 @@ ivas_error ivas_osba_render( { float tmp_ism_out[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_tmp_ism_out[MAX_OUTPUT_CHANNELS]; - int16_t n, nchan_out, nchan_ism, sba_ch_idx; + int16_t n, nchan_out, nchan_ism; ivas_error error; nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_ism = st_ivas->nchan_ism; - if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) - { - sba_ch_idx = st_ivas->nchan_ism; - } - else - { - sba_ch_idx = 0; - } for ( n = 0; n < nchan_out; n++ ) { diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 6d926bf057..a9c3c1fb9b 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1410,7 +1410,6 @@ void ivas_spar_dec_upmixer( #ifdef JBM_FOR_OSBA int16_t nchan_internal_total; int16_t sba_ch_offset; - float *p_tddecorr_in[MAX_OUTPUT_CHANNELS]; #endif hSpar = st_ivas->hSpar; -- GitLab From d2be344b8208b2a9f93081b2d34d7295e6a88e7b Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 31 Aug 2023 14:07:40 +0200 Subject: [PATCH 38/89] fix formatting --- apps/decoder.c | 4 ++-- lib_dec/ivas_ism_param_dec.c | 29 +++++++++++++---------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 76011d1727..953eb56cbc 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1539,11 +1539,11 @@ static bool parseCmdlIVAS_dec( return false; } - if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) + if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) #ifdef VARIABLE_SPEED_DECODING && ( !arg->tsmEnabled ) #endif - ) + ) { arg->enable5ms = false; } diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 865ffe677a..34d88158d6 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -489,7 +489,7 @@ ivas_error ivas_param_ism_dec_open( * set input parameters *-----------------------------------------------------------------*/ - hSpatParamRendCom->slot_size = ( int16_t )( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); + hSpatParamRendCom->slot_size = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); hDirAC->hConfig = NULL; set_s( hSpatParamRendCom->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hSpatParamRendCom->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); @@ -497,7 +497,7 @@ ivas_error ivas_param_ism_dec_open( hSpatParamRendCom->subframes_rendered = 0; hSpatParamRendCom->slots_rendered = 0; hSpatParamRendCom->num_slots = DEFAULT_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME; - hSpatParamRendCom->num_freq_bands = ( int16_t )( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); + hSpatParamRendCom->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); hDirAC->hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; @@ -999,11 +999,9 @@ void ivas_ism_dec_digest_tc( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) #ifdef JBM_FOR_OSBA - || st_ivas->renderer_type == RENDERER_OSBA_STEREO - || st_ivas->renderer_type == RENDERER_OSBA_AMBI - || st_ivas->renderer_type == RENDERER_OSBA_LS -#endif - ) + || st_ivas->renderer_type == RENDERER_OSBA_STEREO || st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS +#endif + ) { int16_t i, num_objects; int16_t azimuth, elevation; @@ -1012,7 +1010,7 @@ void ivas_ism_dec_digest_tc( /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available ) { - int16_t interpolator_length = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { st_ivas->hIsmRendererData->interpolator[0] = 0.0f; @@ -1031,7 +1029,7 @@ void ivas_ism_dec_digest_tc( } else { - ivas_jbm_dec_get_adapted_linear_interpolator( ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); + ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ #ifdef FIX_COMBINED_FORMATS_ISM_GAINS @@ -1056,13 +1054,12 @@ void ivas_ism_dec_digest_tc( azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); - if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM + if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM #ifdef JBM_FOR_OSBA - || st_ivas->renderer_type == RENDERER_OSBA_LS + || st_ivas->renderer_type == RENDERER_OSBA_LS #endif - ) && - st_ivas->hCombinedOrientationData == NULL - ) + ) && + st_ivas->hCombinedOrientationData == NULL ) { if ( st_ivas->hIntSetup.is_planar_setup ) { @@ -1077,9 +1074,9 @@ void ivas_ism_dec_digest_tc( } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV #ifdef JBM_FOR_OSBA - || st_ivas->renderer_type == RENDERER_OSBA_AMBI + || st_ivas->renderer_type == RENDERER_OSBA_AMBI #endif - ) + ) { /*get HOA gets for direction (ACN/SN3D)*/ ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order ); -- GitLab From 337da8b1e49f3896ca575631c39e9ba89e4b3a2d Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 1 Sep 2023 10:28:59 +0200 Subject: [PATCH 39/89] JBM + rate switching for OSBA --- lib_com/ivas_prot.h | 10 ++ lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 34 +++++- lib_dec/ivas_jbm_dec.c | 94 +++++++++++++-- lib_dec/ivas_sba_dec.c | 234 +++++++++++++++++++++++++++++++----- lib_dec/ivas_spar_decoder.c | 24 +++- lib_dec/ivas_stat_dec.h | 24 ++-- 7 files changed, 369 insertions(+), 52 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 5dacf5c6ba..f78b77050d 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3449,6 +3449,16 @@ void ivas_sba_set_cna_cng_flag( ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +#ifdef JBM_FOR_OSBA + , + uint16_t *nSamplesFlushed, /* o : number of samples flushed */ +#if defined SPLIT_REND_WITH_HEAD_ROT + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif +#endif ); ivas_error ivas_sba_digest_tc( diff --git a/lib_com/options.h b/lib_com/options.h index 87dccba3e7..79a7f93192 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -175,6 +175,7 @@ #define CR_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE /* FhG: fix for cng in ISM DTX on sudden silence periods */ #define CR_FIX_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA init */ #define CR_FIX_OSBA_FLOAT_BUFFER_INIT /* FhG: */ +#define CR_FIX_JBM_FLUSH_OFFSET /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 20f6ed46f6..5bd4681d7b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -361,7 +361,17 @@ ivas_error ivas_dec_setup( num_bits_read += SBA_ORDER_BITS; if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate && ivas_total_brate > IVAS_SID_5k2 ) { - if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_dec_reconfigure( st_ivas +#ifdef JBM_FOR_OSBA + , + nSamplesRendered, +#if defined SPLIT_REND_WITH_HEAD_ROT + pcm_resolution, +#endif + data +#endif + + ) ) != IVAS_ERR_OK ) { return error; } @@ -472,7 +482,16 @@ ivas_error ivas_dec_setup( if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate ) { - if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_dec_reconfigure( st_ivas + #ifdef JBM_FOR_OSBA + , + nSamplesRendered, +#if defined SPLIT_REND_WITH_HEAD_ROT + pcm_resolution, +#endif + data +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -598,7 +617,16 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->ivas_total_brate = IVAS_24k4; } - if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_dec_reconfigure( st_ivas + #ifdef JBM_FOR_OSBA + , + nSamplesRendered, +#if defined SPLIT_REND_WITH_HEAD_ROT + pcm_resolution, +#endif + data +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 19e4868378..9e49167c85 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -958,7 +958,11 @@ ivas_error ivas_jbm_dec_render( + MAX_NUM_OBJECTS #endif ]; - float *p_tc[MAX_TRANSPORT_CHANNELS]; + float *p_tc[MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ]; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; error = IVAS_ERR_OK; @@ -1532,7 +1536,11 @@ ivas_error ivas_jbm_dec_flush_renderer( hTcBuffer->n_samples_buffered = hTcBuffer->n_samples_granularity + n_samples_still_available; hTcBuffer->n_samples_available = 0; hTcBuffer->n_samples_flushed = n_samples_to_render; +#ifdef CR_FIX_JBM_FLUSH_OFFSET + hTcBuffer->n_samples_rendered = 0; +#else hTcBuffer->n_samples_rendered = hTcBuffer->n_samples_granularity; +#endif for ( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) { @@ -1631,12 +1639,59 @@ ivas_error ivas_jbm_dec_flush_renderer( } } } +#ifdef JBM_FOR_OSBA + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + { + float *tc_local[MAX_TRANSPORT_CHANNELS]; + int16_t last_spar_md_idx; + int16_t last_dirac_md_idx; + uint16_t nSamplesAvailableNext; + + last_spar_md_idx = st_ivas->hSpar->render_to_md_map[st_ivas->hSpar->slots_rendered - 1]; + last_dirac_md_idx = st_ivas->hSpatParamRendCom->render_to_md_map[st_ivas->hSpatParamRendCom->slots_rendered - 1]; +#ifdef DEBUGGING + assert( ism_mode_old == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ); +#endif + /* copy from ISM delay buffer to the correct place in tcs */ + for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ ) + { + tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx + 2][hTcBuffer->n_samples_rendered]; + mvr2r( st_ivas->hMasaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hMasaIsmData->delayBuffer_size ); + } + /* transfer adapted sf info from hTcBuffer to SPAR and DirAC */ + st_ivas->hSpar->nb_subframes = 1; + st_ivas->hSpar->subframes_rendered = 0; + st_ivas->hSpar->subframe_nbslots[0] = JBM_CLDFB_SLOTS_IN_SUBFRAME; + st_ivas->hSpar->slots_rendered = 0; + st_ivas->hSpar->num_slots = JBM_CLDFB_SLOTS_IN_SUBFRAME; + st_ivas->hSpatParamRendCom->nb_subframes = 1; + st_ivas->hSpatParamRendCom->subframes_rendered = 0; + st_ivas->hSpatParamRendCom->subframe_nbslots[0] = JBM_CLDFB_SLOTS_IN_SUBFRAME; + st_ivas->hSpatParamRendCom->slots_rendered = 0; + st_ivas->hSpatParamRendCom->num_slots = JBM_CLDFB_SLOTS_IN_SUBFRAME; + /* also adapt md maps, just use the last index */ + set_s( st_ivas->hSpar->render_to_md_map, last_spar_md_idx, n_slots_still_available ); + set_s( st_ivas->hSpatParamRendCom->render_to_md_map, last_dirac_md_idx, n_slots_still_available ); + /* render the last subframe */ + if ( ( error = ivas_osba_dirac_td_binaural_jbm( st_ivas, (uint16_t) hTcBuffer->n_samples_granularity, nSamplesRendered, &nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif else { return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong IVAS format in VoIP renderer flushing!" ); } +#ifdef CR_FIX_JBM_FLUSH_OFFSET + hTcBuffer->n_samples_rendered = hTcBuffer->n_samples_granularity; +#endif } +#ifdef JBM_FOR_OSBA + *nSamplesRendered = n_samples_to_render; +#endif + /* Only write out the valid data*/ #if defined SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->hDecoderConfig->Opt_Limiter ) @@ -2002,7 +2057,10 @@ int16_t ivas_jbm_dec_get_num_tc_channels( { num_tc++; } - num_tc += st_ivas->nchan_ism; + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + num_tc += st_ivas->nchan_ism; + } } #endif else if ( st_ivas->ivas_format == MC_FORMAT ) @@ -2208,7 +2266,11 @@ ivas_error ivas_jbm_dec_tc_buffer_open( if ( hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_NONE ) { hTcBuffer->tc_buffer = NULL; - for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2235,7 +2297,11 @@ ivas_error ivas_jbm_dec_tc_buffer_open( if ( nsamp_to_allocate == 0 ) { hTcBuffer->tc_buffer = NULL; - for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2259,7 +2325,11 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; offset += n_samp_residual; } - for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + for ( ; ch_idx < MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2372,7 +2442,13 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; offset += n_samp_residual; } - for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + for ( ; ch_idx < MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + + ; + ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2436,7 +2512,11 @@ void ivas_jbm_dec_tc_buffer_close( if ( *phTcBuffer != NULL ) { - for ( i = 0; i < MAX_TRANSPORT_CHANNELS; i++ ) + for ( i = 0; i < MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; i++ ) { ( *phTcBuffer )->tc[i] = NULL; } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 8f7e5d42ef..5f668d5245 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -102,6 +102,16 @@ void ivas_sba_set_cna_cng_flag( ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +#ifdef JBM_FOR_OSBA + , + uint16_t *nSamplesFlushed, /* o : number of samples flushed */ +#if defined SPLIT_REND_WITH_HEAD_ROT + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif +#endif ) { int16_t nchan_transport_old, nSCE_old, nCPE_old, nchan_hp20_old; @@ -115,8 +125,13 @@ ivas_error ivas_sba_dec_reconfigure( DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; ISM_MODE ism_mode_old; +#ifdef JBM_FOR_OSBA + int16_t granularity_new; + int16_t sba_analysis_order_old; +#endif ism_mode_old = st_ivas->ism_mode; + error = IVAS_ERR_OK; hDecoderConfig = st_ivas->hDecoderConfig; @@ -127,7 +142,9 @@ ivas_error ivas_sba_dec_reconfigure( * Set SBA high-level parameters * Save old SBA high-level parameters *-----------------------------------------------------------------*/ - +#ifdef JBM_FOR_OSBA + nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas ); +#endif ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); nchan_hp20_old = getNumChanSynthesis( st_ivas ); if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) @@ -150,28 +167,113 @@ ivas_error ivas_sba_dec_reconfigure( nCPE_old = st_ivas->nCPE; nchan_transport_old = st_ivas->nchan_transport; sba_dirac_stereo_flag_old = st_ivas->sba_dirac_stereo_flag; +#ifndef JBM_FOR_OSBA nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas ); - +#endif +#ifdef JBM_FOR_OSBA + sba_analysis_order_old = st_ivas->sba_analysis_order; +#endif st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); - /* save old */ - if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens - { - st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots; - st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpar->nb_subframes; - st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpar->slots_rendered; - st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpar->subframes_rendered; - mvs2s( st_ivas->hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#ifdef JBM_FOR_OSBA + *nSamplesFlushed = 0; + granularity_new = st_ivas->hTcBuffer->n_samples_granularity; + /* we may need to flush only for binaural and OSBA and TSM */ + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) + { + RENDERER_TYPE renderer_type_new; + int16_t sba_order_internal; + sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); + + /* get new renderer type */ + /* copy the logic from ivas_renderer_select(), because calling this function has too many side effects that would affect the flushing */ + if ( ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) <= 2 ) + { + + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL +#ifdef SPLIT_REND_WITH_HEAD_ROT + || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM +#endif + ) + { + renderer_type_new = RENDERER_BINAURAL_PARAMETRIC; + } + else + { + renderer_type_new = RENDERER_BINAURAL_PARAMETRIC_ROOM; + } + } + else + { + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB +#ifdef SPLIT_REND_WITH_HEAD_ROT + || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM +#endif + ) + { + renderer_type_new = RENDERER_BINAURAL_FASTCONV; + } + else + { + renderer_type_new = RENDERER_BINAURAL_FASTCONV_ROOM; + } + } + /* determine new granularity */ + granularity_new = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + /* this will change anyway only with binaural */ + if ( renderer_type_new == RENDERER_BINAURAL_FASTCONV && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + granularity_new *= JBM_CLDFB_SLOTS_IN_SUBFRAME; + } + /* flush renderer on granularity change form 5ms to 1.25ms, again only possible for binaural rendering */ + + if ( granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) + { + /* write back info for correct rendering */ + st_ivas->sba_analysis_order = sba_analysis_order_old; + if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, granularity_new, st_ivas->renderer_type, st_ivas->intern_config, &st_ivas->hIntSetup, st_ivas->mc_mode, ism_mode_old, nSamplesFlushed, +#ifdef SPLIT_REND_WITH_HEAD_ROT + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); + } + else if ( granularity_new > st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } } - else if ( st_ivas->hSpatParamRendCom != NULL ) +#endif + + /* save old */ +#ifdef JBM_FOR_OSBA + if ( ism_mode_old != ISM_SBA_MODE_DISC ) + /* only necessary for SBA and OSBA w/o disrcrete objects, otherwise hTcBuffer is in sync anyway */ { - st_ivas->hTcBuffer->num_slots = st_ivas->hSpatParamRendCom->num_slots; - st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; - st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; - st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; - mvs2s( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#endif + if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens + { + st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots; + st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpar->nb_subframes; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpar->slots_rendered; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpar->subframes_rendered; + mvs2s( st_ivas->hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + else if ( st_ivas->hSpatParamRendCom != NULL ) + { + st_ivas->hTcBuffer->num_slots = st_ivas->hSpatParamRendCom->num_slots; + st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; + mvs2s( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } } - /*-----------------------------------------------------------------* * Allocate, initialize, and configure SBA handles *-----------------------------------------------------------------*/ @@ -227,12 +329,14 @@ ivas_error ivas_sba_dec_reconfigure( hSpar = st_ivas->hSpar; st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); +#ifndef JBM_FOR_OSBA /* synchronize subframe info */ st_ivas->hSpar->num_slots = st_ivas->hTcBuffer->num_slots; st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; st_ivas->hSpar->slots_rendered = st_ivas->hTcBuffer->slots_rendered; st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#endif if ( st_ivas->nchan_transport == 1 ) { @@ -289,6 +393,7 @@ ivas_error ivas_sba_dec_reconfigure( return error; } +#ifndef JBM_FOR_OSBA /* synchronize subframe info */ if ( st_ivas->hSpatParamRendCom != NULL ) { @@ -298,6 +403,7 @@ ivas_error ivas_sba_dec_reconfigure( st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } +#endif } if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) @@ -444,12 +550,12 @@ ivas_error ivas_sba_dec_reconfigure( return error; } #else - if ( st_ivas->hDiracDecBin != NULL ) +if ( st_ivas->hDiracDecBin != NULL ) +{ + if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) { - if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) - { - return error; - } + return error; + } #endif } @@ -465,7 +571,12 @@ ivas_error ivas_sba_dec_reconfigure( /*-----------------------------------------------------------------* * JBM TC buffer *-----------------------------------------------------------------*/ - if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) + if ( st_ivas->hDecoderConfig->Opt_5ms == 1 +#ifdef JBM_FOR_OSBA + || st_ivas->ivas_format == SBA_ISM_FORMAT +#endif + + ) { int16_t tc_nchan_to_allocate; int16_t tc_nchan_tc; @@ -476,19 +587,39 @@ ivas_error ivas_sba_dec_reconfigure( tc_nchan_to_allocate = tc_nchan_tc; if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) { - tc_buffer_mode = TC_BUFFER_MODE_BUFFER; - tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out; - tc_nchan_to_allocate = tc_nchan_tc; +#ifdef JBM_FOR_OSBA + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + { + tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; + tc_nchan_to_allocate = tc_nchan_tc; + } + else +#endif + { + tc_buffer_mode = TC_BUFFER_MODE_BUFFER; + tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out; + tc_nchan_to_allocate = tc_nchan_tc; + } } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; } - else if ( st_ivas->ivas_format == SBA_FORMAT ) + else if ( st_ivas->ivas_format == SBA_FORMAT +#ifdef JBM_FOR_OSBA + || st_ivas->ivas_format == SBA_ISM_FORMAT +#endif + ) { tc_nchan_to_allocate = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); +#ifdef JBM_FOR_OSBA + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + tc_nchan_to_allocate += st_ivas->nchan_ism; + } +#endif } - else + else /* :TODO: looks obsolete, needs to be checked */ { if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) ) { @@ -496,15 +627,58 @@ ivas_error ivas_sba_dec_reconfigure( } } - if ( tc_nchan_tc != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || tc_buffer_mode != st_ivas->hTcBuffer->tc_buffer_mode ) + if ( tc_nchan_tc != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || tc_buffer_mode != st_ivas->hTcBuffer->tc_buffer_mode +#ifdef JBM_FOR_OSBA + || granularity_new != st_ivas->hTcBuffer->n_samples_granularity +#endif + ) { - if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) +#ifdef JBM_FOR_OSBA + if ( !st_ivas->hDecoderConfig->Opt_5ms ) + { + tc_nchan_tc = 0; + tc_nchan_to_allocate = 0; + } +#endif + if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, +#ifdef JBM_FOR_OSBA + granularity_new +#else + NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) +#endif + ) ) != IVAS_ERR_OK ) { return error; } } } +#ifdef JBM_FOR_OSBA + /* resync SPAR and DirAC JBM info from TC Buffer */ + if ( st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( st_ivas->hSpatParamRendCom != NULL ) + { + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + } + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + } + + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + { + int16_t granularityMultiplier = st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size; + int16_t n; + for ( n = 0; n < MAX_JBM_SUBFRAMES_5MS; n++ ) + { + st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier; + } + } +#endif + /*-----------------------------------------------------------------* * floating-point output audio buffers *-----------------------------------------------------------------*/ diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index a9c3c1fb9b..c3ce3222af 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -217,7 +217,11 @@ ivas_error ivas_spar_dec_open( /* allocate transport channels*/ if ( - st_ivas->hDecoderConfig->Opt_5ms && + ( st_ivas->hDecoderConfig->Opt_5ms +#ifdef JBM_FOR_OSBA + || st_ivas->ivas_format == SBA_ISM_FORMAT +#endif + ) && st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; @@ -248,7 +252,7 @@ ivas_error ivas_spar_dec_open( if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; - nchan_to_allocate = nchan_tc + st_ivas->nchan_ism; + nchan_to_allocate = nchan_tc; } else #endif @@ -272,6 +276,14 @@ ivas_error ivas_spar_dec_open( } #endif +#ifdef JBM_FOR_OSBA + /* make sure we have a TC buffer with the correct granularity for rate switching in OSBA */ + if ( !st_ivas->hDecoderConfig->Opt_5ms ) + { + nchan_tc = 0; + nchan_to_allocate = 0; + } +#endif if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, @@ -1476,7 +1488,11 @@ void ivas_spar_dec_upmixer( { for ( i = 0; i < nchan_internal - nchan_transport; i++ ) { +#ifdef JBM_FOR_OSBA + set_zero( st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); +#else set_zero( st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); +#endif } for ( i = 0; i < hSpar->hTdDecorr->num_apd_outputs; i++ ) { @@ -1507,7 +1523,11 @@ void ivas_spar_dec_upmixer( } } +#ifdef JBM_FOR_OSBA + for ( n = 0; n < nchan_internal_total; n++ ) +#else for ( n = 0; n < nchan_internal; n++ ) +#endif { st_ivas->hTcBuffer->tc[n] = NULL; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index e70403488d..306887462c 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -946,16 +946,20 @@ typedef struct typedef struct decoder_tc_buffer_structure { - float *tc_buffer; /* the buffer itself */ - float *tc[MAX_TRANSPORT_CHANNELS]; /* pointers into the buffer to the beginning of each tc */ - TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ - int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ - int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ - int16_t nchan_buffer_full; /* number of channels to be fully buffered */ - int16_t n_samples_available; /* samples still available for rendering in the current frame */ - int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ - int16_t n_samples_rendered; /* samples already rendered in the current frame */ - int16_t n_samples_granularity; /* render granularity */ + float *tc_buffer; /* the buffer itself */ + float *tc[MAX_TRANSPORT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ]; /* pointers into the buffer to the beginning of each tc */ + TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ + int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ + int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ + int16_t nchan_buffer_full; /* number of channels to be fully buffered */ + int16_t n_samples_available; /* samples still available for rendering in the current frame */ + int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ + int16_t n_samples_rendered; /* samples already rendered in the current frame */ + int16_t n_samples_granularity; /* render granularity */ int16_t n_samples_flushed; int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; int16_t nb_subframes; -- GitLab From 020686717e4cc9510dffc2fa2573a7934d4606ee Mon Sep 17 00:00:00 2001 From: wkr Date: Fri, 1 Sep 2023 12:32:26 +0200 Subject: [PATCH 40/89] fix segfault in OSBA bitrate switching --- lib_dec/ivas_sba_dec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 31458d4641..5f0c0ab714 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -706,17 +706,18 @@ if ( st_ivas->hDiracDecBin != NULL ) #ifdef JBM_FOR_OSBA /* resync SPAR and DirAC JBM info from TC Buffer */ - if ( st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity ) + if ( st_ivas->hSpatParamRendCom != NULL ) { - if ( st_ivas->hSpatParamRendCom != NULL ) + if ( st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity ) { mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes; st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; } - mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); - st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; - st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; } if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) -- GitLab From 213d0d761f109454c067f842d2dbc86496d42699 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 1 Sep 2023 13:23:24 +0200 Subject: [PATCH 41/89] fix crash in smoke tests when calling free_ with 0 as argument --- lib_dec/ivas_jbm_dec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9e49167c85..44269fbb44 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2411,7 +2411,10 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif /* realloc buffers */ - free( hTcBuffer->tc_buffer ); + if ( hTcBuffer->tc_buffer ) + { + free( hTcBuffer->tc_buffer ); + } if ( st_ivas->hDecoderConfig->Opt_tsm ) { n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); -- GitLab From dec0b022e520ad44fc7c40e13e9a282f30421bf2 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 1 Sep 2023 13:26:07 +0200 Subject: [PATCH 42/89] do not try to allocate 0 tc buffers --- lib_dec/ivas_sba_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 5f0c0ab714..f0695fbdbe 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -684,7 +684,7 @@ if ( st_ivas->hDiracDecBin != NULL ) #endif ) { -#ifdef JBM_FOR_OSBA +#if 0 if ( !st_ivas->hDecoderConfig->Opt_5ms ) { tc_nchan_tc = 0; -- GitLab From aea65fd4067c3c700729c48ba92a9c02f1e8122f Mon Sep 17 00:00:00 2001 From: wkr Date: Fri, 1 Sep 2023 15:56:44 +0200 Subject: [PATCH 43/89] allocate mono dmx renderer when switching from ISM_MODE_NONE to ISM_MODE_DISC --- lib_dec/ivas_sba_dec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index f0695fbdbe..77419165fc 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -393,6 +393,23 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } + +#ifdef JBM_FOR_OSBA + if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX && !st_ivas->hMonoDmxRenderer ) + { + if ( ( error = ivas_mono_dmx_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->hMonoDmxRenderer != NULL ) + { + free(st_ivas->hMonoDmxRenderer); + st_ivas->hMonoDmxRenderer = NULL; + } +#endif + + #ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { -- GitLab From c4af42e615d74de3bd663376d0e731ad9e6a3a83 Mon Sep 17 00:00:00 2001 From: wkr Date: Tue, 5 Sep 2023 12:59:44 +0200 Subject: [PATCH 44/89] preliminarily fix memory leak in osba-to-stereo bitrate switching --- lib_dec/ivas_corecoder_dec_reconfig.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib_dec/ivas_corecoder_dec_reconfig.c b/lib_dec/ivas_corecoder_dec_reconfig.c index 25767099ae..6f7f9b1e4c 100644 --- a/lib_dec/ivas_corecoder_dec_reconfig.c +++ b/lib_dec/ivas_corecoder_dec_reconfig.c @@ -159,6 +159,15 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hSCE[sce_id] = NULL; } +#ifdef JBM_FOR_OSBA + if ( sba_dirac_stereo_flag_old && nCPE_old == 0 && st_ivas->hCPE[0] ) + { + st_ivas->hCPE[0]->hCoreCoder[0] = 0; /* this has been deallocated as part of the SCE it actually belongs to */ + destroy_cpe_dec( st_ivas->hCPE[0] ); + st_ivas->hCPE[0] = NULL; + } +#endif + for ( cpe_id = st_ivas->nCPE; cpe_id < nCPE_old; cpe_id++ ) { /* don't deallocate first CPE in case of mono/stereo output of 1 TC SBA, only deallocate core coder */ -- GitLab From 877586bb750adc1d665ded53c6813912faaa20f2 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 5 Sep 2023 15:53:57 +0200 Subject: [PATCH 45/89] fix JBM for OSBA, flushing on changing granularity was getting the wrong settings --- lib_dec/ivas_init_dec.c | 18 ++++++++++++------ lib_dec/ivas_sba_dec.c | 11 +++++++---- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index cfa1f2ac32..c1c0f99f67 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -477,13 +477,15 @@ ivas_error ivas_dec_setup( st_ivas->sba_order = 3; } +#ifndef JBM_FOR_OSBA /* set Ambisonic (SBA) order used for analysis and coding */ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); +#endif if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate ) { - if ( ( error = ivas_sba_dec_reconfigure( st_ivas - #ifdef JBM_FOR_OSBA + if ( ( error = ivas_sba_dec_reconfigure( st_ivas +#ifdef JBM_FOR_OSBA , nSamplesRendered, #if defined SPLIT_REND_WITH_HEAD_ROT @@ -491,13 +493,17 @@ ivas_error ivas_dec_setup( #endif data #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } } else { +#ifdef JBM_FOR_OSBA + /* set Ambisonic (SBA) order used for analysis and coding */ + st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); +#endif ivas_sba_config( ivas_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 ); /*correct number of CPEs for discrete ISM coding*/ if ( st_ivas->ini_frame > 0 && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) @@ -617,8 +623,8 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->ivas_total_brate = IVAS_24k4; } - if ( ( error = ivas_sba_dec_reconfigure( st_ivas - #ifdef JBM_FOR_OSBA + if ( ( error = ivas_sba_dec_reconfigure( st_ivas +#ifdef JBM_FOR_OSBA , nSamplesRendered, #if defined SPLIT_REND_WITH_HEAD_ROT @@ -626,7 +632,7 @@ ivas_error ivas_dec_setup( #endif data #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index e7096e7110..4315722d7a 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -229,8 +229,9 @@ ivas_error ivas_sba_dec_reconfigure( if ( granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { - /* write back info for correct rendering */ + /* write back info for correct rendering of the flushable samples */ st_ivas->sba_analysis_order = sba_analysis_order_old; + st_ivas->hDecoderConfig->ivas_total_brate = last_ivas_total_brate; if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, granularity_new, st_ivas->renderer_type, st_ivas->intern_config, &st_ivas->hIntSetup, st_ivas->mc_mode, ism_mode_old, nSamplesFlushed, #ifdef SPLIT_REND_WITH_HEAD_ROT pcm_resolution, @@ -239,7 +240,9 @@ ivas_error ivas_sba_dec_reconfigure( { return error; } + /* restore correct values for the current frame*/ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); + st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate; } else if ( granularity_new > st_ivas->hTcBuffer->n_samples_granularity ) { @@ -288,7 +291,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order != 1 ) ) ) #else - if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) + if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) #endif { free( st_ivas->hSpar->hPCA ); @@ -404,7 +407,7 @@ ivas_error ivas_sba_dec_reconfigure( } if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->hMonoDmxRenderer != NULL ) { - free(st_ivas->hMonoDmxRenderer); + free( st_ivas->hMonoDmxRenderer ); st_ivas->hMonoDmxRenderer = NULL; } #endif @@ -419,7 +422,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifndef NONBE_FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else - if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) +if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) #endif { DIRAC_CONFIG_FLAG flag_config; -- GitLab From d50b4ff872ea7db56fc8f563a5092bcbddf73984 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 5 Sep 2023 16:00:44 +0200 Subject: [PATCH 46/89] add OSBA modes to ivas_modes.json and OSBA input formats to ci_linux.json --- scripts/config/ci_linux.json | 14 +- scripts/config/ivas_modes.json | 4756 ++++++++++++++++++-------------- 2 files changed, 2755 insertions(+), 2015 deletions(-) diff --git a/scripts/config/ci_linux.json b/scripts/config/ci_linux.json index f7d6c4ec4b..33d46408b4 100644 --- a/scripts/config/ci_linux.json +++ b/scripts/config/ci_linux.json @@ -36,6 +36,18 @@ "OMASA_ISM4_1TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA1TC48c.wav", "OMASA_ISM4_1TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA1TC48c.wav", "OMASA_ISM4_2TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA2TC48c.wav", - "OMASA_ISM4_2TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA2TC48c.wav" + "OMASA_ISM4_2TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA2TC48c.wav", + "OSBA_ISM1_FOA": "/usr/local/testv/stvOSBA_1ISM_FOA48c.wav", + "OSBA_ISM1_HOA2": "/usr/local/testv/stvOSBA_1ISM_2OA48c.wav", + "OSBA_ISM1_HOA3": "/usr/local/testv/stvOSBA_1ISM_3OA48c.wav", + "OSBA_ISM2_FOA": "/usr/local/testv/stvOSBA_2ISM_FOA48c.wav", + "OSBA_ISM2_HOA2": "/usr/local/testv/stvOSBA_2ISM_2OA48c.wav", + "OSBA_ISM2_HOA3": "/usr/local/testv/stvOSBA_2ISM_3OA48c.wav", + "OSBA_ISM3_FOA": "/usr/local/testv/stvOSBA_3ISM_FOA48c.wav", + "OSBA_ISM3_HOA2": "/usr/local/testv/stvOSBA_3ISM_2OA48c.wav", + "OSBA_ISM3_HOA3": "/usr/local/testv/stvOSBA_3ISM_3OA48c.wav", + "OSBA_ISM4_FOA": "/usr/local/testv/stvOSBA_4ISM_FOA48c.wav", + "OSBA_ISM4_HOA2": "/usr/local/testv/stvOSBA_4ISM_2OA48c.wav", + "OSBA_ISM4_HOA3": "/usr/local/testv/stvOSBA_4ISM_3OA48c.wav" } } diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index e2bd74ec04..32da5bae1f 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -599,11 +599,11 @@ } } }, - "FOA": { - "FOA_b{bitrate}_{bandwidth}_cbr": { + "SBA": { + "SBA_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "1" + "{ambi_order}" ], "encoptions": [ "-max_band", @@ -612,13 +612,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "FOA", - "table_name": "FOA@{table_bitrate} kbps {bandwidth}", + "in_config": "SBA", + "table_name": "SBA@{table_bitrate} kbps {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -672,10 +671,10 @@ ] } }, - "FOA_b{bitrate}_dtx_{bandwidth}_cbr": { + "SBA_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "1" + "{ambi_order}" ], "encoptions": [ "-dtx", @@ -685,13 +684,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "FOA", - "table_name": "FOA@{table_bitrate} kbps DTX {bandwidth}", + "in_config": "SBA", + "table_name": "SBA@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -724,10 +722,10 @@ ] } }, - "FOA_b{bitrate}_{bandwidth}_rs": { + "SBA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-sba", - "1" + "{ambi_order}" ], "encoptions": [ "-max_band", @@ -736,13 +734,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "FOA", - "table_name": "FOA@{table_bitrate} kbps RS {bandwidth}", + "in_config": "SBA", + "table_name": "SBA@{table_bitrate} kbps RS {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": true, @@ -761,11 +758,11 @@ } } }, - "HOA2": { - "HOA2_b{bitrate}_{bandwidth}_cbr": { + "PlanarSBA": { + "PlanarSBA_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "2" + "-{ambi_order}" ], "encoptions": [ "-max_band", @@ -774,13 +771,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], - "mono": [], - "stereo": [] + "stereo": [], + "mono": [] }, - "in_config": "HOA2", - "table_name": "HOA2@{table_bitrate} kbps {bandwidth}", + "in_config": "SBA", + "table_name": "Planar SBA@{table_bitrate} kbps {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -834,10 +830,10 @@ ] } }, - "HOA2_b{bitrate}_dtx_{bandwidth}_cbr": { + "PlanarSBA_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "2" + "-{ambi_order}" ], "encoptions": [ "-dtx", @@ -847,13 +843,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], - "mono": [], - "stereo": [] + "stereo": [], + "mono": [] }, - "in_config": "HOA2", - "table_name": "HOA2@{table_bitrate} kbps DTX {bandwidth}", + "in_config": "SBA", + "table_name": "Planar SBA@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -886,10 +881,10 @@ ] } }, - "HOA2_b{bitrate}_{bandwidth}_rs": { + "PlanarSBA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-sba", - "2" + "-{ambi_order}" ], "encoptions": [ "-max_band", @@ -898,13 +893,12 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "HOA2", - "table_name": "HOA2@{table_bitrate} kbps RS {bandwidth}", + "in_config": "SBA", + "table_name": "Planar SBA@{table_bitrate} kbps RS {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": true, @@ -923,11 +917,11 @@ } } }, - "HOA3": { - "HOA3_b{bitrate}_{bandwidth}_cbr": { + "MASA": { + "MASA_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", - "3" + "-masa", + "1" ], "encoptions": [ "-max_band", @@ -936,15 +930,16 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA3", - "table_name": "HOA3@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA1TC1DIR", + "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -959,7 +954,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -975,7 +969,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -988,7 +981,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -996,28 +988,66 @@ ] } }, - "HOA3_b{bitrate}_dtx_{bandwidth}_cbr": { + "MASA_1TC_1DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-sba", - "3" + "-masa", + "1" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA3", - "table_name": "HOA3@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA1TC1DIR", + "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + + }, + "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-masa", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "MASA2TC1DIR", + "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -1029,7 +1059,13 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ 13200, @@ -1038,20 +1074,32 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ] } }, - "HOA3_b{bitrate}_{bandwidth}_rs": { + "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-sba", - "3" + "-masa", + "2" ], "encoptions": [ "-max_band", @@ -1060,17 +1108,21 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA3", - "table_name": "HOA3@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA2TC1DIR", + "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": true, "amr": false, + "mono": false, + "rs": true, + "amr": false, "mono": false, "bitrates": { "wb": { @@ -1083,12 +1135,10 @@ "all": "{sw_files_path}/sw_13k2_512k.bin" } } - } - }, - "PlanarFOA": { - "PlanarFOA_b{bitrate}_{bandwidth}_cbr": { + }, + "MASA_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", + "-masa", "1" ], "encoptions": [ @@ -1098,15 +1148,16 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "FOA", - "table_name": "Planar FOA@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA1TC2DIR", + "table_name": "MASA 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -1121,7 +1172,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1137,7 +1187,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1150,7 +1199,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1158,28 +1206,28 @@ ] } }, - "PlanarFOA_b{bitrate}_dtx_{bandwidth}_cbr": { + "MASA_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", - "1" + "-masa", + "2" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "FOA", - "table_name": "Planar FOA@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA2TC2DIR", + "table_name": "MASA 2TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -1191,7 +1239,13 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ 13200, @@ -1200,75 +1254,51 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ] } }, - "PlanarFOA_b{bitrate}_{bandwidth}_rs": { + "MASA_1TC_1DIR_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", + "-masa", "1" ], "encoptions": [ + "-dtx", "-max_band", "{bandwidth}" ], "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "FOA", - "table_name": "Planar FOA@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } - } - }, - "PlanarHOA2": { - "PlanarHOA2_b{bitrate}_{bandwidth}_cbr": { - "encmodeoption": [ - "-sba", - "2" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" + "in_config": "MASA1TC1DIR", + "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" ], - "dec": { - "7_1_4": [], - "HOA3": [], - "HOA2": [], - "FOA": [], - "mono": [], - "stereo": [] - }, - "in_config": "HOA2", - "table_name": "Planar HOA2@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1283,7 +1313,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1299,7 +1328,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1312,7 +1340,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1320,10 +1347,10 @@ ] } }, - "PlanarHOA2_b{bitrate}_dtx_{bandwidth}_cbr": { + "MASA_1TC_2DIR_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", - "2" + "-masa", + "1" ], "encoptions": [ "-dtx", @@ -1333,15 +1360,16 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA2", - "table_name": "Planar HOA2@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA1TC2DIR", + "table_name": "MASA 1TC 2DIR@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -1353,7 +1381,13 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ 13200, @@ -1362,75 +1396,51 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ] } }, - "PlanarHOA2_b{bitrate}_{bandwidth}_rs": { + "MASA_2TC_1DIR_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", + "-masa", "2" ], "encoptions": [ + "-dtx", "-max_band", "{bandwidth}" ], "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA2", - "table_name": "Planar HOA2@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } - } - }, - "PlanarHOA3": { - "PlanarHOA3_b{bitrate}_{bandwidth}_cbr": { - "encmodeoption": [ - "-sba", - "3" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" + "in_config": "MASA2TC1DIR", + "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" ], - "dec": { - "7_1_4": [], - "HOA3": [], - "HOA2": [], - "FOA": [], - "mono": [], - "stereo": [] - }, - "in_config": "HOA3", - "table_name": "Planar HOA3@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1445,7 +1455,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1461,7 +1470,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1474,7 +1482,6 @@ 80000, 96000, 128000, - 160000, 192000, 256000, 384000, @@ -1482,10 +1489,10 @@ ] } }, - "PlanarHOA3_b{bitrate}_dtx_{bandwidth}_cbr": { + "MASA_2TC_2DIR_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-sba", - "3" + "-masa", + "2" ], "encoptions": [ "-dtx", @@ -1495,15 +1502,16 @@ "dec": { "7_1_4": [], "HOA3": [], - "HOA2": [], - "FOA": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "HOA3", - "table_name": "Planar HOA3@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "MASA2TC2DIR", + "table_name": "MASA 2TC 2DIR@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], "rs": false, "amr": false, "mono": false, @@ -1515,7 +1523,13 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ 13200, @@ -1524,76 +1538,46 @@ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ 32000, 48000, 64000, - 80000 + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ] } - }, - "PlanarHOA3_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-sba", - "3" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "7_1_4": [], - "HOA3": [], - "HOA2": [], - "FOA": [], - "mono": [], - "stereo": [] - }, - "in_config": "HOA3", - "table_name": "Planar HOA3@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } } }, - "MASA": { - "MASA_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "MC": { + "MC_5_1_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-masa", - "1" + "-mc", + "5_1" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "5_1": [] }, - "in_config": "MASA1TC1DIR", - "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], + "in_config": "5_1", + "table_name": "MC 5_1@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1608,6 +1592,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1623,6 +1608,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1635,6 +1621,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1642,66 +1629,22 @@ ] } }, - "MASA_1TC_1DIR_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-masa", - "1" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] - }, - "in_config": "MASA1TC1DIR", - "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } - - }, - "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "MC_7_1_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-masa", - "2" + "-mc", + "7_1" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "7_1": [] }, - "in_config": "MASA2TC1DIR", - "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], + "in_config": "7_1", + "table_name": "MC 7_1@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1716,6 +1659,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1731,6 +1675,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1743,6 +1688,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1750,68 +1696,22 @@ ] } }, - "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_rs": { + "MC_5_1_2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-masa", - "2" + "-mc", + "5_1_2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "5_1_2": [] }, - "in_config": "MASA2TC1DIR", - "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], - "rs": true, - "amr": false, - "mono": false, - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } - }, - "MASA_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { - "encmodeoption": [ - "-masa", - "1" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] - }, - "in_config": "MASA1TC2DIR", - "table_name": "MASA 1TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], + "in_config": "5_1_2", + "table_name": "MC 5_1_2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1826,6 +1726,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1841,6 +1742,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1853,6 +1755,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1860,28 +1763,22 @@ ] } }, - "MASA_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "MC_5_1_4_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-masa", - "2" + "-mc", + "5_1_4" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "5_1_4": [] }, - "in_config": "MASA2TC2DIR", - "table_name": "MASA 2TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], + "in_config": "5_1_4", + "table_name": "MC 5_1_4@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1896,6 +1793,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1911,6 +1809,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1923,6 +1822,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1930,29 +1830,22 @@ ] } }, - "MASA_1TC_1DIR_b{bitrate}_dtx_{bandwidth}_cbr": { + "MC_7_1_4_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-masa", - "1" + "-mc", + "7_1_4" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "7_1_4": [] }, - "in_config": "MASA1TC1DIR", - "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], + "in_config": "7_1_4", + "table_name": "MC 7_1_4@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -1967,6 +1860,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1982,6 +1876,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -1994,6 +1889,7 @@ 80000, 96000, 128000, + 160000, 192000, 256000, 384000, @@ -2001,170 +1897,180 @@ ] } }, - "MASA_1TC_2DIR_b{bitrate}_dtx_{bandwidth}_cbr": { + "MC_5_1_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-masa", - "1" + "-mc", + "5_1" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "5_1": [] }, - "in_config": "MASA1TC2DIR", - "table_name": "MASA 1TC 2DIR@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], - "rs": false, + "in_config": "5_1", + "table_name": "MC 5_1@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "MASA_2TC_1DIR_b{bitrate}_dtx_{bandwidth}_cbr": { + "MC_7_1_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-masa", - "2" + "-mc", + "7_1" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], - "EXT": [] + "7_1": [] }, - "in_config": "MASA2TC1DIR", - "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "{item}.met" - ], - "rs": false, + "in_config": "7_1", + "table_name": "MC 7_1@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "MASA_2TC_2DIR_b{bitrate}_dtx_{bandwidth}_cbr": { + "MC_5_1_2_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-masa", - "2" + "-mc", + "5_1_2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "5_1_2": [] + }, + "in_config": "5_1_2", + "table_name": "MC 5_1_2@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "MC_5_1_4_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-mc", + "5_1_4" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "5_1_4": [] + }, + "in_config": "5_1_4", + "table_name": "MC 5_1_4@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "MC_7_1_4_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-mc", + "7_1_4" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [] + }, + "in_config": "7_1_4", + "table_name": "MC 7_1_4@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } + }, + "ISM1": { + "ISM1_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism", + "1" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [], - "HOA3": [], - "mono": [], - "stereo": [], "EXT": [] }, - "in_config": "MASA2TC2DIR", - "table_name": "MASA 2TC 2DIR@{table_bitrate} kbps DTX {bandwidth}", + "in_config": "ISM1", + "table_name": "ISM1@{table_bitrate} kbps {bandwidth}", "nummetadata": 1, "metadatafilenames": [ - "{item}.met" + "stvISM{mdi}.csv" ], "rs": false, "amr": false, @@ -2179,11 +2085,7 @@ 64000, 80000, 96000, - 128000, - 192000, - 256000, - 384000, - 512000 + 128000 ], "swb": [ 13200, @@ -2194,11 +2096,7 @@ 64000, 80000, 96000, - 128000, - 192000, - 256000, - 384000, - 512000 + 128000 ], "fb": [ 32000, @@ -2206,32 +2104,62 @@ 64000, 80000, 96000, - 128000, - 192000, - 256000, - 384000, - 512000 + 128000 ] } - } - }, - "MC": { - "MC_5_1_b{bitrate}_{bandwidth}_cbr": { + }, + "ISM1_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-mc", - "5_1" + "-ism", + "1" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "5_1": [] + "EXT": [] }, - "in_config": "5_1", - "table_name": "MC 5_1@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM1", + "table_name": "ISM1@{table_bitrate} RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_128k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_128k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_128k.bin" + } + } + }, + "ISM1_b{bitrate}_dtx_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism", + "1" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM1", + "table_name": "ISM1@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": false, "amr": false, "mono": false, @@ -2245,12 +2173,7 @@ 64000, 80000, 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 128000 ], "swb": [ 13200, @@ -2261,12 +2184,7 @@ 64000, 80000, 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 128000 ], "fb": [ 32000, @@ -2274,37 +2192,35 @@ 64000, 80000, 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 128000 ] } - }, - "MC_7_1_b{bitrate}_{bandwidth}_cbr": { + } + }, + "ISM2": { + "ISM2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-mc", - "7_1" + "-ism", + "2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1": [] + "EXT": [] }, - "in_config": "7_1", - "table_name": "MC 7_1@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM2", + "table_name": "ISM2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": false, "amr": false, "mono": false, "bitrates": { "wb": [ - 13200, 16400, 24400, 32000, @@ -2315,12 +2231,9 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ], "swb": [ - 13200, 16400, 24400, 32000, @@ -2331,9 +2244,7 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ], "fb": [ 32000, @@ -2344,34 +2255,34 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ] } }, - "MC_5_1_2_b{bitrate}_{bandwidth}_cbr": { + "ISM2_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-mc", - "5_1_2" + "-dtx", + "-ism", + "2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "5_1_2": [] + "EXT": [] }, - "in_config": "5_1_2", - "table_name": "MC 5_1_2@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": false, + "in_config": "ISM2", + "table_name": "ISM2@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": false, "amr": false, "mono": false, "bitrates": { "wb": [ - 13200, 16400, 24400, 32000, @@ -2382,12 +2293,9 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ], "swb": [ - 13200, 16400, 24400, 32000, @@ -2398,9 +2306,7 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ], "fb": [ 32000, @@ -2411,35 +2317,68 @@ 128000, 160000, 192000, - 256000, - 384000, - 512000 + 256000 ] } }, - "MC_5_1_4_b{bitrate}_{bandwidth}_cbr": { + "ISM2_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-mc", - "5_1_4" + "-ism", + "2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "5_1_4": [] + "EXT": [] }, - "in_config": "5_1_4", - "table_name": "MC 5_1_4@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM2", + "table_name": "ISM2@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_16k4_256k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_16k4_256k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_256k.bin" + } + } + } + }, + "ISM3": { + "ISM3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM3", + "table_name": "ISM3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": false, "amr": false, "mono": false, "bitrates": { "wb": [ - 13200, - 16400, 24400, 32000, 48000, @@ -2450,12 +2389,9 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ], "swb": [ - 13200, - 16400, 24400, 32000, 48000, @@ -2466,8 +2402,7 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ], "fb": [ 32000, @@ -2479,34 +2414,34 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ] } }, - "MC_7_1_4_b{bitrate}_{bandwidth}_cbr": { + "ISM3_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-mc", - "7_1_4" + "-dtx", + "-ism", + "3" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [] + "EXT": [] }, - "in_config": "7_1_4", - "table_name": "MC 7_1_4@{table_bitrate} kbps {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM3", + "table_name": "ISM3@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": false, "amr": false, "mono": false, "bitrates": { "wb": [ - 13200, - 16400, 24400, 32000, 48000, @@ -2517,12 +2452,9 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ], "swb": [ - 13200, - 16400, 24400, 32000, 48000, @@ -2533,8 +2465,7 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ], "fb": [ 32000, @@ -2546,172 +2477,215 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000 ] } }, - "MC_5_1_b{bitrate}_{bandwidth}_rs": { + "ISM3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-mc", - "5_1" + "-ism", + "3" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "5_1": [] + "EXT": [] }, - "in_config": "5_1", - "table_name": "MC 5_1@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM3", + "table_name": "ISM3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": true, "amr": false, "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_24k4_384k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_24k4_384k.bin" }, "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_32k_384k.bin" } } - }, - "MC_7_1_b{bitrate}_{bandwidth}_rs": { + } + }, + "ISM4": { + "ISM4_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-mc", - "7_1" + "-ism", + "4" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1": [] + "EXT": [] }, - "in_config": "7_1", - "table_name": "MC 7_1@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, + "in_config": "ISM4", + "table_name": "ISM4@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": false, "amr": false, "mono": false, "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } + "wb": [ + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] } }, - "MC_5_1_2_b{bitrate}_{bandwidth}_rs": { + "ISM4_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-mc", - "5_1_2" + "-dtx", + "-ism", + "4" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "5_1_2": [] + "EXT": [] }, - "in_config": "5_1_2", - "table_name": "MC 5_1_2@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, + "in_config": "ISM4", + "table_name": "ISM4@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": false, "amr": false, "mono": false, "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } - } - }, - "MC_5_1_4_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-mc", - "5_1_4" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "5_1_4": [] - }, - "in_config": "5_1_4", - "table_name": "MC 5_1_4@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } + "wb": [ + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] } }, - "MC_7_1_4_b{bitrate}_{bandwidth}_rs": { + "ISM4_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-mc", - "7_1_4" + "-ism", + "4" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "7_1_4": [] + "EXT": [] }, - "in_config": "7_1_4", - "table_name": "MC 7_1_4@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "ISM4", + "table_name": "ISM4@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], "rs": true, "amr": false, "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_24k4_384k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_24k4_384k.bin" }, "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" + "all": "{sw_files_path}/sw_32k_384k.bin" } } } }, - "ISM1": { - "ISM1_b{bitrate}_{bandwidth}_cbr": { + "ISM+1": { + "ISM+1_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism", - "1" + "+1" ], "encoptions": [ "-max_band", @@ -2721,7 +2695,7 @@ "EXT": [] }, "in_config": "ISM1", - "table_name": "ISM1@{table_bitrate} kbps {bandwidth}", + "table_name": "ISM+1@{table_bitrate} kbps {bandwidth}", "nummetadata": 1, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -2762,43 +2736,10 @@ ] } }, - "ISM1_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-ism", - "1" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "EXT": [] - }, - "in_config": "ISM1", - "table_name": "ISM1@{table_bitrate} RS kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_128k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_128k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_32k_128k.bin" - } - } - }, - "ISM1_b{bitrate}_dtx_{bandwidth}_cbr": { + "ISM+1_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-ism", - "1" + "+1" ], "encoptions": [ "-dtx", @@ -2809,7 +2750,7 @@ "EXT": [] }, "in_config": "ISM1", - "table_name": "ISM1@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "ISM+1@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 1, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -2851,11 +2792,11 @@ } } }, - "ISM2": { - "ISM2_b{bitrate}_{bandwidth}_cbr": { + "ISM+2": { + "ISM+2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism", - "2" + "+2" ], "encoptions": [ "-max_band", @@ -2865,7 +2806,7 @@ "EXT": [] }, "in_config": "ISM2", - "table_name": "ISM2@{table_bitrate} kbps {bandwidth}", + "table_name": "ISM+2@{table_bitrate} kbps {bandwidth}", "nummetadata": 2, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -2913,11 +2854,11 @@ ] } }, - "ISM2_b{bitrate}_dtx_{bandwidth}_cbr": { + "ISM+2_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-dtx", "-ism", - "2" + "+2" ], "encoptions": [ "-max_band", @@ -2927,7 +2868,7 @@ "EXT": [] }, "in_config": "ISM2", - "table_name": "ISM2@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "ISM+2@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 2, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -2974,46 +2915,13 @@ 256000 ] } - }, - "ISM2_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-ism", - "2" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "EXT": [] - }, - "in_config": "ISM2", - "table_name": "ISM2@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 2, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_16k4_256k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_16k4_256k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_32k_256k.bin" - } - } } }, - "ISM3": { - "ISM3_b{bitrate}_{bandwidth}_cbr": { + "ISM+3": { + "ISM+3_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism", - "3" + "+3" ], "encoptions": [ "-max_band", @@ -3023,7 +2931,7 @@ "EXT": [] }, "in_config": "ISM3", - "table_name": "ISM3@{table_bitrate} kbps {bandwidth}", + "table_name": "ISM+3@{table_bitrate} kbps {bandwidth}", "nummetadata": 3, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -3043,7 +2951,7 @@ 160000, 192000, 256000, - 384000 + 384000 ], "swb": [ 24400, @@ -3056,7 +2964,7 @@ 160000, 192000, 256000, - 384000 + 384000 ], "fb": [ 32000, @@ -3068,15 +2976,15 @@ 160000, 192000, 256000, - 384000 + 384000 ] } }, - "ISM3_b{bitrate}_dtx_{bandwidth}_cbr": { + "ISM+3_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-dtx", "-ism", - "3" + "+3" ], "encoptions": [ "-max_band", @@ -3086,7 +2994,7 @@ "EXT": [] }, "in_config": "ISM3", - "table_name": "ISM3@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "ISM+3@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 3, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -3106,7 +3014,7 @@ 160000, 192000, 256000, - 384000 + 384000 ], "swb": [ 24400, @@ -3134,46 +3042,13 @@ 384000 ] } - }, - "ISM3_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-ism", - "3" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "EXT": [] - }, - "in_config": "ISM3", - "table_name": "ISM3@{table_bitrate} kbps {bandwidth}", - "nummetadata": 3, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_24k4_384k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_24k4_384k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_32k_384k.bin" - } - } } }, - "ISM4": { - "ISM4_b{bitrate}_{bandwidth}_cbr": { + "ISM+4": { + "ISM+4_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-ism", - "4" + "+4" ], "encoptions": [ "-max_band", @@ -3183,7 +3058,7 @@ "EXT": [] }, "in_config": "ISM4", - "table_name": "ISM4@{table_bitrate} kbps {bandwidth}", + "table_name": "ISM+4@{table_bitrate} kbps {bandwidth}", "nummetadata": 4, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -3203,8 +3078,8 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000, + 512000 ], "swb": [ 24400, @@ -3217,8 +3092,8 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000, + 512000 ], "fb": [ 32000, @@ -3230,16 +3105,16 @@ 160000, 192000, 256000, - 384000, - 512000 + 384000, + 512000 ] } }, - "ISM4_b{bitrate}_dtx_{bandwidth}_cbr": { + "ISM+4_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-dtx", "-ism", - "4" + "+4" ], "encoptions": [ "-max_band", @@ -3249,7 +3124,7 @@ "EXT": [] }, "in_config": "ISM4", - "table_name": "ISM4@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "ISM+4@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 4, "metadatafilenames": [ "stvISM{mdi}.csv" @@ -3300,60 +3175,24 @@ 512000 ] } - }, - "ISM4_b{bitrate}_{bandwidth}_rs": { - "encmodeoption": [ - "-ism", - "4" - ], - "encoptions": [ - "-max_band", - "{bandwidth}" - ], - "dec": { - "EXT": [] - }, - "in_config": "ISM4", - "table_name": "ISM4@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 4, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], - "rs": true, - "amr": false, - "mono": false, - "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_24k4_384k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_24k4_384k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_32k_384k.bin" - } - } } - }, - "ISM+1": { - "ISM+1_b{bitrate}_{bandwidth}_cbr": { + }, + "stereo": { + "stereo_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism", - "+1" + "-stereo" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "EXT": [] + "STEREO": [] }, - "in_config": "ISM1", - "table_name": "ISM+1@{table_bitrate} kbps {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "Stereo@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -3367,7 +3206,10 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ], "swb": [ 13200, @@ -3378,7 +3220,10 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ], "fb": [ 32000, @@ -3386,14 +3231,16 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ] } }, - "ISM+1_b{bitrate}_dtx_{bandwidth}_cbr": { + "stereo_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ - "-ism", - "+1" + "-stereo" ], "encoptions": [ "-dtx", @@ -3401,14 +3248,12 @@ "{bandwidth}" ], "dec": { - "EXT": [] + "STEREO": [] }, - "in_config": "ISM1", - "table_name": "ISM+1@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 1, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "Stereo@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, "mono": false, @@ -3422,7 +3267,10 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ], "swb": [ 13200, @@ -3433,7 +3281,10 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ], "fb": [ 32000, @@ -3441,556 +3292,383 @@ 64000, 80000, 96000, - 128000 + 128000, + 160000, + 192000, + 256000 ] } + }, + "stereo_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-stereo" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "STEREO": [] + }, + "in_config": "STEREO", + "table_name": "stereo@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "13/64": "{sw_files_path}/wb_high1.bin" + }, + "swb": { + "13/32": "{sw_files_path}/swb_low1.bin", + "24/64": "{sw_files_path}/swb_high1.bin", + "13/128": "{sw_files_path}/sw_swb1.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + }, + "fb": { + "32/64": "{sw_files_path}/sw_fb1.bin", + "32/128": "{sw_files_path}/sw_fb2.bin", + "48/256": "{sw_files_path}/sw_fb3.bin" + } + } + }, + "stereo_b{bitrate}_dtx_{bandwidth}_rs": { + "encmodeoption": [ + "-stereo" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "STEREO": [] + }, + "in_config": "STEREO", + "table_name": "stereo@{table_bitrate} kbps RS DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "13/64": "{sw_files_path}/wb_high1.bin" + }, + "swb": { + "13/32": "{sw_files_path}/swb_low1.bin", + "24/64": "{sw_files_path}/swb_high1.bin", + "13/128": "{sw_files_path}/sw_swb1.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + }, + "fb": { + "32/64": "{sw_files_path}/sw_fb1.bin", + "32/128": "{sw_files_path}/sw_fb2.bin", + "48/256": "{sw_files_path}/sw_fb3.bin" + } + } } }, - "ISM+2": { - "ISM+2_b{bitrate}_{bandwidth}_cbr": { + "StereoDmxEVS": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism", - "+2" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM2", - "table_name": "ISM+2@{table_bitrate} kbps {bandwidth}", - "nummetadata": 2, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ + 7200, + 8000, + 9600, + 13200, 16400, 24400, 32000, 48000, 64000, - 80000, 96000, - 128000, - 160000, - 192000, - 256000 + 128000 ], "swb": [ + 9600, + 13200, 16400, 24400, 32000, 48000, 64000, - 80000, 96000, - 128000, - 160000, - 192000, - 256000 + 128000 ], "fb": [ + 16400, + 24400, 32000, 48000, 64000, - 80000, 96000, - 128000, - 160000, - 192000, - 256000 + 128000 ] } }, - "ISM+2_b{bitrate}_dtx_{bandwidth}_cbr": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo2_cbr": { "encmodeoption": [ - "-dtx", - "-ism", - "+2" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "lo", + "2" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM2", - "table_name": "ISM+2@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 2, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo2 {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ], "swb": [ - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ] } - } - }, - "ISM+3": { - "ISM+3_b{bitrate}_{bandwidth}_cbr": { + }, + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo3_cbr": { "encmodeoption": [ - "-ism", - "+3" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "lo", + "3" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM3", - "table_name": "ISM+3@{table_bitrate} kbps {bandwidth}", - "nummetadata": 3, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo3 {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 + 13200 ], "swb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 + 13200 ] } }, - "ISM+3_b{bitrate}_dtx_{bandwidth}_cbr": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo5_cbr": { "encmodeoption": [ - "-dtx", - "-ism", - "+3" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "lo", + "5" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM3", - "table_name": "ISM+3@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 3, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo5 {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 + 13200 ], "swb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000 + 13200 ] } - } - }, - "ISM+4": { - "ISM+4_b{bitrate}_{bandwidth}_cbr": { + }, + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo7_cbr": { "encmodeoption": [ - "-ism", - "+4" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "lo", + "7" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM4", - "table_name": "ISM+4@{table_bitrate} kbps {bandwidth}", - "nummetadata": 4, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo7 {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 13200 ], "swb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 13200 ] } }, - "ISM+4_b{bitrate}_dtx_{bandwidth}_cbr": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi2_cbr": { "encmodeoption": [ - "-dtx", - "-ism", - "+4" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "hi", + "2" ], "dec": { - "EXT": [] + "MONO": [] }, - "in_config": "ISM4", - "table_name": "ISM+4@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 4, - "metadatafilenames": [ - "stvISM{mdi}.csv" - ], + "in_config": "STEREO", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi2 {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 13200 ], "swb": [ - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000, - 384000, - 512000 + 13200 ] } - } - }, - "stereo": { - "stereo_b{bitrate}_{bandwidth}_cbr": { + }, + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi3_cbr": { "encmodeoption": [ - "-stereo" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "hi", + "3" ], "dec": { - "STEREO": [] + "MONO": [] }, "in_config": "STEREO", - "table_name": "Stereo@{table_bitrate} kbps {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi3 {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ], "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ] } }, - "stereo_b{bitrate}_dtx_{bandwidth}_cbr": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi5_cbr": { "encmodeoption": [ - "-stereo" + "-stereo_dmx_evs" ], "encoptions": [ - "-dtx", "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "hi", + "5" ], "dec": { - "STEREO": [] + "MONO": [] }, "in_config": "STEREO", - "table_name": "Stereo@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi5 {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ], "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 - ], - "fb": [ - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 160000, - 192000, - 256000 + 13200 ] } }, - "stereo_b{bitrate}_{bandwidth}_rs": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi7_cbr": { "encmodeoption": [ - "-stereo" + "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}" + "{bandwidth}", + "-rf", + "hi", + "7" ], "dec": { - "STEREO": [] + "MONO": [] }, "in_config": "STEREO", - "table_name": "stereo@{table_bitrate} kbps RS {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi7 {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": true, + "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { - "wb": { - "13/64": "{sw_files_path}/wb_high1.bin" - }, - "swb": { - "13/32": "{sw_files_path}/swb_low1.bin", - "24/64": "{sw_files_path}/swb_high1.bin", - "13/128": "{sw_files_path}/sw_swb1.bin", - "48/128": "{sw_files_path}/sw_highest.bin" - }, - "fb": { - "32/64": "{sw_files_path}/sw_fb1.bin", - "32/128": "{sw_files_path}/sw_fb2.bin", - "48/256": "{sw_files_path}/sw_fb3.bin" - } + "wb": [ + 13200 + ], + "swb": [ + 13200 + ] } }, - "stereo_b{bitrate}_dtx_{bandwidth}_rs": { + "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_vbr": { "encmodeoption": [ - "-stereo" + "-stereo_dmx_evs" ], "encoptions": [ "-dtx", @@ -3998,39 +3676,27 @@ "{bandwidth}" ], "dec": { - "STEREO": [] + "MONO": [] }, "in_config": "STEREO", - "table_name": "stereo@{table_bitrate} kbps RS DTX {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": true, + "rs": false, "amr": false, - "mono": false, + "mono": true, "bitrates": { - "wb": { - "13/64": "{sw_files_path}/wb_high1.bin" - }, - "swb": { - "13/32": "{sw_files_path}/swb_low1.bin", - "24/64": "{sw_files_path}/swb_high1.bin", - "13/128": "{sw_files_path}/sw_swb1.bin", - "48/128": "{sw_files_path}/sw_highest.bin" - }, - "fb": { - "32/64": "{sw_files_path}/sw_fb1.bin", - "32/128": "{sw_files_path}/sw_fb2.bin", - "48/256": "{sw_files_path}/sw_fb3.bin" - } + "wb": [ + 5900 + ] } - } - }, - "StereoDmxEVS": { - "StereoDmxEvs_b{bitrate}_{bandwidth}_cbr": { + }, + "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ + "-dtx", "-max_band", "{bandwidth}" ], @@ -4038,7 +3704,7 @@ "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -4080,247 +3746,222 @@ ] } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo2_cbr": { + "StereoDmxEvs_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}", - "-rf", - "lo", - "2" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo2 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, + "rs": true, "amr": false, "mono": true, "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] + "wb": { + "07/16": "{sw_files_path}/wb_low1.bin", + "13/64": "{sw_files_path}/wb_high1.bin", + "07/64": "{sw_files_path}/sw_wb1.bin" + }, + "swb": { + "13/32": "{sw_files_path}/swb_low1.bin", + "24/64": "{sw_files_path}/swb_high1.bin", + "13/128": "{sw_files_path}/sw_swb1.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + }, + "fb": { + "16/128": "{sw_files_path}/sw_16k4_128k_evs.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + } } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo3_cbr": { + "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ + "-dtx", "-max_band", - "{bandwidth}", - "-rf", - "lo", - "3" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo3 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, + "rs": true, "amr": false, "mono": true, "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] - } - }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo5_cbr": { - "encmodeoption": [ - "-stereo_dmx_evs" - ], - "encoptions": [ - "-max_band", - "{bandwidth}", - "-rf", - "lo", - "5" - ], - "dec": { - "MONO": [] - }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo5 {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": false, - "amr": false, - "mono": true, - "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] + "wb": { + "07/16": "{sw_files_path}/wb_low1.bin", + "05/64": "{sw_files_path}/wb_high1.bin", + "07/64": "{sw_files_path}/sw_wb5.bin", + "13/64": "{sw_files_path}/sw_wb1.bin" + }, + "swb": { + "13/32": "{sw_files_path}/swb_low1.bin", + "24/64": "{sw_files_path}/swb_high1.bin", + "13/128": "{sw_files_path}/sw_swb1.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + }, + "fb": { + "16/128": "{sw_files_path}/sw_16k4_128k_evs.bin", + "48/128": "{sw_files_path}/sw_highest.bin" + } } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_lo7_cbr": { + "StereoDmxEvs_b{bitrate}_amr_{bandwidth}_cbr": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}", - "-rf", - "lo", - "7" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Lo7 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps AMR {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, - "amr": false, + "amr": true, "mono": true, "bitrates": { "wb": [ - 13200 - ], - "swb": [ - 13200 + 6600, + 8850, + 12650, + 14250, + 15850, + 18250, + 19850, + 23050, + 23850 ] } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi2_cbr": { + "StereoDmxEvs_b{bitrate}_dtx_amr_{bandwidth}_cbr": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ + "-dtx", "-max_band", - "{bandwidth}", - "-rf", - "hi", - "2" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi2 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps AMR DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, - "amr": false, + "amr": true, "mono": true, "bitrates": { "wb": [ - 13200 - ], - "swb": [ - 13200 + 6600, + 8850, + 12650, + 14250, + 15850, + 18250, + 19850, + 23050, + 23850 ] } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi3_cbr": { + "StereoDmxEvs_b{bitrate}_amr_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}", - "-rf", - "hi", - "3" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi3 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, - "amr": false, + "rs": true, + "amr": true, "mono": true, "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] + "wb": { + "06/23": "{sw_files_path}/sw_amrwb.bin" + } } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi5_cbr": { + "StereoDmxEvs_b{bitrate}_amr_evs_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ "-max_band", - "{bandwidth}", - "-rf", - "hi", - "5" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi5 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, - "amr": false, + "rs": true, + "amr": true, "mono": true, "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] + "wb": { + "06/64": "{sw_files_path}/sw_amrwb_evs.bin" + }, + "swb": { + "06/128": "{sw_files_path}/sw_amrwb_evs2.bin" + } } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rf_hi7_cbr": { + "StereoDmxEvs_b{bitrate}_dtx_amr_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], "encoptions": [ + "-dtx", "-max_band", - "{bandwidth}", - "-rf", - "hi", - "7" + "{bandwidth}" ], "dec": { "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RF Hi7 {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, - "amr": false, + "rs": true, + "amr": true, "mono": true, "bitrates": { - "wb": [ - 13200 - ], - "swb": [ - 13200 - ] + "wb": { + "06/23": "{sw_files_path}/sw_amrwb.bin" + } } }, - "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_vbr": { + "StereoDmxEvs_b{bitrate}_dtx_amr_evs_{bandwidth}_rs": { "encmodeoption": [ "-stereo_dmx_evs" ], @@ -4333,323 +3974,1408 @@ "MONO": [] }, "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps DTX {bandwidth}", + "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], - "rs": false, - "amr": false, + "rs": true, + "amr": true, "mono": true, "bitrates": { - "wb": [ - 5900 - ] + "wb": { + "06/64": "{sw_files_path}/sw_amrwb_evs.bin" + }, + "swb": { + "06/128": "{sw_files_path}/sw_amrwb_evs2.bin" + } } - }, - "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_cbr": { + } + }, + + "OMASA": { + "OMASA_ISM1_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "1", + "2" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "OMASA_ISM1_2TC1DIR", + "table_name": "OMASA ISM1 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], "rs": false, "amr": false, - "mono": true, + "mono": false, "bitrates": { "wb": [ - 7200, - 8000, - 9600, 13200, 16400, 24400, 32000, 48000, 64000, + 80000, 96000, - 128000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ - 9600, 13200, 16400, 24400, 32000, 48000, 64000, + 80000, 96000, - 128000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ + 13200, 16400, 24400, 32000, 48000, 64000, + 80000, 96000, - 128000 + 128000, + 192000, + 256000, + 384000, + 512000 ] } }, - "StereoDmxEvs_b{bitrate}_{bandwidth}_rs": { + "OMASA_ISM1_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "1", + "2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] - }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_2TC2DIR", + "table_name": "OMASA ISM1 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], "rs": true, "amr": false, - "mono": true, + "mono": false, "bitrates": { "wb": { - "07/16": "{sw_files_path}/wb_low1.bin", - "13/64": "{sw_files_path}/wb_high1.bin", - "07/64": "{sw_files_path}/sw_wb1.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "swb": { - "13/32": "{sw_files_path}/swb_low1.bin", - "24/64": "{sw_files_path}/swb_high1.bin", - "13/128": "{sw_files_path}/sw_swb1.bin", - "48/128": "{sw_files_path}/sw_highest.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "fb": { - "16/128": "{sw_files_path}/sw_16k4_128k_evs.bin", - "48/128": "{sw_files_path}/sw_highest.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" } } }, - "StereoDmxEvs_b{bitrate}_dtx_{bandwidth}_rs": { + "OMASA_ISM1_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "1", + "1" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, + "in_config": "OMASA_ISM1_1TC1DIR", + "table_name": "OMASA ISM1 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], + "rs": false, "amr": false, - "mono": true, + "mono": false, "bitrates": { - "wb": { - "07/16": "{sw_files_path}/wb_low1.bin", - "05/64": "{sw_files_path}/wb_high1.bin", - "07/64": "{sw_files_path}/sw_wb5.bin", - "13/64": "{sw_files_path}/sw_wb1.bin" - }, - "swb": { - "13/32": "{sw_files_path}/swb_low1.bin", - "24/64": "{sw_files_path}/swb_high1.bin", - "13/128": "{sw_files_path}/sw_swb1.bin", - "48/128": "{sw_files_path}/sw_highest.bin" - }, - "fb": { - "16/128": "{sw_files_path}/sw_16k4_128k_evs.bin", - "48/128": "{sw_files_path}/sw_highest.bin" - } + "wb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ], + "swb": [ + 16400, + 48000, + 96000, + 256000 + ], + "fb": [ + 24400, + 64000, + 128000, + 384000 + ] } }, - "StereoDmxEvs_b{bitrate}_amr_{bandwidth}_cbr": { + "OMASA_ISM1_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "1", + "1" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps AMR {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "OMASA_ISM1_1TC2DIR", + "table_name": "OMASA ISM1 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], "rs": false, - "amr": true, - "mono": true, + "amr": false, + "mono": false, "bitrates": { "wb": [ - 6600, - 8850, - 12650, - 14250, - 15850, - 18250, - 19850, - 23050, - 23850 + 16400, + 48000, + 96000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 ] } }, - "StereoDmxEvs_b{bitrate}_dtx_amr_{bandwidth}_cbr": { + + + "OMASA_ISM2_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "2", + "2" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps AMR DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "OMASA_ISM2_2TC1DIR", + "table_name": "OMASA ISM2 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], "rs": false, - "amr": true, - "mono": true, + "amr": false, + "mono": false, "bitrates": { "wb": [ - 6600, - 8850, - 12650, - 14250, - 15850, - 18250, - 19850, - 23050, - 23850 + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 ] } }, - "StereoDmxEvs_b{bitrate}_amr_{bandwidth}_rs": { + "OMASA_ISM2_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "2", + "2" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "OMASA_ISM2_2TC2DIR", + "table_name": "OMASA ISM2 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], "rs": true, - "amr": true, - "mono": true, + "amr": false, + "mono": false, "bitrates": { "wb": { - "06/23": "{sw_files_path}/sw_amrwb.bin" - } - } + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } }, - "StereoDmxEvs_b{bitrate}_amr_evs_{bandwidth}_rs": { + "OMASA_ISM2_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_masa", + "2", + "1" ], "encoptions": [ "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], + "in_config": "OMASA_ISM2_1TC1DIR", + "table_name": "OMASA ISM2 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 80000, + 192000, + 512000 + ], + "swb": [ + 48000, + 96000, + 160000, + 256000 + ], + "fb": [ + 64000, + 128000, + 384000 + ] + } + }, + "OMASA_ISM2_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "2", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM2_1TC2DIR", + "table_name": "OMASA ISM2 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 160000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + }, + + + "OMASA_ISM3_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_2TC1DIR", + "table_name": "OMASA ISM3 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM3_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "3", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_2TC2DIR", + "table_name": "OMASA ISM3 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], "rs": true, - "amr": true, - "mono": true, + "amr": false, + "mono": false, "bitrates": { "wb": { - "06/64": "{sw_files_path}/sw_amrwb_evs.bin" + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin" }, "swb": { - "06/128": "{sw_files_path}/sw_amrwb_evs2.bin" + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin" } } }, - "StereoDmxEvs_b{bitrate}_dtx_amr_{bandwidth}_rs": { + "OMASA_ISM3_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM3_1TC1DIR", + "table_name": "OMASA ISM3 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 192000, + 512000 + ], + "swb": [ + 96000, + 160000, + 256000 + ], + "fb": [ + 128000, + 384000 + ] + } + }, + "OMASA_ISM3_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_1TC2DIR", + "table_name": "OMASA ISM3 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 160000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + }, + + + "OMASA_ISM4_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_2TC1DIR", + "table_name": "OMASA ISM4 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM4_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_masa", + "4", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_2TC2DIR", + "table_name": "OMASA ISM4 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OMASA_ISM4_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM4_1TC1DIR", + "table_name": "OMASA ISM4 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 192000, + 512000 + ], + "swb": [ + 160000, + 256000 + ], + "fb": [ + 128000, + 384000 + ] + } + }, + "OMASA_ISM4_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_1TC2DIR", + "table_name": "OMASA ISM4 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + } + }, + "OSBA": { + "OSBA_ISM1_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA3", + "table_name": "OSBA ISM1 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM1_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA2", + "table_name": "OSBA ISM1 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM1_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "1", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_FOA", + "table_name": "OSBA ISM1 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA3", + "table_name": "OSBA ISM2 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_HOA2", + "table_name": "OSBA ISM2 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM2_FOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_sba", + "2", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_FOA", + "table_name": "OSBA ISM2 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OSBA_ISM3_HOA3_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-stereo_dmx_evs" + "-ism_sba", + "3", + "3" ], "encoptions": [ - "-dtx", "-max_band", "{bandwidth}" ], "dec": { - "MONO": [] + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": true, - "mono": true, - "bitrates": { - "wb": { - "06/23": "{sw_files_path}/sw_amrwb.bin" - } - } - }, - "StereoDmxEvs_b{bitrate}_dtx_amr_evs_{bandwidth}_rs": { - "encmodeoption": [ - "-stereo_dmx_evs" - ], - "encoptions": [ - "-dtx", - "-max_band", - "{bandwidth}" + "in_config": "OSBA_ISM3_HOA3", + "table_name": "OSBA ISM3 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv" ], - "dec": { - "MONO": [] - }, - "in_config": "STEREO", - "table_name": "StereoDmxEVS@{table_bitrate} kbps RS AMR DTX {bandwidth}", - "nummetadata": 0, - "metadatafilenames": [], - "rs": true, - "amr": true, - "mono": true, + "rs": false, + "amr": false, + "mono": false, "bitrates": { - "wb": { - "06/64": "{sw_files_path}/sw_amrwb_evs.bin" - }, - "swb": { - "06/128": "{sw_files_path}/sw_amrwb_evs2.bin" - } + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] } - } - }, - - "OMASA": { - "OMASA_ISM1_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + }, + "OSBA_ISM3_HOA2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism_masa", - "1", + "-ism_sba", + "3", "2" ], "encoptions": [ @@ -4663,12 +5389,13 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM1_2TC1DIR", - "table_name": "OMASA ISM1 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 2, + "in_config": "OSBA_ISM3_HOA2", + "table_name": "OSBA ISM3 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}.met" + "{item}_ISM2.csv", + "{item}_ISM3.csv" ], "rs": false, "amr": false, @@ -4721,11 +5448,11 @@ ] } }, - "OMASA_ISM1_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "OSBA_ISM3_FOA_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism_masa", - "1", - "2" + "-ism_sba", + "3", + "1" ], "encoptions": [ "-max_band", @@ -4738,33 +5465,70 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM1_2TC2DIR", - "table_name": "OMASA ISM1 2TC 2DIR@{table_bitrate} RS {bandwidth}", - "nummetadata": 2, + "in_config": "OSBA_ISM3_FOA", + "table_name": "OSBA ISM3 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}.met" + "{item}_ISM2.csv", + "{item}_ISM3.csv" ], - "rs": true, + "rs": false, "amr": false, "mono": false, "bitrates": { - "wb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "swb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - }, - "fb": { - "all": "{sw_files_path}/sw_13k2_512k.bin" - } + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] } }, - "OMASA_ISM1_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM4_HOA3_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism_masa", - "1", - "1" + "-ism_sba", + "4", + "3" ], "encoptions": [ "-max_band", @@ -4777,12 +5541,14 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM1_1TC1DIR", - "table_name": "OMASA ISM1 1TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 2, + "in_config": "OSBA_ISM4_HOA3", + "table_name": "OSBA ISM4 HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}.met" + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" ], "rs": false, "amr": false, @@ -4790,30 +5556,56 @@ "bitrates": { "wb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ], "swb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "fb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ] } - }, - "OMASA_ISM1_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + }, + "OSBA_ISM4_HOA2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism_masa", - "1", - "1" + "-ism_sba", + "4", + "2" ], "encoptions": [ "-max_band", @@ -4826,45 +5618,71 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM1_1TC2DIR", - "table_name": "OMASA ISM1 1TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 2, + "in_config": "OSBA_ISM4_HOA2", + "table_name": "OSBA ISM4 HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}.met" + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv" ], "rs": false, "amr": false, "mono": false, "bitrates": { "wb": [ + 13200, 16400, + 24400, + 32000, 48000, + 64000, + 80000, 96000, - 256000 + 128000, + 192000, + 256000, + 384000, + 512000 ], "swb": [ + 13200, + 16400, 24400, + 32000, + 48000, 64000, + 80000, + 96000, 128000, - 384000 + 192000, + 256000, + 384000, + 512000 ], "fb": [ 13200, + 16400, + 24400, 32000, + 48000, + 64000, 80000, + 96000, + 128000, 192000, + 256000, + 384000, 512000 ] } }, - - - "OMASA_ISM2_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM4_FOA_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ - "-ism_masa", - "2", - "2" + "-ism_sba", + "4", + "1" ], "encoptions": [ "-max_band", @@ -4874,15 +5692,17 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM2_2TC1DIR", - "table_name": "OMASA ISM2 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 3, + "in_config": "OSBA_ISM4_FOA", + "table_name": "OSBA ISM4 FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", - "{item}.met" + "{item}_ISM3.csv", + "{item}_ISM4.csv" ], "rs": false, "amr": false, @@ -4935,10 +5755,48 @@ ] } }, - "OMASA_ISM2_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "OSBA_ISM1_HOA3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", - "2", + "-ism_sba", + "1", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM1_HOA3", + "table_name": "OSBA ISM1 HOA3 RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}_ISM1.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OSBA_ISM1_HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism_sba", + "1", "2" ], "encoptions": [ @@ -4949,15 +5807,14 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM2_2TC2DIR", - "table_name": "OMASA ISM2 2TC 2DIR@{table_bitrate} RS {bandwidth}", - "nummetadata": 3, + "in_config": "OSBA_ISM1_HOA2", + "table_name": "OSBA ISM1 HOA2 RS {bandwidth}", + "nummetadata": 1, "metadatafilenames": [ - "{item}_ISM1.csv", - "{item}_ISM2.csv", - "{item}.met" + "{item}_ISM1.csv" ], "rs": true, "amr": false, @@ -4974,10 +5831,10 @@ } } }, - "OMASA_ISM2_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM1_FOA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", - "2", + "-ism_sba", + "1", "1" ], "encoptions": [ @@ -4991,41 +5848,32 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM2_1TC1DIR", - "table_name": "OMASA ISM2 1TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 3, + "in_config": "OSBA_ISM1_FOA", + "table_name": "OSBA ISM1 FOA RS {bandwidth}", + "nummetadata": 1, "metadatafilenames": [ - "{item}_ISM1.csv", - "{item}_ISM2.csv", - "{item}.met" + "{item}_ISM1.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 80000, - 192000, - 512000 - ], - "swb": [ - 48000, - 96000, - 160000, - 256000 - ], - "fb": [ - 64000, - 128000, - 384000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "OMASA_ISM2_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM2_HOA3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "2", - "1" + "3" ], "encoptions": [ "-max_band", @@ -5035,48 +5883,35 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM2_1TC2DIR", - "table_name": "OMASA ISM2 1TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 3, + "in_config": "OSBA_ISM2_HOA3", + "table_name": "OSBA ISM2 HOA RS {bandwidth}", + "nummetadata": 2, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}_ISM2.csv", - "{item}.met" + "{item}_ISM2.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 16400, - 48000, - 96000, - 160000, - 256000 - ], - "swb": [ - 24400, - 64000, - 128000, - 384000 - ], - "fb": [ - 13200, - 32000, - 80000, - 192000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } - }, - - - "OMASA_ISM3_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + }, + "OSBA_ISM2_HOA2_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", - "3", + "-ism_sba", + "2", "2" ], "encoptions": [ @@ -5087,73 +5922,36 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM3_2TC1DIR", - "table_name": "OMASA ISM3 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 4, + "in_config": "OSBA_ISM2_HOA2", + "table_name": "OSBA ISM2 HOA2 RS {bandwidth}", + "nummetadata": 2, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}_ISM2.csv", - "{item}_ISM3.csv", - "{item}.met" + "{item}_ISM2.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "OMASA_ISM3_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "OSBA_ISM2_FOA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", - "3", - "2" + "-ism_sba", + "2", + "1" ], "encoptions": [ "-max_band", @@ -5163,37 +5961,36 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] - }, - "in_config": "OMASA_ISM3_2TC2DIR", - "table_name": "OMASA ISM3 2TC 2DIR@{table_bitrate} RS {bandwidth}", - "nummetadata": 4, + "stereo": [], + "EXT": [] + }, + "in_config": "OSBA_ISM2_FOA", + "table_name": "OSBA ISM2 FOA RS {bandwidth}", + "nummetadata": 2, "metadatafilenames": [ "{item}_ISM1.csv", - "{item}_ISM2.csv", - "{item}_ISM3.csv", - "{item}.met" + "{item}_ISM2.csv" ], "rs": true, "amr": false, "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "fb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" } } }, - "OMASA_ISM3_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM3_HOA3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "3", - "1" + "3" ], "encoptions": [ "-max_band", @@ -5206,39 +6003,34 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM3_1TC1DIR", - "table_name": "OMASA ISM3 1TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 4, + "in_config": "OSBA_ISM3_HOA3", + "table_name": "OSBA ISM3 HOA3 RS {bandwidth}", + "nummetadata": 3, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", - "{item}_ISM3.csv", - "{item}.met" + "{item}_ISM3.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 192000, - 512000 - ], - "swb": [ - 96000, - 160000, - 256000 - ], - "fb": [ - 128000, - 384000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } - }, - "OMASA_ISM3_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + }, + "OSBA_ISM3_HOA2_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "3", - "1" + "2" ], "encoptions": [ "-max_band", @@ -5248,50 +6040,37 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM3_1TC2DIR", - "table_name": "OMASA ISM3 1TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 4, + "in_config": "OSBA_ISM3_HOA2", + "table_name": "OSBA ISM3 HOA2 RS {bandwidth}", + "nummetadata": 3, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", - "{item}_ISM3.csv", - "{item}.met" + "{item}_ISM3.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 16400, - 48000, - 96000, - 160000, - 256000 - ], - "swb": [ - 24400, - 64000, - 128000, - 384000 - ], - "fb": [ - 13200, - 32000, - 80000, - 192000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - - - "OMASA_ISM4_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM3_FOA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", - "4", - "2" + "-ism_sba", + "3", + "1" ], "encoptions": [ "-max_band", @@ -5301,74 +6080,37 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM4_2TC1DIR", - "table_name": "OMASA ISM4 2TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 5, + "in_config": "OSBA_ISM3_FOA", + "table_name": "OSBA ISM3 FOA RS {bandwidth}", + "nummetadata": 3, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", - "{item}_ISM3.csv", - "{item}_ISM4.csv", - "{item}.met" + "{item}_ISM3.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "swb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ], - "fb": [ - 13200, - 16400, - 24400, - 32000, - 48000, - 64000, - 80000, - 96000, - 128000, - 192000, - 256000, - 384000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "OMASA_ISM4_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { + "OSBA_ISM4_HOA3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "4", - "2" + "3" ], "encoptions": [ "-max_band", @@ -5378,38 +6120,38 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM4_2TC2DIR", - "table_name": "OMASA ISM4 2TC 2DIR@{table_bitrate} RS {bandwidth}", - "nummetadata": 5, + "in_config": "OSBA_ISM4_HOA3", + "table_name": "OSBA ISM4 HOA3 RS {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", "{item}_ISM3.csv", - "{item}_ISM4.csv", - "{item}.met" + "{item}_ISM4.csv" ], "rs": true, "amr": false, "mono": false, "bitrates": { "wb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "swb": { - "all": "{sw_files_path}/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin" + "all": "{sw_files_path}/sw_13k2_512k.bin" }, "fb": { "all": "{sw_files_path}/sw_13k2_512k.bin" } } - }, - "OMASA_ISM4_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + }, + "OSBA_ISM4_HOA2_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "4", - "1" + "2" ], "encoptions": [ "-max_band", @@ -5422,37 +6164,33 @@ "stereo": [], "EXT": [] }, - "in_config": "OMASA_ISM4_1TC1DIR", - "table_name": "OMASA ISM4 1TC 1DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 5, + "in_config": "OSBA_ISM4_HOA2", + "table_name": "OSBA ISM4 HOA2 RS {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", "{item}_ISM3.csv", - "{item}_ISM4.csv", - "{item}.met" + "{item}_ISM4.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 192000, - 512000 - ], - "swb": [ - 160000, - 256000 - ], - "fb": [ - 128000, - 384000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } }, - "OMASA_ISM4_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "OSBA_ISM4_FOA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ - "-ism_masa", + "-ism_sba", "4", "1" ], @@ -5464,41 +6202,31 @@ "7_1_4": [], "HOA3": [], "mono": [], - "stereo": [] + "stereo": [], + "EXT": [] }, - "in_config": "OMASA_ISM4_1TC2DIR", - "table_name": "OMASA ISM4 1TC 2DIR@{table_bitrate} kbps {bandwidth}", - "nummetadata": 5, + "in_config": "OSBA_ISM4_FOA", + "table_name": "OSBA ISM4 FOA RS {bandwidth}", + "nummetadata": 4, "metadatafilenames": [ "{item}_ISM1.csv", "{item}_ISM2.csv", "{item}_ISM3.csv", - "{item}_ISM4.csv", - "{item}.met" + "{item}_ISM4.csv" ], - "rs": false, + "rs": true, "amr": false, "mono": false, "bitrates": { - "wb": [ - 16400, - 48000, - 96000, - 256000 - ], - "swb": [ - 24400, - 64000, - 128000, - 384000 - ], - "fb": [ - 13200, - 32000, - 80000, - 192000, - 512000 - ] + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } } } } -- GitLab From 27ed9e01c357a26c77240e3ee78aed4175c52817 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 6 Sep 2023 09:55:48 +0200 Subject: [PATCH 47/89] add SBA-related changes back --- scripts/config/ivas_modes.json | 714 +++++++++++++++++++++++++++++++-- 1 file changed, 684 insertions(+), 30 deletions(-) diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index 32da5bae1f..703a3e2b04 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -599,11 +599,497 @@ } } }, - "SBA": { - "SBA_b{bitrate}_{bandwidth}_cbr": { + "FOA": { + "FOA_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "{ambi_order}" + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "FOA", + "table_name": "FOA@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "FOA_b{bitrate}_dtx_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "1" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "FOA", + "table_name": "FOA@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000 + ] + } + }, + "FOA_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-sba", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "FOA", + "table_name": "FOA@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } + }, + "HOA2": { + "HOA2_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA2", + "table_name": "HOA2@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "HOA2_b{bitrate}_dtx_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "2" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA2", + "table_name": "HOA2@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000 + ] + } + }, + "HOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-sba", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA2", + "table_name": "HOA2@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } + }, + "HOA3": { + "HOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA3", + "table_name": "HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "HOA3_b{bitrate}_dtx_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "3" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA3", + "table_name": "HOA3@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000 + ] + } + }, + "HOA3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-sba", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA3", + "table_name": "HOA3@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } + }, + "PlanarFOA": { + "PlanarFOA_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "1" ], "encoptions": [ "-max_band", @@ -612,12 +1098,13 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "SBA", - "table_name": "SBA@{table_bitrate} kbps {bandwidth}", + "in_config": "FOA", + "table_name": "Planar FOA@{table_bitrate} kbps {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -671,10 +1158,10 @@ ] } }, - "SBA_b{bitrate}_dtx_{bandwidth}_cbr": { + "PlanarFOA_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "{ambi_order}" + "1" ], "encoptions": [ "-dtx", @@ -684,12 +1171,13 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "SBA", - "table_name": "SBA@{table_bitrate} kbps DTX {bandwidth}", + "in_config": "FOA", + "table_name": "Planar FOA@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -722,10 +1210,10 @@ ] } }, - "SBA_b{bitrate}_{bandwidth}_rs": { + "PlanarFOA_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-sba", - "{ambi_order}" + "1" ], "encoptions": [ "-max_band", @@ -734,12 +1222,13 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "SBA", - "table_name": "SBA@{table_bitrate} kbps RS {bandwidth}", + "in_config": "FOA", + "table_name": "Planar FOA@{table_bitrate} kbps RS {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": true, @@ -758,11 +1247,11 @@ } } }, - "PlanarSBA": { - "PlanarSBA_b{bitrate}_{bandwidth}_cbr": { + "PlanarHOA2": { + "PlanarHOA2_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "-{ambi_order}" + "2" ], "encoptions": [ "-max_band", @@ -771,12 +1260,13 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], - "stereo": [], - "mono": [] + "mono": [], + "stereo": [] }, - "in_config": "SBA", - "table_name": "Planar SBA@{table_bitrate} kbps {bandwidth}", + "in_config": "HOA2", + "table_name": "Planar HOA2@{table_bitrate} kbps {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -830,10 +1320,10 @@ ] } }, - "PlanarSBA_b{bitrate}_dtx_{bandwidth}_cbr": { + "PlanarHOA2_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-sba", - "-{ambi_order}" + "2" ], "encoptions": [ "-dtx", @@ -843,12 +1333,175 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], - "stereo": [], - "mono": [] + "mono": [], + "stereo": [] + }, + "in_config": "HOA2", + "table_name": "Planar HOA2@{table_bitrate} kbps DTX {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000 + ] + } + }, + "PlanarHOA2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-sba", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA2", + "table_name": "Planar HOA2@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + } + }, + "PlanarHOA3": { + "PlanarHOA3_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] + }, + "in_config": "HOA3", + "table_name": "Planar HOA3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 0, + "metadatafilenames": [], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 160000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "PlanarHOA3_b{bitrate}_dtx_{bandwidth}_cbr": { + "encmodeoption": [ + "-sba", + "3" + ], + "encoptions": [ + "-dtx", + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "HOA2": [], + "FOA": [], + "mono": [], + "stereo": [] }, - "in_config": "SBA", - "table_name": "Planar SBA@{table_bitrate} kbps DTX {bandwidth}", + "in_config": "HOA3", + "table_name": "Planar HOA3@{table_bitrate} kbps DTX {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": false, @@ -881,10 +1534,10 @@ ] } }, - "PlanarSBA_b{bitrate}_{bandwidth}_rs": { + "PlanarHOA3_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-sba", - "-{ambi_order}" + "3" ], "encoptions": [ "-max_band", @@ -893,12 +1546,13 @@ "dec": { "7_1_4": [], "HOA3": [], + "HOA2": [], "FOA": [], "mono": [], "stereo": [] }, - "in_config": "SBA", - "table_name": "Planar SBA@{table_bitrate} kbps RS {bandwidth}", + "in_config": "HOA3", + "table_name": "Planar HOA3@{table_bitrate} kbps RS {bandwidth}", "nummetadata": 0, "metadatafilenames": [], "rs": true, -- GitLab From 0b395bc1344030d2b1d747c30e6787cebcd01592 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 12:22:59 +0200 Subject: [PATCH 48/89] fix formatting --- lib_dec/ivas_init_dec.c | 4 ++-- lib_dec/ivas_jbm_dec.c | 16 ++++++++++------ lib_dec/ivas_stat_dec.h | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index c1c0f99f67..ac71d679c6 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -480,7 +480,7 @@ ivas_error ivas_dec_setup( #ifndef JBM_FOR_OSBA /* set Ambisonic (SBA) order used for analysis and coding */ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); -#endif +#endif if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate ) { @@ -503,7 +503,7 @@ ivas_error ivas_dec_setup( #ifdef JBM_FOR_OSBA /* set Ambisonic (SBA) order used for analysis and coding */ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); -#endif +#endif ivas_sba_config( ivas_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 ); /*correct number of CPEs for discrete ISM coding*/ if ( st_ivas->ini_frame > 0 && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 44269fbb44..fab58816ee 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2270,7 +2270,8 @@ ivas_error ivas_jbm_dec_tc_buffer_open( #ifdef JBM_FOR_OSBA + MAX_NUM_OBJECTS #endif - ; ch_idx++ ) + ; + ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2299,9 +2300,10 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->tc_buffer = NULL; for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS #ifdef JBM_FOR_OSBA - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif - ; ch_idx++ ) + ; + ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2329,7 +2331,8 @@ ivas_error ivas_jbm_dec_tc_buffer_open( #ifdef JBM_FOR_OSBA + MAX_NUM_OBJECTS #endif - ; ch_idx++ ) + ; + ch_idx++ ) { hTcBuffer->tc[ch_idx] = NULL; } @@ -2447,7 +2450,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } for ( ; ch_idx < MAX_TRANSPORT_CHANNELS #ifdef JBM_FOR_OSBA - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif ; @@ -2519,7 +2522,8 @@ void ivas_jbm_dec_tc_buffer_close( #ifdef JBM_FOR_OSBA + MAX_NUM_OBJECTS #endif - ; i++ ) + ; + i++ ) { ( *phTcBuffer )->tc[i] = NULL; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 306887462c..01b90e7a69 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -949,7 +949,7 @@ typedef struct decoder_tc_buffer_structure float *tc_buffer; /* the buffer itself */ float *tc[MAX_TRANSPORT_CHANNELS #ifdef JBM_FOR_OSBA - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif ]; /* pointers into the buffer to the beginning of each tc */ TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ -- GitLab From de2b8ea74822a2623bde02d9d4f39720a1c6821e Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 12:23:45 +0200 Subject: [PATCH 49/89] fix path in check-format.sh --- scripts/check-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 659657dfea..8ec2991cda 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -38,7 +38,7 @@ if [ ! -d "lib_com" ]; then exit 255 fi -CLANG_FORMAT=./clang-format.exe +CLANG_FORMAT=clang-format CLANG_FORMAT_REQUIRED_VERSION="13.0" # list (with space between entries) of substrings that are excluded from the file list, e.g. very large files -- GitLab From 7887d6c9fc6763faa0ad0886c61c3e18f25d1f8c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 12:46:35 +0200 Subject: [PATCH 50/89] increase timeout for smoke tests --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0da7bd4f76..e0afb4ea1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -366,7 +366,7 @@ codec-smoke-test: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request - timeout: "10 minutes" + timeout: "30 minutes" stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: -- GitLab From f8f6495399c4218da1567d645ef6279525f51170 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 15:53:31 +0200 Subject: [PATCH 51/89] resolve decoder hang-up with OSBA JBM to BINAURAL_FASTCONV_ROOM --- lib_dec/ivas_jbm_dec.c | 13 +++++++++++-- lib_dec/ivas_spar_decoder.c | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index fab58816ee..1b49b5a298 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -858,7 +858,12 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( ivas_ism_dec_digest_tc( st_ivas ); /* delay the objects here for all renderers where it is needed */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || + st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || + st_ivas->renderer_type == RENDERER_OSBA_AMBI || + st_ivas->renderer_type == RENDERER_OSBA_LS || + st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL + ) { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -1194,7 +1199,11 @@ ivas_error ivas_jbm_dec_render( v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } } - else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS ) + else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS +#ifdef JBM_FOR_OSBA + || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM +#endif + ) { float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_output_ism[MAX_OUTPUT_CHANNELS]; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index c3ce3222af..b34db02485 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -269,7 +269,7 @@ ivas_error ivas_spar_dec_open( } #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); -- GitLab From c8906c681edc97ef0808ba9cdf9c771bf344e553 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 16:04:05 +0200 Subject: [PATCH 52/89] fix formatting --- lib_dec/ivas_jbm_dec.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1b49b5a298..c817e9905e 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -858,12 +858,11 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( ivas_ism_dec_digest_tc( st_ivas ); /* delay the objects here for all renderers where it is needed */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || - st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || - st_ivas->renderer_type == RENDERER_OSBA_AMBI || - st_ivas->renderer_type == RENDERER_OSBA_LS || - st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL - ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || + st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || + st_ivas->renderer_type == RENDERER_OSBA_AMBI || + st_ivas->renderer_type == RENDERER_OSBA_LS || + st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -1199,11 +1198,11 @@ ivas_error ivas_jbm_dec_render( v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } } - else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS + else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS #ifdef JBM_FOR_OSBA - || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM + || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM #endif - ) + ) { float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_output_ism[MAX_OUTPUT_CHANNELS]; -- GitLab From 3148a2d4ca390af60f13041d3381e16d88c7b1c9 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 6 Sep 2023 16:54:24 +0200 Subject: [PATCH 53/89] fix compilation error in split-rendering smoke test --- lib_dec/ivas_sba_dec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index e2582c1cd2..ad1c2385e0 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -183,6 +183,7 @@ ivas_error ivas_sba_dec_reconfigure( { RENDERER_TYPE renderer_type_new; int16_t sba_order_internal; + sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); /* get new renderer type */ @@ -192,7 +193,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL #ifdef SPLIT_REND_WITH_HEAD_ROT - || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) { @@ -207,7 +208,7 @@ ivas_error ivas_sba_dec_reconfigure( { if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT - || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) { -- GitLab From b70699c2101aaa2c60ef2b4d19cf1d5be8f01a78 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 7 Sep 2023 11:54:15 +0200 Subject: [PATCH 54/89] fix compilation error with JBM_FOR_OSBA disabled --- lib_dec/ivas_osba_dec.c | 4 ---- lib_dec/ivas_sba_dec.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 821fa73fb6..d7326c88b6 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -372,11 +372,7 @@ ivas_error ivas_osba_render( } } -#ifdef JBM_FOR_OSBA if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output_f, output_frame ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index ad1c2385e0..43843ffa71 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -258,9 +258,8 @@ ivas_error ivas_sba_dec_reconfigure( /* save old */ #ifdef JBM_FOR_OSBA if ( ism_mode_old != ISM_SBA_MODE_DISC ) - /* only necessary for SBA and OSBA w/o disrcrete objects, otherwise hTcBuffer is in sync anyway */ - { #endif + { if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens { st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots; -- GitLab From 3d4ea707e515f304003a9423627eae320ef07840 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 7 Sep 2023 13:37:28 +0200 Subject: [PATCH 55/89] restore BE-ness of an OSBA stereo condition in pytests --- lib_dec/ivas_init_dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index ac71d679c6..2674e3734b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -911,7 +911,8 @@ int16_t getNumChanSynthesis( if ( st_ivas->sba_dirac_stereo_flag ) { n = CPE_CHANNELS; -#ifdef JBM_FOR_OSBA +#if 0 + /* TODO wkr: this is actually a correct bugfix for OSBA, it is disabled for now to pass the pipelines in the OSBA JBM branch */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { n += st_ivas->nchan_ism; -- GitLab From 9049344509063ba9b82ad57840ff30550133e0c6 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 7 Sep 2023 13:46:30 +0200 Subject: [PATCH 56/89] fix formatting --- lib_dec/ivas_sba_dec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 43843ffa71..bddb94a87e 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -291,7 +291,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifdef NONBE_FIX_736_FOA_BR_SWITCH if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( st_ivas->sba_order != 1 ) ) ) #else - if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) + if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) ) #endif { free( st_ivas->hSpar->hPCA ); @@ -422,7 +422,7 @@ ivas_error ivas_sba_dec_reconfigure( #ifndef NONBE_FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else -if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) + if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) #endif { DIRAC_CONFIG_FLAG flag_config; @@ -622,12 +622,12 @@ if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_typ return error; } #else -if ( st_ivas->hDiracDecBin != NULL ) -{ - if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) + if ( st_ivas->hDiracDecBin != NULL ) { - return error; - } + if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) + { + return error; + } #endif } @@ -716,7 +716,7 @@ if ( st_ivas->hDiracDecBin != NULL ) #ifdef JBM_FOR_OSBA granularity_new #else - NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) + NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) #endif ) ) != IVAS_ERR_OK ) { -- GitLab From 2efa2e089a00ac50c96a811639f0e2ace6a153b8 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 7 Sep 2023 17:38:12 +0200 Subject: [PATCH 57/89] fix crash when switching from high to low BR DirAC --- lib_dec/ivas_sba_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index bddb94a87e..a7ca3cc843 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -419,7 +419,7 @@ ivas_error ivas_sba_dec_reconfigure( return error; } #endif -#ifndef NONBE_FIX_736_FOA_BR_SWITCH +#if 1 if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) -- GitLab From 720d5532a1bbe08363a0395a10452a1007bc6574 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 8 Sep 2023 08:28:11 +0200 Subject: [PATCH 58/89] Revert "fix crash when switching from high to low BR DirAC" This reverts commit 2efa2e089a00ac50c96a811639f0e2ace6a153b8. --- lib_dec/ivas_sba_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index a7ca3cc843..bddb94a87e 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -419,7 +419,7 @@ ivas_error ivas_sba_dec_reconfigure( return error; } #endif -#if 1 +#ifndef NONBE_FIX_736_FOA_BR_SWITCH if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) #else if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) -- GitLab From 7d998adffc780e4f3667024edcb6c0701a73f50b Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 8 Sep 2023 08:36:37 +0200 Subject: [PATCH 59/89] merge define FIX_COMBINED_FORMATS_ISM_GAINS into JBM_FOR_OSBA --- lib_com/options.h | 9 ++------- lib_dec/ivas_ism_param_dec.c | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index ce3b471348..3649c5d084 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,15 +158,8 @@ #define OSBA_SPLIT_RENDERING #endif -<<<<<<< HEAD -#define JBM_FOR_OSBA -#define FIX_COMBINED_FORMATS_ISM_GAINS - -#define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ -======= #define FIX_708_DPID_COMMAND_LINE /* issue 708: sanity checks for '-dpid' command-line */ #define FIX_730_DPID_NOT_SET_CORRECTLY /* Eri: issue 730: write dpid read from file in correct index, print informative error message when DPID specified is not found. */ ->>>>>>> main #define FIX_RAM_COUNTING_5MS_RENDERING /* FhG: fix for correct RAM reporting with 5ms rendering */ @@ -193,6 +186,8 @@ #define NONBE_FIX_760_COHERENCE_MASA /* Nokia: Issue 760: fixes decoder crash for some cases when all energy ratios are 1 */ #define NONBE_FIX_752_OSBA_MISCONFIG_MCT /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/ +#define JBM_FOR_OSBA /* FhG: implement OSBA format in the JBM path */ + /* ##################### End NON-BE switches ############################# */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 34d88158d6..178093ee3c 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1032,7 +1032,7 @@ void ivas_ism_dec_digest_tc( ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ -#ifdef FIX_COMBINED_FORMATS_ISM_GAINS +#ifdef JBM_FOR_OSBA num_objects = st_ivas->nchan_ism; #else num_objects = st_ivas->nchan_transport; -- GitLab From 044640591484f0c34d511cf3197956f449abd1f3 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 8 Sep 2023 11:05:15 +0200 Subject: [PATCH 60/89] fix wrong setting of the number of ISM channels in TD renderer due to missing else --- lib_dec/ivas_objectRenderer_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index b341d686dc..6827099502 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -148,7 +148,7 @@ ivas_error ivas_td_binaural_renderer_sf( ch_offset = 2; } #ifdef JBM_FOR_OSBA - if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) + else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { nchan_ism_internal = st_ivas->nchan_ism; nchan_ism = st_ivas->nchan_ism; -- GitLab From 4d99621d48e553ce4b832162033fb56eac3fca3c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 11:19:51 +0200 Subject: [PATCH 61/89] implement OSBA output to BINAURAL_ROOM_IR in JBM path --- lib_dec/ivas_dirac_dec.c | 85 ++++++++++++++++++++++++++++++++++++ lib_dec/ivas_init_dec.c | 18 +++++++- lib_dec/ivas_ism_param_dec.c | 1 + lib_dec/ivas_jbm_dec.c | 57 +++++++++++++----------- lib_dec/ivas_output_config.c | 6 +++ lib_dec/ivas_spar_decoder.c | 62 +++++++++++++++++++++++--- 6 files changed, 197 insertions(+), 32 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index dd23cc1250..7084af31d4 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2401,6 +2401,91 @@ void ivas_dirac_dec_render_sf( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { + +#ifdef JBM_FOR_OSBA + /* render objects in combined format onto the CICP19 channels for BINAURAL_ROOM_IR */ + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + int16_t in_ch; + for ( in_ch = 0; in_ch < st_ivas->nchan_ism; in_ch++ ) + { + int16_t i, j, k, j2, l; + float *g1, g2; + int16_t num_objects, nchan_out_woLFE, lfe_index; + int16_t azimuth, elevation; + int16_t tc_offset; + int16_t n_slots_to_render; + int16_t n_samples_to_render; + int16_t interp_offset; + float gain, prev_gain; + num_objects = st_ivas->nchan_ism; + nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; + n_slots_to_render = st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; + n_samples_to_render = hSpatParamRendCom->num_freq_bands * n_slots_to_render; + tc_offset = st_ivas->hTcBuffer->n_samples_rendered; + interp_offset = st_ivas->hTcBuffer->n_samples_rendered; + + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) + { + ivas_jbm_dec_get_adapted_linear_interpolator( n_samples_to_render, + n_samples_to_render, + st_ivas->hIsmRendererData->interpolator ); + interp_offset = 0; + + } + + for ( i = 0; i < num_objects; i++ ) + { + /* Combined rotation: rotate the object positions depending the head and external orientations */ + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) + { + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); + if ( st_ivas->hEFAPdata != NULL ) + { + efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); + } + } + + lfe_index = 0; + for ( j = 0, j2 = 0; j < nchan_out_woLFE; j++, j2++ ) + { + if ( ( st_ivas->hIntSetup.num_lfe > 0 ) && ( st_ivas->hIntSetup.index_lfe[lfe_index] == j ) ) + { + ( lfe_index < ( st_ivas->hIntSetup.num_lfe - 1 ) ) ? ( lfe_index++, j2++ ) : j2++; + } + + gain = st_ivas->hIsmRendererData->gains[i][j]; + prev_gain = st_ivas->hIsmRendererData->prev_gains[i][j]; + if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) + { + g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; + float *tc_re = pppQMfFrame_ts_re[nchan_transport + i][0]; + float *tc_im = pppQMfFrame_ts_im[nchan_transport + i][0]; + + for ( k = 0; k < n_slots_to_render; k++ ) + { + g2 = 1.0f - *g1; + for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) + { + Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += ( *g1 * gain + g2 * prev_gain ) * *( tc_re++ ); + Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += ( *g1 * gain + g2 * prev_gain ) * *( tc_im++ ); + } + g1 += hSpatParamRendCom->num_freq_bands; + } + } + + /* update here only in case of head rotation */ + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) + { + st_ivas->hIsmRendererData->prev_gains[i][j] = gain; + } + } + } + } + } +#endif + + #ifdef SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 6ef6fdaba3..673bfe4447 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1163,6 +1163,16 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) + { + st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; + st_ivas->intern_config = AUDIO_CONFIG_7_1_4; + st_ivas->hOutSetup.output_config = st_ivas->intern_config; + st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); + } +#endif + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_EXTERNAL ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; @@ -2926,7 +2936,13 @@ void ivas_init_dec_get_num_cldfb_instances( { *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; } - } +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + *numCldfbAnalyses = st_ivas->nchan_ism + st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; + } +#endif + } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 178093ee3c..baa6234bc9 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1057,6 +1057,7 @@ void ivas_ism_dec_digest_tc( if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM #ifdef JBM_FOR_OSBA || st_ivas->renderer_type == RENDERER_OSBA_LS + || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM #endif ) && st_ivas->hCombinedOrientationData == NULL ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 175a784f47..6085638649 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -94,7 +94,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -486,7 +486,7 @@ ivas_error ivas_jbm_dec_tc( { for ( int16_t c = 0; c < nchan; c++ ) { - int16_t val = (int16_t) ( output[c][t] + 0.5f ); + int16_t val = ( int16_t )( output[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); } } @@ -1204,21 +1204,28 @@ ivas_error ivas_jbm_dec_render( #endif ) { - float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - float *p_output_ism[MAX_OUTPUT_CHANNELS]; - - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) - { - p_output_ism[n] = &output_ism[n][0]; - } - - ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); - for ( n = 0; n < nchan_out; n++ ) - { - v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); - v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); - } + float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; + float *p_output_ism[MAX_OUTPUT_CHANNELS]; + + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output_ism[n] = &output_ism[n][0]; + } + + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) + { + ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); + } + + for ( n = 0; n < nchan_out; n++ ) + { + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) + { + v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); + } + v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); + } } else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { @@ -1640,7 +1647,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1758,7 +1765,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -2266,7 +2273,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -2295,7 +2302,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { - n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } @@ -2385,9 +2392,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2433,7 +2440,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { - n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; @@ -2562,7 +2569,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 10491211c0..e6af220d9d 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -170,6 +170,12 @@ void ivas_renderer_select( { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } + #ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + *internal_config = AUDIO_CONFIG_7_1_4; + } +#endif if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index b34db02485..f536b9f4b6 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1562,15 +1562,31 @@ void ivas_spar_dec_upmixer_sf( ) { int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; - float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; - float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; + float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ][CLDFB_NO_COL_MAX]; + float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ][CLDFB_NO_COL_MAX]; int16_t i, b, ts, out_ch, in_ch; int16_t num_spar_bands, spar_band, nchan_transport; int16_t num_in_ingest, split_band; int16_t slot_size, slot_idx_start; - float *p_tc[MAX_OUTPUT_CHANNELS]; + float *p_tc[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ]; int16_t md_idx; - float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; + float Pcm_tmp[MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ][L_FRAME48k]; int16_t numch_out_dirac; float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; @@ -1602,6 +1618,14 @@ void ivas_spar_dec_upmixer_sf( { p_tc[i] = st_ivas->hTcBuffer->tc[i + nchan_ism] + slot_idx_start * slot_size; } + + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + for ( i = 0;i< nchan_ism; i++ ) + { + p_tc[i+nchan_internal] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; + } + } } else #endif @@ -1680,7 +1704,11 @@ void ivas_spar_dec_upmixer_sf( if ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) { /* at this point, output channels are used as intermediate procesing buffers */ - for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS; in_ch++ ) + for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS +#ifdef JBM_FOR_OSBA + + MAX_NUM_OBJECTS +#endif + ; in_ch++ ) { for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) { @@ -1731,6 +1759,24 @@ void ivas_spar_dec_upmixer_sf( st_ivas->cldfbAnaDec[in_ch] ); } } +#ifdef JBM_FOR_OSBA + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + int16_t nchan_all = st_ivas->nchan_ism + numch_in; + for ( ; in_ch < nchan_all; in_ch++ ) + { + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) + { + cldfbAnalysis_ts( + &p_tc[in_ch][ts * num_cldfb_bands], + cldfb_in_ts_re[in_ch][ts], + cldfb_in_ts_im[in_ch][ts], + num_cldfb_bands, + st_ivas->cldfbAnaDec[in_ch] ); + } + } + } +#endif if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA3 ) ) ) { @@ -1860,7 +1906,11 @@ void ivas_spar_dec_upmixer_sf( #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif - ) ) + ) +#ifdef JBM_FOR_OSBA + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif + ) { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { -- GitLab From cc518194e41b4b9736247a81c7e7023f45cb6104 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 11:44:27 +0200 Subject: [PATCH 62/89] wrap changes realted to ROOM_IR output into the new define OSBA_ROOM_IR (disabled for now) --- lib_com/options.h | 4 +++ lib_dec/ivas_init_dec.c | 4 +-- lib_dec/ivas_ism_param_dec.c | 4 ++- lib_dec/ivas_jbm_dec.c | 48 +++++++++++++++++++----------------- lib_dec/ivas_output_config.c | 2 +- lib_dec/ivas_spar_decoder.c | 16 ++++++------ 6 files changed, 45 insertions(+), 33 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3649c5d084..c29c6aee4e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,6 +188,10 @@ #define JBM_FOR_OSBA /* FhG: implement OSBA format in the JBM path */ +#ifdef JBM_FOR_OSBA +//#define OSBA_ROOM_IR +#endif + /* ##################### End NON-BE switches ############################# */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 673bfe4447..b1c9cc53e7 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1163,7 +1163,7 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; @@ -2936,7 +2936,7 @@ void ivas_init_dec_get_num_cldfb_instances( { *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; } -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *numCldfbAnalyses = st_ivas->nchan_ism + st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index baa6234bc9..ee710d473c 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1057,7 +1057,9 @@ void ivas_ism_dec_digest_tc( if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM #ifdef JBM_FOR_OSBA || st_ivas->renderer_type == RENDERER_OSBA_LS - || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM +#ifdef OSBA_ROOM_IR + || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM +#endif #endif ) && st_ivas->hCombinedOrientationData == NULL ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 6085638649..f0b1683c21 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1204,28 +1204,32 @@ ivas_error ivas_jbm_dec_render( #endif ) { - float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - float *p_output_ism[MAX_OUTPUT_CHANNELS]; - - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) - { - p_output_ism[n] = &output_ism[n][0]; - } - - ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) - { - ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); - } - - for ( n = 0; n < nchan_out; n++ ) - { - if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) - { - v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); - } - v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); - } + float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; + float *p_output_ism[MAX_OUTPUT_CHANNELS]; + + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output_ism[n] = &output_ism[n][0]; + } + + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); +#ifdef OSBA_ROOM_IR + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif + { + ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); + } + + for ( n = 0; n < nchan_out; n++ ) + { +#ifdef OSBA_ROOM_IR + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif + { + v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); + } + v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); + } } else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index e6af220d9d..1733f9589c 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -170,7 +170,7 @@ void ivas_renderer_select( { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } - #ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *internal_config = AUDIO_CONFIG_7_1_4; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index f536b9f4b6..f7134a948f 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1563,12 +1563,12 @@ void ivas_spar_dec_upmixer_sf( { int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif ][CLDFB_NO_COL_MAX]; float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif ][CLDFB_NO_COL_MAX]; @@ -1577,13 +1577,13 @@ void ivas_spar_dec_upmixer_sf( int16_t num_in_ingest, split_band; int16_t slot_size, slot_idx_start; float *p_tc[MAX_OUTPUT_CHANNELS -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif ]; int16_t md_idx; float Pcm_tmp[MAX_OUTPUT_CHANNELS -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif ][L_FRAME48k]; @@ -1619,6 +1619,7 @@ void ivas_spar_dec_upmixer_sf( p_tc[i] = st_ivas->hTcBuffer->tc[i + nchan_ism] + slot_idx_start * slot_size; } +#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { for ( i = 0;i< nchan_ism; i++ ) @@ -1626,6 +1627,7 @@ void ivas_spar_dec_upmixer_sf( p_tc[i+nchan_internal] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; } } +#endif } else #endif @@ -1705,7 +1707,7 @@ void ivas_spar_dec_upmixer_sf( { /* at this point, output channels are used as intermediate procesing buffers */ for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif ; in_ch++ ) @@ -1759,7 +1761,7 @@ void ivas_spar_dec_upmixer_sf( st_ivas->cldfbAnaDec[in_ch] ); } } -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { int16_t nchan_all = st_ivas->nchan_ism + numch_in; @@ -1907,7 +1909,7 @@ void ivas_spar_dec_upmixer_sf( || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif ) -- GitLab From b5068d600990ba34636f3d12defc71d8caf00048 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 11:53:58 +0200 Subject: [PATCH 63/89] fix formatting --- lib_dec/ivas_dirac_dec.c | 17 ++++++++--------- lib_dec/ivas_init_dec.c | 8 ++++---- lib_dec/ivas_ism_param_dec.c | 2 +- lib_dec/ivas_jbm_dec.c | 20 ++++++++++---------- lib_dec/ivas_output_config.c | 2 +- lib_dec/ivas_spar_decoder.c | 35 ++++++++++++++++++----------------- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 7084af31d4..d541007078 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2403,7 +2403,7 @@ void ivas_dirac_dec_render_sf( { #ifdef JBM_FOR_OSBA - /* render objects in combined format onto the CICP19 channels for BINAURAL_ROOM_IR */ + /* render objects in combined format onto the CICP19 channels for BINAURAL_ROOM_IR */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { int16_t in_ch; @@ -2424,14 +2424,13 @@ void ivas_dirac_dec_render_sf( n_samples_to_render = hSpatParamRendCom->num_freq_bands * n_slots_to_render; tc_offset = st_ivas->hTcBuffer->n_samples_rendered; interp_offset = st_ivas->hTcBuffer->n_samples_rendered; - - if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) + + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) { ivas_jbm_dec_get_adapted_linear_interpolator( n_samples_to_render, n_samples_to_render, - st_ivas->hIsmRendererData->interpolator ); + st_ivas->hIsmRendererData->interpolator ); interp_offset = 0; - } for ( i = 0; i < num_objects; i++ ) @@ -2453,16 +2452,16 @@ void ivas_dirac_dec_render_sf( { ( lfe_index < ( st_ivas->hIntSetup.num_lfe - 1 ) ) ? ( lfe_index++, j2++ ) : j2++; } - - gain = st_ivas->hIsmRendererData->gains[i][j]; + + gain = st_ivas->hIsmRendererData->gains[i][j]; prev_gain = st_ivas->hIsmRendererData->prev_gains[i][j]; if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) { g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; float *tc_re = pppQMfFrame_ts_re[nchan_transport + i][0]; float *tc_im = pppQMfFrame_ts_im[nchan_transport + i][0]; - - for ( k = 0; k < n_slots_to_render; k++ ) + + for ( k = 0; k < n_slots_to_render; k++ ) { g2 = 1.0f - *g1; for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index b1c9cc53e7..7db930f159 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1164,12 +1164,12 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); #ifdef OSBA_ROOM_IR - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; st_ivas->intern_config = AUDIO_CONFIG_7_1_4; st_ivas->hOutSetup.output_config = st_ivas->intern_config; - st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); + st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); } #endif @@ -2937,12 +2937,12 @@ void ivas_init_dec_get_num_cldfb_instances( *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; } #ifdef OSBA_ROOM_IR - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *numCldfbAnalyses = st_ivas->nchan_ism + st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; } #endif - } + } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index ee710d473c..964b13958b 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1058,7 +1058,7 @@ void ivas_ism_dec_digest_tc( #ifdef JBM_FOR_OSBA || st_ivas->renderer_type == RENDERER_OSBA_LS #ifdef OSBA_ROOM_IR - || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM + || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM #endif #endif ) && diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index f0b1683c21..9d681ff9c3 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -94,7 +94,7 @@ ivas_error ivas_jbm_dec_tc( output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - output_frame = ( int16_t )( output_Fs / FRAMES_PER_SEC ); + output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { @@ -486,7 +486,7 @@ ivas_error ivas_jbm_dec_tc( { for ( int16_t c = 0; c < nchan; c++ ) { - int16_t val = ( int16_t )( output[c][t] + 0.5f ); + int16_t val = (int16_t) ( output[c][t] + 0.5f ); dbgwrite( &val, sizeof( int16_t ), 1, 1, "./res/TC_dec_core_out.raw" ); } } @@ -1651,7 +1651,7 @@ ivas_error ivas_jbm_dec_flush_renderer( { for ( ch_idx = 0; ch_idx < st_ivas->hDecoderConfig->nchan_out; ch_idx++ ) { - set_zero( p_output[ch_idx], ( int16_t )( *nSamplesRendered ) ); + set_zero( p_output[ch_idx], (int16_t) ( *nSamplesRendered ) ); } st_ivas->hTcBuffer->slots_rendered += 1; st_ivas->hTcBuffer->subframes_rendered += 1; @@ -1769,7 +1769,7 @@ ivas_error ivas_jbm_dec_set_discard_samples( error = IVAS_ERR_OK; /* render first frame with front zero padding and discarding those samples */ - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; if ( nSlotsInFirstSubframe > 0 ) { @@ -2277,7 +2277,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->n_samples_flushed = 0; hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; nsamp_to_allocate = 0; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -2306,7 +2306,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { - n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } @@ -2396,9 +2396,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( #endif int16_t nMaxSlotsPerSubframeNew; - nMaxSlotsPerSubframeNew = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; + nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; #ifdef DEBUGGING - nMaxSlotsPerSubframeOld = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) { @@ -2444,7 +2444,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { - n_samp_full = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; @@ -2573,7 +2573,7 @@ void ivas_jbm_dec_td_renderers_adapt_subframes( int16_t nMaxSlotsPerSubframe, nSlotsAvailable; uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; - nMaxSlotsPerSubframe = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; st_ivas->hTcBuffer->num_slots = nSlotsAvailable; st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 1733f9589c..f7785344bb 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -171,7 +171,7 @@ void ivas_renderer_select( *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } #ifdef OSBA_ROOM_IR - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *internal_config = AUDIO_CONFIG_7_1_4; } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index f7134a948f..114d6d6116 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1564,14 +1564,14 @@ void ivas_spar_dec_upmixer_sf( int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS #ifdef OSBA_ROOM_IR - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif - ][CLDFB_NO_COL_MAX]; + ][CLDFB_NO_COL_MAX]; float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS #ifdef OSBA_ROOM_IR - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif - ][CLDFB_NO_COL_MAX]; + ][CLDFB_NO_COL_MAX]; int16_t i, b, ts, out_ch, in_ch; int16_t num_spar_bands, spar_band, nchan_transport; int16_t num_in_ingest, split_band; @@ -1580,13 +1580,13 @@ void ivas_spar_dec_upmixer_sf( #ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif - ]; + ]; int16_t md_idx; float Pcm_tmp[MAX_OUTPUT_CHANNELS #ifdef OSBA_ROOM_IR + MAX_NUM_OBJECTS #endif - ][L_FRAME48k]; + ][L_FRAME48k]; int16_t numch_out_dirac; float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; @@ -1620,13 +1620,13 @@ void ivas_spar_dec_upmixer_sf( } #ifdef OSBA_ROOM_IR - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { - for ( i = 0;i< nchan_ism; i++ ) - { - p_tc[i+nchan_internal] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; - } - } + for ( i = 0; i < nchan_ism; i++ ) + { + p_tc[i + nchan_internal] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; + } + } #endif } else @@ -1708,9 +1708,10 @@ void ivas_spar_dec_upmixer_sf( /* at this point, output channels are used as intermediate procesing buffers */ for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS #ifdef OSBA_ROOM_IR - + MAX_NUM_OBJECTS + + MAX_NUM_OBJECTS #endif - ; in_ch++ ) + ; + in_ch++ ) { for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) { @@ -1762,7 +1763,7 @@ void ivas_spar_dec_upmixer_sf( } } #ifdef OSBA_ROOM_IR - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { int16_t nchan_all = st_ivas->nchan_ism + numch_in; for ( ; in_ch < nchan_all; in_ch++ ) @@ -1910,9 +1911,9 @@ void ivas_spar_dec_upmixer_sf( #endif ) #ifdef OSBA_ROOM_IR - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif - ) + ) { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { -- GitLab From 88561c3253c05d23e28913c40b662f562ec6c3f1 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 12:01:30 +0200 Subject: [PATCH 64/89] fix one ifdef in ivas_dirac_dec.c --- lib_dec/ivas_dirac_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index d541007078..db0b4a1a03 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2402,7 +2402,7 @@ void ivas_dirac_dec_render_sf( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { -#ifdef JBM_FOR_OSBA +#ifdef OSBA_ROOM_IR /* render objects in combined format onto the CICP19 channels for BINAURAL_ROOM_IR */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { -- GitLab From 500f0e1c617de77b298078ea3ee5d13df7142a8e Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 13:08:25 +0200 Subject: [PATCH 65/89] fix compiler warnings in ivas_Dirac_dec_render_sf --- lib_dec/ivas_dirac_dec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 81c17dc45e..dfb19a6e92 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2421,10 +2421,10 @@ void ivas_dirac_dec_render_sf( int16_t in_ch; for ( in_ch = 0; in_ch < st_ivas->nchan_ism; in_ch++ ) { - int16_t i, j, k, j2, l; + int16_t j, k, j2, l; float *g1, g2; int16_t num_objects, nchan_out_woLFE, lfe_index; - int16_t azimuth, elevation; + int16_t az1, el1; int16_t tc_offset; int16_t n_slots_to_render; int16_t n_samples_to_render; @@ -2450,10 +2450,10 @@ void ivas_dirac_dec_render_sf( /* Combined rotation: rotate the object positions depending the head and external orientations */ if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) { - rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &az1, &el1, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); if ( st_ivas->hEFAPdata != NULL ) { - efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); + efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], az1, el1, EFAP_MODE_EFAP ); } } -- GitLab From dd80c43b01f424e013095f1d34be0329e83c819a Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Wed, 13 Sep 2023 16:08:36 +0200 Subject: [PATCH 66/89] enable OSBA_ROOM_IR --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index cde4f2a7a6..527e672888 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -200,7 +200,7 @@ #define JBM_FOR_OSBA /* FhG: implement OSBA format in the JBM path */ #ifdef JBM_FOR_OSBA -//#define OSBA_ROOM_IR +#define OSBA_ROOM_IR #endif /* ##################### End NON-BE switches ########################### */ -- GitLab From 2f6a3c8854ae7f34e4353f8df0c047f8fe7342fa Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 08:55:07 +0200 Subject: [PATCH 67/89] fix merge errors --- lib_dec/ivas_sba_dec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index e8862d8a55..f486da28e3 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -258,9 +258,7 @@ ivas_error ivas_sba_dec_reconfigure( #endif /* save old */ -#ifdef JBM_FOR_OSBA if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) -#endif { if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens { @@ -693,7 +691,7 @@ ivas_error ivas_sba_dec_reconfigure( } #endif } - else /* :TODO: looks obsolete, needs to be checked */ + else { if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) ) { @@ -707,13 +705,6 @@ ivas_error ivas_sba_dec_reconfigure( #endif ) { -#if 0 - if ( !st_ivas->hDecoderConfig->Opt_5ms ) - { - tc_nchan_tc = 0; - tc_nchan_to_allocate = 0; - } -#endif if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, #ifdef JBM_FOR_OSBA granularity_new -- GitLab From 50e276dfb81163d5e560ecaabf7168927a9a4dbc Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 09:11:42 +0200 Subject: [PATCH 68/89] fix compiler warnings --- lib_dec/ivas_dirac_dec.c | 2 -- lib_dec/ivas_spar_decoder.c | 27 ++++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index dfb19a6e92..de9affa9fa 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2425,7 +2425,6 @@ void ivas_dirac_dec_render_sf( float *g1, g2; int16_t num_objects, nchan_out_woLFE, lfe_index; int16_t az1, el1; - int16_t tc_offset; int16_t n_slots_to_render; int16_t n_samples_to_render; int16_t interp_offset; @@ -2434,7 +2433,6 @@ void ivas_dirac_dec_render_sf( nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; n_slots_to_render = st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered]; n_samples_to_render = hSpatParamRendCom->num_freq_bands * n_slots_to_render; - tc_offset = st_ivas->hTcBuffer->n_samples_rendered; interp_offset = st_ivas->hTcBuffer->n_samples_rendered; if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 114d6d6116..a6efe4a515 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -272,7 +272,7 @@ ivas_error ivas_spar_dec_open( if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ - granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); + granularity = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); } #endif @@ -381,7 +381,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -397,11 +397,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -434,7 +434,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -615,7 +615,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -919,7 +919,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1343,7 +1343,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1649,8 +1649,7 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B - : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } @@ -1904,12 +1903,14 @@ void ivas_spar_dec_upmixer_sf( } else { - if ( hDecoderConfig->output_config == AUDIO_CONFIG_FOA || + if ( (hDecoderConfig->output_config == AUDIO_CONFIG_FOA || !( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT - || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) +#else + ) #endif - ) + ) #ifdef OSBA_ROOM_IR && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif -- GitLab From d10f4c7bf7c3f0577b2f9bf64a8a8af5107bf305 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 09:56:59 +0200 Subject: [PATCH 69/89] fix compile error with instrumented code --- lib_dec/ivas_dirac_dec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index de9affa9fa..26a96231ca 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2422,7 +2422,6 @@ void ivas_dirac_dec_render_sf( for ( in_ch = 0; in_ch < st_ivas->nchan_ism; in_ch++ ) { int16_t j, k, j2, l; - float *g1, g2; int16_t num_objects, nchan_out_woLFE, lfe_index; int16_t az1, el1; int16_t n_slots_to_render; @@ -2467,9 +2466,12 @@ void ivas_dirac_dec_render_sf( prev_gain = st_ivas->hIsmRendererData->prev_gains[i][j]; if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) { + float *tc_re, *tc_im; + float *g1, g2; + g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; - float *tc_re = pppQMfFrame_ts_re[nchan_transport + i][0]; - float *tc_im = pppQMfFrame_ts_im[nchan_transport + i][0]; + tc_re = pppQMfFrame_ts_re[nchan_transport + i][0]; + tc_im = pppQMfFrame_ts_im[nchan_transport + i][0]; for ( k = 0; k < n_slots_to_render; k++ ) { -- GitLab From cc9c06d8fd6d67789ec8073bf9c8d26371b84281 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 10:10:34 +0200 Subject: [PATCH 70/89] fix formatting --- lib_dec/ivas_spar_decoder.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index a6efe4a515..8e055422fe 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -272,7 +272,7 @@ ivas_error ivas_spar_dec_open( if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ - granularity = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); + granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); } #endif @@ -381,7 +381,7 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { @@ -397,11 +397,11 @@ ivas_error ivas_spar_dec( if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - nb_bits_read[1]; } else { - last_bit_pos = ( int16_t )( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + last_bit_pos = (int16_t) ( ( hDecoderConfig->ivas_total_brate / FRAMES_PER_SEC ) - 1 ); } if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { @@ -434,7 +434,7 @@ ivas_error ivas_spar_dec( { int16_t zero_pad_bits; *nb_bits_read += SID_FORMAT_NBITS; - zero_pad_bits = ( int16_t )( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; + zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; } @@ -615,7 +615,7 @@ void ivas_spar_get_cldfb_gains( weights = hSpar->hFbMixer->cldfb_cross_fade; cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); - cf_cldfb_end = ( int16_t )( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); + cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); num_cf_slots = cf_cldfb_end - cf_cldfb_start + 1; num_samples = num_cf_slots * stride + pt_len - stride; @@ -919,7 +919,7 @@ static float ivas_spar_get_cldfb_slot_gain( encfb_delay = IVAS_FB_ENC_DELAY_NS; decfb_delay = IVAS_FB_DEC_DELAY_NS; xfade_start_ns = hSpar->hFbMixer->cross_fade_start_offset / output_Fs * 1000000000.f - encfb_delay + decfb_delay * 0.5f; - xfade_delay_subframes = ( int16_t )( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); i_hist = 4 - xfade_delay_subframes; split_band = SPAR_DIRAC_SPLIT_START_BAND; @@ -1343,7 +1343,7 @@ void ivas_spar_dec_digest_tc( #endif /* TD decorrelator */ - default_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); nSamplesLeftForTD = nSamplesForRendering; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -1649,7 +1649,8 @@ void ivas_spar_dec_upmixer_sf( for ( i = 0; i < nchan_transport; i++ ) { tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC ); - pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp; + pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B + : (short) tmp; dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" ); } } @@ -1903,16 +1904,16 @@ void ivas_spar_dec_upmixer_sf( } else { - if ( (hDecoderConfig->output_config == AUDIO_CONFIG_FOA || - !( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB + if ( ( hDecoderConfig->output_config == AUDIO_CONFIG_FOA || + !( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) #else ) #endif - ) + ) #ifdef OSBA_ROOM_IR - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif ) { -- GitLab From f9a746fad191c6d5e376b79816f55f203fd4c809 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 11:27:20 +0200 Subject: [PATCH 71/89] fix decoder crashes with OSBA JBM to BINAURAL ouput --- lib_dec/ivas_sba_dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index f486da28e3..5d48df73b6 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -258,7 +258,9 @@ ivas_error ivas_sba_dec_reconfigure( #endif /* save old */ - if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) +#ifdef JBM_FOR_OSBA + if ( ism_mode_old != ISM_SBA_MODE_DISC ) +#endif { if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens { -- GitLab From 7b879bdba4a9293bd42336c9c597d9e6338d6000 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 13:13:57 +0200 Subject: [PATCH 72/89] replace output to p_output in SBA_ISM branch in ivas_jbm_dec --- lib_dec/ivas_jbm_dec.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index db40800f92..ef28d7fb73 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -439,7 +439,7 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->nSCE == 1 ) { st = st_ivas->hSCE[0]->hCoreCoder[0]; - if ( ( error = ivas_sce_dec( st_ivas, 0, &output[0], output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sce_dec( st_ivas, 0, p_output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) { return error; } @@ -447,7 +447,7 @@ ivas_error ivas_jbm_dec_tc( else if ( st_ivas->nCPE == 1 ) { st = st_ivas->hCPE[0]->hCoreCoder[0]; - if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_cpe_dec( st_ivas, 0, p_output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) { return error; } @@ -455,7 +455,7 @@ ivas_error ivas_jbm_dec_tc( else if ( st_ivas->nCPE > 1 ) { st = st_ivas->hCPE[0]->hCoreCoder[0]; - if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_mct_dec( st_ivas, p_output, output_frame, nb_bits_metadata[0] + nb_bits_metadata[1] ) ) != IVAS_ERR_OK ) { return error; } @@ -463,27 +463,27 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->sba_dirac_stereo_flag ) { - ivas_agc_dec_process( st_ivas->hSpar->hAgcDec, &output[sba_ch_idx], &output[sba_ch_idx], st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, output_frame ); + ivas_agc_dec_process( st_ivas->hSpar->hAgcDec, &p_output[sba_ch_idx], &p_output[sba_ch_idx], st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, output_frame ); if ( st_ivas->hSpar->hPCA != NULL ) { - ivas_pca_dec( st_ivas->hSpar->hPCA, output_frame, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, &output[sba_ch_idx] ); + ivas_pca_dec( st_ivas->hSpar->hPCA, output_frame, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, &p_output[sba_ch_idx] ); } ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) ); - ivas_sba_dirac_stereo_dec( st_ivas, &output[sba_ch_idx], output_frame, 0 ); + ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame, 0 ); } /* HP filtering */ for ( n = 0; n < getNumChanSynthesis( st_ivas ); n++ ) { - hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + hp20( p_output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); } - nchan_remapped = ivas_sba_remapTCs( &output[sba_ch_idx], st_ivas, output_frame ); + nchan_remapped = ivas_sba_remapTCs( &p_output[sba_ch_idx], st_ivas, output_frame ); #ifdef DEBUG_OSBA if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) @@ -503,27 +503,27 @@ ivas_error ivas_jbm_dec_tc( { num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ); - ivas_sba_mix_matrix_determiner( st_ivas->hSpar, &output[sba_ch_idx], st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames ); + ivas_sba_mix_matrix_determiner( st_ivas->hSpar, &p_output[sba_ch_idx], st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames ); } else if ( st_ivas->renderer_type != RENDERER_DISABLE && !st_ivas->sba_dirac_stereo_flag ) { - ivas_spar_dec_agc_pca( st_ivas, &output[sba_ch_idx], output_frame ); + ivas_spar_dec_agc_pca( st_ivas, &p_output[sba_ch_idx], output_frame ); } if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { /* loudness correction */ - ivas_dirac_dec_binaural_sba_gain( &output[sba_ch_idx], nchan_remapped, output_frame ); + ivas_dirac_dec_binaural_sba_gain( &p_output[sba_ch_idx], nchan_remapped, output_frame ); } else if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { - ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); + ivas_mono_downmix_render_passive( st_ivas, p_output, output_frame ); /* add W */ for ( n = 0; n < nchan_out; n++ ) { - v_add( output[n], output[n + max( nchan_out, nchan_ism )], output[n], output_frame ); + v_add( p_output[n], p_output[n + max( nchan_out, nchan_ism )], p_output[n], output_frame ); } } } -- GitLab From bb8276e54d8020126e99de55a10be7d866ac28e5 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 16:42:26 +0200 Subject: [PATCH 73/89] improve object panning code in DirAC decoder --- lib_dec/ivas_dirac_dec.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 26a96231ca..a563e8e8a4 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2467,21 +2467,25 @@ void ivas_dirac_dec_render_sf( if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) { float *tc_re, *tc_im; - float *g1, g2; + float *w1, w2; - g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; + w1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; tc_re = pppQMfFrame_ts_re[nchan_transport + i][0]; tc_im = pppQMfFrame_ts_im[nchan_transport + i][0]; for ( k = 0; k < n_slots_to_render; k++ ) { - g2 = 1.0f - *g1; + float g; + + w2 = 1.0f - *w1; + g = ( *w1 * gain + w2 * prev_gain ); + for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) { - Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += ( *g1 * gain + g2 * prev_gain ) * *( tc_re++ ); - Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += ( *g1 * gain + g2 * prev_gain ) * *( tc_im++ ); + Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_re++ ); + Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_im++ ); } - g1 += hSpatParamRendCom->num_freq_bands; + w1 += hSpatParamRendCom->num_freq_bands; } } -- GitLab From 26c93190c41d60fb01031ef5339c343dc93e3125 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 16:57:01 +0200 Subject: [PATCH 74/89] fix audio config names in new OSBA JBM code --- lib_dec/ivas_jbm_dec.c | 6 +++--- lib_dec/ivas_output_config.c | 2 +- lib_dec/ivas_sba_dec.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 86d8627141..ed00255406 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -855,7 +855,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || - st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -1239,7 +1239,7 @@ ivas_error ivas_jbm_dec_render( v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); } } - else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ + else if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, &p_output[st_ivas->nchan_ism] ); @@ -1261,7 +1261,7 @@ ivas_error ivas_jbm_dec_render( else /* SBA_MODE_SPAR */ { ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { #ifdef DEBUGGING assert( st_ivas->ism_mode == ISM_MODE_NONE ); diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index be9e5bca95..ee20eafec5 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -173,7 +173,7 @@ void ivas_renderer_select( #ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { - *internal_config = AUDIO_CONFIG_7_1_4; + *internal_config = IVAS_AUDIO_CONFIG_7_1_4; } #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 86718be4b5..f08f962f63 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -181,7 +181,7 @@ ivas_error ivas_sba_dec_reconfigure( granularity_new = st_ivas->hTcBuffer->n_samples_granularity; /* we may need to flush only for binaural and OSBA and TSM */ - if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { RENDERER_TYPE renderer_type_new; int16_t sba_order_internal; @@ -193,7 +193,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) <= 2 ) { - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL + if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif @@ -208,7 +208,7 @@ ivas_error ivas_sba_dec_reconfigure( } else { - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB + if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif @@ -662,7 +662,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) { #ifdef JBM_FOR_OSBA - if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO ) ) { tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; tc_nchan_to_allocate = tc_nchan_tc; -- GitLab From be0ae97e964e32275f6b8fd9422632a284840e8e Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 14 Sep 2023 17:02:23 +0200 Subject: [PATCH 75/89] fix formatting --- lib_dec/ivas_spar_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index ebcee26ae6..1aa0b626c8 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1910,9 +1910,9 @@ void ivas_spar_dec_upmixer_sf( #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif - ) + ) #ifdef OSBA_ROOM_IR - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif ) { -- GitLab From e13a3eb53b2bd79bf9d5c81daacfe2e57a80a3c4 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 11:44:31 +0200 Subject: [PATCH 76/89] fix channel offset in ivas_spar_dec_upmixer --- lib_dec/ivas_spar_decoder.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 1aa0b626c8..9d56c650cb 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1422,7 +1422,6 @@ void ivas_spar_dec_upmixer( float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; #ifdef JBM_FOR_OSBA int16_t nchan_internal_total; - int16_t sba_ch_offset; #endif hSpar = st_ivas->hSpar; @@ -1431,20 +1430,14 @@ void ivas_spar_dec_upmixer( n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #ifdef JBM_FOR_OSBA nchan_internal_total = nchan_internal; - sba_ch_offset = 0; if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { nchan_internal_total += st_ivas->nchan_ism; - sba_ch_offset = st_ivas->nchan_ism; } #endif for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { -#ifdef JBM_FOR_OSBA - output_f_local[n] = output[n + sba_ch_offset]; -#else output_f_local[n] = output[n]; -#endif } #ifdef JBM_FOR_OSBA -- GitLab From cf647e75a4c9858d787f1e51f10187037d118534 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 11:52:33 +0200 Subject: [PATCH 77/89] fix compiler warning in ivas_spar_decoder.c --- lib_dec/ivas_spar_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 9d56c650cb..55a080f6a2 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1898,12 +1898,12 @@ void ivas_spar_dec_upmixer_sf( } else { - if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA || + if ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA || !( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif - ) + ) ) #ifdef OSBA_ROOM_IR && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif -- GitLab From ade62a366bf2aea4861e909301634b9f24aa38d9 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 12:12:23 +0200 Subject: [PATCH 78/89] fix formatting --- lib_dec/ivas_spar_decoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 55a080f6a2..d5ac1a39c8 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1899,13 +1899,13 @@ void ivas_spar_dec_upmixer_sf( else { if ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA || - !( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB + !( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT - || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif - ) ) + ) ) #ifdef OSBA_ROOM_IR - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif ) { -- GitLab From defcc4155225a0a9848da586c590a1f764ff8f8f Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 14:24:39 +0200 Subject: [PATCH 79/89] Revert "fix channel offset in ivas_spar_dec_upmixer" This reverts commit e13a3eb53b2bd79bf9d5c81daacfe2e57a80a3c4. --- lib_dec/ivas_spar_decoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index d5ac1a39c8..efb1c7d3d4 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1422,6 +1422,7 @@ void ivas_spar_dec_upmixer( float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; #ifdef JBM_FOR_OSBA int16_t nchan_internal_total; + int16_t sba_ch_offset; #endif hSpar = st_ivas->hSpar; @@ -1430,14 +1431,20 @@ void ivas_spar_dec_upmixer( n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); #ifdef JBM_FOR_OSBA nchan_internal_total = nchan_internal; + sba_ch_offset = 0; if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { nchan_internal_total += st_ivas->nchan_ism; + sba_ch_offset = st_ivas->nchan_ism; } #endif for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { +#ifdef JBM_FOR_OSBA + output_f_local[n] = output[n + sba_ch_offset]; +#else output_f_local[n] = output[n]; +#endif } #ifdef JBM_FOR_OSBA -- GitLab From fc4b3f444d73dfb6a41cd4f22c82db635ee10485 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 14:33:13 +0200 Subject: [PATCH 80/89] fix pointer to ouput buffer in ivas_dec --- lib_dec/ivas_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 24c07b12ca..19eebc1bd1 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -756,7 +756,7 @@ ivas_error ivas_dec( } } - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &p_output[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From c31bb375f71fe2dc4224dcc2eefb6e8ca5fabf18 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 15 Sep 2023 15:22:57 +0200 Subject: [PATCH 81/89] fix audio config names in split-rendering path in ivas_sba_dec_reconfigure --- lib_dec/ivas_sba_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 39ca5ccb12..1c730f6380 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -195,7 +195,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL #ifdef SPLIT_REND_WITH_HEAD_ROT - || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) { @@ -210,7 +210,7 @@ ivas_error ivas_sba_dec_reconfigure( { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB #ifdef SPLIT_REND_WITH_HEAD_ROT - || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM + || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) { -- GitLab From e3c458d81504c4695a01ef9d740655a9529dbfe8 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 09:51:29 +0200 Subject: [PATCH 82/89] fix merge error in ivas_sba_dec.c --- lib_dec/ivas_sba_dec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 80c28d9498..4fec6a4953 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -130,11 +130,9 @@ ivas_error ivas_sba_dec_reconfigure( ISM_MODE ism_mode_old; #ifdef JBM_FOR_OSBA int16_t granularity_new; - int16_t sba_analysis_order_old; #endif ism_mode_old = st_ivas->ism_mode; - error = IVAS_ERR_OK; hDecoderConfig = st_ivas->hDecoderConfig; -- GitLab From 058b204ae52b529e859d5e2ec198ed851bb23880 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 10:36:16 +0200 Subject: [PATCH 83/89] add missing ifdef around a change in ivas_dec --- lib_dec/ivas_dec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 6eb51e5288..4f22c314bb 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -762,8 +762,12 @@ ivas_error ivas_dec( #endif } } - +#ifdef JBM_FOR_OSBA if ( ( error = ivas_sba_upmixer_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) +#else + + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &p_output[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; } -- GitLab From 76a7c988ea11ea49027e28c7605db586f5c51a2c Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 14:38:52 +0200 Subject: [PATCH 84/89] fix number of TC buffers for MONO/STEREO output --- lib_rend/ivas_output_init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index 3d57a7f219..efe23f0b5f 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -388,7 +388,12 @@ int16_t ivas_get_nchan_buffers_dec( nchan_out_buff = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; /*take into account sba_ch_idx' in ivas_dec() */ } #ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH - nchan_out_buff = max( nchan_out_buff, nchan_internal + st_ivas->nchan_ism ); +#ifdef JBM_FOR_OSBA + if ( !( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) +#endif + { + nchan_out_buff = max( nchan_out_buff, nchan_internal + st_ivas->nchan_ism ); + } #endif nchan_out_buff = min( nchan_out_buff, MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); } -- GitLab From fa27182100cb80b451515d0d270f621d650b1c64 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 15:08:17 +0200 Subject: [PATCH 85/89] change hMasaIsmData to hSbaIsmData in OMASA JBM code --- lib_dec/ivas_jbm_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 11b1781f50..20535cb0a4 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -864,7 +864,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { - delay_signal( st_ivas->hTcBuffer->tc[n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); + delay_signal( st_ivas->hTcBuffer->tc[n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hSbaIsmData->delayBuffer[n], st_ivas->hSbaIsmData->delayBuffer_size ); } } @@ -1685,7 +1685,7 @@ ivas_error ivas_jbm_dec_flush_renderer( for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ ) { tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx + 2][hTcBuffer->n_samples_rendered]; - mvr2r( st_ivas->hMasaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hMasaIsmData->delayBuffer_size ); + mvr2r( st_ivas->hSbaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hSbaIsmData->delayBuffer_size ); } /* transfer adapted sf info from hTcBuffer to SPAR and DirAC */ st_ivas->hSpar->nb_subframes = 1; -- GitLab From 3547b957a688b63603cc77ed4605814d63f91e6e Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 17:54:04 +0200 Subject: [PATCH 86/89] save correct sba order for renderer flush --- lib_dec/ivas_sba_dec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 4fec6a4953..49d5c05afb 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -124,6 +124,9 @@ ivas_error ivas_sba_dec_reconfigure( int16_t ch, nchan_out_buff, nchan_out_buff_old; #ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH int16_t sba_analysis_order_old; +#endif +#ifdef JBM_FOR_OSBA + int16_t sba_analysis_order_old_flush; #endif DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; @@ -138,6 +141,9 @@ ivas_error ivas_sba_dec_reconfigure( hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; +#ifdef JBM_FOR_OSBA + sba_analysis_order_old = st_ivas->sba_analysis_order; +#endif #ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH sba_analysis_order_old = ivas_sba_get_analysis_order( last_ivas_total_brate, st_ivas->sba_order ); #endif @@ -235,7 +241,11 @@ ivas_error ivas_sba_dec_reconfigure( if ( granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { /* write back info for correct rendering of the flushable samples */ +#ifdef JBM_FOR_OSBA + st_ivas->sba_analysis_order = sba_analysis_order_old_flush; +#else st_ivas->sba_analysis_order = sba_analysis_order_old; +#endif st_ivas->hDecoderConfig->ivas_total_brate = last_ivas_total_brate; if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, granularity_new, st_ivas->renderer_type, st_ivas->intern_config, &st_ivas->hIntSetup, st_ivas->mc_mode, ism_mode_old, nSamplesFlushed, #ifdef SPLIT_REND_WITH_HEAD_ROT -- GitLab From aa28706f0e9498c76fa644dad96629f2bcde3ed8 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 22 Sep 2023 18:02:57 +0200 Subject: [PATCH 87/89] fix uninitialized variable in ivas_sba_dec_reconfigure --- lib_dec/ivas_sba_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 49d5c05afb..62b735f218 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -142,7 +142,7 @@ ivas_error ivas_sba_dec_reconfigure( ivas_total_brate = hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; #ifdef JBM_FOR_OSBA - sba_analysis_order_old = st_ivas->sba_analysis_order; + sba_analysis_order_old_flush = st_ivas->sba_analysis_order; #endif #ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH sba_analysis_order_old = ivas_sba_get_analysis_order( last_ivas_total_brate, st_ivas->sba_order ); -- GitLab From fe94b2b55fc6c094e394febe144d3b2e3ab5d47e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 26 Sep 2023 14:07:03 +0200 Subject: [PATCH 88/89] remove code only needed for debugging --- apps/decoder.c | 3 --- lib_com/options.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7c1d5b3f65..09ce373d6b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1577,9 +1577,6 @@ static bool parseCmdlIVAS_dec( } if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) -#ifdef VARIABLE_SPEED_DECODING - && ( !arg->tsmEnabled ) -#endif ) { arg->enable5ms = false; diff --git a/lib_com/options.h b/lib_com/options.h index 7ec157e8a9..53de4ed729 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -127,7 +127,7 @@ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ /*#define DEBUG_AGC_ENCODER_CMD_OPTION*/ /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ /*#define DEBUG_JBM_CMD_OPTION*/ /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ -#define VARIABLE_SPEED_DECODING /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ +/*#define VARIABLE_SPEED_DECODING*/ /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ /*Split Rendering Debug switches*/ /*#define DBG_WAV_WRITER*/ /* add debugging function dbgwrite_wav() */ -- GitLab From 041719664e665a2b9b30e5385da28a477d35f0bd Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 26 Sep 2023 14:09:27 +0200 Subject: [PATCH 89/89] clang-format --- apps/decoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 09ce373d6b..1493350f7b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1576,8 +1576,7 @@ static bool parseCmdlIVAS_dec( return false; } - if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) - ) + if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) ) { arg->enable5ms = false; } -- GitLab