mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
tests/check/elements/audioconvert.c: Add small test for 32bit float <=> 64bit float conversion (works only one way so...
Original commit message from CVS: * tests/check/elements/audioconvert.c: (test_float_conversion): Add small test for 32bit float <=> 64bit float conversion (works only one way so far, 32=>64 produces structured noise).
This commit is contained in:
parent
b7cf10eb6d
commit
7439949980
2 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-02-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* tests/check/elements/audioconvert.c: (test_float_conversion):
|
||||
Add small test for 32bit float <=> 64bit float conversion (works
|
||||
only one way so far, 32=>64 produces structured noise).
|
||||
|
||||
2007-02-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/audioconvert/gstaudioconvert.c:
|
||||
|
|
|
@ -37,7 +37,7 @@ GstPad *mysrcpad, *mysinkpad;
|
|||
"rate = (int) [ 1, MAX ], " \
|
||||
"channels = (int) [ 1, 8 ], " \
|
||||
"endianness = (int) BYTE_ORDER, " \
|
||||
"width = (int) 32;" \
|
||||
"width = (int) { 32, 64 };" \
|
||||
"audio/x-raw-int, " \
|
||||
"rate = (int) [ 1, MAX ], " \
|
||||
"channels = (int) [ 1, 8 ], " \
|
||||
|
@ -463,6 +463,23 @@ GST_START_TEST (test_float_conversion)
|
|||
"BYTE_ORDER", 32), out, get_int_caps (1, "BYTE_ORDER", 16, 16, TRUE)
|
||||
);
|
||||
}
|
||||
|
||||
/* 64-bit float <-> 32-bit float */
|
||||
{
|
||||
gdouble in[] = { 0.0, 1.0, -1.0, 0.5, -0.5 };
|
||||
gfloat out[] = { 0.0, 1.0, -1.0, 0.5, -0.5 };
|
||||
|
||||
RUN_CONVERSION ("64 float to 32 float",
|
||||
in, get_float_caps (1, "BYTE_ORDER", 64),
|
||||
out, get_float_caps (1, "BYTE_ORDER", 32));
|
||||
|
||||
/* FIXME: this fails */
|
||||
#if 0
|
||||
RUN_CONVERSION ("32 float to 64 float",
|
||||
out, get_float_caps (1, "BYTE_ORDER", 32),
|
||||
in, get_float_caps (1, "BYTE_ORDER", 64));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue