Time expression Semantics question on Media Time Base

Hello all,

Appendix I Time Expression Semantics (https://w3c.github.io/ttml2/#time-expression-semantics) describes how time expressions should be evalutated and converted according to the selected Time Base.
I was studying how a Media Time Base relates to the the offset-time expression, so I'm looking at the whole I.2 section and in particular to the I.2.2 section.

By remembering that the offset-time expression is composed in the following format:

> time-count fraction? metric

and clock-time is composed as follows:

> hours ":" minutes ":" seconds ( fraction | ":" frames ( "." sub-frames )? )?


That section states what follows:


"If a time expression uses a clock-time form or an offset-time form that doesn't use the ticks (t) metric, then:

M = referenceBegin + 3600 * hours + 60 * minutes + seconds + ((frames + (subFrames / subFrameRate)) / effectiveFrameRate)

where referenceBegin [...] corresponds to the active end of the immediately prior sibling timed element;

the hours, minutes, seconds, frames, subFrames components are extracted from time expression if present, or zero if not present; furthermore, if the time expression takes the form of a clock-time expression, then the fraction component, if present, is added to the seconds component to form a real-valued seconds component, or, if the time expression takes the form of an offset-time expression, then the fraction component, if present, is added to the time-count component to form a real-valued time count component according to the specified offset metric;"


So, as reported, when using a clock-time with a Media Time Base, we can use the formula above, by zeroing missing values and adding fraction component to the seconds component.
However, it is also says that the same formula is valid for offset-time, which however doesn't have the same fields.

Is it correct to assume that all the fields in the same formula should be zeroed according to the metric field?


For example, if we have an offset-time of "10m", the formula would be:

	M = referenceBegin + (3600 * 0) + (60 * 10) + (0) + ((0 + (0 / subFrameRate)) / effectiveFrameRate)

If so, other offset-time examples could be:

- 2h => (3600 * 2) + (60 * 0) + 0...
- 24f => (3600 * 0) + (60 * 0) + 0 + (24 + (0 / subFrameRate)) / effectiveFrameRate)



Furthermore, about the fraction component of an offset-time, the section states that "is added to the time-count [...] component according to the specified offset metric".
As I found no specification about how each offset metric (which are "h" | "m" | "s" | "ms" | "f", excluding "t" as it uses a different formula) should use the fraction component, I'd like to understand if it is correct to assume the following statements for each metric; some could contrast with others:

- "2.5h"          => means (3600 * 2) + (60 * 30) + (0)...

- "2.5m"         => means (3600 * 0) + (60 * 2) + 30...

- "2.5m"         => means (3600 * 0) + (60 * 2) + 5...

- "2.5s"          => means (3600 * 0) + (60 * 0) + 2.5

- "250.5ms"   => means (3600 * 0) + (60 * 0) + 0.2505...

- "250.5ms"   => means (3600 * 0) + (60 * 0) + 0.250 + (( 5 + (0 / subFrameRate)) / effectiveFrameRate)

- "24.5f"         => means (3600 * 0) + (60 * 0) + 0 + ((24 + (0.5 / subFrameRate)) / effectiveFrameRate)


My biggest doubts are on the milliseconds and frame metrics, but also others.

Thank you,
Alexander

Received on Saturday, 3 August 2024 16:51:25 UTC