mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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.
This commit is contained in:
parent
5c2c727f84
commit
c1bf1ba843
2 changed files with 2 additions and 5 deletions
|
@ -497,8 +497,6 @@ gst_volume_init (GstVolume * self, GstVolumeClass * g_class)
|
||||||
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (self), TRUE);
|
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (self), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define USE_ORC
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
volume_process_double (GstVolume * self, gpointer bytes, guint n_bytes)
|
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;
|
gfloat *data = (gfloat *) bytes;
|
||||||
guint num_samples = n_bytes / sizeof (gfloat);
|
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
|
static void
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
|
|
||||||
.function orc_scalarmultiply_f32_ns
|
.function orc_scalarmultiply_f32_ns
|
||||||
.dest 4 d1 float
|
.dest 4 d1 float
|
||||||
.source 4 s1 float
|
|
||||||
.floatparam 4 p1
|
.floatparam 4 p1
|
||||||
|
|
||||||
mulf d1, s1, p1
|
mulf d1, d1, p1
|
||||||
|
|
||||||
|
|
||||||
.function orc_process_int16
|
.function orc_process_int16
|
||||||
|
|
Loading…
Reference in a new issue