[mythtv] Internal DVD Player multichannel support

Ed W lists at wildgooses.com
Tue May 2 22:03:21 UTC 2006


>>mode and be done with it.  Maybe a keystroke in the different playback 
>>modes to
>>switch between surround and "bypass" (stereo (front L+R), but with 
>>to steer bass to the LFE channel) would be a good thing to do as well.
>might be difficult to change dynamically. leave this feature for a lot later 

The way it's usually done is to consider 6 channel to be "normal" and 
downmix from there.

So what I do in my case is hook up all 6 outputs to my 6 inputs on my 
amp (conceptually at least) and then when it's a two channel signal all 
that happens is that the rear speakers are silent. 

I don't have any special upmixing which occurs when there is only stereo 
to make it some kind of pseudo surround signal.  I did play with some 
matrixing idea to make this happen (do a phase difference and then play 
it back with delay and attenuation from the surround channels), but it 
didn't really float my boat...

So basically you just leave your amp in 6 channel mode all the time, no 
need for any special processing

To downmix we simply steal the mplayer matrixing code...  It's just a 
case of splitting the signal to the speakers you haven't got, eg if no 
center then half the center signal and patch it to the two front 
speakers.  No surround then just patch the surrounds to the front.  No 
sub then split the sub signal and send it to the front channels.  To be 
totally correct you should drop 3dB of attenuation if you merge two 
channels together to avoid clipping

Bass management is slightly harder, but mplayer uses a fast high quality 
solution.  Essentially you generate a highpass/lowpass FIR filter and 
convolve everything with this.  Take the outputs to the respective 
speakers.  There is a fast convolver in lavc and from memory there is an 
adequate if not optimal bit of code to generate filter coeffs in 
mplayer, otherwise there is a slightly nice bit of code in brutefir  (or 
write our own... *shock*)

I did all of this in Jack + Brutefir though because I wanted to play 
with optimising the filters... I have this mad idea that by using some 
linear phase filters you can get better dispersion control from the 
mains to the sub, hence run the sub higher.  The effect is dramatic and 
reduces the work the main speakers are doing and hence drops their 
distortion dramatically - probably gives a nice boost for folks using 
standard surround speakers in their setup...

Ed W

More information about the mythtv-dev mailing list