[ogg-dev] ogg dirac granulepos in oggz tools

David Flynn davidf+nntp at woaf.net
Fri Dec 5 09:51:21 PST 2008


On 2008-12-04, Conrad Parker <conrad at metadecks.org> wrote:
> So the last remaining tool to check is oggz-chop. I at first assumed it
> would not work with Dirac's granulepos, but it seems to do something
> vaguely useful:

Chopping is more difficult.  It needs to be done based upon the
presentation time which isnt in order.

> So:
>  - is the current output correct?

Need to check.  The best way is to compare the output of chopping a
non-reordered sequence and a reordered one.  NB, if you jump into the
middle of a dependency chain there will be a few extra pictures at the
start -- something which skeleton stuff might fix (when values for
the fields are decided)

>  - if not, how should the packets that a given packet depends on be determined,
>    ie. how to determine reference frames? Is it possible to do so using only the
>    granulepos encoding?

If you find the picture at time (t), inspect the dist value in the
decoded granule_position. then something equivalent to searching
for a granule_position matching:
  candidate_granpos >> 32 == (GP64 >> 32) - dist

NB, dist / (field_coding+1) should be the number of packets to go
backwards by.

NB, don't keep repeating until you find dist=0, just do it once.

..david



More information about the ogg-dev mailing list