Loading lib_com/ivas_prot_fx.h +30 −18 Original line number Original line Diff line number Diff line Loading @@ -2501,7 +2501,7 @@ Word16 ivas_sba_get_nchan_metadata_fx( ); ); #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT /*! r: number of bits in SPAR SID frame */ /*! r: number of bits in SBQ SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ const Word16 nchan_transport /* i : number of transport channels */ ); ); Loading Loading @@ -3500,7 +3500,9 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ const Word16 bits_sph_idx, const Word16 bits_sph_idx, const Word16 bits_sp_coh ); const Word16 bits_sp_coh ); void ivas_merge_masa_metadata_fx( void ivas_merge_masa_metadata_fx( MASA_ENCODER_HANDLE hMasa, /* i/o: MASA enc handle. source for MASA metadata and combined metadata will be here */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA enc handle. source for MASA metadata and combined metadata will be here */ OMASA_SPATIAL_META_HANDLE hOMasaMeta /* i : ISM-object metadata to be merged with the MASA metadata */ OMASA_SPATIAL_META_HANDLE hOMasaMeta /* i : ISM-object metadata to be merged with the MASA metadata */ Loading @@ -3522,12 +3524,14 @@ void ivas_param_mc_enc_fx( Word32 *data_f_fx[], /* i/o: input/transport MC data Q11 */ Word32 *data_f_fx[], /* i/o: input/transport MC data Q11 */ const Word16 input_frame /* i : input frame length */ const Word16 input_frame /* i : input frame length */ ); ); void ivas_merge_masa_transports_fx( void ivas_merge_masa_transports_fx( Word32 data_in_f1_fx[][L_FRAME48k], // Qx Word32 data_in_f1_fx[][L_FRAME48k], // Qx Word32 *data_in_f2_fx[], // Qx Word32 *data_in_f2_fx[], // Qx Word32 *data_out_f_fx[], // Qx Word32 *data_out_f_fx[], // Qx const Word16 input_frame, const Word16 input_frame, const Word16 num_transport_channels ); const Word16 num_transport_channels ); void ivas_param_mc_enc_close_fx( void ivas_param_mc_enc_close_fx( PARAM_MC_ENC_HANDLE *hParamMC, /* i/o: Parametric MC encoder handle */ PARAM_MC_ENC_HANDLE *hParamMC, /* i/o: Parametric MC encoder handle */ Loading Loading @@ -3626,11 +3630,18 @@ ivas_error ivas_masa_encode_fx( void ivas_write_format_sid_fx( void ivas_write_format_sid_fx( const IVAS_FORMAT ivas_format, /* i : IVAS format */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const Word16 element_mode, /* i : element bitrate */ const Word16 element_mode, /* i : element bitrate */ #ifdef NONBE_FIX_1052_SBA_EXT_FIX BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ const Word16 sba_planar /* i : SBA planar flag */ #else BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ #endif ); ); void ivas_write_format_fx( /* i/o: IVAS encoder structure */ void ivas_write_format_fx( Encoder_Struct *st_ivas ); Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); ivas_error create_sce_enc_fx( ivas_error create_sce_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading Loading @@ -5851,7 +5862,8 @@ ivas_error ivas_dirac_enc_fx( const Word16 nchan_transport, /* i : number of transport channels */ const Word16 nchan_transport, /* i : number of transport channels */ #endif #endif const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 shift ); const Word16 shift ); ivas_error ivas_spar_md_enc_init_fx( ivas_error ivas_spar_md_enc_init_fx( ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ Loading lib_com/ivas_sba_config_fx.c +3 −2 Original line number Original line Diff line number Diff line Loading @@ -171,10 +171,10 @@ Word16 ivas_sba_get_nchan_fx( /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_sba_spar_sid_bitlen_fx() * ivas_sba_spar_sid_bitlen_fx() * * * Get number of bits in SPAR SID frame * Get number of bits in SBA SID frame *-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ /*! r: number of bits in SPAR SID frame */ /*! r: number of bits in SBA SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ const Word16 nchan_transport /* i : number of transport channels */ ) ) Loading @@ -191,6 +191,7 @@ Word16 ivas_sba_spar_sid_bitlen_fx( } } #endif #endif /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_sba_get_nchan_metadata() * ivas_sba_get_nchan_metadata() * * Loading lib_com/options.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -122,7 +122,6 @@ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ #define NONBE_FIX_1130_DIV_ZERO_LEV_DUR /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */ #define NONBE_FIX_1130_DIV_ZERO_LEV_DUR /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */ #define FIX_1111_TDM_LSP_BUFFER /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */ #define FIX_1111_TDM_LSP_BUFFER /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */ #define NONBE_1325_TD_STEREO_QUANT_LSF_SEC /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */ #define NONBE_1325_TD_STEREO_QUANT_LSF_SEC /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */ #define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ #define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ Loading @@ -130,6 +129,7 @@ #define FIX_1138_SBA_EXT_ERROR_PRINTOUT /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */ #define FIX_1138_SBA_EXT_ERROR_PRINTOUT /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ /* #################### End BASOP porting switches ############################ */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/ivas_dirac_dec_fx.c +3 −12 Original line number Original line Diff line number Diff line Loading @@ -1292,6 +1292,7 @@ void ivas_dirac_dec_read_BS_fx( set32_fx( hQMetaData->q_direction[0].band_data[b].elevation_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES ); set32_fx( hQMetaData->q_direction[0].band_data[b].elevation_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES ); } } } } #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), nchan_transport, NULL, SBA_FORMAT ) ); *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), nchan_transport, NULL, SBA_FORMAT ) ); move16(); move16(); Loading Loading @@ -1393,6 +1394,7 @@ void ivas_dirac_dec_read_BS_fx( *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), 0, NULL, SBA_FORMAT ) ); *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), 0, NULL, SBA_FORMAT ) ); move16(); move16(); #endif #endif FOR( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) FOR( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { { hQMetaData->q_direction[0].band_data[orig_dirac_bands - 1].azimuth_fx[i] = hQMetaData->q_direction[0].band_data[1].azimuth_fx[0]; hQMetaData->q_direction[0].band_data[orig_dirac_bands - 1].azimuth_fx[i] = hQMetaData->q_direction[0].band_data[1].azimuth_fx[0]; Loading Loading @@ -2269,16 +2271,6 @@ void ivas_dirac_dec_render_sf_fx( move16(); move16(); move16(); move16(); FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { set32_fx( Cldfb_RealBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( Cldfb_ImagBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); } } /* local copies of azi, ele, diffuseness */ /* local copies of azi, ele, diffuseness */ Word16 azimuth[CLDFB_NO_CHANNELS_MAX]; Word16 azimuth[CLDFB_NO_CHANNELS_MAX]; Word16 elevation[CLDFB_NO_CHANNELS_MAX]; Word16 elevation[CLDFB_NO_CHANNELS_MAX]; Loading Loading @@ -2325,7 +2317,6 @@ void ivas_dirac_dec_render_sf_fx( push_wmops( "ivas_dirac_dec_render" ); push_wmops( "ivas_dirac_dec_render" ); /* Initialize aux buffers */ /* Initialize aux buffers */ FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { { FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) Loading lib_dec/ivas_init_dec_fx.c +30 −2 Original line number Original line Diff line number Diff line Loading @@ -408,6 +408,7 @@ ivas_error ivas_dec_setup( move16(); move16(); st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) ); st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) ); move16(); move16(); #ifndef NONBE_FIX_1052_SBA_EXT_FIX #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { Loading @@ -419,8 +420,9 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); } } #endif #endif #endif num_bits_read = add( num_bits_read, SBA_ORDER_BITS ); num_bits_read = add( num_bits_read, SBA_ORDER_BITS ); test(); test(); test(); test(); IF( st_ivas->ini_frame > 0 && NE_32( ivas_total_brate, st_ivas->last_active_ivas_total_brate ) && GT_32( ivas_total_brate, IVAS_SID_5k2 ) ) IF( st_ivas->ini_frame > 0 && NE_32( ivas_total_brate, st_ivas->last_active_ivas_total_brate ) && GT_32( ivas_total_brate, IVAS_SID_5k2 ) ) Loading Loading @@ -733,6 +735,7 @@ ivas_error ivas_dec_setup( BREAK; BREAK; } } #ifndef NONBE_FIX_1052_SBA_EXT_FIX #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { Loading @@ -744,7 +747,7 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); } } #endif #endif #endif test(); test(); IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) { { Loading Loading @@ -1098,6 +1101,7 @@ static ivas_error ivas_read_format( *num_bits_read = add( *num_bits_read, SBA_ORDER_BITS ); *num_bits_read = add( *num_bits_read, SBA_ORDER_BITS ); move16(); move16(); #endif #endif if ( st_ivas->sba_analysis_order == 0 ) if ( st_ivas->sba_analysis_order == 0 ) { { st_ivas->sba_analysis_order = SBA_FOA_ORDER; st_ivas->sba_analysis_order = SBA_FOA_ORDER; Loading Loading @@ -1195,11 +1199,13 @@ void copy_decoder_config( return; return; } } /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_init_decoder_front() * ivas_init_decoder_front() * * * Set decoder parameters to initial values * Set decoder parameters to initial values *-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ ivas_error ivas_init_decoder_front( ivas_error ivas_init_decoder_front( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) ) Loading @@ -1216,6 +1222,10 @@ ivas_error ivas_init_decoder_front( move16(); move16(); st_ivas->nCPE = 0; st_ivas->nCPE = 0; move16(); move16(); #ifdef NONBE_FIX_1052_SBA_EXT_FIX st_ivas->nchan_ism = 0; move16(); #endif st_ivas->nCPE_old = 0; st_ivas->nCPE_old = 0; move16(); move16(); st_ivas->nchan_transport = -1; st_ivas->nchan_transport = -1; Loading Loading @@ -1379,10 +1389,13 @@ ivas_error ivas_init_decoder_fx( move32(); move32(); st_ivas->last_active_ivas_total_brate = ivas_total_brate; st_ivas->last_active_ivas_total_brate = ivas_total_brate; move32(); move32(); /*-----------------------------------------------------------------* /*-----------------------------------------------------------------* * Set number of output channels for EXTERNAL output config. * Set number of output channels for EXTERNAL output config. *-----------------------------------------------------------------*/ *-----------------------------------------------------------------*/ test(); test(); IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT Loading @@ -1397,7 +1410,11 @@ ivas_error ivas_init_decoder_fx( { { hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config ); hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config ); } } #ifdef NONBE_FIX_1052_SBA_EXT_FIX ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) #else ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif #else #else IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif #endif Loading Loading @@ -1437,6 +1454,8 @@ ivas_error ivas_init_decoder_fx( st_ivas->intern_config = output_config; st_ivas->intern_config = output_config; move32(); move32(); test(); test(); #ifdef FIX_1052_EXT_OUTPUT #ifdef FIX_1052_EXT_OUTPUT IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) { { Loading @@ -1445,7 +1464,11 @@ ivas_error ivas_init_decoder_fx( move32(); move32(); } } #ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER #ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER #ifdef NONBE_FIX_1052_SBA_EXT_FIX ELSE IF( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && ( st_ivas->ivas_format == SBA_ISM_FORMAT || st_ivas->ivas_format == SBA_FORMAT ) ) #else ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif { { st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order ); st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order ); ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config ); ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config ); Loading Loading @@ -1741,7 +1764,12 @@ ivas_error ivas_init_decoder_fx( test(); test(); test(); test(); #ifdef NONBE_FIX_1052_SBA_EXT_FIX test(); IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) && !( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_FOA ) ) ) #else IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) ) IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) ) #endif { { IF( NE_32( ( error = ivas_dirac_dec_config_fx( st_ivas, DIRAC_OPEN ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_dirac_dec_config_fx( st_ivas, DIRAC_OPEN ) ), IVAS_ERR_OK ) ) { { Loading Loading
lib_com/ivas_prot_fx.h +30 −18 Original line number Original line Diff line number Diff line Loading @@ -2501,7 +2501,7 @@ Word16 ivas_sba_get_nchan_metadata_fx( ); ); #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT /*! r: number of bits in SPAR SID frame */ /*! r: number of bits in SBQ SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ const Word16 nchan_transport /* i : number of transport channels */ ); ); Loading Loading @@ -3500,7 +3500,9 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ const Word16 bits_sph_idx, const Word16 bits_sph_idx, const Word16 bits_sp_coh ); const Word16 bits_sp_coh ); void ivas_merge_masa_metadata_fx( void ivas_merge_masa_metadata_fx( MASA_ENCODER_HANDLE hMasa, /* i/o: MASA enc handle. source for MASA metadata and combined metadata will be here */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA enc handle. source for MASA metadata and combined metadata will be here */ OMASA_SPATIAL_META_HANDLE hOMasaMeta /* i : ISM-object metadata to be merged with the MASA metadata */ OMASA_SPATIAL_META_HANDLE hOMasaMeta /* i : ISM-object metadata to be merged with the MASA metadata */ Loading @@ -3522,12 +3524,14 @@ void ivas_param_mc_enc_fx( Word32 *data_f_fx[], /* i/o: input/transport MC data Q11 */ Word32 *data_f_fx[], /* i/o: input/transport MC data Q11 */ const Word16 input_frame /* i : input frame length */ const Word16 input_frame /* i : input frame length */ ); ); void ivas_merge_masa_transports_fx( void ivas_merge_masa_transports_fx( Word32 data_in_f1_fx[][L_FRAME48k], // Qx Word32 data_in_f1_fx[][L_FRAME48k], // Qx Word32 *data_in_f2_fx[], // Qx Word32 *data_in_f2_fx[], // Qx Word32 *data_out_f_fx[], // Qx Word32 *data_out_f_fx[], // Qx const Word16 input_frame, const Word16 input_frame, const Word16 num_transport_channels ); const Word16 num_transport_channels ); void ivas_param_mc_enc_close_fx( void ivas_param_mc_enc_close_fx( PARAM_MC_ENC_HANDLE *hParamMC, /* i/o: Parametric MC encoder handle */ PARAM_MC_ENC_HANDLE *hParamMC, /* i/o: Parametric MC encoder handle */ Loading Loading @@ -3626,11 +3630,18 @@ ivas_error ivas_masa_encode_fx( void ivas_write_format_sid_fx( void ivas_write_format_sid_fx( const IVAS_FORMAT ivas_format, /* i : IVAS format */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const Word16 element_mode, /* i : element bitrate */ const Word16 element_mode, /* i : element bitrate */ #ifdef NONBE_FIX_1052_SBA_EXT_FIX BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ const Word16 sba_planar /* i : SBA planar flag */ #else BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ #endif ); ); void ivas_write_format_fx( /* i/o: IVAS encoder structure */ void ivas_write_format_fx( Encoder_Struct *st_ivas ); Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); ivas_error create_sce_enc_fx( ivas_error create_sce_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading Loading @@ -5851,7 +5862,8 @@ ivas_error ivas_dirac_enc_fx( const Word16 nchan_transport, /* i : number of transport channels */ const Word16 nchan_transport, /* i : number of transport channels */ #endif #endif const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 shift ); const Word16 shift ); ivas_error ivas_spar_md_enc_init_fx( ivas_error ivas_spar_md_enc_init_fx( ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ Loading
lib_com/ivas_sba_config_fx.c +3 −2 Original line number Original line Diff line number Diff line Loading @@ -171,10 +171,10 @@ Word16 ivas_sba_get_nchan_fx( /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_sba_spar_sid_bitlen_fx() * ivas_sba_spar_sid_bitlen_fx() * * * Get number of bits in SPAR SID frame * Get number of bits in SBA SID frame *-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ /*! r: number of bits in SPAR SID frame */ /*! r: number of bits in SBA SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ const Word16 nchan_transport /* i : number of transport channels */ ) ) Loading @@ -191,6 +191,7 @@ Word16 ivas_sba_spar_sid_bitlen_fx( } } #endif #endif /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_sba_get_nchan_metadata() * ivas_sba_get_nchan_metadata() * * Loading
lib_com/options.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -122,7 +122,6 @@ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ #define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ #define NONBE_FIX_1130_DIV_ZERO_LEV_DUR /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */ #define NONBE_FIX_1130_DIV_ZERO_LEV_DUR /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */ #define FIX_1111_TDM_LSP_BUFFER /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */ #define FIX_1111_TDM_LSP_BUFFER /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */ #define NONBE_1325_TD_STEREO_QUANT_LSF_SEC /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */ #define NONBE_1325_TD_STEREO_QUANT_LSF_SEC /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */ #define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ #define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ Loading @@ -130,6 +129,7 @@ #define FIX_1138_SBA_EXT_ERROR_PRINTOUT /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */ #define FIX_1138_SBA_EXT_ERROR_PRINTOUT /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ /* #################### End BASOP porting switches ############################ */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/ivas_dirac_dec_fx.c +3 −12 Original line number Original line Diff line number Diff line Loading @@ -1292,6 +1292,7 @@ void ivas_dirac_dec_read_BS_fx( set32_fx( hQMetaData->q_direction[0].band_data[b].elevation_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES ); set32_fx( hQMetaData->q_direction[0].band_data[b].elevation_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES ); } } } } #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), nchan_transport, NULL, SBA_FORMAT ) ); *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), nchan_transport, NULL, SBA_FORMAT ) ); move16(); move16(); Loading Loading @@ -1393,6 +1394,7 @@ void ivas_dirac_dec_read_BS_fx( *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), 0, NULL, SBA_FORMAT ) ); *nb_bits = add( *nb_bits, ivas_qmetadata_dec_sid_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), 0, NULL, SBA_FORMAT ) ); move16(); move16(); #endif #endif FOR( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) FOR( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { { hQMetaData->q_direction[0].band_data[orig_dirac_bands - 1].azimuth_fx[i] = hQMetaData->q_direction[0].band_data[1].azimuth_fx[0]; hQMetaData->q_direction[0].band_data[orig_dirac_bands - 1].azimuth_fx[i] = hQMetaData->q_direction[0].band_data[1].azimuth_fx[0]; Loading Loading @@ -2269,16 +2271,6 @@ void ivas_dirac_dec_render_sf_fx( move16(); move16(); move16(); move16(); FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { set32_fx( Cldfb_RealBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( Cldfb_ImagBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); } } /* local copies of azi, ele, diffuseness */ /* local copies of azi, ele, diffuseness */ Word16 azimuth[CLDFB_NO_CHANNELS_MAX]; Word16 azimuth[CLDFB_NO_CHANNELS_MAX]; Word16 elevation[CLDFB_NO_CHANNELS_MAX]; Word16 elevation[CLDFB_NO_CHANNELS_MAX]; Loading Loading @@ -2325,7 +2317,6 @@ void ivas_dirac_dec_render_sf_fx( push_wmops( "ivas_dirac_dec_render" ); push_wmops( "ivas_dirac_dec_render" ); /* Initialize aux buffers */ /* Initialize aux buffers */ FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { { FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) Loading
lib_dec/ivas_init_dec_fx.c +30 −2 Original line number Original line Diff line number Diff line Loading @@ -408,6 +408,7 @@ ivas_error ivas_dec_setup( move16(); move16(); st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) ); st_ivas->sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) ); move16(); move16(); #ifndef NONBE_FIX_1052_SBA_EXT_FIX #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { Loading @@ -419,8 +420,9 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); } } #endif #endif #endif num_bits_read = add( num_bits_read, SBA_ORDER_BITS ); num_bits_read = add( num_bits_read, SBA_ORDER_BITS ); test(); test(); test(); test(); IF( st_ivas->ini_frame > 0 && NE_32( ivas_total_brate, st_ivas->last_active_ivas_total_brate ) && GT_32( ivas_total_brate, IVAS_SID_5k2 ) ) IF( st_ivas->ini_frame > 0 && NE_32( ivas_total_brate, st_ivas->last_active_ivas_total_brate ) && GT_32( ivas_total_brate, IVAS_SID_5k2 ) ) Loading Loading @@ -733,6 +735,7 @@ ivas_error ivas_dec_setup( BREAK; BREAK; } } #ifndef NONBE_FIX_1052_SBA_EXT_FIX #ifdef NONBE_FIX_1052_SBA_EXT #ifdef NONBE_FIX_1052_SBA_EXT IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { Loading @@ -744,7 +747,7 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); st_ivas->hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); } } #endif #endif #endif test(); test(); IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) { { Loading Loading @@ -1098,6 +1101,7 @@ static ivas_error ivas_read_format( *num_bits_read = add( *num_bits_read, SBA_ORDER_BITS ); *num_bits_read = add( *num_bits_read, SBA_ORDER_BITS ); move16(); move16(); #endif #endif if ( st_ivas->sba_analysis_order == 0 ) if ( st_ivas->sba_analysis_order == 0 ) { { st_ivas->sba_analysis_order = SBA_FOA_ORDER; st_ivas->sba_analysis_order = SBA_FOA_ORDER; Loading Loading @@ -1195,11 +1199,13 @@ void copy_decoder_config( return; return; } } /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_init_decoder_front() * ivas_init_decoder_front() * * * Set decoder parameters to initial values * Set decoder parameters to initial values *-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ ivas_error ivas_init_decoder_front( ivas_error ivas_init_decoder_front( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) ) Loading @@ -1216,6 +1222,10 @@ ivas_error ivas_init_decoder_front( move16(); move16(); st_ivas->nCPE = 0; st_ivas->nCPE = 0; move16(); move16(); #ifdef NONBE_FIX_1052_SBA_EXT_FIX st_ivas->nchan_ism = 0; move16(); #endif st_ivas->nCPE_old = 0; st_ivas->nCPE_old = 0; move16(); move16(); st_ivas->nchan_transport = -1; st_ivas->nchan_transport = -1; Loading Loading @@ -1379,10 +1389,13 @@ ivas_error ivas_init_decoder_fx( move32(); move32(); st_ivas->last_active_ivas_total_brate = ivas_total_brate; st_ivas->last_active_ivas_total_brate = ivas_total_brate; move32(); move32(); /*-----------------------------------------------------------------* /*-----------------------------------------------------------------* * Set number of output channels for EXTERNAL output config. * Set number of output channels for EXTERNAL output config. *-----------------------------------------------------------------*/ *-----------------------------------------------------------------*/ test(); test(); IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { { #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT Loading @@ -1397,7 +1410,11 @@ ivas_error ivas_init_decoder_fx( { { hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config ); hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config ); } } #ifdef NONBE_FIX_1052_SBA_EXT_FIX ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, SBA_FORMAT ) ) #else ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif #else #else IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif #endif Loading Loading @@ -1437,6 +1454,8 @@ ivas_error ivas_init_decoder_fx( st_ivas->intern_config = output_config; st_ivas->intern_config = output_config; move32(); move32(); test(); test(); #ifdef FIX_1052_EXT_OUTPUT #ifdef FIX_1052_EXT_OUTPUT IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) { { Loading @@ -1445,7 +1464,11 @@ ivas_error ivas_init_decoder_fx( move32(); move32(); } } #ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER #ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER #ifdef NONBE_FIX_1052_SBA_EXT_FIX ELSE IF( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && ( st_ivas->ivas_format == SBA_ISM_FORMAT || st_ivas->ivas_format == SBA_FORMAT ) ) #else ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) #endif { { st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order ); st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order ); ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config ); ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config ); Loading Loading @@ -1741,7 +1764,12 @@ ivas_error ivas_init_decoder_fx( test(); test(); test(); test(); #ifdef NONBE_FIX_1052_SBA_EXT_FIX test(); IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) && !( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->intern_config, IVAS_AUDIO_CONFIG_FOA ) ) ) #else IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) ) IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) ) #endif { { IF( NE_32( ( error = ivas_dirac_dec_config_fx( st_ivas, DIRAC_OPEN ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_dirac_dec_config_fx( st_ivas, DIRAC_OPEN ) ), IVAS_ERR_OK ) ) { { Loading