[Ffmpeg-devel] dts decoding broken?

Justin Ruggles justinruggles
Sat Feb 17 00:04:25 CET 2007


Andreas ?man wrote:
> Uoti Urpala wrote:
> 
>>On Fri, 2007-02-09 at 19:19 +0200, Uoti Urpala wrote:
>>
>>>On Fri, 2007-02-09 at 17:52 +0100, mail at kraymer.de wrote:
>>>
>>>>same with 5.1 dts. Now, I only get 2 out of 6 channels without downmix,
>>>>even with -channels 2 and/or -af channels=2. What I get is mainly music
>>>>and background sounds, voices are missing.
>>>>I did some regression testing and it turned out that a change in ffmpeg,
>>>>namely commit -r 7839, introduced that behavior. Using recent mplayer svn
>>>
>>>That commit changes the decoder to output the full number of channels by
>>>default. Unfortunately it also seems to completely remove the ability to
>>>use the libdts downmixing functionality.
>>>
>>>The rest of the channels are there and you can access them by explicitly
>>>specifying some conversion to 2 channels with "-af pan" for example.
>>>However having a way to use the libdts downmixing would be better.
>>
>>Does anyone intend to restore support for the downmixing functionality?
>>Can anything sanely use the current 6-channel output? Is the channel
>>order even documented anywhere in FFmpeg (outside libdts)?
>>
> 
> 
> No. i don't think so, aac 5.1 and ac3 5.1 output channels in different
> order.
> 
> On top of that, "avctx->channels" is a bit misused, atleast in the
> current ac3-decoder. (It's used both for hinting the decoder of how
> many channels we'd like and as a result for how many we got).
> This causes issues when streams switches no. of channels during
> playback.

amen. :)  I'm going nuts trying to sort out the downmixing in the LGPL
AC3 decoder.  Also, there is no way to specify if you want a 2-channel
stereo downmix or a 2-channel surround-matrix downmix.

> Here are some ideas from the top of my head.
> 
> * avctx->channels should be replaced with an enum much like PixelFormat
> for video, or we collide with formats having the same amount of channels
> (such DTS_3F1R and DTS_2F2R). These enumerations implicitly specifies
> the number of channels, the channel locations (front, back, side, 
> center, etc) and channel order (interleave offset in output data).
> Call it 'ChannelFormat' / 'ChannelLayout' or somthing.

I like the idea.




More information about the ffmpeg-devel mailing list