diff options
Diffstat (limited to 'host/lib/convert/convert_with_tables.cpp')
-rw-r--r-- | host/lib/convert/convert_with_tables.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/host/lib/convert/convert_with_tables.cpp b/host/lib/convert/convert_with_tables.cpp index cd7773d4b..4d295fa01 100644 --- a/host/lib/convert/convert_with_tables.cpp +++ b/host/lib/convert/convert_with_tables.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011-2012 Ettus Research LLC +// Copyright 2011-2013 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -59,16 +59,16 @@ public: item32_t lookup(const sc16_t &in0, const sc16_t &in1){ if (swap){ //hope this compiles out, its a template constant return - (item32_t(_table[boost::uint16_t(in0.real())]) << 16) | - (item32_t(_table[boost::uint16_t(in0.imag())]) << 24) | - (item32_t(_table[boost::uint16_t(in1.real())]) << 0) | - (item32_t(_table[boost::uint16_t(in1.imag())]) << 8) ; + (item32_t(_table[boost::uint16_t(in1.real())]) << 16) | + (item32_t(_table[boost::uint16_t(in1.imag())]) << 24) | + (item32_t(_table[boost::uint16_t(in0.real())]) << 0) | + (item32_t(_table[boost::uint16_t(in0.imag())]) << 8) ; } return - (item32_t(_table[boost::uint16_t(in0.real())]) << 8) | - (item32_t(_table[boost::uint16_t(in0.imag())]) << 0) | - (item32_t(_table[boost::uint16_t(in1.real())]) << 24) | - (item32_t(_table[boost::uint16_t(in1.imag())]) << 16) ; + (item32_t(_table[boost::uint16_t(in1.real())]) << 8) | + (item32_t(_table[boost::uint16_t(in1.imag())]) << 0) | + (item32_t(_table[boost::uint16_t(in0.real())]) << 24) | + (item32_t(_table[boost::uint16_t(in0.imag())]) << 16) ; } private: @@ -196,27 +196,27 @@ static converter::sptr make_convert_sc16_item32_le_1_to_fc64_1(void){ } static converter::sptr make_convert_sc8_item32_be_1_to_fc32_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<float, uhd::ntohx, SHIFT_PAIR1>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<float, uhd::ntohx, SHIFT_PAIR0>()); } static converter::sptr make_convert_sc8_item32_be_1_to_fc64_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<double, uhd::ntohx, SHIFT_PAIR1>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<double, uhd::ntohx, SHIFT_PAIR0>()); } static converter::sptr make_convert_sc8_item32_le_1_to_fc32_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<float, uhd::wtohx, SHIFT_PAIR0>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<float, uhd::wtohx, SHIFT_PAIR1>()); } static converter::sptr make_convert_sc8_item32_le_1_to_fc64_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<double, uhd::wtohx, SHIFT_PAIR0>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<double, uhd::wtohx, SHIFT_PAIR1>()); } static converter::sptr make_convert_sc8_item32_be_1_to_sc16_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<s16_t, uhd::ntohx, SHIFT_PAIR1>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<s16_t, uhd::ntohx, SHIFT_PAIR0>()); } static converter::sptr make_convert_sc8_item32_le_1_to_sc16_1(void){ - return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<s16_t, uhd::wtohx, SHIFT_PAIR0>()); + return converter::sptr(new convert_sc8_item32_1_to_fcxx_1<s16_t, uhd::wtohx, SHIFT_PAIR1>()); } static converter::sptr make_convert_sc16_1_to_sc8_item32_be_1(void){ |