diff options
| -rw-r--r-- | host/lib/convert/convert_unpack_sc12.cpp | 16 | 
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);  | 
