summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PhaseReference.cpp22
-rw-r--r--src/PhaseReference.h1
2 files changed, 18 insertions, 5 deletions
diff --git a/src/PhaseReference.cpp b/src/PhaseReference.cpp
index d9d9efc..840917f 100644
--- a/src/PhaseReference.cpp
+++ b/src/PhaseReference.cpp
@@ -29,18 +29,30 @@
typedef std::complex<float> complexf;
-
+/* ETSI EN 300 401 Table 43 (Clause 14.3.2)
+ * Contains h_{i,k} values
+ */
const unsigned char PhaseReference::d_h[4][32] = {
- { 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1,
+ /* h0 */ { 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1,
0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1 },
- { 0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0,
+ /* h1 */ { 0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0,
0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0 },
- { 0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3,
+ /* h2 */ { 0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3,
0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3 },
- { 0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2,
+ /* h3 */ { 0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2,
0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2 }
};
+/* EN 300 401, Clause 14.3.2:
+ * \phi_k = (\pi / 2) * (h_{i,k-k'} + n
+ *
+ * where "The indices i, k' and the parameter n are specified as functions of
+ * the carrier index k for the four transmission modes in tables 44 to 47."
+ *
+ * Tables 44 to 47 describe the frequency interleaving done in
+ * FrequencyInterleaver.
+ */
+
PhaseReference::PhaseReference(unsigned int dabmode) :
ModCodec(ModFormat(0), ModFormat(0)),
diff --git a/src/PhaseReference.h b/src/PhaseReference.h
index b4eec82..12ac9c4 100644
--- a/src/PhaseReference.h
+++ b/src/PhaseReference.h
@@ -56,3 +56,4 @@ protected:
};
#endif // PHASE_REFERENCE_H
+