[mythtv] Internal DVD Player multichannel support
matt mead
m-mythtv at goof.com
Wed May 3 12:54:25 UTC 2006
Ed W wrote:
>>> 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
>>> intelligence
>>> to steer bass to the LFE channel) would be a good thing to do as well.
> 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.
This is fine, for stereo content, and what I'd want, though I'd add in bass
management to push the results of a low-pass-filter to the LFE.
> 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...
Well, my point is that some "plain stereo" signals *are* intended to provide
surround information. Dolby Pro-Logic pulls 4 channels (Front
Left/Center/Right, Mono Rear) from two by reversing the matrix encoding done at
production time. I don't really want to listen to a "pseudo surround signal"
either, but there are stereo signals intended to be de-matrixed and played
across more than two speakers. Unfortunately, I don't know of a way to detect
them automatically - hence my suggestion to have a keystroke for switching
between "bypass" and "surround." Surround could simply be all 6 channels from
AC3/DTS if available or routing of the 4 channels from a de-matrixed stereo
signal to the 6 physical channels if all that is available is stereo. Bypass
would be stereo to the Front Left/Right and LFE given a stereo track, and
stereo downmix of AC3/DTS routed to Front Left/Right and LFE given AC3/DTS.
> So basically you just leave your amp in 6 channel mode all the time, no
> need for any special processing
Right - this is what I'd like to do - just have the code and playback-time
control to switch myth's output modes, leaving the amp alone.
> 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...
I have played with mplayer using 6 channel output to my alsa device and it
seems to work just fine given an AC3/DTS soundtrack. I have not tried it with
a stereo signal to see how it performs. I don't know if it does bass
management as appropriate, nor do I know (but I doubt) if it does a de-matrix
of DPL/DPLII signals. Stealing the code would be a great start, though I have
yet to look specifically into it.
I've got my development machine up and running - I'll have to work on the
.19-fixes branch for the time-being unless someone has a suggestion for how to
work against the trunk when your backend remains at .19-fixes. I should have
some time in the next couple weeks to start digging into the patch and working
on the additional support.
-matt
--
matt mead
http://collectivity.goof.com/
More information about the mythtv-dev
mailing list