diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-04 11:29:53 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-04 11:29:53 +0100 |
commit | c509b9af6e043220a5949a86e3d7121728b23429 (patch) | |
tree | fc2bf098bdc7f4fa1db2d9f2b11fe438394fe759 | |
parent | a9300929a1291b12c5a6cabb0f70ac7ae0f1681e (diff) | |
download | dabmux-c509b9af6e043220a5949a86e3d7121728b23429.tar.gz dabmux-c509b9af6e043220a5949a86e3d7121728b23429.tar.bz2 dabmux-c509b9af6e043220a5949a86e3d7121728b23429.zip |
Clarify TIST setting
-rw-r--r-- | src/DabMultiplexer.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index 2b2acd9..399084a 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -1752,10 +1752,22 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu edi_tagDETI.tsta = tist->TIST; - timestamp += 3 << 17; - if (timestamp > 0xf9ffff) + /* Coding of the TIST, according to ETS 300 799 Annex C + + Bit number b0(MSb)..b6 b7..b9 b10..b17 b18..b20 b21..b23(LSb) + Bit number b23(MSb)..b17 b16..b14 b13..b6 b5..b3 b2..b0(LSb) + as uint32_t + Width 7 3 8 3 3 + Timestamp level 1 2 3 4 5 + Valid range [0..124], 127 [0..7] [0..255] [0..7] [0..7] + Approximate 8 ms 1 ms 3,91 us 488 ns 61 ns + time resolution + */ + + timestamp += 24 << 13; // Shift 24ms by 13 to Timestamp level 2 + if (timestamp > 0xf9FFff) { - timestamp -= 0xfa0000; + timestamp -= 0xfa0000; // Substract 16384000, corresponding to one second // Also update MNSC time for next frame MNSC_increment_time = true; |