Commit c1bf1ba8 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

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.
parent 5c2c727f
......@@ -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
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment