Skip to content

Commit

Permalink
Merge pull request #824 from AOMediaCodec/sunghee-hwang-patch-3
Browse files Browse the repository at this point in the history
Fix #817, leb128() is limited to 8 bytes.
  • Loading branch information
sunghee-hwang authored Jun 3, 2024
2 parents ba34bcc + 4f58927 commit 1b6aa47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ All syntax elements conform to the [=Syntactic Description Language=] specified

<b>leb128()</b> indicates the type of an unsigned integer. To encode the following unsigned integer <b>syntaxName</b>, it first represents the integer in binary with an N-bit representation, where N is a multiple of 7. Then break the integer up into groups of 7 bits. Output one encoded byte for each 7 bits group, from least significant to most significant group. Each byte will have the group in its 7 least significant bits. Set the most significant bit on each byte except the last byte.

<b>syntaxName</b> is an unsigned integer which is encoded by <b>leb128()</b>. The size of the unsigned integer to be encoded is limited to 32 bits. In other words, the value returned from the <b>leb128()</b> parsing process is less than or equal to \(2^{32} - 1\).
<b>syntaxName</b> is an unsigned integer which is encoded by <b>leb128()</b>. The size of the unsigned integer to be encoded is limited to 32 bits. In other words, the value returned from the <b>leb128()</b> parsing process is less than or equal to \(2^{32} - 1\). After encoding by <b>leb128()</b>, its maximum size is limited to 8 bytes.

NOTE: There are multiple ways of encoding the same value depending on how many leading zero bits are encoded. There is no requirement that this syntax descriptor uses the most compressed representation. This can be useful for encoder implementations by allowing a fixed amount of space to be filled in later when the value becomes known.

Expand Down

0 comments on commit 1b6aa47

Please sign in to comment.