SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
leansdr::s2_plscodes< T > Struct Template Reference

#include <dvbs2.h>

Public Member Functions

 s2_plscodes ()
 

Public Attributes

uint64_t codewords [COUNT]
 
complex< T > symbols [COUNT][LENGTH]
 

Static Public Attributes

static const int COUNT = 128
 
static const int LENGTH = 64
 
static const uint64_t SCRAMBLING = 0x719d83c953422dfa
 

Detailed Description

template<typename T>
struct leansdr::s2_plscodes< T >

Definition at line 76 of file dvbs2.h.

Constructor & Destructor Documentation

◆ s2_plscodes()

template<typename T>
leansdr::s2_plscodes< T >::s2_plscodes ( )
inline

Definition at line 83 of file dvbs2.h.

References leansdr::cstln_amp, i, leansdr::complex< T >::im, leansdr::s2_sof< T >::LENGTH, and leansdr::complex< T >::re.

84  {
85  uint32_t G[6] = {0x55555555,
86  0x33333333,
87  0x0f0f0f0f,
88  0x00ff00ff,
89  0x0000ffff,
90  0xffffffff};
91  for (int index = 0; index < COUNT; ++index)
92  {
93  uint32_t y = 0;
94  for (int row = 0; row < 6; ++row)
95  if ((index >> (6 - row)) & 1)
96  y ^= G[row];
97  uint64_t code = 0;
98  for (int bit = 31; bit >= 0; --bit)
99  {
100  int yi = (y >> bit) & 1;
101  if (index & 1)
102  code = (code << 2) | (yi << 1) | (yi ^ 1);
103  else
104  code = (code << 2) | (yi << 1) | yi;
105  }
106  // Scrambling
107  code ^= SCRAMBLING;
108  // Store precomputed codeword.
109  codewords[index] = code;
110  // Also store as symbols.
111  for (int i = 0; i < LENGTH; ++i)
112  {
113  int yi = (code >> (LENGTH - 1 - i)) & 1;
114  int nyi = yi ^ (i & 1);
115  symbols[index][i].re = cstln_amp * (1 - 2 * nyi) / sqrtf(2);
116  symbols[index][i].im = cstln_amp * (1 - 2 * yi) / sqrtf(2);
117  }
118  }
119  }
static const uint64_t SCRAMBLING
Definition: dvbs2.h:120
complex< T > symbols[COUNT][LENGTH]
Definition: dvbs2.h:82
static const int LENGTH
Definition: dvbs2.h:80
unsigned int uint32_t
Definition: rtptypes_win.h:46
int32_t i
Definition: decimators.h:244
const float cstln_amp
Definition: sdr.h:404
static const int COUNT
Definition: dvbs2.h:79
uint64_t codewords[COUNT]
Definition: dvbs2.h:81
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48

Member Data Documentation

◆ codewords

template<typename T>
uint64_t leansdr::s2_plscodes< T >::codewords[COUNT]

Definition at line 81 of file dvbs2.h.

◆ COUNT

template<typename T>
const int leansdr::s2_plscodes< T >::COUNT = 128
static

Definition at line 79 of file dvbs2.h.

◆ LENGTH

template<typename T>
const int leansdr::s2_plscodes< T >::LENGTH = 64
static

Definition at line 80 of file dvbs2.h.

◆ SCRAMBLING

template<typename T>
const uint64_t leansdr::s2_plscodes< T >::SCRAMBLING = 0x719d83c953422dfa
static

Definition at line 120 of file dvbs2.h.

◆ symbols

template<typename T>
complex<T> leansdr::s2_plscodes< T >::symbols[COUNT][LENGTH]

Definition at line 82 of file dvbs2.h.


The documentation for this struct was generated from the following file: