[mythtv] [mythtv-commits] Ticket #6569: ac3 level is low for 5.1 source

Jean-Yves Avenard jyavenard at gmail.com
Thu May 6 03:47:40 UTC 2010


Hi

On 6 May 2010 13:23, Mark Spieth <mark at digivation.com.au> wrote:
>> The only time I can think 2 channels won't go back to 6, if when you
>> have weird stream that does 6 ->  2 ->  6 ->2 ->  6
>
> OneHD does this all the time. motogp/f1 is in ac3 5.1 ads are in ac3 2.0

They certainly don't do it every 50-60 frames or so !!

Which is what the current code prevent. It's the only time 2 -> 6 -> 2
-> 6 won't work


> ok. may need a flag to enable/disable functionality but auto is better.

no need, because that code is triggered only when several changes
occur more than every

#define AUDIOMAXFRAMES       30


> upmixer has 2 and 6 ch mode. of source material is 6 ch it just copies with
> the same audio latency (I think) so it can handle it seemlessly. just need
> to tell it the #source channels and it should do the correct thing to get
> the resultant 6 channels out. shoudl work for mono too. the other separate
> mono upmix should have been done there too.

Mono to stereo upmix is done during AddSamples

>
> we could add a further mode where we tell upmixer whether its in int16 or
> float source format too so it will use whatever is fed to it.

you will have to revert all the last changes then

Because the previous upmixer, full of switch / case based on the size
of the samples was just nasty

>
> timestretch is after upmix in the dataflow and is thus independent. always
> in output channel size mode.

yes but it is already in the audio buffer.

Which is what I was referring to... You are changing the type of data
in the audio buffer, be it the number of channels, the number of
samples, weither they have been resampled or not etc...

We can not handle different data type in the same audio buffer as it is.

So if you make a change, it has to be reset.

>
> the audio card should only need to be reopened if the #output channels
> changes, which should be never for a session.
> the dataflow of the audio system ensures that.

Sorry, but that's just wrong...
There's more settings provided to the audio card than the number of channels...

But if you have some knowledge of the code that I don't...
Feel free to have a crack at it ...

Now is a good time too ...

Jean-Yves


More information about the mythtv-dev mailing list