[xiph-rtp] Tag or Hash? (was: Disambiguation update)
David Barrett
dbarrett at quinthar.com
Thu Sep 29 12:52:44 PDT 2005
Luca Barbato wrote:
> Yet to be decided:
>
> - Use a tag or an hash?
>
> lu
I'm not passionate either way, but I vote hash. My breakdown is as follows:
Tag:
- Pro: one byte
- Con: Limited to 256 entries
- Pro/Con: Centrally organized namespace
Hash:
- Pro: Unlimited entries
- Con: Four bytes
- Pro/Con: No central codebook namespace
- Con: Infinitesimal potential for collision
I'm voting hash purely because of its support for unlimited entries.
And no, I don't have any grand ambitions to use more than 256 entries.
But given how much work we've gone through to allow codebook switching,
I think we go the extra step and make it unlimited.
It'd be sad if we put so much effort into it, only to find out down the
road that there's some killer app -- one we might not be able to
visualize now -- that requires unlimited codebooks. I'll admit, it's
not the most persuasive reasoning, but the potential upside (potential
killer app that only Vorbis/Theora can solve) outweighs the downside
(three extra bytes per packet).
(And as for what this killer app might be, consider a TV station using
Vorbis for audio and Theora for video, broadcast to your handheld
player. As you move throughout the environment your bandwidth might
vary anywhere from 56Kbps to 56Mbps. An ideal server might continuously
vary the encoding rates, continuously optimize the codebooks, crank up
the resolution to HD or down to beans. It could trickle codebooks to
you before changing, etc etc. I'm just tossing out ideas.)
Something that's either good or bad depending on your perspective is the
actual tag namespace management. If we have tags, *someone* has to pick
which codebook is assigned to which tag, and then everyone who gets that
stream (or rebroadcasts it) needs to agree. But if we use hashes, then
nobody needs to pre-decide on a tag/codebook mapping, and this might
enable greater decentralized broadcasting and re-encoding (ie, a source
broadcasts in one and repeaters re-encode in another, and you needn't
re-synchronize your tag index when switching repeaters).
Anyway, as I said, I'm not passionate on the issue, but were I forced to
decide I'd pick hashes for their flexibility and limitlessness.
What's your take?
-david
More information about the xiph-rtp
mailing list