Reword restriction on `obu_size`
jwcullen opened this issue · 3 comments
The maximum size of an OBU (an OBU Header followed by the OBU payload) SHALL be limited to 2MB (i.e.,
2^21 bytes). It implies that the maximum value of the obu_size field SHALL be limited to 2^21 - 4.
Clause 1) A maximum size of an entire OBU must be 2 MB or less.
Clause 2) A maximum size of obu_size
must be 2^21 - 4 or
When obu_size
is written using the minimum number of bytes (i.e 0xfc, 0xff, 0x7f
). It takes up three bytes. The preceding portion of the header takes up one byte.
- In this case an
obu_size
of 2^21 - 4 would correspond with an OBU which is 2MB. - This clearly obeys clause 1 and clause 2.
When obu_size
is written with padded bytes (e.g. 0xfc, 0xff, 0xff, 0x00
or 0xfc, 0xff, 0xff, 0x80, 0x00
). It may be more than three bytes.
- In the first case an
obu_size
of 2^21 - 4 would correspond with an OBU that is 2 MB + 1 byte. Therefore we violate restriction 1. In order to obey both clause 1 and clause 2obu_size
would be limited to 2^21 - 5 (i.e.0xfb, 0xff, 0xff, 0x00
). - This is the max while obeying clause 1 and clause 2.
There is nothing that would violate clause 2 and NOT violate clause 1. I think the wording of clause 2 is confusing. But it does not need any technically changes.
In Propositional Logic, when the conditional statement Clause 1) -> Clause 2) is true, it does not mean that the inverse is always true.
I mean what the sentences say is that the maximum value of the obu_size is limited to 2^21-4 as long as the size of an OBU is limited to 2MB but they say nothing about the inverse.
Would it help to add a clarification that Clause 2 holds if it is not written with padded bytes?
mean what the sentences say is that the maximum value of the obu_size is limited to 2^21-4 as long as the size of an OBU is limited to 2MB but they say nothing about the inverse.
I agree. The statement spec is logically correct/consistent. Just worded in a way that can be slightly misleading. I think this is strictly an editorial problem.
Would it help to add a clarification that Clause 2 holds if it is not written with padded bytes?
Yes. I think this would make it clearer.