MPEGGroup / FileFormat

MPEG file format discussions
23 stars 0 forks source link

template fields should be clarified #19

Closed cconcolato closed 3 years ago

cconcolato commented 4 years ago

The definition of "template" fields is very vague: In 6.2.2:

Fields shown as "template" in the box descriptions are optional in the specifications that use this specification. If the field is used in another specification, that use must be conformant with its definition here, and the specification must define whether the use is optional or mandatory.

In 11.3:

Any template fields used must be explicitly declared; their use must be conformant with the specification here.

In C.6

Template fields are defined in the file format. If any are used in a derived specification, the use must be compatible with the base definition, and that use explicitly documented.

Saying a field is "optional" is very confusing. It has to be coded anyway. Also, how do you verify the conformance part here?

I think this should be rephrased the part in 6.2.2 along the lines of:

Fields shown as "template" in the box descriptions are fields which are coded with a default value, as defined in this specification. Derived specifications may permit writers to use other values than the default value.

kgruen commented 4 years ago

Cyril's phrasing of 6.2.2 would clarify what is meant by "template", so I support his proposal.

While browsing the occurrences of "template", I stumbled over 12.1.3.3, stating: "depth takes one of the following values 0x0018 – images are in colour with no alpha" which is odd, because only one value is given. Maybe I have an outdated version of 14496-12. In 12.2.3.2, the AudioSampleEntry contains a template unsigned int(32) samplerate with a tricky semantics, but not a default value; only the AudioSampleEntryV1 seems to have a default samplerate value of 1.0 (as a 16.16 fixed-point number). Anyway, my latter remarks are pure editorial.

jeanlf commented 4 years ago

Agree with Cyril - maybe "default" rather than "template" would be a better terminology ?

dwsinger commented 4 years ago

Yes, this was a very early attempt to avoid 'reserved'. We can do better.

dwsinger commented 3 years ago

"Fields shown as “template” in the box descriptions are fields which are coded with a default value unless a derived specification defines their use and permits writers to use other values than the default. "