Commit graph

12 commits

Author SHA1 Message Date
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Tom Tsou
0e9f204029 convert: Add SSE implementation for sc12
Implementation uses SSSE3 intructions to perform 12-bit
sample pack/unpack operations to/from standard 16 and 32
bit host values. Input/output shuffle orderings for a
single 128-bit SSE register with 16-bit integers shown
below.

   16-bit interleaved I/Q
  ---------------------------------------
 | Q3 | I3 | Q2 | I2 | Q1 | I1 | Q0 | I0 | Input
  ---------------------------------------
 | 127                                 0 |

     12-bit packed I/Q byteswapped
      -----------------------
     |   I0   |   Q0   |  I1 | 0
     |-----------------------|
     | I1 |  Q1  |  I2  | Q2 |             Output
     |-----------------------|
     | Q2  |   I3   |   Q3   |
     |-----------------------|
     |        Unused         | 3
      -----------------------
     31                     0

Fixes: #1740, #966
Related: #1739
2017-07-25 10:15:37 -07:00
Tom Tsou
f21874e68a convert: Add sc12-sc16 converters
Create missing sc12-sc16 and sc16-sc12 type converters. To avoid
replicating the full sc12 converter class object, overload the
converter calls with C++11 std::enable_if metafunctions. When
used with std::is_floating and std::is_integral templates, this
allow a single template interface with compile time function
selection and static type checking.

Note the below std::enable_if interface is confusing, but quite
effective in this case.

  typename enable_if<is_floating_point<type>::value>::type* = NULL

Fixes: #966
Related: #967, #1721
2017-07-18 12:45:56 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Martin Braun
99c2730bc9 Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
  stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
  compilers support that).
2016-11-08 08:02:22 -08:00
Martin Braun
9caf20c299 converters: Clarifying comment re packing 2016-06-22 19:08:19 -07:00
Martin Braun
12aed42c4b convert: Removed default-all-lines 12-bit packer 2015-01-14 10:15:40 +01:00
Tom Tsou
7b61f4bb1a convert: Limit sc12 converter buffer overwrite
This patch addresses issue #648 "B200: TX with SC12 format and MIMO".

The observed MIMO header corruption was caused by overwriting the
end of the packed 12-bit sample output buffer. The overwrite was due to
the converter call always writing out 4 complex samples even if less
than 4 samples were available. The extra samples would corrupt data with
zero padding.

Avoid the overwrite condition by only writing the minimum number of
32-bit lines necessary rather than the entire 12 byte struct.

Samples        32-bit lines
  1                 1
  2                 2
  3                 3
  4                 3

Signed-off-by: Tom Tsou <tom@tsou.cc>
2015-01-14 10:15:40 +01:00
Ben Hilburn
178ac3f1c9 Merging USRP X300 and X310 support!! 2014-02-04 11:04:07 -08:00
Ben Hilburn
9e47ad607b Squashed merge of Coverity fixes. 2013-11-27 12:11:23 -08:00
Josh Blum
2d4c77489f convert: added sc12 and fc32 converters 2013-08-28 17:07:36 -07:00