mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
- Pre-allocate and reuse sample decompression buffers. In many FLAC files, the amount of samples per frame is either constant or the largest frame will be hit within the first couple of frames. Also, during audio output, we need to move and combine the samples from the decompression buffers into the final output buffers anyways. Avoiding the reallocation of these large buffers provides an improvement from 16x to 18x decode speed on strongly compressed but otherwise usual input. - Leave a FIXME for a similar improvement that can be made in the residual decoder. - Pre-allocate audio chunks if frame size is known. - Use reasonable inline capacities in several places where we know the maximum or usual capacity needed.
4.5 KiB
4.5 KiB