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

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Jan 14 11:11:55 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 #7 from Radoslaw Szkodzinski  2006-01-14 19:11 UTC -------
The patches I posted have gain problems (it's too quiet).
I had to fix scale() routine. (Forgot to convert from MAD's 29 to 32 bits.)

I will post final versions in a moment.

***
OT?

There's no need for 24-bit mp3's.
MP3 is a lossy format, so synthesis of any MP3 file can be done with almost
arbitrary precision. I won't delve into mathematical detail here.
See http://mp3decoders.mp3-tech.org/24bit.html point 3.

Check this comparison out (foobar2000 run under Wine):

INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://c:\gst-test.wav" (0)
INFO (foo_bitcompare) : location: "file://c:\001 madplay-test-24.wav" (0)
INFO (foo_bitcompare) : first different sample found
INFO (foo_bitcompare) : differences found: 18085910 sample(s), starting at
2.2675737E-05 second(s), peak: 1.1548400E-07 at 6.6453243E+01 second(s), 1ch
INFO (foo_bitcompare) : Finished successfully.

INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://C:\madplay-test.wav" (0)
INFO (foo_bitcompare) : location: "file://c:\001 madplay-test-24.wav" (0)
INFO (foo_bitcompare) : No differences in decoded data found.
INFO (foo_bitcompare) : Finished successfully.

Madplay doesn't provide full quality of underlying libmad.

INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://C:\madplay-test.wav" (0)
INFO (foo_bitcompare) : location: "file://c:\001 madplay-test-16.wav" (0)
INFO (foo_bitcompare) : first different sample found
INFO (foo_bitcompare) : differences found: 18597029 sample(s), starting at
4.9886621E-04 second(s), peak: 3.0398369E-05 at 6.6453243E+01 second(s), 1ch
INFO (foo_bitcompare) : Finished successfully.

INFO (foo_bitcompare) : Comparing:
INFO (foo_bitcompare) : location: "file://c:\gst-test.wav" (0)
INFO (foo_bitcompare) : location: "file://c:\001 madplay-test-16.wav" (0)
INFO (foo_bitcompare) : first different sample found
INFO (foo_bitcompare) : differences found: 18666984 sample(s), starting at
2.2675737E-05 second(s), peak: 3.0513853E-05 at 6.6453243E+01 second(s), 1ch
INFO (foo_bitcompare) : Finished successfully.


Notice that in 32 bit madplay mode is in reality 24 bit, while MAD is
internally 29 bit signed.

gst-test.wav was obtained with these commands:
gst-launch-0.8 filesrc location="$IN" ! mad ! filesink location=gst-test.raw
rawtowav.py gst-test.raw gst-test.wav

rawtowav is a throwaway script which uses Python's wave module to wrap raw data
in RIFF format.

madplay-test.wav was obtained with this command:
madplay -b 32 -d -owave:madplay-test.wav $IN

madplay-test-16.wav was obtained with this command:
madplay -b 16 -d -owave:madplay-test.wav $IN

madplay-test-24.wav was obtained with this command:
madplay -b 24 -d -owave:madplay-test.wav $IN

Versions 001 - * in front were converted to 32 bit with foobar's diskwriter to
facilitate comparison.


-- 
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