[Bug 739354] New: program-c: loadpq broken on big-endian systems (makes gst volume tests fail for f64)
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Oct 29 06:38:06 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=739354
GStreamer | orc | git
Summary: program-c: loadpq broken on big-endian systems (makes
gst volume tests fail for f64)
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: orc
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: t.i.m at zen.co.uk
QAContact: gstreamer-bugs at lists.freedesktop.org
CC: ds at schleef.org
GNOME version: ---
In -base/tests/check/elements/volume.c the f64 format tests fail on powerpc
because orc generates broken backup code:
-base/gst/volume/tmp-orc.c:
static void
_backup_volume_orc_scalarmultiply_f64_ns (OrcExecutor * ORC_RESTRICT ex)
{
...
orc_union64 var33;
/* 1: loadpq */
var33.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 +
(ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
for (i = 0; i < n; i++) {
...
}
}
void
volume_orc_scalarmultiply_f64_ns (double * ORC_RESTRICT d1, double p1, int n)
{
...
ex->arrays[ORC_VAR_A2] = c;
ex->program = 0;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
{
orc_union64 tmp;
tmp.f = p1;
ex->params[ORC_VAR_P1] = tmp.x2[0]; <====
ex->params[ORC_VAR_T1] = tmp.x2[1]; <====
}
....
}
It doesn't save/restore the 64-bit double by which to multiply all the samples
with correctly on big-endian architectures, the higher/upper 32-bits are
swapped, which makes everything something around 0 after processing.
What I'm not sure about is whether the value is stored incorrectly, or read
incorrectly.
There's a comment in struct _OrcExecutor saying
/* high half of params is stored in params[ORC_VAR_T1..] */
which I would interpret such that the values should be stored differently on
big-endian. (But then I don't really understand why they're stored that way via
.x2 in the first place I suppose).
--
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