[Bug 687378] Optimize audioconvert on simple endian conversions
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Nov 2 01:28:50 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=687378
GStreamer | gst-plugins-base | git
Sebastian Dröge <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #227872|none |needs-work
status| |
--- Comment #3 from Sebastian Dröge <slomo at circular-chaos.org> 2012-11-02 08:28:44 UTC ---
Review of attachment 227872:
--> (https://bugzilla.gnome.org/review?bug=687378&attachment=227872)
::: gst/audioconvert/audioconvert.c
@@ +682,3 @@
+ /* in some cases we only need to do endian conversion.
+ * This is a minor optimization to catch that case. */
+ ctx->fast_endian_conversion = NULL;
Maybe call this ctx->fast_path?
@@ +685,3 @@
+ if (ctx->mix_passthrough &&
+ GST_AUDIO_FORMAT_INFO_IS_INTEGER (in->finfo) &&
+ GST_AUDIO_FORMAT_INFO_IS_INTEGER (out->finfo) &&
This will work for floats too
@@ +695,3 @@
+ } else if (in_depth == 32 && out_depth == 32) {
+ ctx->fast_endian_conversion =
+ (AudioConvertFastEndian) audio_convert_orc_32_swap;
For S32 the fast paths shouldn't be that useful. audioconvert will already do
exactly that with the normal code path.
@@ +700,3 @@
+ GST_AUDIO_FORMAT_INFO_IS_SIGNED (in->finfo)) {
+ ctx->fast_endian_conversion =
+ (AudioConvertFastEndian) audio_convert_orc_s16_s32_swap;
This works for unsigned too, and for output_endianness!=G_BYTE_ORDER. Also for
$something to S32 native-endianness the normal audioconvert code path will
already do exactly this.
::: gst/audioconvert/gstaudioconvertorc.orc
@@ +602,3 @@
+swapl d1, s1
+
+.function audio_convert_orc_s16_s32_swap
There should already be a function that converts S16 non-host-endianness to S32
host-endianness
--
Configure bugmail: https://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