[FFmpeg-devel] [PATCH] Bugfix: decoding 8- and 24-bit FLAC files

Michael Niedermayer michaelni
Tue Jun 12 01:51:34 CEST 2007


On Mon, Jun 11, 2007 at 09:13:50PM +0100, Michael Donaghy wrote:
> On Monday 11 June 2007 16:40:28 Michael Niedermayer wrote:
> > Hi
> >
> > On Sun, Jun 10, 2007 at 03:48:56PM +0100, Michael Donaghy wrote:
> > > Attached is a patch to fix two problems relating to decoding of FLAC
> > > files with 8 and 24 (and I believe 20, though am unable to test this) bit
> > > samples; also attached is a 5-second example of each for verification
> > > (test by "ffplay file.flac" for ffplay built with and without this
> > > patch).
> >
> > iam not sure if all subscribers are happy with receiving large sample files
> > over ffmpeg-dev ...
> I read the "patch submission checklist" in the FAQ on the website as meaning 
> it was necessary to attach a sample for any bugfix; my apologies if I 
> misunderstood.

i clarified the checklist, is it more understandabel now?
(and to all the ones pointing at me for not setting a limit in mailman,
mailman is set to a 200k limit ...)

> > why not replace all the shifts and shift_to_16_bits by
> > (x<<8)>>(24-bps)
> > ?
> You have your bitshifts the wrong way around, 

yeah that is what happens when one copy and pastes code and improves
it without thinking about the correctness of the original ...

> but yes, this works; the  
> downsides are slightly reduced readability (and a compiler warning to go with 
> this), but it shortens the code and presumably increases performance; I took 
> the approach I did in order to fix the problem with the minimum of changes to 
> existing code as per the FAQ, but I prefer this way. Attached is a patch to 
> do it as you suggest.

patch looks ok

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20070612/42abdc28/attachment.pgp>

More information about the ffmpeg-devel mailing list