[FFmpeg-devel] [PATCH] alac.c cleanup (was ALAC question)

Michael Niedermayer michaelni
Wed Jul 18 07:55:17 CEST 2007


Hi

On Wed, Jul 18, 2007 at 03:39:08AM +0200, Vitor Sessak wrote:
> Hi
> 
> Michael Niedermayer wrote:
> >Hi
> 
> [...]
> 
> >
> >
> >ok, sorry, ive looked at an old checkout by misstake, the patch is ok then
> 
> Applied. The last chunk of Matthieu's patch (attached) unifies the mono 
> and stereo decoding (one is basically a copy of the other). Actually, in 
> the code
> 
> switch(channels) {
> case 1:
> 	{ mono_code }
>  	break;
> case 2:
> 	{ stereo code }
> 	break;
> }
> 
> I've cut { mono_code } and { stereo code } to separated files and diffed 
> them (attached too), so you can see they're actually the same thing. The 
> only modification is that alac->setinfo_sample_size is replaced by 
> readsamplesize in the mono code. But readsamplesize is:
> 
> readsamplesize = alac->setinfo_sample_size - (wasted_bytes * 8) + 
> channels - 1;
> 
> Since wasted_bytes != 0 is unsupported (one comment in the code says it 
> has something to do with files with more than 2 audio channels), 
> readsamplesize and alac->setinfo_sample_size should be identical in mono 
> files.
> 
> I tested with both mono and stereo files and the decoded result are 
> identical before and after the patch.

patch ok


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070718/47306a90/attachment.pgp>



More information about the ffmpeg-devel mailing list