aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-01-13 09:26:43 +0100
committerMartin Braun <martin.braun@ettus.com>2015-01-14 10:15:40 +0100
commit12aed42c4b472f84003736e85565caafd093a320 (patch)
treec7f62e2989c6c943476b3ad163e308f00b37284c /host/lib/convert
parent7b61f4bb1a3c02acbab083000fcd9d62f79708a2 (diff)
downloaduhd-12aed42c4b472f84003736e85565caafd093a320.tar.gz
uhd-12aed42c4b472f84003736e85565caafd093a320.tar.bz2
uhd-12aed42c4b472f84003736e85565caafd093a320.zip
convert: Removed default-all-lines 12-bit packer
Diffstat (limited to 'host/lib/convert')
-rw-r--r--host/lib/convert/convert_pack_sc12.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/host/lib/convert/convert_pack_sc12.cpp b/host/lib/convert/convert_pack_sc12.cpp
index 4f2aa3a64..322097e34 100644
--- a/host/lib/convert/convert_pack_sc12.cpp
+++ b/host/lib/convert/convert_pack_sc12.cpp
@@ -36,6 +36,7 @@ enum item32_sc12_3x_enable {
CONVERT12_LINE0 = 0x01,
CONVERT12_LINE1 = 0x02,
CONVERT12_LINE2 = 0x04,
+ CONVERT12_LINE_ALL = 0x07,
};
/*
@@ -89,24 +90,6 @@ void convert_star_4_to_sc12_item32_3
output.line2 = towire(line2);
}
-/*
- * Packed 12-bit converter with all lines enabled
- */
-template <typename type, towire32_type towire>
-void convert_star_4_to_sc12_item32_3
-(
- const std::complex<type> &in0,
- const std::complex<type> &in1,
- const std::complex<type> &in2,
- const std::complex<type> &in3,
- item32_sc12_3x &output,
- const double scalar
-)
-{
- int enable = CONVERT12_LINE0 | CONVERT12_LINE1 | CONVERT12_LINE2;
- convert_star_4_to_sc12_item32_3<type, towire>(in0, in1, in2, in3, enable, output, scalar);
-}
-
template <typename type, towire32_type towire>
struct convert_star_1_to_sc12_item32_1 : public converter
{
@@ -157,7 +140,8 @@ struct convert_star_1_to_sc12_item32_1 : public converter
convert_star_4_to_sc12_item32_3<type, towire>(0, 0, input[0], input[1], enable, output[o++], _scalar);
break;
case 3:
- convert_star_4_to_sc12_item32_3<type, towire>(0, input[0], input[1], input[2], output[o++], _scalar);
+ enable = CONVERT12_LINE2 | CONVERT12_LINE1 | CONVERT12_LINE0;
+ convert_star_4_to_sc12_item32_3<type, towire>(0, input[0], input[1], input[2], enable, output[o++], _scalar);
break;
}
i += head_samps;
@@ -165,7 +149,7 @@ struct convert_star_1_to_sc12_item32_1 : public converter
//convert the body
while (i+3 < nsamps)
{
- convert_star_4_to_sc12_item32_3<type, towire>(input[i+0], input[i+1], input[i+2], input[i+3], output[o], _scalar);
+ convert_star_4_to_sc12_item32_3<type, towire>(input[i+0], input[i+1], input[i+2], input[i+3], CONVERT12_LINE_ALL, output[o], _scalar);
o++; i += 4;
}
@@ -184,7 +168,8 @@ struct convert_star_1_to_sc12_item32_1 : public converter
convert_star_4_to_sc12_item32_3<type, towire>(input[i+0], input[i+1], 0, 0, enable, output[o], _scalar);
break;
case 3:
- convert_star_4_to_sc12_item32_3<type, towire>(input[i+0], input[i+1], input[i+2], 0, output[o], _scalar);
+ enable = CONVERT12_LINE0 | CONVERT12_LINE1 | CONVERT12_LINE2;
+ convert_star_4_to_sc12_item32_3<type, towire>(input[i+0], input[i+1], input[i+2], 0, enable, output[o], _scalar);
break;
}
}