Commit be0814c6 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into 677-add-masa-and-omasa-jbm-self-tests

parents 9c8db7ab fb7db6ea
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2891,6 +2891,13 @@ cleanup:
#ifdef SUPPORT_JBM_TRACEFILE
    JbmTraceFileWriter_close( &jbmTraceWriter );
#endif
#ifdef FIX_683_JBM_CLEANUP
    MasaFileWriter_close( &masaWriter );
    for ( int16_t i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ )
    {
        IsmFileWriter_close( &ismWriters[i] );
    }
#endif

    if ( decodingFailed && error == IVAS_ERR_OK )
    {
+2 −2
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ typedef enum
    AUDIO_CONFIG_ISM2,                          /* ISM2                         */
    AUDIO_CONFIG_ISM3,                          /* ISM3                         */
    AUDIO_CONFIG_ISM4,                          /* ISM4                         */
    AUDIO_CONFIG_MASA1,                         /* MASA1                        */ // TODO: seems not to be used
    AUDIO_CONFIG_MASA2,                         /* MASA2                        */ // TODO: seems not to be used
    AUDIO_CONFIG_MASA1,                         /* MASA1                        */ 
    AUDIO_CONFIG_MASA2,                         /* MASA2                        */ 
    AUDIO_CONFIG_EXTERNAL                       /* external renderer            */

} AUDIO_CONFIG;
+8 −0
Original line number Diff line number Diff line
@@ -897,6 +897,10 @@ void reconstruct_ism_ratios(

void ivas_omasa_modify_masa_energy_ratios(
    IVAS_QMETADATA_HANDLE hQMetaData /* i/o: q_metadata handle  */
#ifdef FIX_672_NOKIA_TODO
    ,
    float masa_to_total_energy_ratio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_MAXIMUM_CODING_SUBBANDS]
#endif
)
{
    int16_t i, m, d, b;
@@ -916,7 +920,11 @@ void ivas_omasa_modify_masa_energy_ratios(
        {
            for ( d = 0; d < hQMetaData->no_directions; d++ )
            {
#ifdef FIX_672_NOKIA_TODO
                hQMetaData->q_direction[d].band_data[b].energy_ratio[m] = hQMetaData->q_direction[d].band_data[b].energy_ratio[m] * masa_to_total_energy_ratio[i][b];
#else
                hQMetaData->q_direction[d].band_data[b].energy_ratio[m] = hQMetaData->q_direction[d].band_data[b].energy_ratio[m] * hQMetaData->masa_to_total_energy_ratio[i][b];
#endif
            }
        }
    }
+8 −0
Original line number Diff line number Diff line
@@ -5991,7 +5991,11 @@ void ivas_omasa_set_edited_objects(
);
#endif
void ivas_omasa_encode_masa_to_total(
#ifdef FIX_672_NOKIA_TODO
    float masa_to_total_ratio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS],
#else
    IVAS_QMETADATA_HANDLE hQMetaData,
#endif
    BSTR_ENC_HANDLE hMetaData,
    const int16_t low_bitrate_mode,
    const int16_t nbands,
@@ -6008,6 +6012,10 @@ void ivas_omasa_decode_masa_to_total(

void ivas_omasa_modify_masa_energy_ratios(
    IVAS_QMETADATA_HANDLE hQMetaData                            /* i/o: q_metadata handle                       */
#ifdef FIX_672_NOKIA_TODO
    ,
    float masa_to_total_energy_ratio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_MAXIMUM_CODING_SUBBANDS]
#endif
);

#endif
+5 −0
Original line number Diff line number Diff line
@@ -484,6 +484,9 @@ typedef struct ivas_masa_config_struct
    uint8_t useCoherence;
    uint8_t coherencePresent;
    uint8_t mergeRatiosOverSubframes;
#ifdef FIX_672_NOKIA_TODO
    IVAS_FORMAT input_ivas_format;
#endif

} MASA_CODEC_CONFIG;

@@ -576,9 +579,11 @@ typedef struct ivas_masa_qmetadata_frame_struct
    int16_t ec_flag;
    float dir_comp_ratio;
    uint8_t is_masa_ivas_format;
#ifndef FIX_672_NOKIA_TODO
#ifdef MASA_AND_OBJECTS
    float masa_to_total_energy_ratio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS]; /* TODO Nokia: This should be moved to some other place and reserved only when needed. */
#endif
#endif

} IVAS_QMETADATA, *IVAS_QMETADATA_HANDLE;

Loading