Loading lib_dec/ivas_jbm_dec.c +17 −0 Original line number Diff line number Diff line Loading @@ -1964,6 +1964,8 @@ static void ivas_jbm_dec_copy_masa_meta_to_buffer( hJbmMetadata->diffuseToTotalRatioBuffer[write_idx][band] = extOutMeta->diffuseToTotalRatio[sf][band]; hJbmMetadata->surroundCoherenceBuffer[write_idx][band] = extOutMeta->surroundCoherence[sf][band]; } hJbmMetadata->numberOfDirections[write_idx] = extOutMeta->descriptiveMeta.numberOfDirections; } } Loading Loading @@ -2019,6 +2021,7 @@ void ivas_jbm_masa_sf_to_sf_map( int16_t slot_read_idx, sf_read_idx; int16_t sf_idx; int16_t dir, band; uint8_t numberOfDirections; /* Set values */ hJbmMetadata = st_ivas->hJbmMetadata; Loading Loading @@ -2053,5 +2056,19 @@ void ivas_jbm_masa_sf_to_sf_map( extOutMeta->surroundCoherence[sf_idx][band] = hJbmMetadata->surroundCoherenceBuffer[sf_read_idx][band]; } } /* Determine the number of directions for the frame to be written */ numberOfDirections = 0; for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { sf_read_idx = sf_to_sf_map[sf_idx]; if ( hJbmMetadata->numberOfDirections[sf_read_idx] == 1 ) { numberOfDirections = 1; break; } } extOutMeta->descriptiveMeta.numberOfDirections = numberOfDirections; } #endif lib_dec/ivas_stat_dec.h +1 −0 Original line number Diff line number Diff line Loading @@ -1233,6 +1233,7 @@ typedef struct jbm_metadata_structure uint8_t spreadCoherenceBuffer[MASA_MAXIMUM_DIRECTIONS][MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t surroundCoherenceBuffer[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t diffuseToTotalRatioBuffer[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t numberOfDirections[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES]; /* Descriptive metadata, value is 0 or 1 */ int16_t slot_read_idx; int16_t slot_write_idx; Loading Loading
lib_dec/ivas_jbm_dec.c +17 −0 Original line number Diff line number Diff line Loading @@ -1964,6 +1964,8 @@ static void ivas_jbm_dec_copy_masa_meta_to_buffer( hJbmMetadata->diffuseToTotalRatioBuffer[write_idx][band] = extOutMeta->diffuseToTotalRatio[sf][band]; hJbmMetadata->surroundCoherenceBuffer[write_idx][band] = extOutMeta->surroundCoherence[sf][band]; } hJbmMetadata->numberOfDirections[write_idx] = extOutMeta->descriptiveMeta.numberOfDirections; } } Loading Loading @@ -2019,6 +2021,7 @@ void ivas_jbm_masa_sf_to_sf_map( int16_t slot_read_idx, sf_read_idx; int16_t sf_idx; int16_t dir, band; uint8_t numberOfDirections; /* Set values */ hJbmMetadata = st_ivas->hJbmMetadata; Loading Loading @@ -2053,5 +2056,19 @@ void ivas_jbm_masa_sf_to_sf_map( extOutMeta->surroundCoherence[sf_idx][band] = hJbmMetadata->surroundCoherenceBuffer[sf_read_idx][band]; } } /* Determine the number of directions for the frame to be written */ numberOfDirections = 0; for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { sf_read_idx = sf_to_sf_map[sf_idx]; if ( hJbmMetadata->numberOfDirections[sf_read_idx] == 1 ) { numberOfDirections = 1; break; } } extOutMeta->descriptiveMeta.numberOfDirections = numberOfDirections; } #endif
lib_dec/ivas_stat_dec.h +1 −0 Original line number Diff line number Diff line Loading @@ -1233,6 +1233,7 @@ typedef struct jbm_metadata_structure uint8_t spreadCoherenceBuffer[MASA_MAXIMUM_DIRECTIONS][MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t surroundCoherenceBuffer[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t diffuseToTotalRatioBuffer[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES][MASA_FREQUENCY_BANDS]; uint8_t numberOfDirections[MAX_PARAM_SPATIAL_SUBFRAMES * MASA_JBM_RINGBUFFER_FRAMES]; /* Descriptive metadata, value is 0 or 1 */ int16_t slot_read_idx; int16_t slot_write_idx; Loading