avcodec/ac3enc: Avoid copying samples
Only the last 256 samples of each frame are used; the encoder currently uses a buffer for 1536 + 256 samples whose first 256 samples contain are the last 256 samples from the last frame and the next 1536 are the samples of the current frame. Yet since 238b2d41 all the DSP functions only need 256 contiguous samples and this can be achieved by only retaining the last 256 samples of each frame. Doing so saves 6KiB per channel. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Showing
Please register or sign in to comment