aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-01-12 14:25:17 +0100
committerMartin Braun <martin.braun@ettus.com>2015-01-12 14:25:17 +0100
commitd15fe9bc22efe4d0499a9108659e32c93e0a2848 (patch)
tree2d23259d495e8764020267b775adaaac3beb92ba /host/lib/convert
parentd9e7a42d511a706e124ac161073416c1809e1bc7 (diff)
parent0b9b070515eaae6a631095f2d08d664e07ee4140 (diff)
downloaduhd-d15fe9bc22efe4d0499a9108659e32c93e0a2848.tar.gz
uhd-d15fe9bc22efe4d0499a9108659e32c93e0a2848.tar.bz2
uhd-d15fe9bc22efe4d0499a9108659e32c93e0a2848.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/convert')
-rw-r--r--host/lib/convert/convert_unpack_sc12.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/convert/convert_unpack_sc12.cpp b/host/lib/convert/convert_unpack_sc12.cpp
index a2aec2ae5..94b415355 100644
--- a/host/lib/convert/convert_unpack_sc12.cpp
+++ b/host/lib/convert/convert_unpack_sc12.cpp
@@ -62,17 +62,17 @@ void convert_sc12_item32_3_to_star_4
const boost::uint64_t line12 = (boost::uint64_t(line1) << 32) | line2;
//step 1: shift out and mask off the individual numbers
- const type i0 = type(boost::int16_t(line0 >> 16)*scalar);
- const type q0 = type(boost::int16_t(line0 >> 4)*scalar);
+ const type i0 = type(boost::int16_t((line0 >> 16) & 0xfff0)*scalar);
+ const type q0 = type(boost::int16_t((line0 >> 4) & 0xfff0)*scalar);
- const type i1 = type(boost::int16_t(line01 >> 24)*scalar);
- const type q1 = type(boost::int16_t(line1 >> 12)*scalar);
+ const type i1 = type(boost::int16_t((line01 >> 24) & 0xfff0)*scalar);
+ const type q1 = type(boost::int16_t((line1 >> 12) & 0xfff0)*scalar);
- const type i2 = type(boost::int16_t(line1 >> 0)*scalar);
- const type q2 = type(boost::int16_t(line12 >> 20)*scalar);
+ const type i2 = type(boost::int16_t((line1 >> 0) & 0xfff0)*scalar);
+ const type q2 = type(boost::int16_t((line12 >> 20) & 0xfff0)*scalar);
- const type i3 = type(boost::int16_t(line2 >> 8)*scalar);
- const type q3 = type(boost::int16_t(line2 << 4)*scalar);
+ const type i3 = type(boost::int16_t((line2 >> 8) & 0xfff0)*scalar);
+ const type q3 = type(boost::int16_t((line2 << 4) & 0xfff0)*scalar);
//step 2: load the outputs
out0 = std::complex<type>(i0, q0);