[FFmpeg-devel] Decoder-independent multichannel downmixing

Benjamin Larsson banan
Mon May 5 12:38:15 CEST 2008


James Lee wrote:
> 2008/5/4 Justin Ruggles <justinruggles at bellsouth.net>:
>   
>>  Channel ordering is one big issue.  Currently, all decoders send output
>>  in native channel order for that codec.  I agree that requiring decoders
>>  to output in WAVE/SMTPE channel order would be best, but it can be
>>  tricky.  Especially with raw audio, the channel order can depend on the
>>  container, so the PCM decoder will not know if or how to rearrange the
>>  channels without access to that information.
>>
>>  I have tried in the past, but it didn't get anywhere.  I believe
>>  Benjamin has also attempted this, and he may have a good solution.
>>
>>  See:
>>  http://wiki.multimedia.cx/index.php?title=FFmpeg_audio_API
>>     
>
> Has any work taken place regarding the suggestions in that wiki
> article?  It only seems to deal with channel downmixing, not with a
> general solution for channel ordering (other than stating that the
> user should reorder the channels before passing them into the mix
> structure).  Also, it doesn't seem to allow for multiple downmixing
> matrices for the same input channels / output channels combination -
> you could imagine it might be nice to be able to have eg. a Dolby Pro
> Logic, Dolby Pro Logic II, and other downmix matrices for 5.1 -->
> stereo and have the user pass in an additional flag indicating their
> preference.
>
> And Justin, it looks like you had outlined a proposal for channel
> ordering in some detail last year - any reason you didn't go ahead
> with this (i.e. just lack of time, or a fundamental issue with it?).
>
> Benjamin: are you working on these?  Is there any discussion going on
> regarding this.
>   

The solutions I came up with got to complex so I got bored and havn't 
done anything more. The problem is combining channel order and 
downmixing without making it a total mess. And regarding multiple 
matrices per downmix configuration, out_dwChannelMask should specify the 
positions of the speakers and depending on the positions a suitable 
mixing table should be returned during the init. I didn't think of using 
other matrices for the same speaker configuration. I guess we could add 
a name to av_codec_mix_struct so we could look up the table by name.

But please do continue working on this, it is needed.

MvH
Benjamin Larsson






More information about the ffmpeg-devel mailing list