From: Sebastian Dröge Date: Fri, 1 Oct 2010 08:42:27 +0000 (+0200) Subject: volume: Improve f32 scaling by using only a single array X-Git-Tag: 1.19.3~511^2~7996 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1bf1ba843e1a14445135f7da9118bdeb00471e1;p=platform%2Fupstream%2Fgstreamer.git volume: Improve f32 scaling by using only a single array Passing the same array as dest and src is invalid anyway because they're maked with the restrict qualifier. --- diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index c37eeea..fab1787 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -497,8 +497,6 @@ gst_volume_init (GstVolume * self, GstVolumeClass * g_class) gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (self), TRUE); } -#define USE_ORC - static void volume_process_double (GstVolume * self, gpointer bytes, guint n_bytes) { @@ -536,7 +534,7 @@ volume_process_float (GstVolume * self, gpointer bytes, guint n_bytes) gfloat *data = (gfloat *) bytes; guint num_samples = n_bytes / sizeof (gfloat); - orc_scalarmultiply_f32_ns (data, data, self->current_volume, num_samples); + orc_scalarmultiply_f32_ns (data, self->current_volume, num_samples); } static void diff --git a/gst/volume/gstvolumeorc.orc b/gst/volume/gstvolumeorc.orc index 8e100a4..2de5566 100644 --- a/gst/volume/gstvolumeorc.orc +++ b/gst/volume/gstvolumeorc.orc @@ -3,10 +3,9 @@ .function orc_scalarmultiply_f32_ns .dest 4 d1 float -.source 4 s1 float .floatparam 4 p1 -mulf d1, s1, p1 +mulf d1, d1, p1 .function orc_process_int16