Allocation of memory for the buffers of bitstream indices (7)
The structure hIvasEnc is currently counted in the static memory consumption. The majority of its size is taken by the buffers containing bitstream indices: ind_list[MAX_NUM_DATA][MAX_NUM_INDICES]
and ind_list_metadata[MAX_NUM_METADATA][MAX_BITS_METADATA]
.
These are intermediate buffers that were historically introduced in the EVS encoder to facilitate the writing of indices out of order. This simplifies the source code and improves its readability by keeping various technologies compact. Also, any modifications to the encoder affecting the order of indices or their number can be done without affecting the existing code. The total static memory of these buffer is ~30 kWords.
The buffer ind_list[][]
is part of the EVS core where it is not counted in the total static memory consumption. It needs to be revisited and reworked in the IVAS codec. There are several possibilities what to do with these buffers, e.g. remove them, optimize their sizes, move them down the processing stream, etc.
As a temporary solution, the structure hIvasEnc is not counted in the memory consumption of the IVAS encoder. This is implemented under the compilation switch BITSTREAM_INDICES_MEMORY
.