aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert/convert_with_tables.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-08-28 17:07:07 -0700
committerJosh Blum <josh@joshknows.com>2013-08-28 17:07:07 -0700
commit9f993843e52b1da877fd579de499e492f602ce81 (patch)
tree7a8e28f0f7f84ae22da44712ea3b76507cc0a1b6 /host/lib/convert/convert_with_tables.cpp
parent96e50aebb7a4b3f98aac3c11aa1a3f06c14c0849 (diff)
downloaduhd-9f993843e52b1da877fd579de499e492f602ce81.tar.gz
uhd-9f993843e52b1da877fd579de499e492f602ce81.tar.bz2
uhd-9f993843e52b1da877fd579de499e492f602ce81.zip
convert: sc8 swap for vita compliance
Diffstat (limited to 'host/lib/convert/convert_with_tables.cpp')
-rw-r--r--host/lib/convert/convert_with_tables.cpp30
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){