[Ffmpeg-devel] [PATCH] lpcm 20 and 24 bit support in MPEG PS

Baptiste Coudurier baptiste.coudurier
Sat Sep 30 13:49:01 CEST 2006


Reimar D?ffinger a ?crit :
> Hello,
> On Fri, Sep 29, 2006 at 06:00:04PM +0200, Baptiste Coudurier wrote:
>> Demuxer is not doing any conversion, it just depack samples correctly.
> 
> With that argument there is no reason why we should have both big and
> little endian audio formats either.

Maybe.

>> That is a demuxer issue, not a codec one, if demuxer do not depack it
>> you cannot stream copy,
> 
> Ok, but why is that so? Does the muxer do packing as well? I also wasn't
> aware that stream copy does not work with MPlayer for these files.

Mplayer does the exact decoding treatment as well, but it does not work 
with mono, and uses a special dvdpcm decoder.
Stream copy wont work except from PS to PS.
Yes muxer should pack it, and it muxer's job. Atm Lavf Mpeg PS muxer 
does not mux 24 bit lpcm.

>> and there is no reason to put the code in
>> libavcodec.
> 
> Well, except that there is lots of similar code there. And that like
> this you will be doing 20 bit lpcm -> 24 bit PCM -> 16 bit PCM during
> playback which is a waste of CPU time (and not even such a small one if
> it was 6 channel 192KHz, 24 bit audio)...

I agree that it is a waste of cpu time, but it is the correct way to do 
it. Now it seems the audio API is a bit special.

Maybe we should start using AVFrame, SampleFormat, and doing conversion 
only when it is needed. Not only decode_to_16. And finally use 
CODEC_ID_RAWAUDIO.

Could we go for that for 0.5.0 ?

>> It looks like PCM_S24DAUD case, which has nothing to do in pcm.c, since
>> it is 20 bit lpcm.
> 
> Nobody objected to me placing it there...
> 

True. I was not following ffmpeg one year ago. Im sorry.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no




More information about the ffmpeg-devel mailing list