Menu

Parse Info headers and ogg/mkv encapsulation

2007-04-28
2013-06-04
  • Nobody/Anonymous

    I seem to recall from an early version of the Dirac spec that the 'BBCD' sequence was reserved exclusively for the parse info header and this sequence was to be escaped if it occured in the encoded picture data.  There was some discussion as to whether this escaping was necessary when packing Dirac in ogg or another container format.  In the latest spec I see no reference to such escape codes, so I'm guessing this was dropped.

    I'm wondering if there is defined anywhere a preferred way of encapsulating Dirac in containers such as Ogg and Matroska.  It looks like the recommendation for Ogg is to just split the Dirac stream at each parse info header.  Should the same be done for Matroska?  I see that there was a proposed SoC project last year to package Dirac in Matroska, but it was never done.

     
    • Tim Borer

      Tim Borer - 2007-04-30

      In previous versions of the spec, an in these forums, we did discuss escape codes.

      The idea was that we would have a unique code to signal the start of parse units. Since Dirac uses arithmetic coding these unique codes could be generated by the arithmetic coded data and, therefore, should be escaped.

      But the escape codes introduced considerable complexity and, after a lot of reflection, we realised they were not really necessary anyway.

      The byte stream may, indeed, contain accidental parse info prefix values ('BBCD'). But you can tell whether these are true or accidental parse info prefixes by using the next (and maybe previous) parse info offsets. If after the offset there is another parse info prefix then you can be fairly certain that both prefixes are genuine. If you are still unsure you can check one further offset ahead. This is the same process that is used in similar circumstances for wrapped compressed data (I am thinking specifically here of compressed audio in MPEG-2 transport streams). So, the conclusion was, that we don't need special escape sequences.

      As for wrapping Dirac: Xiph produced a spec for wrapping Dirac in Ogg, which is probably well out of date now. Fluendo have produced a spec for wrapping Dirac in MPEG-2 transport streams. But, as far as I know there is, as yet, no spec for wrapping Dirac on Matroska.

      Tim

       

Log in to post a comment.