[gstreamer-bugs] [Bug 326734] [mad] Add 24-bit output support

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Jan 14 14:00:41 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=326734
 GStreamer | gst-plugins-ugly | Ver: HEAD CVS





------- Comment #11 from Radoslaw Szkodzinski  2006-01-14 22:00 UTC -------
>Patches look ok from a brief read, except this bit looks strange:
-  bytes_per_sample = MAD_NCHANNELS (&mad->frame.header) << 1;
+  bytes_per_sample = MAD_NCHANNELS (&mad->frame.header) * 32;

<< 1 is a bitshift to left. This means that a single channel turns to 2 bytes,
while 2 channels turn to 4 bytes.

Well, I meant to write * 4 instead of * 32. 
I had 3 (24 bits) somewhere during development and messed it up, as you can
see.

Or change it to a left shift by 2. It makes no difference, except being less
readable. Any sane compiler would optimise it to a bit shift.

Should I refresh the patches?


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list