[ogg-dev] OggPCM2: channel map
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Fri Nov 18 16:14:17 PST 2005
> I that this is handled pretty nicely by the "simple map" that Sampo
> suggested. This is basically the same thing as the "channel map"
> described on the wiki, but with the (physical,logical) channel pair
> swapped. So, using the syntax from the wiki:
> channel_type = OGG_CHANNEL_MAP_STEREO
> channel_map [OGG_CHANNEL_FRONT_LEFT] = 1
> channel_map [OGG_CHANNEL_FRONT_RIGHT] = 2
Not sure this is a good idea. Remember that channel_map is just an array
(unless you want to make it a map?). So if you had a OGG_CHANNEL_SPECIAL
with an id of 1000, it would force 1000 entries in the array.
> This is nice because it makes it impossible for somebody to do something
> stupid like define two channels as carrying FRONT_LEFT. A player can't
> handle that situation sanely, but handling both FRONT_LEFT and
> FRONT_RIGHT mapping to channel 0 is easy. Like Sampo said, this does
> mean having to define (and assign an order to) what channels are in each
> channel type, but I don't look at that as a bad thing. The other case we
> were trying to support, of multiple logical streams at different
> bitrates is still easy:
While it makes it impossible to do something stupid like mapping two
channels to the same target, it makes it easier to not map a channel at
all.
> >One idea I had for this is that there should be a default mapping for
> >all channel mappings and a default channel mapping for the most used
> >number of channels. For example, we would say that unless you include a
> >mapping header, then a 2-channel file is stereo with left channel
> >interleaved before right. I've added the idea at the bottom of
> >http://wiki.xiph.org/index.php/OggPCM2 . Any thoughts on this?
> >
> >
> >
> I think this is a good idea, but it may be wise to stop at stereo and
> not provide a preference for any of the 4+ channel formats.
I think a default mapping would be needed just to help for the
conversion header.
Jean-Marc
More information about the ogg-dev
mailing list