[mythtv] Fwd: Re: [mythtv-users] AC3 Decoding without external hardware?

Ed W lists at wildgooses.com
Sat Feb 10 00:06:38 UTC 2007

Hi Mark

Sorry, something strange happened in Firefox and I didn't realise that I 
was replying to an 8 month previous email...

see below:

Mark Spieth wrote:
>> I have a couple of problems with some DVDs in that the sound is
>> distorted and coming out of the wrong speakers - I think it's going to
>> be traced to avformat probably reporting the wrong number of channels,
>> but haven't debugged it completely yet.  2 channel works great though -
>> no regressions that I can see and mythmusic works well.
> use alsa remapping to fix this.

I *think* the issue is that the audio layer is trying to decode more 
channels that there really are, or it's picking the wrong rate or 
something.  Haven't debugged, but the result is that the audio is only 
through two or three channels and it's only high freq and it sounds 
horrible and glitchy.  Sometimes I can only hear the surround through 
the front speakers, etc.  On these problem films it sometimes corrects 
itself if I skip forward (but then goes bad if I rewind).  Hence I think 
that it's a decoding issue with certain DVD's

Stress though that there is no regression here.  It's perfect on two 
channel stuff, including music

>> Oh, one possible issue is that I think that the LFE bass is not being
>> boosted by 6dB?  I really don't understand where this ought to happen in
> use alsa to fix this too

This is not the right solution.  Xine correctly decodes the audio and 
hence you would get bass doubled if you switched to using Xine or 
similar.  Also you would run into problems in a 4 way setup where the 
bass is merged to the mains.

In my case I am using Jack and not Alsa and hence it's not an option as 
such.  I have everything rigged up through Brutefir and it passes 
through some massive FIR filters to mangle the audio and basically time 
align everything and also to implement some high end crossovers.  
Simplest solution is just to fix the thing at source...

> If someone wishes to commit it soon, let me know and Ill clean it up (saving 
> myself work in case it doesnt :).
> I just generate it the easy way :)

I would vote that if we clean it up then we have a decent chance to get 
it included.  I can't really see why it would not be worthy of being 
considered for inclusion?  It's mostly changes to audio code that you 
and I wrote a reasonable chunk of anyway...

I would vote to break out the digital mixing out from the main audio 
base file into a seperate file, but it's just a neatness thing... 

> I have 1 more change which allows a 2 speaker PC setup (analog out of 
> course) to be used with 2 or 6 ch audio with a little alsa config, you get 
> 6ch native and 2ch passive surround decode (in alsa). sounds not too bad.
> if anyone knows of a prologic decoder plugin for alsa, I cant find one.

I'm not quite sure what you are describing here?  If it's down mixing 
from 6 channel to fewer channels then this is worthy of breaking out 
into a seperate module.  This gets non-trivial as soon as you start to 
consider bass management (eg, 3 channel setup, large front speakers, 
small center channel....  ugh).  Pop it into a seperate mixer module and 
we can create all kinds of matrix mixing and do whatever we like in the 
future without invasive patches.  MPlayer has some code which could be 
stolen for this purpose... (Xine also has some, but I don't understand 
it as well...)

I would be very interested to find a prologic decoder if you find one.  
The papers are out there and I think Gerzon is a starting point..?  I 
think at it's heart it's a simple matter of simply doing L-R and R-L and 
then remapping to rears, ie it's all a phase encoding thing...  There 
are some "how does it work guides" around the web - probably Wikipedia 
has a starting point.  Probably ask on the Sursound list...?


Ed W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20070210/af49989b/attachment.htm 

More information about the mythtv-dev mailing list