This 24-bit tag is stored in 3 bytes, starting with the least
significant 8 bits.
"""
LIkewise, the 'image dimensions' record can be described as a 32-bit
record, with 4 subfields, also stored little-end first. So there's no
need at all to include the (incompletely specified) 'swap2' function,
along with that C code using it (which does non-portable unaligned
reads, BTW).
And a picture, showing the field layout wouldn't hurt.
I would also add :
- all elements described in the header (or anywhere, for that
matter) need to have actual names so that they can be properly
referred to later. 9.2 doesn't name things, and 9.3 has a typo in the
name of 'update_mb_segmentat[i]on_map', so that it can't be found in a
search.
- how about an overview of the whole header, showing how the
optional and variable parts are organized (again, picture is good).
In general, there is too much 'implementation' detail in the spec.
This may be an attempt to help the implementor, but it's a slippery
slope, and clutters the spec, making it harder to understand what's
actually going on. For instance, the last pgph of chapter 6 complains
about the non-portable nature of >> on negative numbers, and promises
to call attention to these when they show up (a promise not kept,
BTW). This is a compression spec, not a C tutorial! Just define the
>> to do what you want, and be done with it.
In fact, there is no need to mess around with different integer
widths, just say that all variables are infinite range, define what <<
and >> ( and '/' if applicable) do to these (which is simpler than the
C equivalents), and then use '&0xFF' for instance if you need to
truncate things. It is up the spec to define the operations, and
ultimately up to the implementor to figure out what the range of
subexpressions are, although it certainly doesn't hurt to define some
of these in the comments alongside.
And on the subject of commentary, take a look at any other established
standard doc (I highly recommend the ETS 300 401 DAB spec, which is
very well written, at least the sections 10..15 that I worked with).
They are, in general, clearly divided into 'normative' and
'informative' sections. The 'normative' sections should be sufficient
to form the spec, but may be too terse and hard to get the 'big
picture' from; the informative parts are to help out with the big
picture. The advantage of this is that you can gloss over some details
in the 'informative' part (for clarity) without compromising the
detailed accuracy of the 'normative' parts. In the current VP8 spec,
the two types of content are mixed confusingly. For instance, the
description of how arithmetic coding actually works in section 7 is
great, and welcome, but does not need to be part of the spec, it
should be marked as an 'informative' section. That way, if anything in
there is not exactly in line with the rest of the spec, it's not a
problem. In the current spec, the 'normative' info appears to start
in 7.2 but the language is still informal; information is then
redundantly restated in 7.3, so maybe 7.2 is purely informative? this
needs to be clear (and bugs in 7.3 need fixing :-) ).
At the end of the day, it should be possible to give the spec to
someone, and with sufficient diligence they should be able to create a
correct decoder from the spec alone, without looking at the reference
code (or even at reference compressed data). The current spec is quite
far from that ideal.
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.