[Bug 773073] New: audioconvert: endian conversion optimization
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Oct 17 08:49:29 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=773073
Bug ID: 773073
Summary: audioconvert: endian conversion optimization
Classification: Platform
Product: GStreamer
Version: 1.8.3
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-base
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: brain at jikos.cz
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Endian conversion in the audioconvert plugin is highly inefficient.
On Cortex A7 @ 500MHz it takes additional 7-8% CPU to convert S24LE to S24BE,
similar results can be observed for 16 and 32 bits. This is unacceptably high.
The current implementation performs 24->32 unpack, 24-bit quantization and
32->24 bit pack. It requires to allocate additional buffers as it cannot run in
place:
0:00:00.264383167 406 0x304320 LOG audio-converter
audio-converter.c:322:gst_audio_converter_update_config: new rate 0 -> 0
0:00:00.265950834 406 0x304320 INFO audio-converter
audio-converter.c:863:gst_audio_converter_new: unitsizes: 6 -> 6
0:00:00.266781125 406 0x304320 INFO audio-converter
audio-converter.c:566:chain_unpack: unpack format S24LE to S32LE
0:00:00.267911417 406 0x304320 INFO audio-converter
audio-converter.c:623:chain_mix: mix format S32LE, passthrough 1, in_channels
2, out_channels 2
0:00:00.268835292 406 0x304320 INFO audio-converter
audio-converter.c:674:chain_quantize: depth in 32, out 24
0:00:00.269497709 406 0x304320 INFO audio-converter
audio-converter.c:686:chain_quantize: using no dither and noise shaping
0:00:00.270300750 406 0x304320 INFO audio-converter
audio-converter.c:698:chain_quantize: quantize to 24 bits, dither 0, ns 0
0:00:00.271145542 406 0x304320 INFO audio-converter
audio-converter.c:721:chain_pack: pack format S32LE to S24BE
0:00:00.271963250 406 0x304320 INFO audio-converter
audio-converter.c:884:gst_audio_converter_new: do full conversion
0:00:00.272734250 406 0x304320 LOG audio-converter
audio-converter.c:747:setup_allocators: chain 0x3016c8: 1 1
0:00:00.273480709 406 0x304320 LOG audio-converter
audio-converter.c:747:setup_allocators: chain 0x301688: 1 0
0:00:00.277083625 406 0x304320 INFO audioconvert
gstaudioconvert.c:224:gst_audio_convert_get_unit_size:<audioconvert0> unit_size
= 6
0:00:00.278164584 406 0x304320 INFO audioconvert
gstaudioconvert.c:224:gst_audio_convert_get_unit_size:<audioconvert0> unit_size
= 6
Similar behaviour can be observed with 16 and 32 bits.
On the other hand with SIMD instructions the conversion can be done very
efficiently. E.g. only 3 NEON instructions are needed to convert eight 24-bit
values in place:
VLD3.8
VSWP d0,d2
VST3.8
or to convert sixteen 16-bit values in place:
VLD2.16
VSWP d0,d1
VST2.16
The attempt here is to discuss the best way how to integrate these instructions
into the audioconvert module, still keeping the portability. Also without SIMD
instructions the code needs to be optimized (e.g. to perform the conversion in
place).
Eventually the discussion should result into a patch.
--
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