[Bug 773073] audioconvert: endian conversion optimization

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Oct 22 07:59:01 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773073

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #338215|none                        |reviewed
             status|                            |

--- Comment #19 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 338215:
 --> (https://bugzilla.gnome.org/review?bug=773073&attachment=338215)

Generally looks good. Do you have any questions about the in-place
implementation?


For the ORC code, for 32 bit you would basically do:

> .function audio_orc_swap_endianness_s32
> .dest 4 d1 gint32
> .source 4 s1 gint32
>
> swapl d1, s1

and then could just call that function. The autogenerated C code should be
equivalent to what you do, but it would end up with optimized assembly for SSE
and NEON for example. Which hopefully is faster than what the compiler
optimizes your code too. Should probably be measured also.

::: gst-libs/gst/audio/audio-converter.c
@@ +923,3 @@
+    z = GUINT32_SWAP_LE_BE (in[2]);
+
+#ifdef WORDS_BIGENDIAN

G_BYTE_ORDER == G_BIG_ENDIAN

::: gst-libs/gst/audio/audio-format.h
@@ +267,3 @@
 #define GST_AUDIO_FORMAT_INFO_DEPTH(info)            ((info)->depth)

+#define GST_AUDIO_FORMAT_IS_ENDIAN_CONVERSION(info1, info2) \

This should probably be internal, not public API

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