Update uvlc definition to match implementations#343
Open
fhvwy wants to merge 1 commit intoAOMediaCodec:masterfrom
Open
Update uvlc definition to match implementations#343fhvwy wants to merge 1 commit intoAOMediaCodec:masterfrom
fhvwy wants to merge 1 commit intoAOMediaCodec:masterfrom
Conversation
The specified uvlc parsing process does not match that used by the libaom reference implementation [1]. The specification encodes 2^32-1 as at least thirty-two zero bits followed by a one, while libaom uses exactly thirty-two zero bits without a one. Other implementations also do not match the specification here ([2] matches the libaom behaviour, [3] raises an error if it sees this case). The difference is never encountered in conforming streams because the one syntax element using the uvlc parsing process (num_ticks_per_picture_minus_1) is not allowed to take the maximum value of 2^32-1. Given that this area is therefore not covered for conformance purposes, it seems easier to update the text of the specification to match the existing implementations than to do the reverse. [1] <https://aomedia.googlesource.com/aom/+/refs/heads/main/aom_dsp/bitreader_buffer.c>, line 63. [2] <https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Source/Lib/Decoder/Codec/EbDecBitstream.c?ref_type=heads#L68> [3] <https://chromium.googlesource.com/codecs/libgav1/+/refs/heads/main/src/utils/raw_bit_reader.cc>, line 161.
Contributor
|
Looks reasonable to me. I am not sure if any of the important people get notified of issues here, so you will probably have to mention it at the working group to get the change adopted. If there is reluctance to change the content, then at least a note could be added to prevent others from having to debug the same issue again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The specified uvlc parsing process does not match that used by the libaom reference implementation [1]. The specification encodes 2^32-1 as at least thirty-two zero bits followed by a one, while libaom uses exactly thirty-two zero bits without a one. Other implementations also do not match the specification here ([2] matches the libaom behaviour, [3] raises an error if it sees this case).
The difference is never encountered in conforming streams because the one syntax element using the uvlc parsing process
(
num_ticks_per_picture_minus_1) is not allowed to take the maximum value of 2^32-1. Given that this area is therefore not covered for conformance purposes, it seems easier to update the text of the specification to match the existing implementations than to do the reverse.[1] https://aomedia.googlesource.com/aom/+/refs/heads/main/aom_dsp/bitreader_buffer.c, line 63.
[2] https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Source/Lib/Decoder/Codec/EbDecBitstream.c?ref_type=heads#L68
[3] https://chromium.googlesource.com/codecs/libgav1/+/refs/heads/main/src/utils/raw_bit_reader.cc, line 161.