Loading apps/decoder.c +1 −4 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; bool evsMode; IVAS_ROOM_SIZE_T roomSize; } DecArguments; Loading Loading @@ -1008,7 +1007,6 @@ static bool parseCmdlIVAS_dec( arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->evsMode = false; arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; Loading Loading @@ -1562,7 +1560,6 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( argv_to_upper, "-EVS" ) == 0 ) { arg->evsMode = true; arg->decMode = IVAS_DEC_MODE_EVS; i++; } Loading Loading @@ -1653,7 +1650,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->evsMode ) else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->decMode == IVAS_DEC_MODE_EVS ) { fprintf( stderr, "Error: Both non-diegetic panning and stereo output specified!\n\n" ); usage_dec(); Loading lib_com/ivas_prot.h +8 −2 Original line number Diff line number Diff line Loading @@ -794,8 +794,8 @@ Word16 matrix_product_q30_fx( ); void ivas_apply_non_diegetic_panning( float *input_f, /* i : non-diegetic object */ float *output_f[], /* o : core-coder transport mono channel/stereo output */ float *input_f, /* i : non-diegetic object (mono channel) */ float *output_f[], /* o : stereo output channels */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ); Loading Loading @@ -5258,6 +5258,12 @@ void ivas_mc2sba( const float gain_lfe /* i : gain for LFE, 0=ignore LFE */ ); void ivas_stereo2sba( float *input_f[], /* i : core-coder transport stereo channels */ float *output_f[], /* o : SBA output channels */ const int16_t output_frame /* i : output frame length per channel */ ); void ivas_param_mc_mc2sba_cldfb( IVAS_OUTPUT_SETUP hTransSetup, /* i : transported MC Format */ float *hoa_encoder, /* i : HOA3 encoder for the transported MC format */ Loading lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,10 @@ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ Loading lib_dec/ivas_init_dec.c +2 −5 Original line number Diff line number Diff line Loading @@ -1446,11 +1446,6 @@ ivas_error ivas_init_decoder( st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); } if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->transport_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO; } /* Only initialize transport setup if it is used */ if ( st_ivas->transport_config != IVAS_AUDIO_CONFIG_INVALID ) { Loading Loading @@ -1581,6 +1576,8 @@ ivas_error ivas_init_decoder( else if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->nchan_transport = CPE_CHANNELS; st_ivas->intern_config = IVAS_AUDIO_CONFIG_STEREO; st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ cpe_id = 0; Loading lib_dec/ivas_jbm_dec.c +29 −23 Original line number Diff line number Diff line Loading @@ -927,6 +927,8 @@ ivas_error ivas_jbm_dec_render( * Rendering *----------------------------------------------------------------*/ *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) { assert( 0 ); Loading @@ -937,30 +939,24 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { if ( st_ivas->ivas_format == MONO_FORMAT ) #ifdef FIX_1435_MOVE_STEREO_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { /* routed to W */ ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); ivas_apply_non_diegetic_panning( p_tc[0], p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); } else if ( st_ivas->ivas_format == STEREO_FORMAT ) { for ( n = 0; n < *nSamplesRendered; n++ ) #endif else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { float tmp; tmp = p_output[0][n]; p_output[0][n] = 0.5f * ( tmp + p_output[1][n] ); /* W = 0.5 * ( L + R ) */ p_output[1][n] = 0.5f * ( tmp - p_output[1][n] ); /* Y = 0.5 * ( L - R ) */ } } #ifdef FIX_1454_FIX_STEREO_TO_FOA_JBM ivas_stereo2sba( p_tc, p_output, *nSamplesRendered ); #else ivas_stereo2sba( p_output, p_output, *nSamplesRendered ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading @@ -985,8 +981,6 @@ ivas_error ivas_jbm_dec_render( } else /* ISM_MODE_DISC */ { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Loudspeaker or Ambisonics rendering */ if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -1103,8 +1097,6 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* shift SBA channels to avoid overwrite by ISM upmix in 1 object case and non-TSM unified channel memory*/ if ( st_ivas->nchan_ism == 1 && st_ivas->hDecoderConfig->Opt_tsm == 0 ) { Loading Loading @@ -1187,7 +1179,7 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->mc_mode == MC_MODE_MCT ) { int16_t crendInPlaceRotation = FALSE; *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) { if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) Loading Loading @@ -1221,7 +1213,6 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) Loading Loading @@ -1948,7 +1939,15 @@ int16_t ivas_jbm_dec_get_num_tc_channels( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; #ifdef FIX_1435_MOVE_STEREO_PANNING if ( st_ivas->ivas_format == MONO_FORMAT ) { num_tc = 1; } else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) #else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) #endif { num_tc = 1; } Loading Loading @@ -2056,10 +2055,12 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } #ifndef FIX_1435_MOVE_STEREO_PANNING else if ( st_ivas->ivas_format == MONO_FORMAT && st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { num_tc = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; } #endif return num_tc; } Loading Loading @@ -2517,6 +2518,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_MONO_DOWNMIX: buffer_mode = TC_BUFFER_MODE_BUFFER; break; #ifdef FIX_1435_MOVE_STEREO_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: #endif case RENDERER_TD_PANNING: case RENDERER_BINAURAL_OBJECTS_TD: case RENDERER_BINAURAL_FASTCONV: Loading @@ -2534,6 +2538,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_OSBA_LS: buffer_mode = TC_BUFFER_MODE_RENDERER; break; #ifndef FIX_1435_MOVE_STEREO_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: if ( st_ivas->ivas_format == MONO_FORMAT ) { Loading @@ -2543,6 +2548,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( { buffer_mode = TC_BUFFER_MODE_RENDERER; } #endif break; case RENDERER_MC_PARAMMC: if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) Loading Loading
apps/decoder.c +1 −4 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; bool evsMode; IVAS_ROOM_SIZE_T roomSize; } DecArguments; Loading Loading @@ -1008,7 +1007,6 @@ static bool parseCmdlIVAS_dec( arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->evsMode = false; arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; Loading Loading @@ -1562,7 +1560,6 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( argv_to_upper, "-EVS" ) == 0 ) { arg->evsMode = true; arg->decMode = IVAS_DEC_MODE_EVS; i++; } Loading Loading @@ -1653,7 +1650,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->evsMode ) else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->decMode == IVAS_DEC_MODE_EVS ) { fprintf( stderr, "Error: Both non-diegetic panning and stereo output specified!\n\n" ); usage_dec(); Loading
lib_com/ivas_prot.h +8 −2 Original line number Diff line number Diff line Loading @@ -794,8 +794,8 @@ Word16 matrix_product_q30_fx( ); void ivas_apply_non_diegetic_panning( float *input_f, /* i : non-diegetic object */ float *output_f[], /* o : core-coder transport mono channel/stereo output */ float *input_f, /* i : non-diegetic object (mono channel) */ float *output_f[], /* o : stereo output channels */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ); Loading Loading @@ -5258,6 +5258,12 @@ void ivas_mc2sba( const float gain_lfe /* i : gain for LFE, 0=ignore LFE */ ); void ivas_stereo2sba( float *input_f[], /* i : core-coder transport stereo channels */ float *output_f[], /* o : SBA output channels */ const int16_t output_frame /* i : output frame length per channel */ ); void ivas_param_mc_mc2sba_cldfb( IVAS_OUTPUT_SETUP hTransSetup, /* i : transported MC Format */ float *hoa_encoder, /* i : HOA3 encoder for the transported MC format */ Loading
lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,10 @@ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ Loading
lib_dec/ivas_init_dec.c +2 −5 Original line number Diff line number Diff line Loading @@ -1446,11 +1446,6 @@ ivas_error ivas_init_decoder( st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); } if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->transport_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO; } /* Only initialize transport setup if it is used */ if ( st_ivas->transport_config != IVAS_AUDIO_CONFIG_INVALID ) { Loading Loading @@ -1581,6 +1576,8 @@ ivas_error ivas_init_decoder( else if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->nchan_transport = CPE_CHANNELS; st_ivas->intern_config = IVAS_AUDIO_CONFIG_STEREO; st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ cpe_id = 0; Loading
lib_dec/ivas_jbm_dec.c +29 −23 Original line number Diff line number Diff line Loading @@ -927,6 +927,8 @@ ivas_error ivas_jbm_dec_render( * Rendering *----------------------------------------------------------------*/ *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) { assert( 0 ); Loading @@ -937,30 +939,24 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { if ( st_ivas->ivas_format == MONO_FORMAT ) #ifdef FIX_1435_MOVE_STEREO_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { /* routed to W */ ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); ivas_apply_non_diegetic_panning( p_tc[0], p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); } else if ( st_ivas->ivas_format == STEREO_FORMAT ) { for ( n = 0; n < *nSamplesRendered; n++ ) #endif else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { float tmp; tmp = p_output[0][n]; p_output[0][n] = 0.5f * ( tmp + p_output[1][n] ); /* W = 0.5 * ( L + R ) */ p_output[1][n] = 0.5f * ( tmp - p_output[1][n] ); /* Y = 0.5 * ( L - R ) */ } } #ifdef FIX_1454_FIX_STEREO_TO_FOA_JBM ivas_stereo2sba( p_tc, p_output, *nSamplesRendered ); #else ivas_stereo2sba( p_output, p_output, *nSamplesRendered ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading @@ -985,8 +981,6 @@ ivas_error ivas_jbm_dec_render( } else /* ISM_MODE_DISC */ { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Loudspeaker or Ambisonics rendering */ if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -1103,8 +1097,6 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* shift SBA channels to avoid overwrite by ISM upmix in 1 object case and non-TSM unified channel memory*/ if ( st_ivas->nchan_ism == 1 && st_ivas->hDecoderConfig->Opt_tsm == 0 ) { Loading Loading @@ -1187,7 +1179,7 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->mc_mode == MC_MODE_MCT ) { int16_t crendInPlaceRotation = FALSE; *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) { if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) Loading Loading @@ -1221,7 +1213,6 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) Loading Loading @@ -1948,7 +1939,15 @@ int16_t ivas_jbm_dec_get_num_tc_channels( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; #ifdef FIX_1435_MOVE_STEREO_PANNING if ( st_ivas->ivas_format == MONO_FORMAT ) { num_tc = 1; } else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) #else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) #endif { num_tc = 1; } Loading Loading @@ -2056,10 +2055,12 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } #ifndef FIX_1435_MOVE_STEREO_PANNING else if ( st_ivas->ivas_format == MONO_FORMAT && st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { num_tc = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; } #endif return num_tc; } Loading Loading @@ -2517,6 +2518,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_MONO_DOWNMIX: buffer_mode = TC_BUFFER_MODE_BUFFER; break; #ifdef FIX_1435_MOVE_STEREO_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: #endif case RENDERER_TD_PANNING: case RENDERER_BINAURAL_OBJECTS_TD: case RENDERER_BINAURAL_FASTCONV: Loading @@ -2534,6 +2538,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_OSBA_LS: buffer_mode = TC_BUFFER_MODE_RENDERER; break; #ifndef FIX_1435_MOVE_STEREO_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: if ( st_ivas->ivas_format == MONO_FORMAT ) { Loading @@ -2543,6 +2548,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( { buffer_mode = TC_BUFFER_MODE_RENDERER; } #endif break; case RENDERER_MC_PARAMMC: if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) Loading