AOMediaCodec/iamf

Clarify `leb128` padding limit

jwcullen opened this issue · 1 comments

In a draft version of the spec we used normatively reference AV1 to define leb128.

This was changed in https://github.com/AOMediaCodec/iamf/pull/558/files to bring in an explicit definition. Later a NOTE was added to clarify that "leading zero bytes" are allowed.

It seems like an oversight that we are missing a limit on the amount of zero-padded bytes.

It is a requirement of bitstream conformance that the most significant bit of leb128_byte is equal to 0 if i is equal to 7. (This ensures that this syntax descriptor never uses more than 8 bytes.)

The benefit of allowing zero-padded bytes is to allow certain use-cases to leave leb128s blank, but fill them in arbitrarily later. But it seems prudent to limit the amount of zero-padded bytes. I think we intended this, but it was just missed in review.

I suggest adding language similar to the AV1 quote above to the IAMF definition of leb128().

+1 that we need to clarify the limit to be 8 bytes or similar limit