[theora] Indexing Ogg files for faster seeking

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Sun Jan 24 17:52:49 PST 2010


On Mon, Jan 25, 2010 at 2:23 PM, Michael Dale <mdale at wikimedia.org> wrote:
> Chris Pearce wrote:
>> I think we should remove the checksums, and simply delta and
>> variable-byte encode the offsets and timestamps. We can consider an
>> index invalid if:
>>
>>   1. The segment/link length doesn't match the length stored in the
>>      fishead packet, or
>>   2. After a seek to a keypoint's offset, we don't land on a page
>>      boundary, or
>>   3. The first keyframe we decode after seeking to a keypoint doesn't
>>      have the same presentation time as stored in the index.
>>
>> Does that sound reasonable?
>
> I like the idea of drooping the checksums. Should make the index small
> and keep implementation simple by avoiding redundancy checks. ie If
> somehow your checksum matched and the presentation time did not then you
> would have to fallback to bisection search anyway. If your checksum did
> not match but the presentation time was what you wanted would you still
> fallback to bisection search to get back to where you started?
>
> Either way the index can be detected as invalid but its not useful to
> the client that is trying to do the seek.

I hope by the end of this somebody writes a wiki page with all the
alternatives proposed and tested and a rationale on why decisions were
made! Sounds like we are on a good path to an optimal (under the given
circumstances) OggIndex.

Cheers,
Silvia.


More information about the theora mailing list