GNOME Bugzilla – Bug 339837
[audioconvert] support for 64-bit float audio
Last modified: 2007-02-28 12:49:21 UTC
audioconvert currently doesn't handle 64-bit float audio. For an example, try playing this file in playbin: http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/AU/Samples/AFsp/M1F1-float64-AFsp.au
2007-02-02 Stefan Kost <ensonic@users.sf.net> * gst/audioconvert/audioconvert.c: (float), (double), (audio_convert_get_func_index): * gst/audioconvert/gstaudioconvert.c: (set_structure_widths), (make_lossless_changes): Support for 64-bit float audio in audioconvert (#339837)
While your fix does make the above sample work, 22bit => 64bit float conversion seems to be slightly broken. Try for example: gst-launch-0.10 filesrc location=M1F1-float64-AFsp.au ! auparse ! audioconvert ! audio/x-raw-float,width=32 ! audioconvert ! audio/x-raw-float,width=64 ! audioconvert ! alsasink
Marking as blocker. This should be either fixed or reverted before the release, given that support for 64-bit floats has been added to elements like volume and level now, and caps will preferably get fixated to 64bit if possible, so something like vorbisdec ! audioconvert ! level ! fakesink would now be broken.
I will work on this. One step could be to use double as the intermediate format it both sides are float/double. Can be done in audio_convert_prepare_context().
and we need gst_channel_mix_mix() -> gst_channel_mix_mix_int() plus a new gst_channel_mix_mix_float()
There is no need to revert anything, because also prior to the 64bit changes audioconvert would degrade quality when doing channel mixing of float.
2007-02-22 Stefan Kost <ensonic@users.sf.net> * gst/audioconvert/audioconvert.c: (float), (double), (float_hq), (double_hq), (audio_convert_get_func_index), (audio_convert_prepare_context), (audio_convert_convert): * gst/audioconvert/audioconvert.h: * gst/audioconvert/gstchannelmix.c: (gst_channel_mix_setup_matrix), (gst_channel_mix_mix_int), (gst_channel_mix_mix_float): * gst/audioconvert/gstchannelmix.h: * tests/check/elements/audioconvert.c: (GST_START_TEST): Add float as an intermediate format, as well as float mixing. Enable test that was failing before. Fixes #339837
Thanks, this fixes the above for me too. > There is no need to revert anything, because also prior to the 64bit changes > audioconvert would degrade quality when doing channel mixing of float. Just to be sure, I wasn't talking about a 'degrade in quality' but garbled output.
Corruption of the audio still exists when converting int to 64-bit float: gst-launch audiotestsrc ! audioconvert ! audio/x-raw-float,width=64 ! audioconvert ! alsasink
2007-02-28 Stefan Kost <ensonic@users.sf.net> * gst/audioconvert/audioconvert.c: (float), (double), (float_hq), (double_hq), (audio_convert_get_func_index), (check_default), (audio_convert_prepare_context), (audio_convert_convert): Also make valgrind happy and avoid copying data in some cases. 2007-02-28 Stefan Kost <ensonic@users.sf.net> * gst/audioconvert/audioconvert.c: (float), (double), (float_hq), (double_hq), (audio_convert_get_func_index), (audio_convert_prepare_context), (audio_convert_convert): * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_class_init), (gst_audio_convert_get_unit_size), (gst_audio_convert_transform_caps): * tests/check/elements/audioconvert.c: (GST_START_TEST), (audioconvert_suite): Don't run inplace if that overwrites source data as we go. Add more tests. Fixes #339837 even more.