diff options
author | Nick Foster <nick@ettus.com> | 2011-05-23 21:49:28 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-14 17:27:46 -0700 |
commit | 3dca19a3e7f56c64423789ee025f16150b1a2cdb (patch) | |
tree | 6d168b13e0a73c9606dc168752879ee8bbb86498 /host/lib | |
parent | 75d0a41c3a7a2c7cd62a6c6b27e648d5617d488e (diff) | |
download | uhd-3dca19a3e7f56c64423789ee025f16150b1a2cdb.tar.gz uhd-3dca19a3e7f56c64423789ee025f16150b1a2cdb.tar.bz2 uhd-3dca19a3e7f56c64423789ee025f16150b1a2cdb.zip |
UHD: Fixed convert_test (scalars backwards), fixed Orc conversions (endianness backwards).
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/convert/convert_orc.orc | 13 | ||||
-rw-r--r-- | host/lib/convert/convert_with_orc.cpp | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/host/lib/convert/convert_orc.orc b/host/lib/convert/convert_orc.orc index c1c3d3c24..83e63f22c 100644 --- a/host/lib/convert/convert_orc.orc +++ b/host/lib/convert/convert_orc.orc @@ -11,3 +11,16 @@ x2 convfl converted, scaled x2 convlw short, converted swapl short, short x2 swapw dst, short + +.function _convert_fc32_1_to_item32_1_bswap_orc +.source 8 src +.dest 4 dst +.floatparam 4 scalar +.temp 8 scaled +.temp 8 converted +.temp 4 short + +x2 mulf scaled, src, scalar +x2 convfl converted, scaled +x2 convlw short, converted +x2 swapw dst, short diff --git a/host/lib/convert/convert_with_orc.cpp b/host/lib/convert/convert_with_orc.cpp index dded22b9d..2d50351e4 100644 --- a/host/lib/convert/convert_with_orc.cpp +++ b/host/lib/convert/convert_with_orc.cpp @@ -23,8 +23,13 @@ using namespace uhd::convert; extern "C" { extern void _convert_fc32_1_to_item32_1_nswap_orc(void *, const void *, float, int); +extern void _convert_fc32_1_to_item32_1_bswap_orc(void *, const void *, float, int); } DECLARE_CONVERTER(convert_fc32_1_to_item32_1_nswap, PRIORITY_LIBORC){ _convert_fc32_1_to_item32_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); } + +DECLARE_CONVERTER(convert_fc32_1_to_item32_1_bswap, PRIORITY_LIBORC){ + _convert_fc32_1_to_item32_1_bswap_orc(outputs[0], inputs[0], scale_factor, nsamps); +} |