Loading apps/decoder.c +49 −3 Original line number Diff line number Diff line Loading @@ -1975,7 +1975,12 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; Loading Loading @@ -2442,13 +2447,27 @@ static ivas_error decodeG192( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples is zeroed, and delayNumSamples_orig is updated only on first good frame, so need to re-fetch delay info */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading Loading @@ -2575,13 +2594,26 @@ static ivas_error decodeG192( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading Loading @@ -3229,13 +3261,27 @@ static ivas_error decodeVoIP( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples_orig is fetched only for the first good frame, but here the delay can change between frames, so need to re-fetch */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading apps/renderer.c +4 −1 Original line number Diff line number Diff line Loading @@ -1844,8 +1844,11 @@ int main( } } } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMetaOutput, NULL ) ) != IVAS_ERR_OK ) /* NULL -> use default metadata delay settings */ #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMetaOutput ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); } Loading lib_com/ivas_cnst.h +6 −0 Original line number Diff line number Diff line Loading @@ -118,7 +118,13 @@ typedef enum RENDERER_NON_DIEGETIC_DOWNMIX, RENDERER_OSBA_STEREO, RENDERER_OSBA_AMBI, #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT RENDERER_OSBA_LS, RENDERER_OMASA_OBJECT_EXT, RENDERER_OMASA_MIX_EXT #else RENDERER_OSBA_LS #endif } RENDERER_TYPE; Loading lib_com/ivas_prot.h +24 −0 Original line number Diff line number Diff line Loading @@ -5733,6 +5733,30 @@ void ivas_omasa_rearrange_channels( const int16_t output_frame /* i : output frame length per channel */ ); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT ivas_error ivas_omasa_combine_separate_ism_with_masa_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_omasa_combine_separate_ism_with_masa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output[], /* o : output synthesis signal */ const int16_t nchan_ism, /* i : number of ISMs */ const int16_t output_frame /* i : output frame length per channel */ ); ivas_error ivas_omasa_render_objects_from_mix_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_omasa_render_objects_from_mix( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output[], /* o : output synthesis signal */ const int16_t nchan_ism, /* i : number of ISMs */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of samples requested */ Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ /* #################### End BASOP porting switches ############################ */ /* clang-format on */ Loading Loading
apps/decoder.c +49 −3 Original line number Diff line number Diff line Loading @@ -1975,7 +1975,12 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; Loading Loading @@ -2442,13 +2447,27 @@ static ivas_error decodeG192( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples is zeroed, and delayNumSamples_orig is updated only on first good frame, so need to re-fetch delay info */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading Loading @@ -2575,13 +2594,26 @@ static ivas_error decodeG192( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading Loading @@ -3229,13 +3261,27 @@ static ivas_error decodeVoIP( if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples_orig is fetched only for the first good frame, but here the delay can change between frames, so need to re-fetch */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading
apps/renderer.c +4 −1 Original line number Diff line number Diff line Loading @@ -1844,8 +1844,11 @@ int main( } } } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMetaOutput, NULL ) ) != IVAS_ERR_OK ) /* NULL -> use default metadata delay settings */ #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMetaOutput ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); } Loading
lib_com/ivas_cnst.h +6 −0 Original line number Diff line number Diff line Loading @@ -118,7 +118,13 @@ typedef enum RENDERER_NON_DIEGETIC_DOWNMIX, RENDERER_OSBA_STEREO, RENDERER_OSBA_AMBI, #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT RENDERER_OSBA_LS, RENDERER_OMASA_OBJECT_EXT, RENDERER_OMASA_MIX_EXT #else RENDERER_OSBA_LS #endif } RENDERER_TYPE; Loading
lib_com/ivas_prot.h +24 −0 Original line number Diff line number Diff line Loading @@ -5733,6 +5733,30 @@ void ivas_omasa_rearrange_channels( const int16_t output_frame /* i : output frame length per channel */ ); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT ivas_error ivas_omasa_combine_separate_ism_with_masa_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_omasa_combine_separate_ism_with_masa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output[], /* o : output synthesis signal */ const int16_t nchan_ism, /* i : number of ISMs */ const int16_t output_frame /* i : output frame length per channel */ ); ivas_error ivas_omasa_render_objects_from_mix_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_omasa_render_objects_from_mix( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output[], /* o : output synthesis signal */ const int16_t nchan_ism, /* i : number of ISMs */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of samples requested */ Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ /* #################### End BASOP porting switches ############################ */ /* clang-format on */ Loading