Re: further debugging of my ogg/theora decoder

salsaman <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
On Tue, Nov 18, 2008 at 12:27 AM, Ralph Giles <[email protected]> wrote:

> On Sun, Nov 16, 2008 at 5:54 PM, salsaman <[email protected]> wrote:
>
> > I am finding something very strange in my test ogg files.
> >
> > For example: I have a shift of 64, and I get a granulepos of 5130.
> >
> > 5130 == 80*64 + 10
> >
> > which suggests that frame 80 is a keyframe.
>
> That's right.
>
> > However, if I start decoding from the beginning, the 81st frame is a
> > keyframe.
>
> Really? Someone has an off-by-one somewhere.
>
> > This suggests that the first frame should be 0. But if I try to search
> for
> > frame 0, it fails.
>
> Correct. The granulepos is derived from the count of decodeable
> frames. So the granulepos is:
>
> first frame 1:0 (keyframe)
> second frame 1:1
> third frame 1:2
>  ...
> 80th frame 80:0 (keyframe)
> 81st frame 80:1
>  ...
> 90th frame 80:10
>
> > Any suggestions ?
>
> Are you counting frames from 0 instead of 1 somewhere? I try to think
> of 'frame index' which starts from zero and 'frame count' which starts
> from 1, similar to the normal index and bounds in C 'for' loops. The
> granulepos records the count, not the index.
>
> FWIW,
>  -r
>


Right, that is what I would expect. I think I will write an ogg file checker
that checks all granulepos and keyframes to make sure the problem is not in
my test files. Some of the files were created with older versions of the
encoder. For example I have one file where I need to subtract 2 from all
keyframe values in order for it to decode properly.

Regards,
Gabriel.
http://lives.sourceforge.net

_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.