Closed nigelmegitt closed 2 years ago
The expectation is that the normal behavior is that all samples (documents) will have a T0 ISD to recreate the display state of the last ISD in the previous sample. This is required for the requirement that every sample (or at least segment) is a RAP. The exception would be if the last ISD in the previous sample had no active text or region at the end of the sample.
There are no sparse tracks. Every sample on the track timeline must be present and contain a valid document, Such a document would be the empty document only if there was no active text or regions for the entire sample.
This is trickier and probably needs more thought for the handling of indefinite end times.
Thanks @mikedo that is interesting but I don't think it answers the question. We can get closer by narrowing down the scenario you describe in either of two ways:
In both of these cases the TTML processor must produce a first "non-empty" ISD1 that begins at a time greater than zero. But should it also produce an "empty" ISD0 from time zero until the begin time of ISD1? Does it matter to implementers?
in the case that the first element that becomes temporally active does so at a time T1 where T1 > 0, does this imply or require that there is a first empty ISD that begins at time 0 and ends at T1?
Yes. There is always an ISD at t = 0.
Similarly, there is always a last ISD whose end time is indefinite.
Yes. There is always an ISD at t = 0.
That's strong certainty @palemieux ! How did you come to this conclusion?
By the way, I would be in favour of a clarification that says "always create an ISD at t = 0". I don't want to do so if there are implementations that do not do this now, and would need to be changed. If there are such implementations, then I would add a clarification that says "creating an ISD at t = 0 if there are no active elements then is optional".
I'm not very comfortable with the current state where possibly different readers come to different conclusions.
From a practical perspective, it is simpler and safer for an ISD to always be defined at t = 0, even if it is empty.
There are otherwise many ambiguities and corner cases to consider, e.g.:
tt
element and how does it related to the root temporal extent?region
element onto which the body
element is flows impact the root temporal extent?active
actually mean?tts:showBackground="always"
?can_of_worms.open()
Those may be related questions, but I think this is a much simpler and more practical question, without worrying about them. The point is: for any given time t is there always exactly one ISD where t falls within that ISD's interval? It may be that the ISD is "empty" of course.
I think this is about avoiding an "if" statement, when it comes down to it, to test for the existence of an ISD, and handling the case where there is none. Maybe all implementers already do this, or maybe they all expect an ISD always.
for any given time t is there always exactly one ISD where t falls within that ISD's interval? It may be that the ISD is "empty" of course.
Exactly :)
It is definitely NOT the case that TTML ISD generation must or may produce an "empty ISD instance" at T=0. I have no idea how PAL came to his conclusion. Certainly there is nothing in TTML to suggest this is the case. On the other hand, I see this question as an exercise in how the ISD sequence produced by the currently specified TTML algorithm can or may be used by downstream applications. As far as that goes, I see no reason that one could not produce a particular option in a TTML Presentation Processor implementation that does indeed produce such an empty ISD at the starting line. At the same time, I don't see any expectation on the part of TTML that all applications should do this or even expect it done.
@skynavga To be clear, the specification does not impose any requirement for an implementation to produce any ISD. However, as stated above, it is simpler and safer for an ISD to always be defined at t = 0, even if it is empty, or, as @nigelmegitt , writes The point is: for any given time t is there always exactly one ISD where t falls within that ISD's interval?
@palemieux The current algorithm defined by [construct intermediate document] assigns T0 to the time coordinate associated with the start of the first active interval in the document; if T0 > 0, then, as defined, that algorithm does not produce an intermediate document for the interval [0,T0).
Furthermore for intervals [Ti,Ti+1), the current algorithm elides (in steps 4,5) the body element of that interval, both the temporary body created in step 2 and the original source document's body, if the temporary (replicated) body is empty.
So, there is nothing in the current TTML specification that implies an intermediate document on the interval [0,T0). Notwithstanding this fact, the only application of this output defined within the specification is a TTML Presentation Processor, which, among other things, must implement some realization of Synchronic Flow Processing, but it makes no assumption about the existence of inactive intervals (in general). The TTML specification also defines one concrete form for this output, namely the Intermediate Document Syntax (ISD), but does not define any application of this syntax.
My conclusion is that, if there is some other (externally defined) application specification that makes use of output of [construct intermediate document], then that specification may define such usage in a manner that requires its application specific processors to insert an empty intermediate document for the interval [0,T0). This would fall under the definition of a higher level protocol.
Thanks all for the discussion on this. I think we may be able to reach a conclusion.
Reading the comments and responses it seems to me that we have agreement that:
Have I got any of those wrong?
I had to read the spec very carefully to come to these conclusions, so I suspect it would be helpful to others to add an informative note to the [resolve timing] algorithm explaining these consequences. I'm happy to draft one, or for someone else to.
I am not sure if it would be helpful or not also to raise an issue against IMSC asking it to require a particular behaviour here. I don't think I've seen enough implementer response to come to a conclusion on that yet.
- TTML does require a final ISD that has no end time, be that empty or not.
How do you reach this conclusion? The specification, for example, ties the active duration of body to the duration of the root temporal extent, which may be definite or indefinite. If definite, then body has a definite end time, and the same applies for regions, head, etc. Since the root temporal extent is defined by the document processing context, it is application specific as to whether the last ISD has indefinite duration. In the case of TTPE, the user supplies an external time extent, which may be definite or not, and that is used to bound the root temporal extent. So I would not agree with your 3rd bullet above.
How do you reach this conclusion?
Thanks for making me look harder at this. I did miss the possibility that all of the elements in the document that can be timed have a definite end time. In that case, I can see that a final empty ISD might not be generated.
Looking at the [resolve timing] procedure, as I quoted at https://github.com/w3c/ttml2/issues/1232#issue-891763373, it relies on a thing called "active time duration" which isn't actually defined in the document; this is the only instance where that phrase appears. The active time duration is that of the document instance, not the body
, so presumably allows for region
s whose intervals extend beyond the body
's interval.
I have not found anything in the spec that defines "active time duration of the current document instance" in relation to the root temporal extent, though reading the definition of the latter, it looks like they may well be referring to the same concept. This could be worth tidying up?
Amending my bullets from https://github.com/w3c/ttml2/issues/1232#issuecomment-842143323 :
@nigelmegitt I now concur with your bullets above; and, yes, we can change "active time duration of the current document instance" to read "active time duration, i.e., root temporal extent, of the current document instance"; the current language was from a time prior to our introducing the term "root temporal extent".
The Timed Text Working Group just discussed Clarify if the first ISD must/may be constructed when empty w3c/ttml2#1232
, and agreed to the following:
SUMMARY: Nigel @nigelmegitt to attempt to resolve objections to the current PR text.
The Timed Text Working Group just discussed Clarify if the first ISD must/may be constructed when empty w3c/ttml2#1232
, and agreed to the following:
SUMMARY: Nigel and Pierre to continue discussions.
This issue arises because there's discussion in MPEG regarding 14496-30 about defining the correct semantics of processing sequences of documents each in a wrapper, where the draft text explains it in terms of sequences of ISDs. @cconcolato @mikedo
The specification for [resolve timing] step 2 is:
The question I have is: in the case that the first element that becomes temporally active does so at a time
T1
whereT1 > 0
, does this imply or require that there is a first empty ISD that begins at time 0 and ends atT1
?Taking it literally, no element becomes temporally active or inactive at time 0, so arguably no ISD should be generated. However, the draft text I've had sight of implies an expectation that there is such an "empty document", and it is possible that implementers would like to be able to rely on this behaviour.
I'd like to discover what our expectation and understanding is here, and if there is implementation experience to guide us, so that we can state this more clearly in the specification, and feed this information to others who may depend on it.