volume: Improve f32 scaling by using only a single array
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 1 Oct 2010 08:42:27 +0000 (10:42 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 1 Oct 2010 08:45:24 +0000 (10:45 +0200)
Passing the same array as dest and src is invalid anyway because
they're maked with the restrict qualifier.

gst/volume/gstvolume.c
gst/volume/gstvolumeorc.orc

index c37eeea..fab1787 100644 (file)
@@ -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
index 8e100a4..2de5566 100644 (file)
@@ -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