From 3ab4c81e9cdcdc42118672fb0d38690db8f2478f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 31 Jan 2016 23:37:46 +0100 Subject: Add comments in PhaseReference --- src/PhaseReference.cpp | 22 +++++++++++++++++----- src/PhaseReference.h | 1 + 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'src') 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 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 + -- cgit v1.2.3