Hi,

august wrote:
> Hey,
> 
>       I will look into your suggestions and comment once I get some
>       examples together.  
> 
>>> or, do I set it up like this:
>>>
>>> for (int i=0;i<GAVL_MAX_CHANNELS;i++)
>>>     channel_locations[i]= GAVL_CHID_AUX;
> 
> As I said before, if I set them all to AUX, no input channels on my test
> file are mixed to output.

Yes, because the channel numbers are different and gavl doesn't know (yet)
how to handle them.

What I thought would make sense is to check if the input format
has *only* GAVL_CHID_AUX and then initialize the matrix with:

for(i = 0; i < out_format->num_channels; i++)
   {
   for(j = 0; j < in_format->num_channels; j++)
     {
     matrix[i][j] = (i == j) ? 1.0 : 0.0;
     }
   }

If I didn't make a mistake, this should cover the cases you describe.

> Would it make sense to have a GAVL_CHID_PASS, so that channel input X is
> mapped to channel output X?

No, because the channel_ids can be different for input and output.

> Where do the definitions for LEFT, RIGHT, CENTER, etc come from?

At the time I programmed this, I wanted full support for 5.1 streams
from DVDs.

> I assume there is no standard for channel 1 to be LEFT, 2 to be RIGHT, 3
> to be X, is there?   Do WAV, AIF, mp3, ogg have these things defined?

wav, vorbis, aac, ac3 and aiff have multichannel definitions.
For wav it's optional though.

Of course, all formats have incompatible definitions, that's why gavl
must know about them so it can reorder them.

> There must be formats that do not.  What do you do with those?

Right now I call gavl_set_channel_setup().

It always works for Mono and Stereo (yea left comes *always* before right
at least). For >= 3 channels it does some heavy guessing, which might be
wrong. Probably it would make sense to set them all to GAVL_CHID_AUX in
this case.

Burkhard

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Gmerlin-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmerlin-general

Reply via email to