Skip to content

HRM and screen clearing after empty ISD #6

Closed
@cconcolato

Description

I've tried to run one example of subtitles in https://github.com/sandflow/imscHRM and ran into the following problem. Consider the following case:

<p xml:id="subtitle3" begin="20.062s" end="22.940s" region="region1" style="style1">このトランプ<br/>おしっこの臭いがする</p>
<p xml:id="subtitle4" begin="23.023s" end="24.024" region="region1" style="style1">嗅いでみて</p>

imscHRM produces:

ERROR:imschrm.hrm:Rendering time exceeded at 23.023s (doc w3c/imsc#7)
  available time: 0.083s | HRM time: 0.101
  Glyph copy count: 0 | render count: 5 | Background draw count: 0

Validation failed

The XML produces at least 3 ISD:

  • one from 20.062s to 22.940s
  • one from 22.940s to 23.023s (i.e. 2-frame duration at 24fps), empty ISD
  • one from 23.023s to 23.023s

After discussion with @palemieux it seems that the problem is that the HRM always assumes that a clear operation has to be performed prior to painting the new ISD text. The IMSC spec says:

DUR(En) = S(En) / BDraw + DURT(En) + DURI(En)
S(En) = CLEAR(En) + PAINT(En )
where CLEAR(E0) = 0 and CLEAR(En | n > 0) = 1, i.e. the Root Container Region in its entirety.

In the above case, ISD2 already has cleared the screen, therefore there should be no need to clear the screen again to paint ISD3.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions