Commit 74399499 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

tests/check/elements/audioconvert.c: Add small test for 32bit float <=> 64bit...

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).
parent b7cf10eb
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;
......
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