Skip to content
Snippets Groups Projects
Unverified Commit 60d6c560 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by Jean-Marc Valin
Browse files

Always use L=0 for last repeated long extension.


Even if it is followed by repeated short extensions with payloads.
We track the total size of the short extension payloads that need
 to be repeated, and remove that from the available space for the
 last long extension.
This means we can no longer use L=0 on a repeat to skip coding a
 frame separator when the extensions to be repeated contain a long
 extension followed by one or more short extensions with payloads
 (and there are no more non-repeated extensions in the current
 frame, but there are extensions in the next frame), but this case
 seems uncommon, and hard to explain.
The savings from always being able to skip coding a length when the
 final extensions are repeated extensions with at least one long
 extension is likely higher.
We can still skip a frame separator if we repeat only short
 extensions.

Also update existing tests and add a test for the case where we do
 not have enough space for the repeated short extensions after the
 last long extension.

Signed-off-by: default avatarJean-Marc Valin <jeanmarcv@google.com>
parent b49c07d1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment