summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Foster2011-01-26 15:28:35 -0800
committerNick Foster2011-01-26 15:28:35 -0800
commit2a4c4f89187bf75caa34c7bc52fc32310a75c9f2 (patch)
treef19b67ddd4b46d80f82b1df39aae6802ec1c2234
parentf47466012c733526e04f8ceeb66a3677eec38cd9 (diff)
downloadgnuradio-2a4c4f89187bf75caa34c7bc52fc32310a75c9f2.tar.gz
gnuradio-2a4c4f89187bf75caa34c7bc52fc32310a75c9f2.tar.bz2
gnuradio-2a4c4f89187bf75caa34c7bc52fc32310a75c9f2.zip
Volk: fixed volk_8i_s32f_convert_32f_a16_orc_impl.
-rw-r--r--volk/include/volk/volk_8i_s32f_convert_32f_a16.h3
-rw-r--r--volk/lib/testqa.cc6
-rw-r--r--volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc6
3 files changed, 9 insertions, 6 deletions
diff --git a/volk/include/volk/volk_8i_s32f_convert_32f_a16.h b/volk/include/volk/volk_8i_s32f_convert_32f_a16.h
index d5c8eeb51..99a24ec10 100644
--- a/volk/include/volk/volk_8i_s32f_convert_32f_a16.h
+++ b/volk/include/volk/volk_8i_s32f_convert_32f_a16.h
@@ -96,7 +96,8 @@ static inline void volk_8i_s32f_convert_32f_a16_generic(float* outputVector, con
*/
extern void volk_8i_s32f_convert_32f_a16_orc_impl(float* outputVector, const int8_t* inputVector, const float scalar, unsigned int num_points);
static inline void volk_8i_s32f_convert_32f_a16_orc(float* outputVector, const int8_t* inputVector, const float scalar, unsigned int num_points){
- volk_8i_s32f_convert_32f_a16_orc_impl(outputVector, inputVector, scalar, num_points);
+ float invscalar = 1.0 / scalar;
+ volk_8i_s32f_convert_32f_a16_orc_impl(outputVector, inputVector, invscalar, num_points);
}
#endif /* LV_HAVE_ORC */
diff --git a/volk/lib/testqa.cc b/volk/lib/testqa.cc
index 4cef7b443..d6b9e347d 100644
--- a/volk/lib/testqa.cc
+++ b/volk/lib/testqa.cc
@@ -49,8 +49,8 @@ BOOST_AUTO_TEST_CASE(volk_test_all) {
VOLK_RUN_TESTS(volk_32f_s32f_convert_32i_u, 1, 2<<31, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_convert_64f_a16, 1e-4, 0, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_convert_64f_u, 1e-4, 0, 2046, 10000);
- VOLK_RUN_TESTS(volk_32f_s32f_convert_8i_a16, 0, 128, 2046, 10000);
- VOLK_RUN_TESTS(volk_32f_s32f_convert_8i_u, 0, 128, 2046, 10000);
+ VOLK_RUN_TESTS(volk_32f_s32f_convert_8i_a16, 1, 128, 2046, 10000);
+ VOLK_RUN_TESTS(volk_32f_s32f_convert_8i_u, 1, 128, 2046, 10000);
// VOLK_RUN_TESTS(volk_32fc_s32f_x2_power_spectral_density_32f_a16, 1e-4, 2046, 10000);
VOLK_RUN_TESTS(volk_32fc_s32f_power_spectrum_32f_a16, 1e-4, 0, 2046, 10000);
VOLK_RUN_TESTS(volk_32fc_x2_square_dist_32f_a16, 1e-4, 0, 2046, 10000);
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(volk_test_all) {
VOLK_RUN_TESTS(volk_32f_x2_dot_prod_32f_u, 1e-4, 0, 2046, 10000);
// VOLK_RUN_TESTS(volk_32f_s32f_32f_fm_detect_32f_a16, 1e-4, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_index_max_16u_a16, 0, 0, 2046, 10000);
- VOLK_RUN_TESTS(volk_32f_x2_s32f_interleave_16ic_a16, 0, 32768, 2046, 10000);
+ VOLK_RUN_TESTS(volk_32f_x2_s32f_interleave_16ic_a16, 1, 32768, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_x2_interleave_32fc_a16, 0, 0, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_x2_max_32f_a16, 1e-4, 0, 2046, 10000);
VOLK_RUN_TESTS(volk_32f_x2_min_32f_a16, 1e-4, 0, 2046, 10000);
diff --git a/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc b/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc
index 4e33f7b3b..8f6e157e9 100644
--- a/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc
+++ b/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc
@@ -1,9 +1,11 @@
.function volk_8i_s32f_convert_32f_a16_orc_impl
-.source 2 src
+.source 1 src
.dest 4 dst
.floatparam 4 scalar
.temp 4 flsrc
.temp 4 lsrc
-convswl lsrc, src
+.temp 2 ssrc
+convsbw ssrc, src
+convswl lsrc, ssrc
convlf flsrc, lsrc
mulf dst, flsrc, scalar