[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/06: gr-dtv: Add DVB-T2 transmitter.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/06: gr-dtv: Add DVB-T2 transmitter. |
Date: |
Sun, 22 Mar 2015 15:59:44 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit a1e3f6ce0fb58de8e1ba634d32844cd62c400508
Author: Ron Economos <address@hidden>
Date: Tue Mar 10 16:22:38 2015 -0700
gr-dtv: Add DVB-T2 transmitter.
---
gr-dtv/examples/README.dvbt2 | 11 +
gr-dtv/examples/vv003-cr23.grc | 2161 +++++++++++++
gr-dtv/examples/vv009-4kfft.grc | 2161 +++++++++++++
gr-dtv/examples/vv018-miso.grc | 2567 +++++++++++++++
gr-dtv/grc/CMakeLists.txt | 9 +
gr-dtv/grc/dtv_block_tree.xml | 12 +
gr-dtv/grc/dtv_dvbt2_cellinterleaver_cc.xml | 72 +
gr-dtv/grc/dtv_dvbt2_framemapper_cc.xml | 562 ++++
gr-dtv/grc/dtv_dvbt2_freqinterleaver_cc.xml | 301 ++
gr-dtv/grc/dtv_dvbt2_interleaver_bb.xml | 105 +
gr-dtv/grc/dtv_dvbt2_miso_cc.xml | 254 ++
gr-dtv/grc/dtv_dvbt2_modulator_bc.xml | 75 +
gr-dtv/grc/dtv_dvbt2_p1insertion_cc.xml | 276 ++
gr-dtv/grc/dtv_dvbt2_paprtr_cc.xml | 286 ++
gr-dtv/grc/dtv_dvbt2_pilotgenerator_cc.xml | 386 +++
gr-dtv/include/gnuradio/dtv/CMakeLists.txt | 9 +
.../gnuradio/dtv/dvbt2_cellinterleaver_cc.h | 58 +
gr-dtv/include/gnuradio/dtv/dvbt2_framemapper_cc.h | 75 +
.../gnuradio/dtv/dvbt2_freqinterleaver_cc.h | 62 +
gr-dtv/include/gnuradio/dtv/dvbt2_interleaver_bb.h | 57 +
gr-dtv/include/gnuradio/dtv/dvbt2_miso_cc.h | 61 +
gr-dtv/include/gnuradio/dtv/dvbt2_modulator_bc.h | 58 +
gr-dtv/include/gnuradio/dtv/dvbt2_p1insertion_cc.h | 61 +
gr-dtv/include/gnuradio/dtv/dvbt2_paprtr_cc.h | 64 +
.../include/gnuradio/dtv/dvbt2_pilotgenerator_cc.h | 66 +
gr-dtv/lib/CMakeLists.txt | 11 +
gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.cc | 277 ++
gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.h | 59 +
gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.cc | 2011 ++++++++++++
gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.h | 211 ++
gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc | 876 +++++
gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.h | 72 +
gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc | 624 ++++
gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.h | 84 +
gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.cc | 596 ++++
gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.h | 53 +
gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc | 964 ++++++
gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.h | 57 +
gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.cc | 366 +++
gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.h | 85 +
gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc | 984 ++++++
gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.h | 112 +
gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc | 3375 ++++++++++++++++++++
gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.h | 173 +
gr-dtv/swig/dtv_swig.i | 27 +
45 files changed, 20826 insertions(+)
diff --git a/gr-dtv/examples/README.dvbt2 b/gr-dtv/examples/README.dvbt2
new file mode 100644
index 0000000..2e1b875
--- /dev/null
+++ b/gr-dtv/examples/README.dvbt2
@@ -0,0 +1,11 @@
+IMPORTANT: Because some of the blocks have to process entire
+T2 frames, the shared memory requirement will be greater than
+the Linux default. The size of shared memory can be increased
+with the following shell command:
+
+sudo sysctl kernel.shmmax=1073741824
+
+Additional information and links to test streams for the three
+DVB-T2 flow graphs can be found here:
+
+https://github.com/drmpeg/gr-dvbt2
diff --git a/gr-dtv/examples/vv003-cr23.grc b/gr-dtv/examples/vv003-cr23.grc
new file mode 100644
index 0000000..ec2e572
--- /dev/null
+++ b/gr-dtv/examples/vv003-cr23.grc
@@ -0,0 +1,2161 @@
+<?xml version='1.0' encoding='ASCII'?>
+<?grc format='1' created='3.7.7'?>
+<flow_graph>
+ <timestamp>Sun Dec 28 23:36:42 2014</timestamp>
+ <block>
+ <key>dtv_dvbt2_framemapper_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_framemapper_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>202</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_32K_T2GI</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_128</value>
+ </param>
+ <param>
+ <key>l1constellation</key>
+ <value>L1_MOD_64QAM</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>t2frames</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>59</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>inputmode</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>reservedbiasbits</key>
+ <value>RESERVED_OFF</value>
+ </param>
+ <param>
+ <key>l1scrambled</key>
+ <value>L1_SCRAMBLED_OFF</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(734, 154)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(8000000.0 * 8) / 7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_freqinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_freqinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K_T2GI</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_128</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>59</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1013, 218)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>vv003_cr23</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_source</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_source_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>/run/shm/adv32k256qam.ts</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(120, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbheader_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbheader_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>RO_0_35</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>FECFRAME_SHORT</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>168</value>
+ </param>
+ <param>
+ <key>tsrate</key>
+ <value>4000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(352, 19)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbscrambler_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbscrambler_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(656, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bch_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bch_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(856, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_ldpc_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_ldpc_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_OTHER</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1064, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_pilotgenerator_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_pilotgenerator_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K_T2GI</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_128</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>59</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>misogroup</key>
+ <value>MISO_TX1</value>
+ </param>
+ <param>
+ <key>equalization</key>
+ <value>EQUALIZATION_ON</value>
+ </param>
+ <param>
+ <key>bandwidth</key>
+ <value>BANDWIDTH_8_0_MHZ</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(64, 459)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_cyclic_prefixer</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_cyclic_prefixer_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>input_size</key>
+ <value>32768</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>32768/128</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tagname</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(344, 515)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_p1insertion_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_p1insertion_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_32K_T2GI</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_128</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>59</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>showlevels</key>
+ <value>SHOWLEVELS_OFF</value>
+ </param>
+ <param>
+ <key>vclip</key>
+ <value>3.3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(560, 483)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>blocks_multiply_const_vxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>0.2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(864, 571)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>osmosdr_sink</key>
+ <param>
+ <key>id</key>
+ <value>osmosdr_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>args</key>
+ <value>bladerf=0,buffers=128,buflen=32768</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>freq0</key>
+ <value>429e6</value>
+ </param>
+ <param>
+ <key>corr0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>18</value>
+ </param>
+ <param>
+ <key>if_gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>bb_gain0</key>
+ <value>-8</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>8750000</value>
+ </param>
+ <param>
+ <key>freq1</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq2</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq3</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq4</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq5</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq6</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq7</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq8</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq9</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq10</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq11</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq12</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq13</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq14</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq15</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq16</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq17</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq18</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq19</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq20</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq21</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq22</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq23</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq24</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq25</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq26</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq27</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq28</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq29</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq30</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq31</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1048, 483)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>vv.cfile</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>unbuffered</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>append</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(864, 475)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_interleaver_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_interleaver_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(48, 219)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_modulator_bc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_modulator_bc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(264, 219)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_cellinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_cellinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>202</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(504, 211)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>dtv_dvb_bch_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_ldpc_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbscrambler_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bch_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_ldpc_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_interleaver_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_interleaver_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_modulator_bc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_modulator_bc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_cellinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_cellinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_framemapper_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbheader_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbscrambler_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_file_source_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbheader_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_framemapper_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_freqinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_freqinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_pilotgenerator_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_p1insertion_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_pilotgenerator_cc_0</source_block_id>
+ <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>osmosdr_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_file_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-dtv/examples/vv009-4kfft.grc b/gr-dtv/examples/vv009-4kfft.grc
new file mode 100644
index 0000000..d502229
--- /dev/null
+++ b/gr-dtv/examples/vv009-4kfft.grc
@@ -0,0 +1,2161 @@
+<?xml version='1.0' encoding='ASCII'?>
+<?grc format='1' created='3.7.7'?>
+<flow_graph>
+ <timestamp>Mon Dec 29 00:00:54 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>vv009_4kfft</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(8000000.0 * 8) / 7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_source</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_source_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>/run/shm/adv4k64qam.ts</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(120, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_ldpc_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_ldpc_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_OTHER</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1056, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bch_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bch_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(840, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbscrambler_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbscrambler_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(624, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbheader_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbheader_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>RO_0_35</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>168</value>
+ </param>
+ <param>
+ <key>tsrate</key>
+ <value>4000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(360, 19)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_pilotgenerator_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_pilotgenerator_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_NORMAL</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_4K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_32</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>misogroup</key>
+ <value>MISO_TX1</value>
+ </param>
+ <param>
+ <key>equalization</key>
+ <value>EQUALIZATION_ON</value>
+ </param>
+ <param>
+ <key>bandwidth</key>
+ <value>BANDWIDTH_8_0_MHZ</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(56, 451)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_cyclic_prefixer</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_cyclic_prefixer_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>input_size</key>
+ <value>4096</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>4096/32</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tagname</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(328, 507)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_p1insertion_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_p1insertion_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_NORMAL</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_4K</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_32</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>showlevels</key>
+ <value>SHOWLEVELS_OFF</value>
+ </param>
+ <param>
+ <key>vclip</key>
+ <value>3.3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(552, 475)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>blocks_multiply_const_vxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>0.2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(832, 563)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>osmosdr_sink</key>
+ <param>
+ <key>id</key>
+ <value>osmosdr_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>args</key>
+ <value>bladerf=0,buffers=128,buflen=32768</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>freq0</key>
+ <value>429e6</value>
+ </param>
+ <param>
+ <key>corr0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>18</value>
+ </param>
+ <param>
+ <key>if_gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>bb_gain0</key>
+ <value>-8</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>8750000</value>
+ </param>
+ <param>
+ <key>freq1</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq2</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq3</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq4</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq5</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq6</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq7</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq8</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq9</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq10</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq11</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq12</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq13</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq14</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq15</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq16</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq17</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq18</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq19</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq20</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq21</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq22</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq23</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq24</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq25</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq26</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq27</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq28</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq29</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq30</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq31</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1024, 467)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_framemapper_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_framemapper_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_64QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>31</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_NORMAL</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_4K</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_32</value>
+ </param>
+ <param>
+ <key>l1constellation</key>
+ <value>L1_MOD_16QAM</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>t2frames</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>inputmode</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>reservedbiasbits</key>
+ <value>RESERVED_OFF</value>
+ </param>
+ <param>
+ <key>l1scrambled</key>
+ <value>L1_SCRAMBLED_OFF</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(712, 147)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_freqinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_freqinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_NORMAL</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_4K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP7</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_32</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(992, 211)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_interleaver_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_interleaver_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C2_3</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_64QAM</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(48, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_modulator_bc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_modulator_bc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_64QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(264, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_cellinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_cellinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_64QAM</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>31</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(488, 195)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>vv.cfile</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>unbuffered</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>append</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(832, 459)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>dtv_dvb_bch_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_ldpc_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbscrambler_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bch_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_ldpc_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_interleaver_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_interleaver_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_modulator_bc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_modulator_bc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_cellinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_cellinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_framemapper_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbheader_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbscrambler_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_file_source_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbheader_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_framemapper_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_freqinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_freqinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_pilotgenerator_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_p1insertion_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_pilotgenerator_cc_0</source_block_id>
+ <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>osmosdr_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_file_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-dtv/examples/vv018-miso.grc b/gr-dtv/examples/vv018-miso.grc
new file mode 100644
index 0000000..2eb011b
--- /dev/null
+++ b/gr-dtv/examples/vv018-miso.grc
@@ -0,0 +1,2567 @@
+<?xml version='1.0' encoding='ASCII'?>
+<?grc format='1' created='3.7.7'?>
+<flow_graph>
+ <timestamp>Mon Dec 29 01:02:46 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>vv018_miso</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(8000000.0) * 8 / 7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbheader_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbheader_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>RO_0_35</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>FECFRAME_SHORT</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>168</value>
+ </param>
+ <param>
+ <key>tsrate</key>
+ <value>4000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(336, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbscrambler_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbscrambler_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(632, 27)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bch_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bch_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(848, 27)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_ldpc_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_ldpc_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBT2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_OTHER</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1056, 27)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_interleaver_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_interleaver_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1056, 115)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_modulator_bc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_modulator_bc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(808, 115)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_cellinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_cellinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>61</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(576, 107)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_framemapper_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_framemapper_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C5_6</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_256QAM</value>
+ </param>
+ <param>
+ <key>rotation</key>
+ <value>ROTATION_ON</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>61</value>
+ </param>
+ <param>
+ <key>tiblocks</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>l1constellation</key>
+ <value>L1_MOD_64QAM</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP2</value>
+ </param>
+ <param>
+ <key>t2frames</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>inputmode</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>reservedbiasbits</key>
+ <value>RESERVED_OFF</value>
+ </param>
+ <param>
+ <key>l1scrambled</key>
+ <value>L1_SCRAMBLED_OFF</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(48, 155)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_cyclic_prefixer</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_cyclic_prefixer_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>input_size</key>
+ <value>32768</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>32768/16</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tagname</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(56, 451)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_freqinterleaver_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_freqinterleaver_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP2</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(328, 195)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_p1insertion_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_p1insertion_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>showlevels</key>
+ <value>SHOWLEVELS_OFF</value>
+ </param>
+ <param>
+ <key>vclip</key>
+ <value>3.3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(312, 523)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_cyclic_prefixer</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_cyclic_prefixer_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>input_size</key>
+ <value>32768</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>32768/16</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tagname</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(56, 579)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_sink_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>vvtx2.cfile</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>unbuffered</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>append</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(616, 579)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>blocks_multiply_const_vxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>0.2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(616, 499)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_pilotgenerator_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_pilotgenerator_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP2</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>misogroup</key>
+ <value>MISO_TX2</value>
+ </param>
+ <param>
+ <key>equalization</key>
+ <value>EQUALIZATION_ON</value>
+ </param>
+ <param>
+ <key>bandwidth</key>
+ <value>BANDWIDTH_8_0_MHZ</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1016, 411)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_pilotgenerator_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_pilotgenerator_cc_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP2</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>misogroup</key>
+ <value>MISO_TX1</value>
+ </param>
+ <param>
+ <key>equalization</key>
+ <value>EQUALIZATION_ON</value>
+ </param>
+ <param>
+ <key>bandwidth</key>
+ <value>BANDWIDTH_8_0_MHZ</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1016, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_miso_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_miso_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>pilotpattern</key>
+ <value>PILOT_PP2</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>paprmode1</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>paprmode2</key>
+ <value>PAPR_OFF</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(640, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbt2_p1insertion_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbt2_p1insertion_cc_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>carriermode</key>
+ <value>CARRIERS_EXTENDED</value>
+ </param>
+ <param>
+ <key>fftsize1</key>
+ <value>FFTSIZE_32K</value>
+ </param>
+ <param>
+ <key>fftsize2</key>
+ <value>FFTSIZE_2K</value>
+ </param>
+ <param>
+ <key>guardinterval</key>
+ <value>GI_1_16</value>
+ </param>
+ <param>
+ <key>numdatasyms</key>
+ <value>19</value>
+ </param>
+ <param>
+ <key>version</key>
+ <value>VERSION_111</value>
+ </param>
+ <param>
+ <key>preamble1</key>
+ <value>PREAMBLE_T2_MISO</value>
+ </param>
+ <param>
+ <key>preamble2</key>
+ <value>PREAMBLE_T2_SISO</value>
+ </param>
+ <param>
+ <key>showlevels</key>
+ <value>SHOWLEVELS_OFF</value>
+ </param>
+ <param>
+ <key>vclip</key>
+ <value>3.3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(312, 379)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>vvtx1.cfile</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>unbuffered</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>append</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(616, 411)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>osmosdr_sink</key>
+ <param>
+ <key>id</key>
+ <value>osmosdr_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>args</key>
+ <value>bladerf=0,buffers=128,buflen=32768</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>freq0</key>
+ <value>429e6</value>
+ </param>
+ <param>
+ <key>corr0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>18</value>
+ </param>
+ <param>
+ <key>if_gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>bb_gain0</key>
+ <value>-8</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>8750000</value>
+ </param>
+ <param>
+ <key>freq1</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq2</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq3</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq4</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq5</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq6</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq7</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq8</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq9</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq10</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq11</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq12</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq13</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq14</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq15</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq16</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq17</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq18</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq19</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq20</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq21</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq22</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq23</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq24</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq25</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq26</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq27</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq28</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq29</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq30</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq31</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(792, 443)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_source</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_source_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>/run/shm/adv32kmiso.ts</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(112, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_null_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_null_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>bus_conns</key>
+ <value>[[0,],]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(616, 352)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>dtv_dvb_bch_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_ldpc_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbscrambler_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bch_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_ldpc_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_interleaver_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_interleaver_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_modulator_bc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_modulator_bc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_cellinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_cellinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_framemapper_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbheader_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbscrambler_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_file_source_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbheader_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_framemapper_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_freqinterleaver_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_p1insertion_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_pilotgenerator_cc_1</source_block_id>
+ <sink_block_id>digital_ofdm_cyclic_prefixer_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_cyclic_prefixer_0_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_p1insertion_cc_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0_0</source_block_id>
+ <sink_block_id>blocks_file_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>osmosdr_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_freqinterleaver_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_miso_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_miso_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_pilotgenerator_cc_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_miso_cc_0</source_block_id>
+ <sink_block_id>dtv_dvbt2_pilotgenerator_cc_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0_0</source_block_id>
+ <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_file_sink_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_p1insertion_cc_0</source_block_id>
+ <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbt2_pilotgenerator_cc_0</source_block_id>
+ <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-dtv/grc/CMakeLists.txt b/gr-dtv/grc/CMakeLists.txt
index b08df40..93d6b57 100644
--- a/gr-dtv/grc/CMakeLists.txt
+++ b/gr-dtv/grc/CMakeLists.txt
@@ -40,6 +40,15 @@ install(FILES
dtv_dvb_bbscrambler_bb.xml
dtv_dvb_bch_bb.xml
dtv_dvb_ldpc_bb.xml
+ dtv_dvbt2_interleaver_bb.xml
+ dtv_dvbt2_modulator_bc.xml
+ dtv_dvbt2_cellinterleaver_cc.xml
+ dtv_dvbt2_framemapper_cc.xml
+ dtv_dvbt2_freqinterleaver_cc.xml
+ dtv_dvbt2_pilotgenerator_cc.xml
+ dtv_dvbt2_paprtr_cc.xml
+ dtv_dvbt2_p1insertion_cc.xml
+ dtv_dvbt2_miso_cc.xml
DESTINATION ${GRC_BLOCKS_DIR}
COMPONENT "dtv_python"
)
diff --git a/gr-dtv/grc/dtv_block_tree.xml b/gr-dtv/grc/dtv_block_tree.xml
index 9ff495a..ba7e3ca 100644
--- a/gr-dtv/grc/dtv_block_tree.xml
+++ b/gr-dtv/grc/dtv_block_tree.xml
@@ -57,5 +57,17 @@
<block>dtv_dvb_bch_bb</block>
<block>dtv_dvb_ldpc_bb</block>
</cat>
+ <cat>
+ <name>DVB-T2</name>
+ <block>dtv_dvbt2_interleaver_bb</block>
+ <block>dtv_dvbt2_modulator_bc</block>
+ <block>dtv_dvbt2_cellinterleaver_cc</block>
+ <block>dtv_dvbt2_framemapper_cc</block>
+ <block>dtv_dvbt2_freqinterleaver_cc</block>
+ <block>dtv_dvbt2_pilotgenerator_cc</block>
+ <block>dtv_dvbt2_paprtr_cc</block>
+ <block>dtv_dvbt2_p1insertion_cc</block>
+ <block>dtv_dvbt2_miso_cc</block>
+ </cat>
</cat>
</cat>
diff --git a/gr-dtv/grc/dtv_dvbt2_cellinterleaver_cc.xml
b/gr-dtv/grc/dtv_dvbt2_cellinterleaver_cc.xml
new file mode 100644
index 0000000..0f3aa76
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_cellinterleaver_cc.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Cell and Time Interleaver
+###################################################
+ -->
+<block>
+ <name>Cell/Time Interleaver</name>
+ <key>dtv_dvbt2_cellinterleaver_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_cellinterleaver_cc($framesize.val, $constellation.val,
$fecblocks, $tiblocks)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>16QAM</name>
+ <key>MOD_16QAM</key>
+ <opt>val:dtv.MOD_16QAM</opt>
+ </option>
+ <option>
+ <name>64QAM</name>
+ <key>MOD_64QAM</key>
+ <opt>val:dtv.MOD_64QAM</opt>
+ </option>
+ <option>
+ <name>256QAM</name>
+ <key>MOD_256QAM</key>
+ <opt>val:dtv.MOD_256QAM</opt>
+ </option>
+ </param>
+ <param>
+ <name>FEC blocks per frame</name>
+ <key>fecblocks</key>
+ <value>168</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>TI blocks per frame</name>
+ <key>tiblocks</key>
+ <value>3</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_framemapper_cc.xml
b/gr-dtv/grc/dtv_dvbt2_framemapper_cc.xml
new file mode 100644
index 0000000..8cfb490
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_framemapper_cc.xml
@@ -0,0 +1,562 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Frame Mapper
+###################################################
+ -->
+<block>
+ <name>Frame Mapper</name>
+ <key>dtv_dvbt2_framemapper_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_framemapper_cc($framesize.val, $rate.val,
$constellation.val, $rotation.val, $fecblocks, $tiblocks, $carriermode.val,
#slurp
+#if str($version) == 'VERSION_111'
+$fftsize1.val, #slurp
+#else
+#if str($preamble2) == 'PREAMBLE_T2_SISO' or str($preamble2) ==
'PREAMBLE_T2_MISO'
+$fftsize1.val, #slurp
+#else
+$fftsize2.val, #slurp
+#end if
+#end if
+$guardinterval.val, $l1constellation.val, $pilotpattern.val, $t2frames,
$numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$paprmode1.val, #slurp
+#else
+$paprmode2.val, #slurp
+#end if
+$version.val, #slurp
+#if str($version) == 'VERSION_111'
+$preamble1.val, #slurp
+#else
+$preamble2.val, #slurp
+#end if
+$inputmode.val, $reservedbiasbits.val, $l1scrambled.val, $inband.val)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Code rate</name>
+ <key>rate</key>
+ <type>enum</type>
+ <option>
+ <name>1/3</name>
+ <key>C1_3</key>
+ <opt>val:dtv.C1_3</opt>
+ </option>
+ <option>
+ <name>2/5</name>
+ <key>C2_5</key>
+ <opt>val:dtv.C2_5</opt>
+ </option>
+ <option>
+ <name>1/2</name>
+ <key>C1_2</key>
+ <opt>val:dtv.C1_2</opt>
+ </option>
+ <option>
+ <name>3/5</name>
+ <key>C3_5</key>
+ <opt>val:dtv.C3_5</opt>
+ </option>
+ <option>
+ <name>2/3</name>
+ <key>C2_3</key>
+ <opt>val:dtv.C2_3</opt>
+ </option>
+ <option>
+ <name>3/4</name>
+ <key>C3_4</key>
+ <opt>val:dtv.C3_4</opt>
+ </option>
+ <option>
+ <name>4/5</name>
+ <key>C4_5</key>
+ <opt>val:dtv.C4_5</opt>
+ </option>
+ <option>
+ <name>5/6</name>
+ <key>C5_6</key>
+ <opt>val:dtv.C5_6</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>16QAM</name>
+ <key>MOD_16QAM</key>
+ <opt>val:dtv.MOD_16QAM</opt>
+ </option>
+ <option>
+ <name>64QAM</name>
+ <key>MOD_64QAM</key>
+ <opt>val:dtv.MOD_64QAM</opt>
+ </option>
+ <option>
+ <name>256QAM</name>
+ <key>MOD_256QAM</key>
+ <opt>val:dtv.MOD_256QAM</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation rotation</name>
+ <key>rotation</key>
+ <type>enum</type>
+ <option>
+ <name>Off</name>
+ <key>ROTATION_OFF</key>
+ <opt>val:dtv.ROTATION_OFF</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>ROTATION_ON</key>
+ <opt>val:dtv.ROTATION_ON</opt>
+ </option>
+ </param>
+ <param>
+ <name>FEC blocks per frame</name>
+ <key>fecblocks</key>
+ <value>168</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>TI blocks per frame</name>
+ <key>tiblocks</key>
+ <value>3</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize1</key>
+ <type>enum</type>
+ <hide>#if str($version) == 'VERSION_111' then $preamble1.hide_base else
$preamble2.hide_base</hide>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize2</key>
+ <type>enum</type>
+ <hide>#if str($version) == 'VERSION_111' then $preamble1.hide_lite else
$preamble2.hide_lite</hide>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>L1 Constellation</name>
+ <key>l1constellation</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>L1_MOD_BPSK</key>
+ <opt>val:dtv.L1_MOD_BPSK</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>L1_MOD_QPSK</key>
+ <opt>val:dtv.L1_MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>16QAM</name>
+ <key>L1_MOD_16QAM</key>
+ <opt>val:dtv.L1_MOD_16QAM</opt>
+ </option>
+ <option>
+ <name>64QAM</name>
+ <key>L1_MOD_64QAM</key>
+ <opt>val:dtv.L1_MOD_64QAM</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilot Pattern</name>
+ <key>pilotpattern</key>
+ <type>enum</type>
+ <option>
+ <name>PP1</name>
+ <key>PILOT_PP1</key>
+ <opt>val:dtv.PILOT_PP1</opt>
+ </option>
+ <option>
+ <name>PP2</name>
+ <key>PILOT_PP2</key>
+ <opt>val:dtv.PILOT_PP2</opt>
+ </option>
+ <option>
+ <name>PP3</name>
+ <key>PILOT_PP3</key>
+ <opt>val:dtv.PILOT_PP3</opt>
+ </option>
+ <option>
+ <name>PP4</name>
+ <key>PILOT_PP4</key>
+ <opt>val:dtv.PILOT_PP4</opt>
+ </option>
+ <option>
+ <name>PP5</name>
+ <key>PILOT_PP5</key>
+ <opt>val:dtv.PILOT_PP5</opt>
+ </option>
+ <option>
+ <name>PP6</name>
+ <key>PILOT_PP6</key>
+ <opt>val:dtv.PILOT_PP6</opt>
+ </option>
+ <option>
+ <name>PP7</name>
+ <key>PILOT_PP7</key>
+ <opt>val:dtv.PILOT_PP7</opt>
+ </option>
+ <option>
+ <name>PP8</name>
+ <key>PILOT_PP8</key>
+ <opt>val:dtv.PILOT_PP8</opt>
+ </option>
+ </param>
+ <param>
+ <name>T2 Frames per Super-frame</name>
+ <key>t2frames</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>Off</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>P2 Only</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2-Lite SISO</name>
+ <key>PREAMBLE_T2_LITE_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_SISO</opt>
+ <opt>hide_lite:</opt>
+ <opt>hide_base:all</opt>
+ </option>
+ <option>
+ <name>T2-Lite MISO</name>
+ <key>PREAMBLE_T2_LITE_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_MISO</opt>
+ <opt>hide_lite:</opt>
+ <opt>hide_base:all</opt>
+ </option>
+ </param>
+ <param>
+ <name>Baseband Framing Mode</name>
+ <key>inputmode</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.INPUTMODE_NORMAL</opt>
+ </option>
+ <option>
+ <name>High Efficiency</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.INPUTMODE_HIEFF</opt>
+ </option>
+ </param>
+ <param>
+ <name>Reserved Bits Bias Balancing</name>
+ <key>reservedbiasbits</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>Off</name>
+ <key>RESERVED_OFF</key>
+ <opt>val:dtv.RESERVED_OFF</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>RESERVED_ON</key>
+ <opt>val:dtv.RESERVED_ON</opt>
+ </option>
+ </param>
+ <param>
+ <name>L1-post Scrambling</name>
+ <key>l1scrambled</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>Off</name>
+ <key>L1_SCRAMBLED_OFF</key>
+ <opt>val:dtv.L1_SCRAMBLED_OFF</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>L1_SCRAMBLED_ON</key>
+ <opt>val:dtv.L1_SCRAMBLED_ON</opt>
+ </option>
+ </param>
+ <param>
+ <name>In-band Signalling</name>
+ <key>inband</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>Off</name>
+ <key>INBAND_OFF</key>
+ <opt>val:dtv.INBAND_OFF</opt>
+ </option>
+ <option>
+ <name>Type B</name>
+ <key>INBAND_ON</key>
+ <opt>val:dtv.INBAND_ON</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_freqinterleaver_cc.xml
b/gr-dtv/grc/dtv_dvbt2_freqinterleaver_cc.xml
new file mode 100644
index 0000000..3bbcd84
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_freqinterleaver_cc.xml
@@ -0,0 +1,301 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Frequency Interleaver
+###################################################
+ -->
+<block>
+ <name>Frequency Interleaver</name>
+ <key>dtv_dvbt2_freqinterleaver_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_freqinterleaver_cc($carriermode.val, $fftsize.val,
$pilotpattern.val, $guardinterval.val, $numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$paprmode1.val, #slurp
+#else
+$paprmode2.val, #slurp
+#end if
+$version.val, #slurp
+#if str($version) == 'VERSION_111'
+$preamble1.val, #slurp
+#else
+$preamble2.val, #slurp
+#end if
+)</make>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize</key>
+ <type>enum</type>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilot Pattern</name>
+ <key>pilotpattern</key>
+ <type>enum</type>
+ <option>
+ <name>PP1</name>
+ <key>PILOT_PP1</key>
+ <opt>val:dtv.PILOT_PP1</opt>
+ </option>
+ <option>
+ <name>PP2</name>
+ <key>PILOT_PP2</key>
+ <opt>val:dtv.PILOT_PP2</opt>
+ </option>
+ <option>
+ <name>PP3</name>
+ <key>PILOT_PP3</key>
+ <opt>val:dtv.PILOT_PP3</opt>
+ </option>
+ <option>
+ <name>PP4</name>
+ <key>PILOT_PP4</key>
+ <opt>val:dtv.PILOT_PP4</opt>
+ </option>
+ <option>
+ <name>PP5</name>
+ <key>PILOT_PP5</key>
+ <opt>val:dtv.PILOT_PP5</opt>
+ </option>
+ <option>
+ <name>PP6</name>
+ <key>PILOT_PP6</key>
+ <opt>val:dtv.PILOT_PP6</opt>
+ </option>
+ <option>
+ <name>PP7</name>
+ <key>PILOT_PP7</key>
+ <opt>val:dtv.PILOT_PP7</opt>
+ </option>
+ <option>
+ <name>PP8</name>
+ <key>PILOT_PP8</key>
+ <opt>val:dtv.PILOT_PP8</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>Off</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>P2 Only</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ </option>
+ <option>
+ <name>T2-Lite SISO</name>
+ <key>PREAMBLE_T2_LITE_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_SISO</opt>
+ </option>
+ <option>
+ <name>T2-Lite MISO</name>
+ <key>PREAMBLE_T2_LITE_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_MISO</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_interleaver_bb.xml
b/gr-dtv/grc/dtv_dvbt2_interleaver_bb.xml
new file mode 100644
index 0000000..0e4e1ea
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_interleaver_bb.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Bit Interleaver
+###################################################
+ -->
+<block>
+ <name>Bit Interleaver</name>
+ <key>dtv_dvbt2_interleaver_bb</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_interleaver_bb($framesize.val, $rate.val,
$constellation.val)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Code rate</name>
+ <key>rate</key>
+ <type>enum</type>
+ <option>
+ <name>1/3</name>
+ <key>C1_3</key>
+ <opt>val:dtv.C1_3</opt>
+ </option>
+ <option>
+ <name>2/5</name>
+ <key>C2_5</key>
+ <opt>val:dtv.C2_5</opt>
+ </option>
+ <option>
+ <name>1/2</name>
+ <key>C1_2</key>
+ <opt>val:dtv.C1_2</opt>
+ </option>
+ <option>
+ <name>3/5</name>
+ <key>C3_5</key>
+ <opt>val:dtv.C3_5</opt>
+ </option>
+ <option>
+ <name>2/3</name>
+ <key>C2_3</key>
+ <opt>val:dtv.C2_3</opt>
+ </option>
+ <option>
+ <name>3/4</name>
+ <key>C3_4</key>
+ <opt>val:dtv.C3_4</opt>
+ </option>
+ <option>
+ <name>4/5</name>
+ <key>C4_5</key>
+ <opt>val:dtv.C4_5</opt>
+ </option>
+ <option>
+ <name>5/6</name>
+ <key>C5_6</key>
+ <opt>val:dtv.C5_6</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>16QAM</name>
+ <key>MOD_16QAM</key>
+ <opt>val:dtv.MOD_16QAM</opt>
+ </option>
+ <option>
+ <name>64QAM</name>
+ <key>MOD_64QAM</key>
+ <opt>val:dtv.MOD_64QAM</opt>
+ </option>
+ <option>
+ <name>256QAM</name>
+ <key>MOD_256QAM</key>
+ <opt>val:dtv.MOD_256QAM</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_miso_cc.xml b/gr-dtv/grc/dtv_dvbt2_miso_cc.xml
new file mode 100644
index 0000000..1ef4d2a
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_miso_cc.xml
@@ -0,0 +1,254 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 MISO Processing
+###################################################
+ -->
+<block>
+ <name>MISO Processing</name>
+ <key>dtv_dvbt2_miso_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_miso_cc($carriermode.val, $fftsize.val, $pilotpattern.val,
$guardinterval.val, $numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$paprmode1.val, #slurp
+#else
+$paprmode2.val, #slurp
+#end if
+)</make>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize</key>
+ <type>enum</type>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilot Pattern</name>
+ <key>pilotpattern</key>
+ <type>enum</type>
+ <option>
+ <name>PP1</name>
+ <key>PILOT_PP1</key>
+ <opt>val:dtv.PILOT_PP1</opt>
+ </option>
+ <option>
+ <name>PP2</name>
+ <key>PILOT_PP2</key>
+ <opt>val:dtv.PILOT_PP2</opt>
+ </option>
+ <option>
+ <name>PP3</name>
+ <key>PILOT_PP3</key>
+ <opt>val:dtv.PILOT_PP3</opt>
+ </option>
+ <option>
+ <name>PP4</name>
+ <key>PILOT_PP4</key>
+ <opt>val:dtv.PILOT_PP4</opt>
+ </option>
+ <option>
+ <name>PP5</name>
+ <key>PILOT_PP5</key>
+ <opt>val:dtv.PILOT_PP5</opt>
+ </option>
+ <option>
+ <name>PP6</name>
+ <key>PILOT_PP6</key>
+ <opt>val:dtv.PILOT_PP6</opt>
+ </option>
+ <option>
+ <name>PP7</name>
+ <key>PILOT_PP7</key>
+ <opt>val:dtv.PILOT_PP7</opt>
+ </option>
+ <option>
+ <name>PP8</name>
+ <key>PILOT_PP8</key>
+ <opt>val:dtv.PILOT_PP8</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>Off</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>P2 Only</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ <nports>2</nports>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_modulator_bc.xml
b/gr-dtv/grc/dtv_dvbt2_modulator_bc.xml
new file mode 100644
index 0000000..6bf17b8
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_modulator_bc.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 QPSK/QAM Modulator
+###################################################
+ -->
+<block>
+ <name>DVB-T2 Modulator</name>
+ <key>dtv_dvbt2_modulator_bc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_modulator_bc($framesize.val, $constellation.val,
$rotation.val)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>16QAM</name>
+ <key>MOD_16QAM</key>
+ <opt>val:dtv.MOD_16QAM</opt>
+ </option>
+ <option>
+ <name>64QAM</name>
+ <key>MOD_64QAM</key>
+ <opt>val:dtv.MOD_64QAM</opt>
+ </option>
+ <option>
+ <name>256QAM</name>
+ <key>MOD_256QAM</key>
+ <opt>val:dtv.MOD_256QAM</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation rotation</name>
+ <key>rotation</key>
+ <type>enum</type>
+ <option>
+ <name>Off</name>
+ <key>ROTATION_OFF</key>
+ <opt>val:dtv.ROTATION_OFF</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>ROTATION_ON</key>
+ <opt>val:dtv.ROTATION_ON</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_p1insertion_cc.xml
b/gr-dtv/grc/dtv_dvbt2_p1insertion_cc.xml
new file mode 100644
index 0000000..c73cf72
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_p1insertion_cc.xml
@@ -0,0 +1,276 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 P1 Symbol Insertion
+###################################################
+ -->
+<block>
+ <name>P1 Symbol Insertion</name>
+ <key>dtv_dvbt2_p1insertion_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_p1insertion_cc($carriermode.val, #slurp
+#if str($version) == 'VERSION_111'
+$fftsize1.val, #slurp
+#else
+#if str($preamble2) == 'PREAMBLE_T2_SISO' or str($preamble2) ==
'PREAMBLE_T2_MISO'
+$fftsize1.val, #slurp
+#else
+$fftsize2.val, #slurp
+#end if
+#end if
+$guardinterval.val, $numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$preamble1.val, #slurp
+#else
+$preamble2.val, #slurp
+#end if
+$showlevels.val, $vclip)</make>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize1</key>
+ <type>enum</type>
+ <hide>#if str($version) == 'VERSION_111' then $preamble1.hide_base else
$preamble2.hide_base</hide>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize2</key>
+ <type>enum</type>
+ <hide>#if str($version) == 'VERSION_111' then $preamble1.hide_lite else
$preamble2.hide_lite</hide>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_lite:all</opt>
+ <opt>hide_base:</opt>
+ </option>
+ <option>
+ <name>T2-Lite SISO</name>
+ <key>PREAMBLE_T2_LITE_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_SISO</opt>
+ <opt>hide_lite:</opt>
+ <opt>hide_base:all</opt>
+ </option>
+ <option>
+ <name>T2-Lite MISO</name>
+ <key>PREAMBLE_T2_LITE_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_MISO</opt>
+ <opt>hide_lite:</opt>
+ <opt>hide_base:all</opt>
+ </option>
+ </param>
+ <param>
+ <name>Show Peak IQ Levels</name>
+ <key>showlevels</key>
+ <type>enum</type>
+ <option>
+ <name>Off</name>
+ <key>SHOWLEVELS_OFF</key>
+ <opt>val:dtv.SHOWLEVELS_OFF</opt>
+ <opt>hide_vclip:all</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>SHOWLEVELS_ON</key>
+ <opt>val:dtv.SHOWLEVELS_ON</opt>
+ <opt>hide_vclip:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Vclip</name>
+ <key>vclip</key>
+ <value>3.3</value>
+ <type>float</type>
+ <hide>$showlevels.hide_vclip</hide>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_paprtr_cc.xml
b/gr-dtv/grc/dtv_dvbt2_paprtr_cc.xml
new file mode 100644
index 0000000..4fa37ef
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_paprtr_cc.xml
@@ -0,0 +1,286 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Tone Reservation PAPR
+###################################################
+ -->
+<block>
+ <name>Tone Reservation PAPR</name>
+ <key>dtv_dvbt2_paprtr_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_paprtr_cc($carriermode.val, $fftsize.val, $pilotpattern.val,
$guardinterval.val, $numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$paprmode1.val, #slurp
+#else
+$paprmode2.val, #slurp
+#end if
+$version.val, $vclip, $iterations, $fftsize.vlength)</make>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize</key>
+ <type>enum</type>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ <opt>vlength:1024</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ <opt>vlength:2048</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ <opt>vlength:4096</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ <opt>vlength:8192</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ <opt>vlength:8192</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ <opt>vlength:16384</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ <opt>vlength:16384</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ <opt>vlength:32768</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ <opt>vlength:32768</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilot Pattern</name>
+ <key>pilotpattern</key>
+ <type>enum</type>
+ <option>
+ <name>PP1</name>
+ <key>PILOT_PP1</key>
+ <opt>val:dtv.PILOT_PP1</opt>
+ </option>
+ <option>
+ <name>PP2</name>
+ <key>PILOT_PP2</key>
+ <opt>val:dtv.PILOT_PP2</opt>
+ </option>
+ <option>
+ <name>PP3</name>
+ <key>PILOT_PP3</key>
+ <opt>val:dtv.PILOT_PP3</opt>
+ </option>
+ <option>
+ <name>PP4</name>
+ <key>PILOT_PP4</key>
+ <opt>val:dtv.PILOT_PP4</opt>
+ </option>
+ <option>
+ <name>PP5</name>
+ <key>PILOT_PP5</key>
+ <opt>val:dtv.PILOT_PP5</opt>
+ </option>
+ <option>
+ <name>PP6</name>
+ <key>PILOT_PP6</key>
+ <opt>val:dtv.PILOT_PP6</opt>
+ </option>
+ <option>
+ <name>PP7</name>
+ <key>PILOT_PP7</key>
+ <opt>val:dtv.PILOT_PP7</opt>
+ </option>
+ <option>
+ <name>PP8</name>
+ <key>PILOT_PP8</key>
+ <opt>val:dtv.PILOT_PP8</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>Off</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ <opt>hide_vclip:all</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ <opt>hide_vclip:all</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ <opt>hide_vclip:</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ <opt>hide_vclip:</opt>
+ </option>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>P2 Only</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ <opt>hide_vclip:all</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ <opt>hide_vclip:all</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ <opt>hide_vclip:</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ <opt>hide_vclip:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Vclip</name>
+ <key>vclip</key>
+ <value>3.3</value>
+ <type>float</type>
+ <hide>#if str($version) == 'VERSION_111' then $paprmode1.hide_vclip else
$paprmode2.hide_vclip</hide>
+ </param>
+ <param>
+ <name>Iterations</name>
+ <key>iterations</key>
+ <value>10</value>
+ <type>int</type>
+ <hide>#if str($version) == 'VERSION_111' then $paprmode1.hide_vclip else
$paprmode2.hide_vclip</hide>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ <vlen>$fftsize.vlength</vlen>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ <vlen>$fftsize.vlength</vlen>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbt2_pilotgenerator_cc.xml
b/gr-dtv/grc/dtv_dvbt2_pilotgenerator_cc.xml
new file mode 100644
index 0000000..fdcac64
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbt2_pilotgenerator_cc.xml
@@ -0,0 +1,386 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-T2 Pilot Generator
+###################################################
+ -->
+<block>
+ <name>Pilot Generator and IFFT</name>
+ <key>dtv_dvbt2_pilotgenerator_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbt2_pilotgenerator_cc($carriermode.val, $fftsize.val,
$pilotpattern.val, $guardinterval.val, $numdatasyms, #slurp
+#if str($version) == 'VERSION_111'
+$paprmode1.val, #slurp
+#else
+$paprmode2.val, #slurp
+#end if
+$version.val, #slurp
+#if str($version) == 'VERSION_111'
+$preamble1.val, #slurp
+#else
+$preamble2.val, #slurp
+#end if
+$misogroup.val, $equalization.val, $bandwidth.val, $fftsize.vlength)</make>
+ <param>
+ <name>Extended Carrier Mode</name>
+ <key>carriermode</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>CARRIERS_NORMAL</key>
+ <opt>val:dtv.CARRIERS_NORMAL</opt>
+ </option>
+ <option>
+ <name>Extended</name>
+ <key>CARRIERS_EXTENDED</key>
+ <opt>val:dtv.CARRIERS_EXTENDED</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fftsize</key>
+ <type>enum</type>
+ <option>
+ <name>1K</name>
+ <key>FFTSIZE_1K</key>
+ <opt>val:dtv.FFTSIZE_1K</opt>
+ <opt>vlength:1024</opt>
+ </option>
+ <option>
+ <name>2K</name>
+ <key>FFTSIZE_2K</key>
+ <opt>val:dtv.FFTSIZE_2K</opt>
+ <opt>vlength:2048</opt>
+ </option>
+ <option>
+ <name>4K</name>
+ <key>FFTSIZE_4K</key>
+ <opt>val:dtv.FFTSIZE_4K</opt>
+ <opt>vlength:4096</opt>
+ </option>
+ <option>
+ <name>8K</name>
+ <key>FFTSIZE_8K</key>
+ <opt>val:dtv.FFTSIZE_8K</opt>
+ <opt>vlength:8192</opt>
+ </option>
+ <option>
+ <name>8K DVB-T2 GI</name>
+ <key>FFTSIZE_8K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_8K_T2GI</opt>
+ <opt>vlength:8192</opt>
+ </option>
+ <option>
+ <name>16K</name>
+ <key>FFTSIZE_16K</key>
+ <opt>val:dtv.FFTSIZE_16K</opt>
+ <opt>vlength:16384</opt>
+ </option>
+ <option>
+ <name>16K DVB-T2 GI</name>
+ <key>FFTSIZE_16K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_16K_T2GI</opt>
+ <opt>vlength:16384</opt>
+ </option>
+ <option>
+ <name>32K</name>
+ <key>FFTSIZE_32K</key>
+ <opt>val:dtv.FFTSIZE_32K</opt>
+ <opt>vlength:32768</opt>
+ </option>
+ <option>
+ <name>32K DVB-T2 GI</name>
+ <key>FFTSIZE_32K_T2GI</key>
+ <opt>val:dtv.FFTSIZE_32K_T2GI</opt>
+ <opt>vlength:32768</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilot Pattern</name>
+ <key>pilotpattern</key>
+ <type>enum</type>
+ <option>
+ <name>PP1</name>
+ <key>PILOT_PP1</key>
+ <opt>val:dtv.PILOT_PP1</opt>
+ </option>
+ <option>
+ <name>PP2</name>
+ <key>PILOT_PP2</key>
+ <opt>val:dtv.PILOT_PP2</opt>
+ </option>
+ <option>
+ <name>PP3</name>
+ <key>PILOT_PP3</key>
+ <opt>val:dtv.PILOT_PP3</opt>
+ </option>
+ <option>
+ <name>PP4</name>
+ <key>PILOT_PP4</key>
+ <opt>val:dtv.PILOT_PP4</opt>
+ </option>
+ <option>
+ <name>PP5</name>
+ <key>PILOT_PP5</key>
+ <opt>val:dtv.PILOT_PP5</opt>
+ </option>
+ <option>
+ <name>PP6</name>
+ <key>PILOT_PP6</key>
+ <opt>val:dtv.PILOT_PP6</opt>
+ </option>
+ <option>
+ <name>PP7</name>
+ <key>PILOT_PP7</key>
+ <opt>val:dtv.PILOT_PP7</opt>
+ </option>
+ <option>
+ <name>PP8</name>
+ <key>PILOT_PP8</key>
+ <opt>val:dtv.PILOT_PP8</opt>
+ </option>
+ </param>
+ <param>
+ <name>Guard Interval</name>
+ <key>guardinterval</key>
+ <type>enum</type>
+ <option>
+ <name>1/32</name>
+ <key>GI_1_32</key>
+ <opt>val:dtv.GI_1_32</opt>
+ </option>
+ <option>
+ <name>1/16</name>
+ <key>GI_1_16</key>
+ <opt>val:dtv.GI_1_16</opt>
+ </option>
+ <option>
+ <name>1/8</name>
+ <key>GI_1_8</key>
+ <opt>val:dtv.GI_1_8</opt>
+ </option>
+ <option>
+ <name>1/4</name>
+ <key>GI_1_4</key>
+ <opt>val:dtv.GI_1_4</opt>
+ </option>
+ <option>
+ <name>1/128</name>
+ <key>GI_1_128</key>
+ <opt>val:dtv.GI_1_128</opt>
+ </option>
+ <option>
+ <name>19/128</name>
+ <key>GI_19_128</key>
+ <opt>val:dtv.GI_19_128</opt>
+ </option>
+ <option>
+ <name>19/256</name>
+ <key>GI_19_256</key>
+ <opt>val:dtv.GI_19_256</opt>
+ </option>
+ </param>
+ <param>
+ <name>Number of Data Symbols</name>
+ <key>numdatasyms</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>Off</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>PAPR Mode</name>
+ <key>paprmode2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>P2 Only</name>
+ <key>PAPR_OFF</key>
+ <opt>val:dtv.PAPR_OFF</opt>
+ </option>
+ <option>
+ <name>Active Constellation Extension</name>
+ <key>PAPR_ACE</key>
+ <opt>val:dtv.PAPR_ACE</opt>
+ </option>
+ <option>
+ <name>Tone Reservation</name>
+ <key>PAPR_TR</key>
+ <opt>val:dtv.PAPR_TR</opt>
+ </option>
+ <option>
+ <name>Both ACE and TR</name>
+ <key>PAPR_BOTH</key>
+ <opt>val:dtv.PAPR_BOTH</opt>
+ </option>
+ </param>
+ <param>
+ <name>Specification Version</name>
+ <key>version</key>
+ <type>enum</type>
+ <option>
+ <name>1.1.1</name>
+ <key>VERSION_111</key>
+ <opt>val:dtv.VERSION_111</opt>
+ <opt>hide_111:</opt>
+ <opt>hide_131:all</opt>
+ </option>
+ <option>
+ <name>1.3.1</name>
+ <key>VERSION_131</key>
+ <opt>val:dtv.VERSION_131</opt>
+ <opt>hide_111:all</opt>
+ <opt>hide_131:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble1</key>
+ <type>enum</type>
+ <hide>$version.hide_111</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_miso:all</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_miso:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Preamble</name>
+ <key>preamble2</key>
+ <type>enum</type>
+ <hide>$version.hide_131</hide>
+ <option>
+ <name>T2 SISO</name>
+ <key>PREAMBLE_T2_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_SISO</opt>
+ <opt>hide_miso:all</opt>
+ </option>
+ <option>
+ <name>T2 MISO</name>
+ <key>PREAMBLE_T2_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_MISO</opt>
+ <opt>hide_miso:</opt>
+ </option>
+ <option>
+ <name>T2-Lite SISO</name>
+ <key>PREAMBLE_T2_LITE_SISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_SISO</opt>
+ <opt>hide_miso:all</opt>
+ </option>
+ <option>
+ <name>T2-Lite MISO</name>
+ <key>PREAMBLE_T2_LITE_MISO</key>
+ <opt>val:dtv.PREAMBLE_T2_LITE_MISO</opt>
+ <opt>hide_miso:</opt>
+ </option>
+ </param>
+ <param>
+ <name>MISO Group</name>
+ <key>misogroup</key>
+ <type>enum</type>
+ <hide>#if str($version) == 'VERSION_111' then $preamble1.hide_miso else
$preamble2.hide_miso</hide>
+ <option>
+ <name>TX1</name>
+ <key>MISO_TX1</key>
+ <opt>val:dtv.MISO_TX1</opt>
+ </option>
+ <option>
+ <name>TX2</name>
+ <key>MISO_TX2</key>
+ <opt>val:dtv.MISO_TX2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Sin(x)/x Equalization</name>
+ <key>equalization</key>
+ <type>enum</type>
+ <option>
+ <name>Off</name>
+ <key>EQUALIZATION_OFF</key>
+ <opt>val:dtv.EQUALIZATION_OFF</opt>
+ <opt>hide_bandwidth:all</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>EQUALIZATION_ON</key>
+ <opt>val:dtv.EQUALIZATION_ON</opt>
+ <opt>hide_bandwidth:</opt>
+ </option>
+ </param>
+ <param>
+ <name>Bandwidth</name>
+ <key>bandwidth</key>
+ <type>enum</type>
+ <hide>$equalization.hide_bandwidth</hide>
+ <option>
+ <name>1.7 MHz</name>
+ <key>BANDWIDTH_1_7_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_1_7_MHZ</opt>
+ </option>
+ <option>
+ <name>5 MHz</name>
+ <key>BANDWIDTH_5_0_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_5_0_MHZ</opt>
+ </option>
+ <option>
+ <name>6 MHz</name>
+ <key>BANDWIDTH_6_0_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_6_0_MHZ</opt>
+ </option>
+ <option>
+ <name>7 MHz</name>
+ <key>BANDWIDTH_7_0_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_7_0_MHZ</opt>
+ </option>
+ <option>
+ <name>8 MHz</name>
+ <key>BANDWIDTH_8_0_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_8_0_MHZ</opt>
+ </option>
+ <option>
+ <name>10 MHz</name>
+ <key>BANDWIDTH_10_0_MHZ</key>
+ <opt>val:dtv.BANDWIDTH_10_0_MHZ</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ <vlen>$fftsize.vlength</vlen>
+ </source>
+</block>
diff --git a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
index 214a3e0..7add5a8 100644
--- a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
+++ b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
@@ -45,6 +45,15 @@ install(FILES
dvb_bbscrambler_bb.h
dvb_bch_bb.h
dvb_ldpc_bb.h
+ dvbt2_interleaver_bb.h
+ dvbt2_modulator_bc.h
+ dvbt2_cellinterleaver_cc.h
+ dvbt2_framemapper_cc.h
+ dvbt2_freqinterleaver_cc.h
+ dvbt2_pilotgenerator_cc.h
+ dvbt2_paprtr_cc.h
+ dvbt2_p1insertion_cc.h
+ dvbt2_miso_cc.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/dtv
COMPONENT "dtv_devel"
)
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_cellinterleaver_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_cellinterleaver_cc.h
new file mode 100644
index 0000000..2293349
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_cellinterleaver_cc.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_H
+#define INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Cell and time interleaves QPSK/QAM modulated cells.
+ * \ingroup dtv
+ *
+ * Input: QPSK, 16QAM, 64QAM or 256QAM modulated cells.
+ * Output: Cell and time interleaved QPSK, 16QAM, 64QAM or 256QAM
modulated cells.
+ */
+ class DTV_API dvbt2_cellinterleaver_cc : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_cellinterleaver_cc> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 cell and time interleaver.
+ *
+ * \param framesize FEC frame size (normal or short).
+ * \param constellation DVB-T2 constellation.
+ * \param fecblocks number of FEC frames in a T2 frame.
+ * \param tiblocks number of time interleaving blocks in a T2 frame.
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_constellation_t
constellation, int fecblocks, int tiblocks);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_framemapper_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_framemapper_cc.h
new file mode 100644
index 0000000..abead6a
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_framemapper_cc.h
@@ -0,0 +1,75 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_H
+#define INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Maps T2 frames.
+ * \ingroup dtv
+ *
+ * Input: Cell and time interleaved QPSK, 16QAM, 64QAM or 256QAM modulated
cells.
+ * Output: T2 frame.
+ */
+ class DTV_API dvbt2_framemapper_cc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_framemapper_cc> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 frame mapper.
+ *
+ * \param framesize FEC frame size (normal or short).
+ * \param rate FEC code rate.
+ * \param constellation DVB-T2 constellation.
+ * \param rotation DVB-T2 constellation rotation (on or off).
+ * \param fecblocks number of FEC frames in a T2 frame.
+ * \param tiblocks number of time interleaving blocks in a T2 frame.
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param guardinterval OFDM ISI guard interval.
+ * \param l1constellation L1 constellation.
+ * \param pilotpattern DVB-T2 pilot pattern (PP1 - PP8).
+ * \param t2frames number of T2 frames in a super-frame.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param paprmode PAPR reduction mode.
+ * \param version DVB-T2 specification version.
+ * \param preamble P1 symbol preamble format.
+ * \param inputmode Baseband Header mode.
+ * \param reservedbiasbits set all L1 bias bits to 1 (on or off).
+ * \param l1scrambled scramble L1 post signalling (on or off).
+ * \param inband In-band type B signalling (on or off).
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation, dvbt2_rotation_t rotation, int fecblocks,
int tiblocks, dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t fftsize,
dvbt2_guardinterval_t guardinterval, dvbt2_l1constellation_t l1constellation,
dvbt2_pilotpattern_t pilotpattern, int t2frames, int numdatasyms, dvbt2_papr_t
paprmode, dvbt2_version_t version, dvbt2_preamble_t preamble, dvbt2_inputmode_t
inputmode, dvbt2_reservedbias [...]
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_freqinterleaver_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_freqinterleaver_cc.h
new file mode 100644
index 0000000..cfb352b
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_freqinterleaver_cc.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_H
+#define INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Frequency interleaves a T2 frame.
+ * \ingroup dtv
+ *
+ * Input: T2 frame.
+ * Output: Frequency interleaved T2 frame.
+ */
+ class DTV_API dvbt2_freqinterleaver_cc : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_freqinterleaver_cc> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 frequency interleaver.
+ *
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param pilotpattern DVB-T2 pilot pattern (PP1 - PP8).
+ * \param guardinterval OFDM ISI guard interval.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param paprmode PAPR reduction mode.
+ * \param version DVB-T2 specification version.
+ * \param preamble P1 symbol preamble format.
+ */
+ static sptr make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode, dvbt2_version_t version,
dvbt2_preamble_t preamble);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_interleaver_bb.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_interleaver_bb.h
new file mode 100644
index 0000000..00c23cc
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_interleaver_bb.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_INTERLEAVER_BB_H
+#define INCLUDED_DTV_DVBT2_INTERLEAVER_BB_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Bit interleaves DVB-T2 FEC baseband frames.
+ * \ingroup dtv
+ *
+ * Input: Normal or short FEC baseband frames with appended LPDC (LDPCFEC).
+ * Output: Bit interleaved (with column twist and bit to cell word
de-multiplexed) cells.
+ */
+ class DTV_API dvbt2_interleaver_bb : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_interleaver_bb> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 bit interleaver.
+ *
+ * \param framesize FEC frame size (normal or short).
+ * \param rate FEC code rate.
+ * \param constellation DVB-T2 constellation.
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_INTERLEAVER_BB_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_miso_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_miso_cc.h
new file mode 100644
index 0000000..1268ae8
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_miso_cc.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_MISO_CC_H
+#define INCLUDED_DTV_DVBT2_MISO_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Splits the stream for MISO (Multiple Input Single Output).
+ * \ingroup dtv
+ *
+ * Input: Frequency interleaved T2 frame.
+ * Output1: Frequency interleaved T2 frame (copy of input).
+ * Output2: Frequency interleaved T2 frame with modified Alamouti
processing.
+ */
+ class DTV_API dvbt2_miso_cc : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_miso_cc> sptr;
+
+ /*!
+ * \brief Create a MISO processor.
+ *
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param pilotpattern DVB-T2 pilot pattern (PP1 - PP8).
+ * \param guardinterval OFDM ISI guard interval.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param paprmode PAPR reduction mode.
+ */
+ static sptr make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_MISO_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_modulator_bc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_modulator_bc.h
new file mode 100644
index 0000000..226dbf5
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_modulator_bc.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_MODULATOR_BC_H
+#define INCLUDED_DTV_DVBT2_MODULATOR_BC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Modulates DVB-T2 cells.
+ * \ingroup dtv
+ *
+ * Input: Bit interleaved (with column twist and bit to cell word
de-multiplexing) cells.
+ * Output: QPSK, 16QAM, 64QAM or 256QAM modulated complex IQ values
(cells).
+ */
+ class DTV_API dvbt2_modulator_bc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_modulator_bc> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 constellation modulator.
+ *
+ * \param framesize FEC frame size (normal or short).
+ * \param constellation DVB-T2 constellation.
+ * \param rotation DVB-T2 constellation rotation (on or off).
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_constellation_t
constellation, dvbt2_rotation_t rotation);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_MODULATOR_BC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_p1insertion_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_p1insertion_cc.h
new file mode 100644
index 0000000..dd15026
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_p1insertion_cc.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_P1INSERTION_CC_H
+#define INCLUDED_DTV_DVBT2_P1INSERTION_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Inserts a P1 symbol.
+ * \ingroup dtv
+ *
+ * Input: OFDM T2 frame.
+ * Output: OFDM T2 frame with P1 symbol.
+ */
+ class DTV_API dvbt2_p1insertion_cc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_p1insertion_cc> sptr;
+
+ /*!
+ * \brief Create a P1 symbol inserter.
+ *
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param guardinterval OFDM ISI guard interval.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param preamble P1 symbol preamble format.
+ * \param showlevels print peak IQ levels.
+ * \param vclip set peak IQ level threshold.
+ */
+ static sptr make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_preamble_t
preamble, dvbt2_showlevels_t showlevels, float vclip);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_P1INSERTION_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_paprtr_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_paprtr_cc.h
new file mode 100644
index 0000000..728a665
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_paprtr_cc.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_PAPRTR_CC_H
+#define INCLUDED_DTV_DVBT2_PAPRTR_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Peak to Average Power Ratio (PAPR) reduction.
+ * \ingroup dtv
+ *
+ * Input: A T2 frame of OFDM symbols.
+ * Output: A T2 frame of PAPR reduced OFDM symbols.
+ */
+ class DTV_API dvbt2_paprtr_cc : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_paprtr_cc> sptr;
+
+ /*!
+ * \brief Create a PAPR reducer.
+ *
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param pilotpattern DVB-T2 pilot pattern (PP1 - PP8).
+ * \param guardinterval OFDM ISI guard interval.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param paprmode PAPR reduction mode.
+ * \param version DVB-T2 specification version.
+ * \param vclip PAPR clipping level.
+ * \param iterations PAPR algorithm number of iterations.
+ * \param vlength input and output vector length.
+ */
+ static sptr make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode, dvbt2_version_t version,
float vclip, int iterations, int vlength);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_PAPRTR_CC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbt2_pilotgenerator_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbt2_pilotgenerator_cc.h
new file mode 100644
index 0000000..f74005a
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbt2_pilotgenerator_cc.h
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_H
+#define INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvbt2_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Adds pilots to T2 frames.
+ * \ingroup dtv
+ *
+ * Input: Frequency interleaved T2 frame.
+ * Output: T2 frame with pilots (in time domain).
+ */
+ class DTV_API dvbt2_pilotgenerator_cc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbt2_pilotgenerator_cc> sptr;
+
+ /*!
+ * \brief Create a DVB-T2 pilot generator.
+ *
+ * \param carriermode number of carriers (normal or extended).
+ * \param fftsize OFDM IFFT size.
+ * \param pilotpattern DVB-T2 pilot pattern (PP1 - PP8).
+ * \param guardinterval OFDM ISI guard interval.
+ * \param numdatasyms number of OFDM symbols in a T2 frame.
+ * \param paprmode PAPR reduction mode.
+ * \param version DVB-T2 specification version.
+ * \param preamble P1 symbol preamble format.
+ * \param misogroup MISO transmitter ID.
+ * \param equalization sin(x)/x DAC equalization (on or off).
+ * \param bandwidth sin(x)/x equalization bandwidth.
+ * \param vlength output vector length.
+ */
+ static sptr make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode, dvbt2_version_t version,
dvbt2_preamble_t preamble, dvbt2_misogroup_t misogroup, dvbt2_equalization_t
equalization, dvbt2_bandwidth_t bandwidth, int vlength);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_H */
+
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt
index a17a0fb..25838ca 100644
--- a/gr-dtv/lib/CMakeLists.txt
+++ b/gr-dtv/lib/CMakeLists.txt
@@ -27,6 +27,7 @@ include_directories(
${GR_ANALOG_INCLUDE_DIRS}
${GR_FEC_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
+ ${VOLK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -81,6 +82,15 @@ list(APPEND dtv_sources
dvb/dvb_bbscrambler_bb_impl.cc
dvb/dvb_bch_bb_impl.cc
dvb/dvb_ldpc_bb_impl.cc
+ dvbt2/dvbt2_interleaver_bb_impl.cc
+ dvbt2/dvbt2_modulator_bc_impl.cc
+ dvbt2/dvbt2_cellinterleaver_cc_impl.cc
+ dvbt2/dvbt2_framemapper_cc_impl.cc
+ dvbt2/dvbt2_freqinterleaver_cc_impl.cc
+ dvbt2/dvbt2_pilotgenerator_cc_impl.cc
+ dvbt2/dvbt2_paprtr_cc_impl.cc
+ dvbt2/dvbt2_p1insertion_cc_impl.cc
+ dvbt2/dvbt2_miso_cc_impl.cc
)
if(ENABLE_GR_CTRLPORT)
@@ -89,6 +99,7 @@ list(APPEND dtv_sources
endif(ENABLE_GR_CTRLPORT)
list(APPEND dtv_libs
+ volk
gnuradio-runtime
gnuradio-analog
gnuradio-filter
diff --git a/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.cc
new file mode 100644
index 0000000..feaf3e2
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.cc
@@ -0,0 +1,277 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_cellinterleaver_cc_impl.h"
+#include <stdio.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_cellinterleaver_cc::sptr
+ dvbt2_cellinterleaver_cc::make(dvb_framesize_t framesize,
dvb_constellation_t constellation, int fecblocks, int tiblocks)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_cellinterleaver_cc_impl(framesize, constellation,
fecblocks, tiblocks));
+ }
+
+ /*
+ * The private constructor
+ */
+
dvbt2_cellinterleaver_cc_impl::dvbt2_cellinterleaver_cc_impl(dvb_framesize_t
framesize, dvb_constellation_t constellation, int fecblocks, int tiblocks)
+ : gr::sync_block("dvbt2_cellinterleaver_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ int max_states, xor_size, pn_mask, result, q = 0;
+ int lfsr = 0;
+ int logic11[2] = {0, 3};
+ int logic12[2] = {0, 2};
+ int logic13[4] = {0, 1, 4, 6};
+ int logic14[6] = {0, 1, 4, 5, 9, 11};
+ int logic15[4] = {0, 1, 2, 12};
+ int *logic;
+ if (framesize == FECFRAME_NORMAL) {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 32400;
+ pn_degree = 15;
+ pn_mask = 0x3fff;
+ max_states = 32768;
+ logic = &logic15[0];
+ xor_size = 4;
+ break;
+ case MOD_16QAM:
+ cell_size = 16200;
+ pn_degree = 14;
+ pn_mask = 0x1fff;
+ max_states = 16384;
+ logic = &logic14[0];
+ xor_size = 6;
+ break;
+ case MOD_64QAM:
+ cell_size = 10800;
+ pn_degree = 14;
+ pn_mask = 0x1fff;
+ max_states = 16384;
+ logic = &logic14[0];
+ xor_size = 6;
+ break;
+ case MOD_256QAM:
+ cell_size = 8100;
+ pn_degree = 13;
+ pn_mask = 0xfff;
+ max_states = 8192;
+ logic = &logic13[0];
+ xor_size = 4;
+ break;
+ default:
+ cell_size = 32400;
+ pn_degree = 15;
+ pn_mask = 0x3fff;
+ max_states = 32768;
+ logic = &logic15[0];
+ xor_size = 4;
+ break;
+ }
+ }
+ else {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 8100;
+ pn_degree = 13;
+ pn_mask = 0xfff;
+ max_states = 8192;
+ logic = &logic13[0];
+ xor_size = 4;
+ break;
+ case MOD_16QAM:
+ cell_size = 4050;
+ pn_degree = 12;
+ pn_mask = 0x7ff;
+ max_states = 4096;
+ logic = &logic12[0];
+ xor_size = 2;
+ break;
+ case MOD_64QAM:
+ cell_size = 2700;
+ pn_degree = 12;
+ pn_mask = 0x7ff;
+ max_states = 4096;
+ logic = &logic12[0];
+ xor_size = 2;
+ break;
+ case MOD_256QAM:
+ cell_size = 2025;
+ pn_degree = 11;
+ pn_mask = 0x3ff;
+ max_states = 2048;
+ logic = &logic11[0];
+ xor_size = 2;
+ break;
+ default:
+ cell_size = 8100;
+ pn_degree = 13;
+ pn_mask = 0xfff;
+ max_states = 8192;
+ logic = &logic13[0];
+ xor_size = 4;
+ break;
+ }
+ }
+ for (int i = 0; i < max_states; i++) {
+ if (i == 0 || i == 1) {
+ lfsr = 0;
+ }
+ else if (i == 2) {
+ lfsr = 1;
+ }
+ else {
+ result = 0;
+ for (int k = 0; k < xor_size; k++) {
+ result ^= (lfsr >> logic[k]) & 1;
+ }
+ lfsr &= pn_mask;
+ lfsr >>= 1;
+ lfsr |= result << (pn_degree - 2);
+ }
+ lfsr |= (i % 2) << (pn_degree - 1);
+ if (lfsr < cell_size) {
+ permutations[q++] = lfsr;
+ }
+ }
+ if (tiblocks == 0) {
+ FECBlocksPerSmallTIBlock = 1;
+ FECBlocksPerBigTIBlock = 1;
+ numBigTIBlocks = 0;
+ numSmallTIBlocks = fecblocks;
+ }
+ else {
+ FECBlocksPerSmallTIBlock = floor(((float)fecblocks) /
((float)tiblocks));
+ FECBlocksPerBigTIBlock = ceil(((float)fecblocks) / ((float)tiblocks));
+ numBigTIBlocks = fecblocks % tiblocks;
+ numSmallTIBlocks = tiblocks - numBigTIBlocks;
+ }
+ time_interleave = (gr_complex *) malloc(sizeof(gr_complex) * cell_size *
fecblocks);
+ if (time_interleave == NULL) {
+ fprintf(stderr, "Cell interleaver 1st malloc, Out of memory.\n");
+ exit(1);
+ }
+ cols = (gr_complex **) malloc(sizeof(gr_complex *) *
FECBlocksPerBigTIBlock * 5);
+ if (cols == NULL) {
+ free(time_interleave);
+ fprintf(stderr, "Cell interleaver 2nd malloc, Out of memory.\n");
+ exit(1);
+ }
+ ti_blocks = tiblocks;
+ fec_blocks = fecblocks;
+ set_output_multiple(cell_size * fecblocks);
+ interleaved_items = cell_size * fecblocks;
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_cellinterleaver_cc_impl::~dvbt2_cellinterleaver_cc_impl()
+ {
+ free(cols);
+ free(time_interleave);
+ }
+
+ int
+ dvbt2_cellinterleaver_cc_impl::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ int FECBlocksPerTIBlock, n, shift, temp, index, rows, numCols, ti_index;
+
+ for (int i = 0; i < noutput_items; i += interleaved_items) {
+ index = 0;
+ for (int s = 0; s < numSmallTIBlocks + numBigTIBlocks; s++) {
+ n = 0;
+ if (s < numSmallTIBlocks) {
+ FECBlocksPerTIBlock = FECBlocksPerSmallTIBlock;
+ }
+ else {
+ FECBlocksPerTIBlock = FECBlocksPerBigTIBlock;
+ }
+ for (int r = 0; r < FECBlocksPerTIBlock; r++) {
+ shift = cell_size;
+ while (shift >= cell_size) {
+ temp = n;
+ shift = 0;
+ for (int p = 0; p < pn_degree; p++) {
+ shift |= temp & 1;
+ shift <<= 1;
+ temp >>= 1;
+ }
+ n++;
+ }
+ for (int w = 0; w < cell_size; w++) {
+ time_interleave[((permutations[w] + shift) % cell_size) + index]
= *in++;
+ }
+ index += cell_size;
+ }
+ }
+ if (ti_blocks != 0) {
+ ti_index = 0;
+ for (int s = 0; s < numSmallTIBlocks + numBigTIBlocks; s++) {
+ if (s < numSmallTIBlocks) {
+ FECBlocksPerTIBlock = FECBlocksPerSmallTIBlock;
+ }
+ else {
+ FECBlocksPerTIBlock = FECBlocksPerBigTIBlock;
+ }
+ numCols = 5 * FECBlocksPerTIBlock;
+ rows = cell_size / 5;
+ for (int j = 0; j < numCols; j++) {
+ cols[j] = &time_interleave[(rows * j) + ti_index];
+ }
+ index = 0;
+ for (int k = 0; k < rows; k++) {
+ for (int w = 0; w < numCols; w++) {
+ *out++ = *(cols[w] + index);
+ }
+ index++;
+ }
+ ti_index += rows * numCols;
+ }
+ }
+ else {
+ index = 0;
+ for (int w = 0; w < fec_blocks * cell_size; w++) {
+ *out++ = time_interleave[index++];
+ }
+ }
+ }
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.h
new file mode 100644
index 0000000..6b7fb05
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_cellinterleaver_cc_impl.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_cellinterleaver_cc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_cellinterleaver_cc_impl : public dvbt2_cellinterleaver_cc
+ {
+ private:
+ int cell_size;
+ int pn_degree;
+ int ti_blocks;
+ int fec_blocks;
+ int permutations[32768];
+ int FECBlocksPerSmallTIBlock;
+ int FECBlocksPerBigTIBlock;
+ int numBigTIBlocks;
+ int numSmallTIBlocks;
+ int interleaved_items;
+ gr_complex *time_interleave;
+ gr_complex **cols;
+
+ public:
+ dvbt2_cellinterleaver_cc_impl(dvb_framesize_t framesize,
dvb_constellation_t constellation, int fecblocks, int tiblocks);
+ ~dvbt2_cellinterleaver_cc_impl();
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_CELLINTERLEAVER_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.cc
new file mode 100644
index 0000000..bd02629
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.cc
@@ -0,0 +1,2011 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_framemapper_cc_impl.h"
+#include <stdio.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_framemapper_cc::sptr
+ dvbt2_framemapper_cc::make(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation, dvbt2_rotation_t rotation, int
fecblocks, int tiblocks, dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_guardinterval_t guardinterval, dvbt2_l1constellation_t
l1constellation, dvbt2_pilotpattern_t pilotpattern, int t2frames, int
numdatasyms, dvbt2_papr_t paprmode, dvbt2_version_t version, dvbt2_preamble_t
preamble, dvbt2_inputmode_t inputmode, dvbt2_rese [...]
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_framemapper_cc_impl(framesize, rate, constellation,
rotation, fecblocks, tiblocks, carriermode, fftsize, guardinterval,
l1constellation, pilotpattern, t2frames, numdatasyms, paprmode, version,
preamble, inputmode, reservedbiasbits, l1scrambled, inband));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbt2_framemapper_cc_impl::dvbt2_framemapper_cc_impl(dvb_framesize_t
framesize, dvb_code_rate_t rate, dvb_constellation_t constellation,
dvbt2_rotation_t rotation, int fecblocks, int tiblocks,
dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t fftsize,
dvbt2_guardinterval_t guardinterval, dvbt2_l1constellation_t l1constellation,
dvbt2_pilotpattern_t pilotpattern, int t2frames, int numdatasyms, dvbt2_papr_t
paprmode, dvbt2_version_t version, dvbt2_preamble_t preamble, dvbt2_inputmo
[...]
+ : gr::block("dvbt2_framemapper_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ L1Pre *l1preinit = &L1_Signalling[0].l1pre_data;
+ L1Post *l1postinit = &L1_Signalling[0].l1post_data;
+ double normalization;
+ int N_punc_temp, N_post_temp;
+ if (framesize == FECFRAME_NORMAL) {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 32400;
+ break;
+ case MOD_16QAM:
+ cell_size = 16200;
+ break;
+ case MOD_64QAM:
+ cell_size = 10800;
+ break;
+ case MOD_256QAM:
+ cell_size = 8100;
+ break;
+ default:
+ cell_size = 0;
+ break;
+ }
+ }
+ else {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 8100;
+ break;
+ case MOD_16QAM:
+ cell_size = 4050;
+ break;
+ case MOD_64QAM:
+ cell_size = 2700;
+ break;
+ case MOD_256QAM:
+ cell_size = 2025;
+ break;
+ default:
+ cell_size = 0;
+ break;
+ }
+ }
+ fef_present = FALSE; /* for testing only */
+ fef_length = 134144; /* " " " */
+ fef_interval = 1; /* " " " */
+ l1preinit->type = STREAMTYPE_TS;
+ l1preinit->bwt_ext = carriermode;
+ fft_size = fftsize;
+ l1preinit->s1 = preamble;
+ l1preinit->s2 = fft_size & 0x7;
+ l1preinit->l1_repetition_flag = FALSE;
+ l1preinit->guard_interval = guardinterval;
+ l1preinit->papr = paprmode;
+ l1preinit->l1_mod = l1constellation;
+ l1preinit->l1_cod = 0;
+ l1preinit->l1_fec_type = 0;
+ if (fef_present == FALSE) {
+ l1preinit->l1_post_info_size = KSIG_POST - 32;
+ }
+ else {
+ l1preinit->l1_post_info_size = KSIG_POST + 34 - 32;
+ }
+ l1preinit->pilot_pattern = pilotpattern;
+ l1preinit->tx_id_availability = 0;
+ l1preinit->cell_id = 0;
+ l1preinit->network_id = 0x3085;
+ l1preinit->t2_system_id = 0x8001;
+ l1preinit->num_t2_frames = t2frames;
+ l1preinit->num_data_symbols = numdatasyms;
+ l1preinit->regen_flag = FALSE;
+ l1preinit->l1_post_extension = FALSE;
+ l1preinit->num_rf = 1;
+ l1preinit->current_rf_index = 0;
+ l1preinit->t2_version = version;
+ if (version == VERSION_131) {
+ l1preinit->l1_post_scrambled = l1scrambled;
+ }
+ else {
+ l1preinit->l1_post_scrambled = FALSE;
+ }
+ l1preinit->t2_base_lite = FALSE;
+ if (reservedbiasbits == RESERVED_ON && version == VERSION_131) {
+ l1preinit->reserved = 0xf;
+ }
+ else {
+ l1preinit->reserved = 0x0;
+ }
+
+ l1postinit->sub_slices_per_frame = 1;
+ l1postinit->num_plp = 1;
+ l1postinit->num_aux = 0;
+ l1postinit->aux_config_rfu = 0;
+ l1postinit->rf_idx = 0;
+ l1postinit->frequency = 729833333;
+ l1postinit->plp_id = 0;
+ l1postinit->plp_type = 1;
+ l1postinit->plp_payload_type = 3;
+ l1postinit->ff_flag = 0;
+ l1postinit->first_rf_idx = 0;
+ l1postinit->first_frame_idx = 0;
+ if (fef_present == FALSE) {
+ l1postinit->plp_group_id = 1;
+ }
+ else {
+ l1postinit->plp_group_id = 0;
+ }
+ switch (rate) {
+ case C1_3:
+ l1postinit->plp_cod = 6;
+ break;
+ case C2_5:
+ l1postinit->plp_cod = 7;
+ break;
+ case C1_2:
+ l1postinit->plp_cod = 0;
+ break;
+ case C3_5:
+ l1postinit->plp_cod = 1;
+ break;
+ case C2_3:
+ l1postinit->plp_cod = 2;
+ break;
+ case C3_4:
+ l1postinit->plp_cod = 3;
+ break;
+ case C4_5:
+ l1postinit->plp_cod = 4;
+ break;
+ case C5_6:
+ l1postinit->plp_cod = 5;
+ break;
+ default:
+ l1postinit->plp_cod = 0;
+ break;
+ }
+ l1postinit->plp_mod = constellation;
+ l1postinit->plp_rotation = rotation;
+ l1postinit->plp_fec_type = framesize;
+ l1postinit->plp_num_blocks_max = fecblocks;
+ l1postinit->frame_interval = 1;
+ l1postinit->time_il_length = tiblocks;
+ l1postinit->time_il_type = 0;
+ l1postinit->in_band_a_flag = 0;
+ if (inband == INBAND_ON && version == VERSION_131) {
+ l1postinit->in_band_b_flag = 1;
+ }
+ else {
+ l1postinit->in_band_b_flag = 0;
+ }
+ if (reservedbiasbits == RESERVED_ON && version == VERSION_131) {
+ l1postinit->reserved_1 = 0x7ff;
+ }
+ else {
+ l1postinit->reserved_1 = 0x0;
+ }
+ if (version == VERSION_111) {
+ l1postinit->plp_mode = 0;
+ }
+ else {
+ l1postinit->plp_mode = inputmode + 1;
+ }
+ if (fef_present == FALSE) {
+ l1postinit->static_flag = 0;
+ l1postinit->static_padding_flag = 0;
+ }
+ else {
+ l1postinit->static_flag = 1;
+ l1postinit->static_padding_flag = 1;
+ }
+ l1postinit->fef_length_msb = 0;
+ if (reservedbiasbits == RESERVED_ON && version == VERSION_131) {
+ l1postinit->reserved_2 = 0x3fffffff;
+ }
+ else {
+ l1postinit->reserved_2 = 0;
+ }
+ l1postinit->frame_idx = 0;
+ l1postinit->sub_slice_interval = 0;
+ l1postinit->type_2_start = 0;
+ l1postinit->l1_change_counter = 0;
+ l1postinit->start_rf_idx = 0;
+ if (reservedbiasbits == RESERVED_ON && version == VERSION_131) {
+ l1postinit->reserved_3 = 0xff;
+ }
+ else {
+ l1postinit->reserved_3 = 0;
+ }
+ l1postinit->plp_id = 0;
+ l1postinit->plp_start = 0;
+ l1postinit->plp_num_blocks = fecblocks;
+ if (reservedbiasbits == RESERVED_ON && version == VERSION_131) {
+ l1postinit->reserved_4 = 0xff;
+ l1postinit->reserved_5 = 0xff;
+ }
+ else {
+ l1postinit->reserved_4 = 0;
+ l1postinit->reserved_5 = 0;
+ }
+
+ bch_poly_build_tables();
+ l1pre_ldpc_lookup_generate();
+ m_bpsk[0].real() = 1.0;
+ m_bpsk[0].imag() = 0.0;
+ m_bpsk[1].real() = -1.0;
+ m_bpsk[1].imag() = 0.0;
+ unmodulated[0].real() = 0.0;
+ unmodulated[0].imag() = 0.0;
+
+ l1post_ldpc_lookup_generate();
+ switch (l1constellation) {
+ case L1_MOD_BPSK:
+ eta_mod = 1;
+ break;
+ case L1_MOD_QPSK:
+ normalization = sqrt(2);
+ m_qpsk[0].real() = 1.0 / normalization;
+ m_qpsk[0].imag() = 1.0 / normalization;
+ m_qpsk[1].real() = 1.0 / normalization;
+ m_qpsk[1].imag() = -1.0 / normalization;
+ m_qpsk[2].real() = -1.0 / normalization;
+ m_qpsk[2].imag() = 1.0 / normalization;
+ m_qpsk[3].real() = -1.0 / normalization;
+ m_qpsk[3].imag() = -1.0 / normalization;
+ eta_mod = 2;
+ break;
+ case L1_MOD_16QAM:
+ normalization = sqrt(10);
+ m_16qam[0].real() = 3.0 / normalization;
+ m_16qam[0].imag() = 3.0 / normalization;
+ m_16qam[1].real() = 3.0 / normalization;
+ m_16qam[1].imag() = 1.0 / normalization;
+ m_16qam[2].real() = 1.0 / normalization;
+ m_16qam[2].imag() = 3.0 / normalization;
+ m_16qam[3].real() = 1.0 / normalization;
+ m_16qam[3].imag() = 1.0 / normalization;
+ m_16qam[4].real() = 3.0 / normalization;
+ m_16qam[4].imag() = -3.0 / normalization;
+ m_16qam[5].real() = 3.0 / normalization;
+ m_16qam[5].imag() = -1.0 / normalization;
+ m_16qam[6].real() = 1.0 / normalization;
+ m_16qam[6].imag() = -3.0 / normalization;
+ m_16qam[7].real() = 1.0 / normalization;
+ m_16qam[7].imag() = -1.0 / normalization;
+ m_16qam[8].real() = -3.0 / normalization;
+ m_16qam[8].imag() = 3.0 / normalization;
+ m_16qam[9].real() = -3.0 / normalization;
+ m_16qam[9].imag() = 1.0 / normalization;
+ m_16qam[10].real() = -1.0 / normalization;
+ m_16qam[10].imag() = 3.0 / normalization;
+ m_16qam[11].real() = -1.0 / normalization;
+ m_16qam[11].imag() = 1.0 / normalization;
+ m_16qam[12].real() = -3.0 / normalization;
+ m_16qam[12].imag() = -3.0 / normalization;
+ m_16qam[13].real() = -3.0 / normalization;
+ m_16qam[13].imag() = -1.0 / normalization;
+ m_16qam[14].real() = -1.0 / normalization;
+ m_16qam[14].imag() = -3.0 / normalization;
+ m_16qam[15].real() = -1.0 / normalization;
+ m_16qam[15].imag() = -1.0 / normalization;
+ eta_mod = 4;
+ break;
+ case L1_MOD_64QAM:
+ normalization = sqrt(42);
+ m_64qam[0].real() = 7.0 / normalization;
+ m_64qam[0].imag() = 7.0 / normalization;
+ m_64qam[1].real() = 7.0 / normalization;
+ m_64qam[1].imag() = 5.0 / normalization;
+ m_64qam[2].real() = 5.0 / normalization;
+ m_64qam[2].imag() = 7.0 / normalization;
+ m_64qam[3].real() = 5.0 / normalization;
+ m_64qam[3].imag() = 5.0 / normalization;
+ m_64qam[4].real() = 7.0 / normalization;
+ m_64qam[4].imag() = 1.0 / normalization;
+ m_64qam[5].real() = 7.0 / normalization;
+ m_64qam[5].imag() = 3.0 / normalization;
+ m_64qam[6].real() = 5.0 / normalization;
+ m_64qam[6].imag() = 1.0 / normalization;
+ m_64qam[7].real() = 5.0 / normalization;
+ m_64qam[7].imag() = 3.0 / normalization;
+ m_64qam[8].real() = 1.0 / normalization;
+ m_64qam[8].imag() = 7.0 / normalization;
+ m_64qam[9].real() = 1.0 / normalization;
+ m_64qam[9].imag() = 5.0 / normalization;
+ m_64qam[10].real() = 3.0 / normalization;
+ m_64qam[10].imag() = 7.0 / normalization;
+ m_64qam[11].real() = 3.0 / normalization;
+ m_64qam[11].imag() = 5.0 / normalization;
+ m_64qam[12].real() = 1.0 / normalization;
+ m_64qam[12].imag() = 1.0 / normalization;
+ m_64qam[13].real() = 1.0 / normalization;
+ m_64qam[13].imag() = 3.0 / normalization;
+ m_64qam[14].real() = 3.0 / normalization;
+ m_64qam[14].imag() = 1.0 / normalization;
+ m_64qam[15].real() = 3.0 / normalization;
+ m_64qam[15].imag() = 3.0 / normalization;
+ m_64qam[16].real() = 7.0 / normalization;
+ m_64qam[16].imag() = -7.0 / normalization;
+ m_64qam[17].real() = 7.0 / normalization;
+ m_64qam[17].imag() = -5.0 / normalization;
+ m_64qam[18].real() = 5.0 / normalization;
+ m_64qam[18].imag() = -7.0 / normalization;
+ m_64qam[19].real() = 5.0 / normalization;
+ m_64qam[19].imag() = -5.0 / normalization;
+ m_64qam[20].real() = 7.0 / normalization;
+ m_64qam[20].imag() = -1.0 / normalization;
+ m_64qam[21].real() = 7.0 / normalization;
+ m_64qam[21].imag() = -3.0 / normalization;
+ m_64qam[22].real() = 5.0 / normalization;
+ m_64qam[22].imag() = -1.0 / normalization;
+ m_64qam[23].real() = 5.0 / normalization;
+ m_64qam[23].imag() = -3.0 / normalization;
+ m_64qam[24].real() = 1.0 / normalization;
+ m_64qam[24].imag() = -7.0 / normalization;
+ m_64qam[25].real() = 1.0 / normalization;
+ m_64qam[25].imag() = -5.0 / normalization;
+ m_64qam[26].real() = 3.0 / normalization;
+ m_64qam[26].imag() = -7.0 / normalization;
+ m_64qam[27].real() = 3.0 / normalization;
+ m_64qam[27].imag() = -5.0 / normalization;
+ m_64qam[28].real() = 1.0 / normalization;
+ m_64qam[28].imag() = -1.0 / normalization;
+ m_64qam[29].real() = 1.0 / normalization;
+ m_64qam[29].imag() = -3.0 / normalization;
+ m_64qam[30].real() = 3.0 / normalization;
+ m_64qam[30].imag() = -1.0 / normalization;
+ m_64qam[31].real() = 3.0 / normalization;
+ m_64qam[31].imag() = -3.0 / normalization;
+ m_64qam[32].real() = -7.0 / normalization;
+ m_64qam[32].imag() = 7.0 / normalization;
+ m_64qam[33].real() = -7.0 / normalization;
+ m_64qam[33].imag() = 5.0 / normalization;
+ m_64qam[34].real() = -5.0 / normalization;
+ m_64qam[34].imag() = 7.0 / normalization;
+ m_64qam[35].real() = -5.0 / normalization;
+ m_64qam[35].imag() = 5.0 / normalization;
+ m_64qam[36].real() = -7.0 / normalization;
+ m_64qam[36].imag() = 1.0 / normalization;
+ m_64qam[37].real() = -7.0 / normalization;
+ m_64qam[37].imag() = 3.0 / normalization;
+ m_64qam[38].real() = -5.0 / normalization;
+ m_64qam[38].imag() = 1.0 / normalization;
+ m_64qam[39].real() = -5.0 / normalization;
+ m_64qam[39].imag() = 3.0 / normalization;
+ m_64qam[40].real() = -1.0 / normalization;
+ m_64qam[40].imag() = 7.0 / normalization;
+ m_64qam[41].real() = -1.0 / normalization;
+ m_64qam[41].imag() = 5.0 / normalization;
+ m_64qam[42].real() = -3.0 / normalization;
+ m_64qam[42].imag() = 7.0 / normalization;
+ m_64qam[43].real() = -3.0 / normalization;
+ m_64qam[43].imag() = 5.0 / normalization;
+ m_64qam[44].real() = -1.0 / normalization;
+ m_64qam[44].imag() = 1.0 / normalization;
+ m_64qam[45].real() = -1.0 / normalization;
+ m_64qam[45].imag() = 3.0 / normalization;
+ m_64qam[46].real() = -3.0 / normalization;
+ m_64qam[46].imag() = 1.0 / normalization;
+ m_64qam[47].real() = -3.0 / normalization;
+ m_64qam[47].imag() = 3.0 / normalization;
+ m_64qam[48].real() = -7.0 / normalization;
+ m_64qam[48].imag() = -7.0 / normalization;
+ m_64qam[49].real() = -7.0 / normalization;
+ m_64qam[49].imag() = -5.0 / normalization;
+ m_64qam[50].real() = -5.0 / normalization;
+ m_64qam[50].imag() = -7.0 / normalization;
+ m_64qam[51].real() = -5.0 / normalization;
+ m_64qam[51].imag() = -5.0 / normalization;
+ m_64qam[52].real() = -7.0 / normalization;
+ m_64qam[52].imag() = -1.0 / normalization;
+ m_64qam[53].real() = -7.0 / normalization;
+ m_64qam[53].imag() = -3.0 / normalization;
+ m_64qam[54].real() = -5.0 / normalization;
+ m_64qam[54].imag() = -1.0 / normalization;
+ m_64qam[55].real() = -5.0 / normalization;
+ m_64qam[55].imag() = -3.0 / normalization;
+ m_64qam[56].real() = -1.0 / normalization;
+ m_64qam[56].imag() = -7.0 / normalization;
+ m_64qam[57].real() = -1.0 / normalization;
+ m_64qam[57].imag() = -5.0 / normalization;
+ m_64qam[58].real() = -3.0 / normalization;
+ m_64qam[58].imag() = -7.0 / normalization;
+ m_64qam[59].real() = -3.0 / normalization;
+ m_64qam[59].imag() = -5.0 / normalization;
+ m_64qam[60].real() = -1.0 / normalization;
+ m_64qam[60].imag() = -1.0 / normalization;
+ m_64qam[61].real() = -1.0 / normalization;
+ m_64qam[61].imag() = -3.0 / normalization;
+ m_64qam[62].real() = -3.0 / normalization;
+ m_64qam[62].imag() = -1.0 / normalization;
+ m_64qam[63].real() = -3.0 / normalization;
+ m_64qam[63].imag() = -3.0 / normalization;
+ eta_mod = 6;
+ break;
+ }
+ if ((preamble == PREAMBLE_T2_SISO) || (preamble ==
PREAMBLE_T2_LITE_SISO)) {
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 558;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1118;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2236;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4472;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8944;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 22432;
+ break;
+ }
+ }
+ else {
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 546;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1098;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2198;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4398;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8814;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 17612;
+ break;
+ }
+ }
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 764;
+ N_FC = 568;
+ C_FC = 402;
+ break;
+ case PILOT_PP2:
+ C_DATA = 768;
+ N_FC = 710;
+ C_FC = 654;
+ break;
+ case PILOT_PP3:
+ C_DATA = 798;
+ N_FC = 710;
+ C_FC = 490;
+ break;
+ case PILOT_PP4:
+ C_DATA = 804;
+ N_FC = 780;
+ C_FC = 707;
+ break;
+ case PILOT_PP5:
+ C_DATA = 818;
+ N_FC = 780;
+ C_FC = 544;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 10;
+ }
+ if (N_FC != 0) {
+ N_FC -= 10;
+ }
+ if (C_FC != 0) {
+ C_FC -= 10;
+ }
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 1522;
+ N_FC = 1136;
+ C_FC = 804;
+ break;
+ case PILOT_PP2:
+ C_DATA = 1532;
+ N_FC = 1420;
+ C_FC = 1309;
+ break;
+ case PILOT_PP3:
+ C_DATA = 1596;
+ N_FC = 1420;
+ C_FC = 980;
+ break;
+ case PILOT_PP4:
+ C_DATA = 1602;
+ N_FC = 1562;
+ C_FC = 1415;
+ break;
+ case PILOT_PP5:
+ C_DATA = 1632;
+ N_FC = 1562;
+ C_FC = 1088;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 1646;
+ N_FC = 1632;
+ C_FC = 1396;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 18;
+ }
+ if (N_FC != 0) {
+ N_FC -= 18;
+ }
+ if (C_FC != 0) {
+ C_FC -= 18;
+ }
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 3084;
+ N_FC = 2272;
+ C_FC = 1609;
+ break;
+ case PILOT_PP2:
+ C_DATA = 3092;
+ N_FC = 2840;
+ C_FC = 2619;
+ break;
+ case PILOT_PP3:
+ C_DATA = 3228;
+ N_FC = 2840;
+ C_FC = 1961;
+ break;
+ case PILOT_PP4:
+ C_DATA = 3234;
+ N_FC = 3124;
+ C_FC = 2831;
+ break;
+ case PILOT_PP5:
+ C_DATA = 3298;
+ N_FC = 3124;
+ C_FC = 2177;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 3328;
+ N_FC = 3266;
+ C_FC = 2792;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 36;
+ }
+ if (N_FC != 0) {
+ N_FC -= 36;
+ }
+ if (C_FC != 0) {
+ C_FC -= 36;
+ }
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6208;
+ N_FC = 4544;
+ C_FC = 3218;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6214;
+ N_FC = 5680;
+ C_FC = 5238;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6494;
+ N_FC = 5680;
+ C_FC = 3922;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6498;
+ N_FC = 6248;
+ C_FC = 5662;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6634;
+ N_FC = 6248;
+ C_FC = 4354;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6698;
+ N_FC = 6532;
+ C_FC = 5585;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6698;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6296;
+ N_FC = 4608;
+ C_FC = 3264;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6298;
+ N_FC = 5760;
+ C_FC = 5312;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6584;
+ N_FC = 5760;
+ C_FC = 3978;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6588;
+ N_FC = 6336;
+ C_FC = 5742;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6728;
+ N_FC = 6336;
+ C_FC = 4416;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6788;
+ N_FC = 6624;
+ C_FC = 5664;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6788;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 72;
+ }
+ if (N_FC != 0) {
+ N_FC -= 72;
+ }
+ if (C_FC != 0) {
+ C_FC -= 72;
+ }
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12418;
+ N_FC = 9088;
+ C_FC = 6437;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12436;
+ N_FC = 11360;
+ C_FC = 10476;
+ break;
+ case PILOT_PP3:
+ C_DATA = 12988;
+ N_FC = 11360;
+ C_FC = 7845;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13002;
+ N_FC = 12496;
+ C_FC = 11324;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13272;
+ N_FC = 12496;
+ C_FC = 8709;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13288;
+ N_FC = 13064;
+ C_FC = 11801;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13416;
+ N_FC = 13064;
+ C_FC = 11170;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13406;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12678;
+ N_FC = 9280;
+ C_FC = 6573;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12698;
+ N_FC = 11600;
+ C_FC = 10697;
+ break;
+ case PILOT_PP3:
+ C_DATA = 13262;
+ N_FC = 11600;
+ C_FC = 8011;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13276;
+ N_FC = 12760;
+ C_FC = 11563;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13552;
+ N_FC = 12760;
+ C_FC = 8893;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13568;
+ N_FC = 13340;
+ C_FC = 12051;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13698;
+ N_FC = 13340;
+ C_FC = 11406;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13688;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 144;
+ }
+ if (N_FC != 0) {
+ N_FC -= 144;
+ }
+ if (C_FC != 0) {
+ C_FC -= 144;
+ }
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 24886;
+ N_FC = 22720;
+ C_FC = 20952;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26022;
+ N_FC = 24992;
+ C_FC = 22649;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 26592;
+ N_FC = 26128;
+ C_FC = 23603;
+ break;
+ case PILOT_PP7:
+ C_DATA = 26836;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 26812;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 25412;
+ N_FC = 23200;
+ C_FC = 21395;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26572;
+ N_FC = 25520;
+ C_FC = 23127;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 27152;
+ N_FC = 26680;
+ C_FC = 24102;
+ break;
+ case PILOT_PP7:
+ C_DATA = 27404;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 27376;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 288;
+ }
+ if (N_FC != 0) {
+ N_FC -= 288;
+ }
+ if (C_FC != 0) {
+ C_FC -= 288;
+ }
+ }
+ break;
+ }
+ if ((preamble == PREAMBLE_T2_SISO) || (preamble ==
PREAMBLE_T2_LITE_SISO)) {
+ if (guardinterval == GI_1_128 && pilotpattern == PILOT_PP7) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_32 && pilotpattern == PILOT_PP4) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_16 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_19_256 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ }
+ if (fef_present == FALSE) {
+ N_punc_temp = (6 * (KBCH_1_2 - KSIG_POST)) / 5;
+ N_post_temp = KSIG_POST + NBCH_PARITY + 9000 - N_punc_temp;
+ }
+ else {
+ N_punc_temp = (6 * (KBCH_1_2 - (KSIG_POST + 34))) / 5;
+ N_post_temp = (KSIG_POST + 34) + NBCH_PARITY + 9000 - N_punc_temp;
+ }
+ if (N_P2 == 1) {
+ N_post = ceil((float)N_post_temp / (2 * (float)eta_mod)) * 2 * eta_mod;
+ }
+ else {
+ N_post = ceil((float)N_post_temp / ((float)eta_mod * (float)N_P2)) *
eta_mod * N_P2;
+ }
+ N_punc = N_punc_temp - (N_post - N_post_temp);
+ l1preinit->l1_post_size = N_post / eta_mod;
+ add_l1pre(&l1pre_cache[0]);
+ l1_constellation = l1constellation;
+ t2_frames = t2frames;
+ t2_frame_num = 0;
+ l1_scrambled = l1scrambled;
+ stream_items = cell_size * fecblocks;
+ if (N_FC == 0) {
+ set_output_multiple((N_P2 * C_P2) + (numdatasyms * C_DATA));
+ mapped_items = (N_P2 * C_P2) + (numdatasyms * C_DATA);
+ if (mapped_items < (stream_items + 1840 + (N_post / eta_mod) + (N_FC -
C_FC))) {
+ fprintf(stderr, "Too many FEC blocks in T2 frame.\n");
+ mapped_items = stream_items + 1840 + (N_post / eta_mod) + (N_FC -
C_FC); /* avoid segfault */
+ }
+ zigzag_interleave = (gr_complex *) malloc(sizeof(gr_complex) *
mapped_items);
+ if (zigzag_interleave == NULL) {
+ fprintf(stderr, "Frame mapper 1st malloc, Out of memory.\n");
+ exit(1);
+ }
+ }
+ else {
+ set_output_multiple((N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) +
N_FC);
+ mapped_items = (N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) + N_FC;
+ if (mapped_items < (stream_items + 1840 + (N_post / eta_mod) + (N_FC -
C_FC))) {
+ fprintf(stderr, "Too many FEC blocks in T2 frame.\n");
+ mapped_items = stream_items + 1840 + (N_post / eta_mod) + (N_FC -
C_FC); /* avoid segfault */
+ }
+ zigzag_interleave = (gr_complex *) malloc(sizeof(gr_complex) *
mapped_items);
+ if (zigzag_interleave == NULL) {
+ fprintf(stderr, "Frame mapper 1st malloc, Out of memory.\n");
+ exit(1);
+ }
+ }
+ dummy_randomize = (gr_complex *) malloc(sizeof(gr_complex) *
mapped_items - stream_items - 1840 - (N_post / eta_mod) - (N_FC - C_FC));
+ if (dummy_randomize == NULL) {
+ free(zigzag_interleave);
+ fprintf(stderr, "Frame mapper 2nd malloc, Out of memory.\n");
+ exit(1);
+ }
+ init_dummy_randomizer();
+ init_l1_randomizer();
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_framemapper_cc_impl::~dvbt2_framemapper_cc_impl()
+ {
+ free(dummy_randomize);
+ free(zigzag_interleave);
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = stream_items * (noutput_items / mapped_items);
+ }
+
+#define CRC_POLY 0x04C11DB7
+
+ int
+ dvbt2_framemapper_cc_impl::add_crc32_bits(unsigned char *in, int length)
+ {
+ int crc = 0xffffffff;
+ int b;
+ int i = 0;
+
+ for (int n = 0; n < length; n++) {
+ b = in[i++] ^ ((crc >> 31) & 0x01);
+ crc <<= 1;
+ if (b) {
+ crc ^= CRC_POLY;
+ }
+ }
+
+ for (int n = 31; n >= 0; n--) {
+ in[i++] = (crc & (1 << n)) ? 1 : 0;
+ }
+ return 32;
+ }
+
+ int
+ dvbt2_framemapper_cc_impl::poly_mult(const int *ina, int lena, const int
*inb, int lenb, int *out)
+ {
+ memset(out, 0, sizeof(int) * (lena + lenb));
+
+ for (int i = 0; i < lena; i++) {
+ for (int j = 0; j < lenb; j++) {
+ if (ina[i] * inb[j] > 0) {
+ out[i + j]++; // count number of terms for this pwr of x
+ }
+ }
+ }
+ int max = 0;
+ for (int i = 0; i < lena + lenb; i++) {
+ out[i] = out[i] & 1; // If even ignore the term
+ if(out[i]) max = i;
+ }
+ // return the size of array to house the result.
+ return max + 1;
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::poly_pack(const int *pin, unsigned int* pout,
int len)
+ {
+ int lw = len / 32;
+ int ptr = 0;
+ unsigned int temp;
+ if (len % 32) {
+ lw++;
+ }
+
+ for (int i = 0; i < lw; i++) {
+ temp = 0x80000000;
+ pout[i] = 0;
+ for (int j = 0; j < 32; j++) {
+ if (pin[ptr++]) {
+ pout[i] |= temp;
+ }
+ temp >>= 1;
+ }
+ }
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::bch_poly_build_tables(void)
+ {
+ // Short polynomials
+ const int polys01[]={1,1,0,1,0,1,0,0,0,0,0,0,0,0,1};
+ const int polys02[]={1,0,0,0,0,0,1,0,1,0,0,1,0,0,1};
+ const int polys03[]={1,1,1,0,0,0,1,0,0,1,1,0,0,0,1};
+ const int polys04[]={1,0,0,0,1,0,0,1,1,0,1,0,1,0,1};
+ const int polys05[]={1,0,1,0,1,0,1,0,1,1,0,1,0,1,1};
+ const int polys06[]={1,0,0,1,0,0,0,1,1,1,0,0,0,1,1};
+ const int polys07[]={1,0,1,0,0,1,1,1,0,0,1,1,0,1,1};
+ const int polys08[]={1,0,0,0,0,1,0,0,1,1,1,1,0,0,1};
+ const int polys09[]={1,1,1,1,0,0,0,0,0,1,1,0,0,0,1};
+ const int polys10[]={1,0,0,1,0,0,1,0,0,1,0,1,1,0,1};
+ const int polys11[]={1,0,0,0,1,0,0,0,0,0,0,1,1,0,1};
+ const int polys12[]={1,1,1,1,0,1,1,1,1,0,1,0,0,1,1};
+
+ int len;
+ int polyout[2][200];
+
+ len = poly_mult(polys01, 15, polys02, 15, polyout[0]);
+ len = poly_mult(polys03, 15, polyout[0], len, polyout[1]);
+ len = poly_mult(polys04, 15, polyout[1], len, polyout[0]);
+ len = poly_mult(polys05, 15, polyout[0], len, polyout[1]);
+ len = poly_mult(polys06, 15, polyout[1], len, polyout[0]);
+ len = poly_mult(polys07, 15, polyout[0], len, polyout[1]);
+ len = poly_mult(polys08, 15, polyout[1], len, polyout[0]);
+ len = poly_mult(polys09, 15, polyout[0], len, polyout[1]);
+ len = poly_mult(polys10, 15, polyout[1], len, polyout[0]);
+ len = poly_mult(polys11, 15, polyout[0], len, polyout[1]);
+ len = poly_mult(polys12, 15, polyout[1], len, polyout[0]);
+ poly_pack(polyout[0], m_poly_s_12, 168);
+ }
+
+ inline void
+ dvbt2_framemapper_cc_impl::reg_6_shift(unsigned int *sr)
+ {
+ sr[5] = (sr[5] >> 1) | (sr[4] << 31);
+ sr[4] = (sr[4] >> 1) | (sr[3] << 31);
+ sr[3] = (sr[3] >> 1) | (sr[2] << 31);
+ sr[2] = (sr[2] >> 1) | (sr[1] << 31);
+ sr[1] = (sr[1] >> 1) | (sr[0] << 31);
+ sr[0] = (sr[0] >> 1);
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::l1pre_ldpc_lookup_generate(void)
+ {
+ int im;
+ int index;
+ int pbits;
+ int q;
+ index = 0;
+ im = 0;
+
+ pbits = FRAME_SIZE_SHORT - NBCH_1_4; //number of parity bits
+ q = 36;
+
+ for (int row = 0; row < 9; row++) {
+ for(int n = 0; n < 360; n++) {
+ for (int col = 1; col <= ldpc_tab_1_4S[row][0]; col++) {
+ l1pre_ldpc_encode.p[index] = (ldpc_tab_1_4S[row][col] + (n * q)) %
pbits;
+ l1pre_ldpc_encode.d[index] = im;
+ index++;
+ }
+ im++;
+ }
+ }
+ l1pre_ldpc_encode.table_length = index;
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::l1post_ldpc_lookup_generate(void)
+ {
+ int im;
+ int index;
+ int pbits;
+ int q;
+ index = 0;
+ im = 0;
+
+ pbits = FRAME_SIZE_SHORT - NBCH_1_2; //number of parity bits
+ q = 25;
+
+ for (int row = 0; row < 20; row++) {
+ for(int n = 0; n < 360; n++) {
+ for (int col = 1; col <= ldpc_tab_1_2S[row][0]; col++) {
+ l1post_ldpc_encode.p[index] = (ldpc_tab_1_2S[row][col] + (n * q))
% pbits;
+ l1post_ldpc_encode.d[index] = im;
+ index++;
+ }
+ im++;
+ }
+ }
+ l1post_ldpc_encode.table_length = index;
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::add_l1pre(gr_complex *out)
+ {
+ int temp, offset_bits = 0;
+ unsigned char b, value;
+ unsigned int shift[6];
+ int plen = FRAME_SIZE_SHORT - NBCH_1_4;
+ const unsigned char *d;
+ unsigned char *p;
+ unsigned char *l1pre = l1_temp;
+ L1Pre *l1preinit = &L1_Signalling[0].l1pre_data;
+ int g, o, index;
+
+ temp = l1preinit->type;
+ for (int n = 7; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1pre[offset_bits++] = l1preinit->bwt_ext;
+ temp = l1preinit->s1;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->s2;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ if (fef_present == FALSE) {
+ l1pre[offset_bits++] = 0;
+ }
+ else {
+ l1pre[offset_bits++] = 1;
+ }
+ l1pre[offset_bits++] = l1preinit->l1_repetition_flag;
+ temp = l1preinit->guard_interval;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->papr;
+ for (int n = 3; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->l1_mod;
+ for (int n = 3; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->l1_cod;
+ for (int n = 1; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->l1_fec_type;
+ for (int n = 1; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->l1_post_size;
+ for (int n = 17; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->l1_post_info_size;
+ for (int n = 17; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->pilot_pattern;
+ for (int n = 3; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->tx_id_availability;
+ for (int n = 7; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->cell_id;
+ for (int n = 15; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->network_id;
+ for (int n = 15; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->t2_system_id;
+ for (int n = 15; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->num_t2_frames;
+ for (int n = 7; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->num_data_symbols;
+ for (int n = 11; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->regen_flag;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1pre[offset_bits++] = l1preinit->l1_post_extension;
+ temp = l1preinit->num_rf;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->current_rf_index;
+ for (int n = 2; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1preinit->t2_version;
+ for (int n = 3; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1pre[offset_bits++] = l1preinit->l1_post_scrambled;
+ l1pre[offset_bits++] = l1preinit->t2_base_lite;
+ temp = l1preinit->reserved;
+ for (int n = 3; n >= 0; n--) {
+ l1pre[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ offset_bits += add_crc32_bits(l1pre, offset_bits);
+ /* Padding */
+ for (int n = KBCH_1_4 - offset_bits - 1; n >= 0; n--) {
+ l1pre[offset_bits++] = 0;
+ }
+ /* BCH */
+ offset_bits = 0;
+ memset(shift, 0, sizeof(unsigned int) * 6);
+ for (int j = 0; j < KBCH_1_4; j++) {
+ value = l1pre[offset_bits++];
+ b = (value ^ ((shift[5] & 0x01000000) ? 1 : 0));
+ reg_6_shift(shift);
+ if (b) {
+ shift[0] ^= m_poly_s_12[0];
+ shift[1] ^= m_poly_s_12[1];
+ shift[2] ^= m_poly_s_12[2];
+ shift[3] ^= m_poly_s_12[3];
+ shift[4] ^= m_poly_s_12[4];
+ shift[5] ^= m_poly_s_12[5];
+ }
+ }
+ for (int n = 0; n < NBCH_PARITY; n++) {
+ l1pre[offset_bits++] = (shift[5] & 0x01000000) ? 1 : 0;
+ reg_6_shift(shift);
+ }
+ /* LDPC */
+ d = l1_temp;
+ p = &l1_temp[NBCH_1_4];
+ memset(p, 0, sizeof(unsigned char)*plen);
+ for(int j = 0; j < l1pre_ldpc_encode.table_length; j++) {
+ p[l1pre_ldpc_encode.p[j]] ^= d[l1pre_ldpc_encode.d[j]];
+ }
+ for(int j = 1; j < plen; j++) {
+ p[j] ^= p[j-1];
+ }
+ /* Puncturing */
+ for (int c = 0; c < 31; c++) {
+ g = pre_puncture[c];
+ for (int c2 = 0; c2 < 360; c2++) {
+ o = (c2 * 36) + g + NBCH_1_4;
+ l1_temp[o] = 0x55;
+ }
+ }
+ g = pre_puncture[31];
+ for (int c2 = 0; c2 < 328; c2++) {
+ o = (c2 * 36) + g + NBCH_1_4;
+ l1_temp[o] = 0x55;
+ }
+ /* remove padding and punctured bits, BPSK modulate */
+ index = 0;
+ for (int w = 0; w < KSIG_PRE; w++) {
+ out[index++] = m_bpsk[l1_temp[w]];
+ }
+ for (int w = 0; w < NBCH_PARITY; w++) {
+ out[index++] = m_bpsk[l1_temp[w + KBCH_1_4]];
+ }
+ for (int w = 0; w < FRAME_SIZE_SHORT - NBCH_1_4; w++) {
+ if (l1_temp[w + NBCH_1_4] != 0x55) {
+ out[index++] = m_bpsk[l1_temp[w + NBCH_1_4]];
+ }
+ }
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::add_l1post(gr_complex *out, int t2_frame_num)
+ {
+ int temp, offset_bits = 0;
+ unsigned char b, value;
+ unsigned int shift[6];
+ int plen = FRAME_SIZE_SHORT - NBCH_1_4;
+ const unsigned char *d;
+ unsigned char *p;
+ unsigned char *l1post = l1_interleave;
+ L1Post *l1postinit = &L1_Signalling[0].l1post_data;
+ int m, g, o, last, index;
+ const int *post_padding;
+ const int *post_puncture;
+ int rows, numCols, mod, offset, pack, produced;
+ unsigned char *cols[12];
+
+ temp = l1postinit->sub_slices_per_frame;
+ for (int n = 14; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->num_plp;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->num_aux;
+ for (int n = 3; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->aux_config_rfu;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->rf_idx;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->frequency;
+ for (int n = 31; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ if (fef_present == TRUE) {
+ temp = 0;
+ for (int n = 3; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = fef_length;
+ for (int n = 21; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = fef_interval;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ }
+ temp = l1postinit->plp_id;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_type;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_payload_type;
+ for (int n = 4; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1post[offset_bits++] = l1postinit->ff_flag;
+ temp = l1postinit->first_rf_idx;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->first_frame_idx;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_group_id;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_cod;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_mod;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1post[offset_bits++] = l1postinit->plp_rotation;
+ temp = l1postinit->plp_fec_type;
+ for (int n = 1; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_num_blocks_max;
+ for (int n = 9; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->frame_interval;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->time_il_length;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1post[offset_bits++] = l1postinit->time_il_type;
+ l1post[offset_bits++] = l1postinit->in_band_a_flag;
+ l1post[offset_bits++] = l1postinit->in_band_b_flag;
+ temp = l1postinit->reserved_1;
+ for (int n = 10; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_mode;
+ for (int n = 1; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ l1post[offset_bits++] = l1postinit->static_flag;
+ l1post[offset_bits++] = l1postinit->static_padding_flag;
+ temp = l1postinit->fef_length_msb;
+ for (int n = 1; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->reserved_2;
+ for (int n = 29; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = t2_frame_num;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->sub_slice_interval;
+ for (int n = 21; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->type_2_start;
+ for (int n = 21; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->l1_change_counter;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->start_rf_idx;
+ for (int n = 2; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->reserved_3;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_id_dynamic;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_start;
+ for (int n = 21; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->plp_num_blocks;
+ for (int n = 9; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->reserved_4;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ temp = l1postinit->reserved_5;
+ for (int n = 7; n >= 0; n--) {
+ l1post[offset_bits++] = temp & (1 << n) ? 1 : 0;
+ }
+ offset_bits += add_crc32_bits(l1post, offset_bits);
+ if (l1_scrambled == TRUE) {
+ for (int n = 0; n < offset_bits; n++) {
+ l1post[n] = l1post[n] ^ l1_randomize[n];
+ }
+ }
+ /* Padding */
+ switch (l1_constellation) {
+ case L1_MOD_BPSK:
+ post_padding = post_padding_bqpsk;
+ break;
+ case L1_MOD_QPSK:
+ post_padding = post_padding_bqpsk;
+ break;
+ case L1_MOD_16QAM:
+ post_padding = post_padding_16qam;
+ break;
+ case L1_MOD_64QAM:
+ post_padding = post_padding_64qam;
+ break;
+ default:
+ post_padding = post_padding_bqpsk;
+ break;
+ }
+ memset(l1_map, 0, KBCH_1_2);
+ if (offset_bits <= 360) {
+ m = 20 - 1;
+ last = 360 - offset_bits;
+ }
+ else {
+ m = (KBCH_1_2 - offset_bits) / 360;
+ last = KBCH_1_2 - offset_bits - (360 * m);
+ }
+ for (int n = 0; n < m; n++) {
+ index = post_padding[n] * 360;
+ if (post_padding[n] == 19) {
+ for (int w = 0; w < 192; w++) {
+ l1_map[index++] = 0x7;
+ }
+ }
+ else {
+ for (int w = 0; w < 360; w++) {
+ l1_map[index++] = 0x7;
+ }
+ }
+ }
+ if (post_padding[m] == 19) {
+ index = (post_padding[m] * 360) + 192 - last;
+ }
+ else {
+ index = (post_padding[m] * 360) + 360 - last;
+ }
+ for (int w = 0; w < last; w++) {
+ l1_map[index++] = 0x7;
+ }
+ index = 0;
+ l1post = l1_temp;
+ for (int n = 0; n < KBCH_1_2; n++) {
+ if (l1_map[n] != 0x7) {
+ l1post[n] = l1_interleave[index++];
+ }
+ else {
+ l1post[n] = 0;
+ }
+ }
+ /* BCH */
+ offset_bits = 0;
+ memset(shift, 0, sizeof(unsigned int) * 6);
+ for (int j = 0; j < KBCH_1_2; j++) {
+ value = l1post[offset_bits++];
+ b = (value ^ ((shift[5] & 0x01000000) ? 1 : 0));
+ reg_6_shift(shift);
+ if (b) {
+ shift[0] ^= m_poly_s_12[0];
+ shift[1] ^= m_poly_s_12[1];
+ shift[2] ^= m_poly_s_12[2];
+ shift[3] ^= m_poly_s_12[3];
+ shift[4] ^= m_poly_s_12[4];
+ shift[5] ^= m_poly_s_12[5];
+ }
+ }
+ for (int n = 0; n < NBCH_PARITY; n++) {
+ l1post[offset_bits++] = (shift[5] & 0x01000000) ? 1 : 0;
+ reg_6_shift(shift);
+ }
+ /* LDPC */
+ d = l1_temp;
+ p = &l1_temp[NBCH_1_2];
+ memset(p, 0, sizeof(unsigned char)*plen);
+ for(int j = 0; j < l1post_ldpc_encode.table_length; j++) {
+ p[l1post_ldpc_encode.p[j]] ^= d[l1post_ldpc_encode.d[j]];
+ }
+ for(int j = 1; j < plen; j++) {
+ p[j] ^= p[j-1];
+ }
+ /* Puncturing */
+ switch (l1_constellation) {
+ case L1_MOD_BPSK:
+ post_puncture = post_puncture_bqpsk;
+ break;
+ case L1_MOD_QPSK:
+ post_puncture = post_puncture_bqpsk;
+ break;
+ case L1_MOD_16QAM:
+ post_puncture = post_puncture_16qam;
+ break;
+ case L1_MOD_64QAM:
+ post_puncture = post_puncture_64qam;
+ break;
+ default:
+ post_puncture = post_puncture_bqpsk;
+ break;
+ }
+ for (int c = 0; c < (N_punc / 360); c++) {
+ g = post_puncture[c];
+ for (int c2 = 0; c2 < 360; c2++) {
+ o = (c2 * 25) + g + NBCH_1_2;
+ l1_temp[o] = 0x55;
+ }
+ }
+ g = post_puncture[(N_punc / 360)];
+ for (int c2 = 0; c2 < (N_punc - ((N_punc / 360) * 360)); c2++) {
+ o = (c2 * 25) + g + NBCH_1_2;
+ l1_temp[o] = 0x55;
+ }
+ /* remove padding and punctured bits */
+ index = 0;
+ for (int w = 0; w < KBCH_1_2; w++) {
+ if (l1_map[w] != 0x7) {
+ l1_interleave[index++] = l1_temp[w];
+ }
+ }
+ for (int w = 0; w < NBCH_PARITY; w++) {
+ l1_interleave[index++] = l1_temp[w + KBCH_1_2];
+ }
+ for (int w = 0; w < FRAME_SIZE_SHORT - NBCH_1_2; w++) {
+ if (l1_temp[w + NBCH_1_2] != 0x55) {
+ l1_interleave[index++] = l1_temp[w + NBCH_1_2];
+ }
+ }
+ /* Bit interleave for 16QAM and 64QAM */
+ if (l1_constellation == L1_MOD_16QAM || l1_constellation ==
L1_MOD_64QAM) {
+ if (l1_constellation == L1_MOD_16QAM) {
+ numCols = 8;
+ rows = N_post / 8;
+ }
+ else {
+ numCols = 12;
+ rows = N_post / 12;
+ }
+ for (int j = 0; j < numCols; j++) {
+ cols[j] = &l1_interleave[rows * j];
+ }
+ index = 0;
+ for (int k = 0; k < rows; k++) {
+ for (int w = 0; w < numCols; w++) {
+ *l1post++ = *(cols[w] + index);
+ }
+ index++;
+ }
+ }
+ switch (l1_constellation) {
+ case L1_MOD_BPSK:
+ index = 0;
+ produced = 0;
+ for (int d = 0; d < N_post; d++) {
+ out[produced++] = m_bpsk[l1_interleave[index++]];
+ }
+ break;
+ case L1_MOD_QPSK:
+ mod = 2;
+ index = 0;
+ produced = 0;
+ for (int d = 0; d < N_post / mod; d++) {
+ pack = 0;
+ for (int e = 0; e < mod; e++) {
+ pack |= l1_interleave[index++];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = m_qpsk[pack];
+ }
+ break;
+ case L1_MOD_16QAM:
+ mod = 4;
+ index = 0;
+ produced = 0;
+ for (int d = 0; d < N_post / (mod * 2); d++) {
+ pack = 0;
+ for (int e = 0; e < (mod * 2); e++) {
+ offset = mux16[e];
+ pack |= l1_temp[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = m_16qam[pack >> 4];
+ out[produced++] = m_16qam[pack & 0xf];
+ index += (mod * 2);
+ }
+ break;
+ case L1_MOD_64QAM:
+ mod = 6;
+ index = 0;
+ produced = 0;
+ for (int d = 0; d < N_post / (mod * 2); d++) {
+ pack = 0;
+ for (int e = 0; e < (mod * 2); e++) {
+ offset = mux64[e];
+ pack |= l1_temp[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = m_64qam[pack >> 6];
+ out[produced++] = m_64qam[pack & 0x3f];
+ index += (mod * 2);
+ }
+ break;
+ }
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::init_dummy_randomizer(void)
+ {
+ int sr = 0x4A80;
+ for (int i = 0; i < mapped_items - stream_items - 1840 - (N_post /
eta_mod) - (N_FC - C_FC); i++) {
+ int b = ((sr) ^ (sr >> 1)) & 1;
+ if (b) {
+ dummy_randomize[i].real() = -1.0;
+ }
+ else {
+ dummy_randomize[i].real() = 1.0;
+ }
+ dummy_randomize[i].imag() = 0;
+ sr >>= 1;
+ if(b) {
+ sr |= 0x4000;
+ }
+ }
+ }
+
+ void
+ dvbt2_framemapper_cc_impl::init_l1_randomizer(void)
+ {
+ int sr = 0x4A80;
+ for (int i = 0; i < KBCH_1_2; i++) {
+ int b = ((sr) ^ (sr >> 1)) & 1;
+ l1_randomize[i] = b;
+ sr >>= 1;
+ if(b) {
+ sr |= 0x4000;
+ }
+ }
+ }
+
+ int
+ dvbt2_framemapper_cc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ int index = 0;
+ int read, save, count = 0;
+ gr_complex *interleave = zigzag_interleave;
+
+ for (int i = 0; i < noutput_items; i += mapped_items) {
+ if (N_P2 == 1) {
+ for (int j = 0; j < 1840; j++) {
+ *out++ = l1pre_cache[index++];
+ }
+ add_l1post(out, t2_frame_num);
+ t2_frame_num = (t2_frame_num + 1) % t2_frames;
+ out += N_post / eta_mod;
+ for (int j = 0; j < stream_items; j++) {
+ *out++ = *in++;
+ }
+ index = 0;
+ for (int j = 0; j < mapped_items - stream_items - 1840 - (N_post /
eta_mod) - (N_FC - C_FC); j++) {
+ *out++ = dummy_randomize[index++];
+ }
+ for (int j = 0; j < N_FC - C_FC; j++) {
+ *out++ = unmodulated[0];
+ }
+ }
+ else {
+ for (int j = 0; j < 1840; j++) {
+ *interleave++ = l1pre_cache[index++];
+ }
+ add_l1post(interleave, t2_frame_num);
+ t2_frame_num = (t2_frame_num + 1) % t2_frames;
+ interleave += N_post / eta_mod;
+ for (int j = 0; j < stream_items; j++) {
+ *interleave++ = *in++;
+ }
+ index = 0;
+ for (int j = 0; j < mapped_items - stream_items - 1840 - (N_post /
eta_mod) - (N_FC - C_FC); j++) {
+ *interleave++ = dummy_randomize[index++];
+ }
+ for (int j = 0; j < N_FC - C_FC; j++) {
+ *interleave++ = unmodulated[0];
+ }
+ interleave = zigzag_interleave;
+ read = 0;
+ index = 0;
+ for (int n = 0; n < N_P2; n++) {
+ save = read;
+ for (int j = 0; j < 1840 / N_P2; j++) {
+ out[index++] = interleave[read];
+ count++;
+ read += N_P2;
+ }
+ read = save + 1;
+ index += C_P2 - (1840 / N_P2);
+ }
+ read = 1840;
+ index = 1840 / N_P2;
+ for (int n = 0; n < N_P2; n++) {
+ save = read;
+ for (int j = 0; j < (N_post / eta_mod) / N_P2; j++) {
+ out[index++] = interleave[read];
+ count++;
+ read += N_P2;
+ }
+ read = save + 1;
+ index += C_P2 - ((N_post / eta_mod) / N_P2);
+ }
+ read = 1840 + (N_post / eta_mod);
+ index = (1840 / N_P2) + ((N_post / eta_mod) / N_P2);
+ for (int n = 0; n < N_P2; n++) {
+ for (int j = 0; j < C_P2 - (1840 / N_P2) - ((N_post / eta_mod) /
N_P2); j++) {
+ out[index++] = interleave[read++];
+ count++;
+ }
+ index += C_P2 - (C_P2 - (1840 / N_P2) - ((N_post / eta_mod) /
N_P2));
+ }
+ index -= C_P2 - (C_P2 - (1840 / N_P2) - ((N_post / eta_mod) / N_P2));
+ for (int j = 0; j < mapped_items - count; j++) {
+ out[index++] = interleave[read++];
+ }
+ out += mapped_items;
+ }
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (stream_items);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const int dvbt2_framemapper_cc_impl::ldpc_tab_1_4S[9][13]=
+ {
+ {12,6295,9626,304,7695,4839,4936,1660,144,11203,5567,6347,12557},
+ {12,10691,4988,3859,3734,3071,3494,7687,10313,5964,8069,8296,11090},
+ {12,10774,3613,5208,11177,7676,3549,8746,6583,7239,12265,2674,4292},
+ {12,11869,3708,5981,8718,4908,10650,6805,3334,2627,10461,9285,11120},
+ {3,7844,3079,10773,0,0,0,0,0,0,0,0,0},
+ {3,3385,10854,5747,0,0,0,0,0,0,0,0,0},
+ {3,1360,12010,12202,0,0,0,0,0,0,0,0,0},
+ {3,6189,4241,2343,0,0,0,0,0,0,0,0,0},
+ {3,9840,12726,4977,0,0,0,0,0,0,0,0,0}
+ };
+
+ const int dvbt2_framemapper_cc_impl::ldpc_tab_1_2S[20][9]=
+ {
+ {8,20,712,2386,6354,4061,1062,5045,5158},
+ {8,21,2543,5748,4822,2348,3089,6328,5876},
+ {8,22,926,5701,269,3693,2438,3190,3507},
+ {8,23,2802,4520,3577,5324,1091,4667,4449},
+ {8,24,5140,2003,1263,4742,6497,1185,6202},
+ {3,0,4046,6934,0,0,0,0,0},
+ {3,1,2855,66,0,0,0,0,0},
+ {3,2,6694,212,0,0,0,0,0},
+ {3,3,3439,1158,0,0,0,0,0},
+ {3,4,3850,4422,0,0,0,0,0},
+ {3,5,5924,290,0,0,0,0,0},
+ {3,6,1467,4049,0,0,0,0,0},
+ {3,7,7820,2242,0,0,0,0,0},
+ {3,8,4606,3080,0,0,0,0,0},
+ {3,9,4633,7877,0,0,0,0,0},
+ {3,10,3884,6868,0,0,0,0,0},
+ {3,11,8935,4996,0,0,0,0,0},
+ {3,12,3028,764,0,0,0,0,0},
+ {3,13,5988,1057,0,0,0,0,0},
+ {3,14,7411,3450,0,0,0,0,0}
+ };
+
+ const int dvbt2_framemapper_cc_impl::pre_puncture[36] =
+ {
+ 27, 13, 29, 32, 5, 0, 11, 21, 33, 20, 25, 28, 18, 35, 8, 3, 9, 31, 22,
24, 7, 14, 17, 4, 2, 26, 16, 34, 19, 10, 12, 23, 1, 6, 30, 15
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_padding_bqpsk[20] =
+ {
+ 18, 17, 16, 15, 14, 13, 12, 11, 4, 10, 9, 8, 3, 2, 7, 6, 5, 1, 19, 0
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_padding_16qam[20] =
+ {
+ 18, 17, 16, 15, 14, 13, 12, 11, 4, 10, 9, 8, 7, 3, 2, 1, 6, 5, 19, 0
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_padding_64qam[20] =
+ {
+ 18, 17, 16, 4, 15, 14, 13, 12, 3, 11, 10, 9, 2, 8, 7, 1, 6, 5, 19, 0
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_puncture_bqpsk[25] =
+ {
+ 6, 4, 18, 9, 13, 8, 15, 20, 5, 17, 2, 24, 10, 22, 12, 3, 16, 23, 1, 14,
0, 21, 19, 7, 11
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_puncture_16qam[25] =
+ {
+ 6, 4, 13, 9, 18, 8, 15, 20, 5, 17, 2, 22, 24, 7, 12, 1, 16, 23, 14, 0,
21, 10, 19, 11, 3
+ };
+
+ const int dvbt2_framemapper_cc_impl::post_puncture_64qam[25] =
+ {
+ 6, 15, 13, 10, 3, 17, 21, 8, 5, 19, 2, 23, 16, 24, 7, 18, 1, 12, 20, 0,
4, 14, 9, 11, 22
+ };
+
+ const int dvbt2_framemapper_cc_impl::mux16[8] =
+ {
+ 7, 1, 3, 5, 2, 4, 6, 0
+ };
+
+ const int dvbt2_framemapper_cc_impl::mux64[12] =
+ {
+ 11, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 0
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.h
new file mode 100644
index 0000000..6cbd6b5
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_framemapper_cc_impl.h
@@ -0,0 +1,211 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_framemapper_cc.h>
+#include "dvb/dvb_defines.h"
+
+#define KBCH_1_4 3072
+#define NBCH_1_4 3240
+#define KBCH_1_2 7032
+#define NBCH_1_2 7200
+
+#define KSIG_PRE 200
+#define KSIG_POST 350
+#define NBCH_PARITY 168
+
+typedef struct{
+ int type;
+ int bwt_ext;
+ int s1;
+ int s2;
+ int l1_repetition_flag;
+ int guard_interval;
+ int papr;
+ int l1_mod;
+ int l1_cod;
+ int l1_fec_type;
+ int l1_post_size;
+ int l1_post_info_size;
+ int pilot_pattern;
+ int tx_id_availability;
+ int cell_id;
+ int network_id;
+ int t2_system_id;
+ int num_t2_frames;
+ int num_data_symbols;
+ int regen_flag;
+ int l1_post_extension;
+ int num_rf;
+ int current_rf_index;
+ int t2_version;
+ int l1_post_scrambled;
+ int t2_base_lite;
+ int reserved;
+ int crc_32;
+}L1Pre;
+
+typedef struct{
+ int sub_slices_per_frame;
+ int num_plp;
+ int num_aux;
+ int aux_config_rfu;
+ int rf_idx;
+ int frequency;
+ int plp_id;
+ int plp_type;
+ int plp_payload_type;
+ int ff_flag;
+ int first_rf_idx;
+ int first_frame_idx;
+ int plp_group_id;
+ int plp_cod;
+ int plp_mod;
+ int plp_rotation;
+ int plp_fec_type;
+ int plp_num_blocks_max;
+ int frame_interval;
+ int time_il_length;
+ int time_il_type;
+ int in_band_a_flag;
+ int in_band_b_flag;
+ int reserved_1;
+ int plp_mode;
+ int static_flag;
+ int static_padding_flag;
+ int fef_length_msb;
+ int reserved_2;
+ int frame_idx;
+ int sub_slice_interval;
+ int type_2_start;
+ int l1_change_counter;
+ int start_rf_idx;
+ int reserved_3;
+ int plp_id_dynamic;
+ int plp_start;
+ int plp_num_blocks;
+ int reserved_4;
+ int reserved_5;
+}L1Post;
+
+typedef struct{
+ L1Pre l1pre_data;
+ L1Post l1post_data;
+}L1Signalling;
+
+typedef struct{
+ int table_length;
+ int d[LDPC_ENCODE_TABLE_LENGTH];
+ int p[LDPC_ENCODE_TABLE_LENGTH];
+}l1pre_ldpc_encode_table;
+
+typedef struct{
+ int table_length;
+ int d[LDPC_ENCODE_TABLE_LENGTH];
+ int p[LDPC_ENCODE_TABLE_LENGTH];
+}l1post_ldpc_encode_table;
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_framemapper_cc_impl : public dvbt2_framemapper_cc
+ {
+ private:
+ int cell_size;
+ int stream_items;
+ int mapped_items;
+ int l1_constellation;
+ int fft_size;
+ int eta_mod;
+ int t2_frames;
+ int t2_frame_num;
+ int l1_scrambled;
+ int fef_present;
+ int fef_length;
+ int fef_interval;
+ int N_P2;
+ int C_P2;
+ int N_FC;
+ int C_FC;
+ int C_DATA;
+ int N_post;
+ int N_punc;
+ L1Signalling L1_Signalling[1];
+ void add_l1pre(gr_complex *);
+ void add_l1post(gr_complex *, int);
+ int add_crc32_bits(unsigned char *, int);
+ unsigned int m_poly_s_12[6];
+ int poly_mult(const int*, int, const int*, int, int*);
+ void poly_pack(const int*, unsigned int*, int);
+ void poly_reverse(int*, int*, int);
+ inline void reg_6_shift(unsigned int*);
+ void bch_poly_build_tables(void);
+ void l1pre_ldpc_lookup_generate(void);
+ void l1post_ldpc_lookup_generate(void);
+ void init_dummy_randomizer(void);
+ void init_l1_randomizer(void);
+ l1pre_ldpc_encode_table l1pre_ldpc_encode;
+ l1post_ldpc_encode_table l1post_ldpc_encode;
+ unsigned char l1_temp[FRAME_SIZE_SHORT];
+ unsigned char l1_interleave[FRAME_SIZE_SHORT];
+ unsigned char l1_map[KBCH_1_2];
+ unsigned char l1_randomize[KBCH_1_2];
+ gr_complex *zigzag_interleave;
+ gr_complex *dummy_randomize;
+ gr_complex l1pre_cache[1840];
+ gr_complex unmodulated[1];
+ gr_complex m_bpsk[2];
+ gr_complex m_qpsk[4];
+ gr_complex m_16qam[16];
+ gr_complex m_64qam[64];
+
+ const static int ldpc_tab_1_4S[9][13];
+ const static int ldpc_tab_1_2S[20][9];
+
+ const static int pre_puncture[36];
+ const static int post_padding_bqpsk[20];
+ const static int post_padding_16qam[20];
+ const static int post_padding_64qam[20];
+ const static int post_puncture_bqpsk[25];
+ const static int post_puncture_16qam[25];
+ const static int post_puncture_64qam[25];
+
+ const static int mux16[8];
+ const static int mux64[12];
+
+ public:
+ dvbt2_framemapper_cc_impl(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation, dvbt2_rotation_t rotation, int
fecblocks, int tiblocks, dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_guardinterval_t guardinterval, dvbt2_l1constellation_t
l1constellation, dvbt2_pilotpattern_t pilotpattern, int t2frames, int
numdatasyms, dvbt2_papr_t paprmode, dvbt2_version_t version, dvbt2_preamble_t
preamble, dvbt2_inputmode_t inputmode, dvbt2_res [...]
+ ~dvbt2_framemapper_cc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_FRAMEMAPPER_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
new file mode 100644
index 0000000..acee743
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
@@ -0,0 +1,876 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_freqinterleaver_cc_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_freqinterleaver_cc::sptr
+ dvbt2_freqinterleaver_cc::make(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_freqinterleaver_cc_impl(carriermode, fftsize, pilotpattern,
guardinterval, numdatasyms, paprmode, version, preamble));
+ }
+
+ /*
+ * The private constructor
+ */
+
dvbt2_freqinterleaver_cc_impl::dvbt2_freqinterleaver_cc_impl(dvbt2_extended_carrier_t
carriermode, dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble)
+ : gr::sync_block("dvbt2_freqinterleaver_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ int max_states, xor_size, pn_mask, result;
+ int q_even = 0;
+ int q_odd = 0;
+ int q_evenP2 = 0;
+ int q_oddP2 = 0;
+ int q_evenFC = 0;
+ int q_oddFC = 0;
+ int lfsr = 0;
+ int logic1k[2] = {0, 4};
+ int logic2k[2] = {0, 3};
+ int logic4k[2] = {0, 2};
+ int logic8k[4] = {0, 1, 4, 6};
+ int logic16k[6] = {0, 1, 4, 5, 9, 11};
+ int logic32k[4] = {0, 1, 2, 12};
+ int *logic;
+ const int *bitpermeven, *bitpermodd;
+ int pn_degree, even, odd;
+ if ((preamble == PREAMBLE_T2_SISO) || (preamble ==
PREAMBLE_T2_LITE_SISO)) {
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 558;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1118;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2236;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4472;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8944;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 22432;
+ break;
+ }
+ }
+ else {
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 546;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1098;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2198;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4398;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8814;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 17612;
+ break;
+ }
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ pn_degree = 9;
+ pn_mask = 0x1ff;
+ max_states = 1024;
+ logic = &logic1k[0];
+ xor_size = 2;
+ bitpermeven = &bitperm1keven[0];
+ bitpermodd = &bitperm1kodd[0];
+ break;
+ case FFTSIZE_2K:
+ pn_degree = 10;
+ pn_mask = 0x3ff;
+ max_states = 2048;
+ logic = &logic2k[0];
+ xor_size = 2;
+ bitpermeven = &bitperm2keven[0];
+ bitpermodd = &bitperm2kodd[0];
+ break;
+ case FFTSIZE_4K:
+ pn_degree = 11;
+ pn_mask = 0x7ff;
+ max_states = 4096;
+ logic = &logic4k[0];
+ xor_size = 2;
+ bitpermeven = &bitperm4keven[0];
+ bitpermodd = &bitperm4kodd[0];
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ pn_degree = 12;
+ pn_mask = 0xfff;
+ max_states = 8192;
+ logic = &logic8k[0];
+ xor_size = 4;
+ bitpermeven = &bitperm8keven[0];
+ bitpermodd = &bitperm8kodd[0];
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ pn_degree = 13;
+ pn_mask = 0x1fff;
+ max_states = 16384;
+ logic = &logic16k[0];
+ xor_size = 6;
+ bitpermeven = &bitperm16keven[0];
+ bitpermodd = &bitperm16kodd[0];
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ pn_degree = 14;
+ pn_mask = 0x3fff;
+ max_states = 32768;
+ logic = &logic32k[0];
+ xor_size = 4;
+ bitpermeven = &bitperm32k[0];
+ bitpermodd = &bitperm32k[0];
+ break;
+ default:
+ pn_degree = 0;
+ pn_mask = 0;
+ max_states = 0;
+ logic = &logic1k[0];
+ xor_size = 0;
+ break;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 764;
+ N_FC = 568;
+ C_FC = 402;
+ break;
+ case PILOT_PP2:
+ C_DATA = 768;
+ N_FC = 710;
+ C_FC = 654;
+ break;
+ case PILOT_PP3:
+ C_DATA = 798;
+ N_FC = 710;
+ C_FC = 490;
+ break;
+ case PILOT_PP4:
+ C_DATA = 804;
+ N_FC = 780;
+ C_FC = 707;
+ break;
+ case PILOT_PP5:
+ C_DATA = 818;
+ N_FC = 780;
+ C_FC = 544;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 10;
+ }
+ if (N_FC != 0) {
+ N_FC -= 10;
+ }
+ if (C_FC != 0) {
+ C_FC -= 10;
+ }
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 1522;
+ N_FC = 1136;
+ C_FC = 804;
+ break;
+ case PILOT_PP2:
+ C_DATA = 1532;
+ N_FC = 1420;
+ C_FC = 1309;
+ break;
+ case PILOT_PP3:
+ C_DATA = 1596;
+ N_FC = 1420;
+ C_FC = 980;
+ break;
+ case PILOT_PP4:
+ C_DATA = 1602;
+ N_FC = 1562;
+ C_FC = 1415;
+ break;
+ case PILOT_PP5:
+ C_DATA = 1632;
+ N_FC = 1562;
+ C_FC = 1088;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 1646;
+ N_FC = 1632;
+ C_FC = 1396;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 18;
+ }
+ if (N_FC != 0) {
+ N_FC -= 18;
+ }
+ if (C_FC != 0) {
+ C_FC -= 18;
+ }
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 3084;
+ N_FC = 2272;
+ C_FC = 1609;
+ break;
+ case PILOT_PP2:
+ C_DATA = 3092;
+ N_FC = 2840;
+ C_FC = 2619;
+ break;
+ case PILOT_PP3:
+ C_DATA = 3228;
+ N_FC = 2840;
+ C_FC = 1961;
+ break;
+ case PILOT_PP4:
+ C_DATA = 3234;
+ N_FC = 3124;
+ C_FC = 2831;
+ break;
+ case PILOT_PP5:
+ C_DATA = 3298;
+ N_FC = 3124;
+ C_FC = 2177;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 3328;
+ N_FC = 3266;
+ C_FC = 2792;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 36;
+ }
+ if (N_FC != 0) {
+ N_FC -= 36;
+ }
+ if (C_FC != 0) {
+ C_FC -= 36;
+ }
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6208;
+ N_FC = 4544;
+ C_FC = 3218;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6214;
+ N_FC = 5680;
+ C_FC = 5238;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6494;
+ N_FC = 5680;
+ C_FC = 3922;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6498;
+ N_FC = 6248;
+ C_FC = 5662;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6634;
+ N_FC = 6248;
+ C_FC = 4354;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6698;
+ N_FC = 6532;
+ C_FC = 5585;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6698;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6296;
+ N_FC = 4608;
+ C_FC = 3264;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6298;
+ N_FC = 5760;
+ C_FC = 5312;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6584;
+ N_FC = 5760;
+ C_FC = 3978;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6588;
+ N_FC = 6336;
+ C_FC = 5742;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6728;
+ N_FC = 6336;
+ C_FC = 4416;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6788;
+ N_FC = 6624;
+ C_FC = 5664;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6788;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 72;
+ }
+ if (N_FC != 0) {
+ N_FC -= 72;
+ }
+ if (C_FC != 0) {
+ C_FC -= 72;
+ }
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12418;
+ N_FC = 9088;
+ C_FC = 6437;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12436;
+ N_FC = 11360;
+ C_FC = 10476;
+ break;
+ case PILOT_PP3:
+ C_DATA = 12988;
+ N_FC = 11360;
+ C_FC = 7845;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13002;
+ N_FC = 12496;
+ C_FC = 11324;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13272;
+ N_FC = 12496;
+ C_FC = 8709;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13288;
+ N_FC = 13064;
+ C_FC = 11801;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13416;
+ N_FC = 13064;
+ C_FC = 11170;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13406;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12678;
+ N_FC = 9280;
+ C_FC = 6573;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12698;
+ N_FC = 11600;
+ C_FC = 10697;
+ break;
+ case PILOT_PP3:
+ C_DATA = 13262;
+ N_FC = 11600;
+ C_FC = 8011;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13276;
+ N_FC = 12760;
+ C_FC = 11563;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13552;
+ N_FC = 12760;
+ C_FC = 8893;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13568;
+ N_FC = 13340;
+ C_FC = 12051;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13698;
+ N_FC = 13340;
+ C_FC = 11406;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13688;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 144;
+ }
+ if (N_FC != 0) {
+ N_FC -= 144;
+ }
+ if (C_FC != 0) {
+ C_FC -= 144;
+ }
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 24886;
+ N_FC = 22720;
+ C_FC = 20952;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26022;
+ N_FC = 24992;
+ C_FC = 22649;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 26592;
+ N_FC = 26128;
+ C_FC = 23603;
+ break;
+ case PILOT_PP7:
+ C_DATA = 26836;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 26812;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 25412;
+ N_FC = 23200;
+ C_FC = 21395;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26572;
+ N_FC = 25520;
+ C_FC = 23127;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 27152;
+ N_FC = 26680;
+ C_FC = 24102;
+ break;
+ case PILOT_PP7:
+ C_DATA = 27404;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 27376;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 288;
+ }
+ if (N_FC != 0) {
+ N_FC -= 288;
+ }
+ if (C_FC != 0) {
+ C_FC -= 288;
+ }
+ }
+ break;
+ }
+ if ((preamble == PREAMBLE_T2_SISO) || (preamble ==
PREAMBLE_T2_LITE_SISO)) {
+ if (guardinterval == GI_1_128 && pilotpattern == PILOT_PP7) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_32 && pilotpattern == PILOT_PP4) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_16 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_19_256 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ }
+ for (int i = 0; i < max_states; i++) {
+ if (i == 0 || i == 1) {
+ lfsr = 0;
+ }
+ else if (i == 2) {
+ lfsr = 1;
+ }
+ else {
+ result = 0;
+ for (int k = 0; k < xor_size; k++) {
+ result ^= (lfsr >> logic[k]) & 1;
+ }
+ lfsr &= pn_mask;
+ lfsr >>= 1;
+ lfsr |= result << (pn_degree - 1);
+ }
+ even = 0;
+ odd = 0;
+ for (int n = 0; n < pn_degree; n++) {
+ even |= ((lfsr >> n) & 0x1) << bitpermeven[n];
+ }
+ for (int n = 0; n < pn_degree; n++) {
+ odd |= ((lfsr >> n) & 0x1) << bitpermodd[n];
+ }
+ even = even + ((i % 2) * (max_states / 2));
+ odd = odd + ((i % 2) * (max_states / 2));
+ if (even < C_DATA) {
+ Heven[q_even++] = even;
+ }
+ if (odd < C_DATA) {
+ Hodd[q_odd++] = odd;
+ }
+ if (even < C_P2) {
+ HevenP2[q_evenP2++] = even;
+ }
+ if (odd < C_P2) {
+ HoddP2[q_oddP2++] = odd;
+ }
+ if (even < N_FC) {
+ HevenFC[q_evenFC++] = even;
+ }
+ if (odd < N_FC) {
+ HoddFC[q_oddFC++] = odd;
+ }
+ }
+ if (fftsize == FFTSIZE_32K || fftsize == FFTSIZE_32K_T2GI) {
+ for (int j = 0; j < q_odd; j++) {
+ int a;
+ a = Hodd[j];
+ Heven[a] = j;
+ }
+ for (int j = 0; j < q_oddP2; j++) {
+ int a;
+ a = HoddP2[j];
+ HevenP2[a] = j;
+ }
+ for (int j = 0; j < q_oddFC; j++) {
+ int a;
+ a = HoddFC[j];
+ HevenFC[a] = j;
+ }
+ }
+ if (N_FC == 0) {
+ set_output_multiple((N_P2 * C_P2) + (numdatasyms * C_DATA));
+ interleaved_items = (N_P2 * C_P2) + (numdatasyms * C_DATA);
+ num_data_symbols = numdatasyms;
+ }
+ else {
+ set_output_multiple((N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) +
N_FC);
+ interleaved_items = (N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) +
N_FC;
+ num_data_symbols = numdatasyms - 1;
+ }
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_freqinterleaver_cc_impl::~dvbt2_freqinterleaver_cc_impl()
+ {
+ }
+
+ int
+ dvbt2_freqinterleaver_cc_impl::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ int symbol = 0;
+ int *H;
+
+ for (int i = 0; i < noutput_items; i += interleaved_items) {
+ for (int j = 0; j < N_P2; j++) {
+ if ((symbol % 2) == 0) {
+ H = HevenP2;
+ }
+ else {
+ H = HoddP2;
+ }
+ for (int j = 0; j < C_P2; j++) {
+ *out++ = in[H[j]];
+ }
+ symbol++;
+ in += C_P2;
+ }
+ for (int j = 0; j < num_data_symbols; j++) {
+ if ((symbol % 2) == 0) {
+ H = Heven;
+ }
+ else {
+ H = Hodd;
+ }
+ for (int j = 0; j < C_DATA; j++) {
+ *out++ = in[H[j]];
+ }
+ symbol++;
+ in += C_DATA;
+ }
+ if (N_FC != 0) {
+ if ((symbol % 2) == 0) {
+ H = HevenFC;
+ }
+ else {
+ H = HoddFC;
+ }
+ for (int j = 0; j < N_FC; j++) {
+ *out++ = in[H[j]];
+ }
+ symbol++;
+ in += N_FC;
+ }
+ }
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm1keven[9] =
+ {
+ 8, 7, 6, 5, 0, 1, 2, 3, 4
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm1kodd[9] =
+ {
+ 6, 8, 7, 4, 1, 0, 5, 2, 3
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm2keven[10] =
+ {
+ 4, 3, 9, 6, 2, 8, 1, 5, 7, 0
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm2kodd[10] =
+ {
+ 6, 9, 4, 8, 5, 1, 0, 7, 2, 3
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm4keven[11] =
+ {
+ 6, 3, 0, 9, 4, 2, 1, 8, 5, 10, 7
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm4kodd[11] =
+ {
+ 5, 9, 1, 4, 3, 0, 8, 10, 7, 2, 6
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm8keven[12] =
+ {
+ 7, 1, 4, 2, 9, 6, 8, 10, 0, 3, 11, 5
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm8kodd[12] =
+ {
+ 11, 4, 9, 3, 1, 2, 5, 0, 6, 7, 10, 8
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm16keven[13] =
+ {
+ 9, 7, 6, 10, 12, 5, 1, 11, 0, 2, 3, 4, 8
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm16kodd[13] =
+ {
+ 6, 8, 10, 12, 2, 0, 4, 1, 11, 3, 5, 9, 7
+ };
+
+ const int dvbt2_freqinterleaver_cc_impl::bitperm32k[14] =
+ {
+ 7, 13, 3, 4, 9, 2, 12, 11, 1, 8, 10, 0, 5, 6
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.h
new file mode 100644
index 0000000..18ce889
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.h
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_freqinterleaver_cc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_freqinterleaver_cc_impl : public dvbt2_freqinterleaver_cc
+ {
+ private:
+ int interleaved_items;
+ int num_data_symbols;
+ int Heven[32768];
+ int Hodd[32768];
+ int HevenP2[32768];
+ int HoddP2[32768];
+ int HevenFC[32768];
+ int HoddFC[32768];
+ int N_P2;
+ int C_P2;
+ int N_FC;
+ int C_FC;
+ int C_DATA;
+
+ const static int bitperm1keven[9];
+ const static int bitperm1kodd[9];
+ const static int bitperm2keven[10];
+ const static int bitperm2kodd[10];
+ const static int bitperm4keven[11];
+ const static int bitperm4kodd[11];
+ const static int bitperm8keven[12];
+ const static int bitperm8kodd[12];
+ const static int bitperm16keven[13];
+ const static int bitperm16kodd[13];
+ const static int bitperm32k[14];
+
+ public:
+ dvbt2_freqinterleaver_cc_impl(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble);
+ ~dvbt2_freqinterleaver_cc_impl();
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_FREQINTERLEAVER_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc
new file mode 100644
index 0000000..82b7c94
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc
@@ -0,0 +1,624 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_interleaver_bb_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_interleaver_bb::sptr
+ dvbt2_interleaver_bb::make(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_interleaver_bb_impl(framesize, rate, constellation));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbt2_interleaver_bb_impl::dvbt2_interleaver_bb_impl(dvb_framesize_t
framesize, dvb_code_rate_t rate, dvb_constellation_t constellation)
+ : gr::block("dvbt2_interleaver_bb",
+ gr::io_signature::make(1, 1, sizeof(unsigned char)),
+ gr::io_signature::make(1, 1, sizeof(unsigned char)))
+ {
+ signal_constellation = constellation;
+ code_rate = rate;
+ if (framesize == FECFRAME_NORMAL) {
+ frame_size = FRAME_SIZE_NORMAL;
+ switch (rate) {
+ case C1_2:
+ nbch = 32400;
+ q_val = 90;
+ break;
+ case C3_5:
+ nbch = 38880;
+ q_val = 72;
+ break;
+ case C2_3:
+ nbch = 43200;
+ q_val = 60;
+ break;
+ case C3_4:
+ nbch = 48600;
+ q_val = 45;
+ break;
+ case C4_5:
+ nbch = 51840;
+ q_val = 36;
+ break;
+ case C5_6:
+ nbch = 54000;
+ q_val = 30;
+ break;
+ default:
+ nbch = 0;
+ q_val = 0;
+ break;
+ }
+ }
+ else {
+ frame_size = FRAME_SIZE_SHORT;
+ switch (rate) {
+ case C1_3:
+ nbch = 5400;
+ q_val = 30;
+ break;
+ case C2_5:
+ nbch = 6480;
+ q_val = 27;
+ break;
+ case C1_2:
+ nbch = 7200;
+ q_val = 25;
+ break;
+ case C3_5:
+ nbch = 9720;
+ q_val = 18;
+ break;
+ case C2_3:
+ nbch = 10800;
+ q_val = 15;
+ break;
+ case C3_4:
+ nbch = 11880;
+ q_val = 12;
+ break;
+ case C4_5:
+ nbch = 12600;
+ q_val = 10;
+ break;
+ case C5_6:
+ nbch = 13320;
+ q_val = 8;
+ break;
+ default:
+ nbch = 0;
+ q_val = 0;
+ break;
+ }
+ }
+ switch (constellation) {
+ case MOD_QPSK:
+ mod = 2;
+ set_output_multiple(frame_size / mod);
+ packed_items = frame_size / mod;
+ break;
+ case MOD_16QAM:
+ mod = 4;
+ set_output_multiple(frame_size / mod);
+ packed_items = frame_size / mod;
+ break;
+ case MOD_64QAM:
+ mod = 6;
+ set_output_multiple(frame_size / mod);
+ packed_items = frame_size / mod;
+ break;
+ case MOD_256QAM:
+ mod = 8;
+ set_output_multiple(frame_size / mod);
+ packed_items = frame_size / mod;
+ break;
+ default:
+ mod = 1;
+ set_output_multiple(frame_size / mod);
+ packed_items = frame_size / mod;
+ break;
+ }
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_interleaver_bb_impl::~dvbt2_interleaver_bb_impl()
+ {
+ }
+
+ void
+ dvbt2_interleaver_bb_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = noutput_items * mod;
+ }
+
+ int
+ dvbt2_interleaver_bb_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (const unsigned char *) input_items[0];
+ unsigned char *out = (unsigned char *) output_items[0];
+ int consumed = 0;
+ int produced = 0;
+ int rows, offset, index;
+ unsigned int pack;
+ const int *twist;
+ const int *mux;
+
+ switch (signal_constellation) {
+ case MOD_QPSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 2;
+ if (code_rate == C1_3 || code_rate == C2_5) {
+ for (int k = 0; k < nbch; k++) {
+ tempu[k] = *in++;
+ }
+ for (int t = 0; t < q_val; t++) {
+ for (int s = 0; s < 360; s++) {
+ tempu[nbch + (360 * t) + s] = in[(q_val * s) + t];
+ }
+ }
+ in = in + (q_val * 360);
+ index = 0;
+ for (int j = 0; j < rows; j++) {
+ out[produced] = tempu[index++] << 1;
+ out[produced++] |= tempu[index++];
+ consumed += 2;
+ }
+ }
+ else {
+ for (int j = 0; j < rows; j++) {
+ out[produced] = in[consumed++] << 1;
+ out[produced++] |= in[consumed++];
+ }
+ }
+ }
+ break;
+ case MOD_16QAM:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ twist = &twist16n[0];
+ }
+ else {
+ twist = &twist16s[0];
+ }
+ if (code_rate == C3_5 && frame_size == FRAME_SIZE_NORMAL) {
+ mux = &mux16_35[0];
+ }
+ else if (code_rate == C1_3 && frame_size == FRAME_SIZE_SHORT) {
+ mux = &mux16_13[0];
+ }
+ else if (code_rate == C2_5 && frame_size == FRAME_SIZE_SHORT) {
+ mux = &mux16_25[0];
+ }
+ else {
+ mux = &mux16[0];
+ }
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / (mod * 2);
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7, *c8;
+ c1 = &tempv[0];
+ c2 = &tempv[rows];
+ c3 = &tempv[rows * 2];
+ c4 = &tempv[rows * 3];
+ c5 = &tempv[rows * 4];
+ c6 = &tempv[rows * 5];
+ c7 = &tempv[rows * 6];
+ c8 = &tempv[rows * 7];
+ for (int k = 0; k < nbch; k++) {
+ tempu[k] = *in++;
+ }
+ for (int t = 0; t < q_val; t++) {
+ for (int s = 0; s < 360; s++) {
+ tempu[nbch + (360 * t) + s] = in[(q_val * s) + t];
+ }
+ }
+ in = in + (q_val * 360);
+ index = 0;
+ for (int col = 0; col < (mod * 2); col++) {
+ offset = twist[col];
+ for (int row = 0; row < rows; row++) {
+ tempv[offset + (rows * col)] = tempu[index++];
+ offset = (offset + 1) % rows;
+ }
+ }
+ index = 0;
+ for (int j = 0; j < rows; j++) {
+ tempu[index++] = c1[j];
+ tempu[index++] = c2[j];
+ tempu[index++] = c3[j];
+ tempu[index++] = c4[j];
+ tempu[index++] = c5[j];
+ tempu[index++] = c6[j];
+ tempu[index++] = c7[j];
+ tempu[index++] = c8[j];
+ }
+ index = 0;
+ for (int d = 0; d < frame_size / (mod * 2); d++) {
+ pack = 0;
+ for (int e = 0; e < (mod * 2); e++) {
+ offset = mux[e];
+ pack |= tempu[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = pack >> 4;
+ out[produced++] = pack & 0xf;
+ index += (mod * 2);
+ consumed += (mod * 2);
+ }
+ }
+ break;
+ case MOD_64QAM:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ twist = &twist64n[0];
+ }
+ else {
+ twist = &twist64s[0];
+ }
+ if (code_rate == C3_5 && frame_size == FRAME_SIZE_NORMAL) {
+ mux = &mux64_35[0];
+ }
+ else if (code_rate == C1_3 && frame_size == FRAME_SIZE_SHORT) {
+ mux = &mux64_13[0];
+ }
+ else if (code_rate == C2_5 && frame_size == FRAME_SIZE_SHORT) {
+ mux = &mux64_25[0];
+ }
+ else {
+ mux = &mux64[0];
+ }
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / (mod * 2);
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7, *c8, *c9,
*c10, *c11, *c12;
+ c1 = &tempv[0];
+ c2 = &tempv[rows];
+ c3 = &tempv[rows * 2];
+ c4 = &tempv[rows * 3];
+ c5 = &tempv[rows * 4];
+ c6 = &tempv[rows * 5];
+ c7 = &tempv[rows * 6];
+ c8 = &tempv[rows * 7];
+ c9 = &tempv[rows * 8];
+ c10 = &tempv[rows * 9];
+ c11 = &tempv[rows * 10];
+ c12 = &tempv[rows * 11];
+ for (int k = 0; k < nbch; k++) {
+ tempu[k] = *in++;
+ }
+ for (int t = 0; t < q_val; t++) {
+ for (int s = 0; s < 360; s++) {
+ tempu[nbch + (360 * t) + s] = in[(q_val * s) + t];
+ }
+ }
+ in = in + (q_val * 360);
+ index = 0;
+ for (int col = 0; col < (mod * 2); col++) {
+ offset = twist[col];
+ for (int row = 0; row < rows; row++) {
+ tempv[offset + (rows * col)] = tempu[index++];
+ offset = (offset + 1) % rows;
+ }
+ }
+ index = 0;
+ for (int j = 0; j < rows; j++) {
+ tempu[index++] = c1[j];
+ tempu[index++] = c2[j];
+ tempu[index++] = c3[j];
+ tempu[index++] = c4[j];
+ tempu[index++] = c5[j];
+ tempu[index++] = c6[j];
+ tempu[index++] = c7[j];
+ tempu[index++] = c8[j];
+ tempu[index++] = c9[j];
+ tempu[index++] = c10[j];
+ tempu[index++] = c11[j];
+ tempu[index++] = c12[j];
+ }
+ index = 0;
+ for (int d = 0; d < frame_size / (mod * 2); d++) {
+ pack = 0;
+ for (int e = 0; e < (mod * 2); e++) {
+ offset = mux[e];
+ pack |= tempu[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = pack >> 6;
+ out[produced++] = pack & 0x3f;
+ index += (mod * 2);
+ consumed += (mod * 2);
+ }
+ }
+ break;
+ case MOD_256QAM:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ if (code_rate == C3_5) {
+ mux = &mux256_35[0];
+ }
+ else if (code_rate == C2_3) {
+ mux = &mux256_23[0];
+ }
+ else {
+ mux = &mux256[0];
+ }
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / (mod * 2);
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7, *c8;
+ const unsigned char *c9, *c10, *c11, *c12, *c13, *c14, *c15,
*c16;
+ c1 = &tempv[0];
+ c2 = &tempv[rows];
+ c3 = &tempv[rows * 2];
+ c4 = &tempv[rows * 3];
+ c5 = &tempv[rows * 4];
+ c6 = &tempv[rows * 5];
+ c7 = &tempv[rows * 6];
+ c8 = &tempv[rows * 7];
+ c9 = &tempv[rows * 8];
+ c10 = &tempv[rows * 9];
+ c11 = &tempv[rows * 10];
+ c12 = &tempv[rows * 11];
+ c13 = &tempv[rows * 12];
+ c14 = &tempv[rows * 13];
+ c15 = &tempv[rows * 14];
+ c16 = &tempv[rows * 15];
+ for (int k = 0; k < nbch; k++) {
+ tempu[k] = *in++;
+ }
+ for (int t = 0; t < q_val; t++) {
+ for (int s = 0; s < 360; s++) {
+ tempu[nbch + (360 * t) + s] = in[(q_val * s) + t];
+ }
+ }
+ in = in + (q_val * 360);
+ index = 0;
+ for (int col = 0; col < (mod * 2); col++) {
+ offset = twist256n[col];
+ for (int row = 0; row < rows; row++) {
+ tempv[offset + (rows * col)] = tempu[index++];
+ offset = (offset + 1) % rows;
+ }
+ }
+ index = 0;
+ for (int j = 0; j < rows; j++) {
+ tempu[index++] = c1[j];
+ tempu[index++] = c2[j];
+ tempu[index++] = c3[j];
+ tempu[index++] = c4[j];
+ tempu[index++] = c5[j];
+ tempu[index++] = c6[j];
+ tempu[index++] = c7[j];
+ tempu[index++] = c8[j];
+ tempu[index++] = c9[j];
+ tempu[index++] = c10[j];
+ tempu[index++] = c11[j];
+ tempu[index++] = c12[j];
+ tempu[index++] = c13[j];
+ tempu[index++] = c14[j];
+ tempu[index++] = c15[j];
+ tempu[index++] = c16[j];
+ }
+ index = 0;
+ for (int d = 0; d < frame_size / (mod * 2); d++) {
+ pack = 0;
+ for (int e = 0; e < (mod * 2); e++) {
+ offset = mux[e];
+ pack |= tempu[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = pack >> 8;
+ out[produced++] = pack & 0xff;
+ index += (mod * 2);
+ consumed += (mod * 2);
+ }
+ }
+ }
+ else {
+ if (code_rate == C1_3) {
+ mux = &mux256s_13[0];
+ }
+ else if (code_rate == C2_5) {
+ mux = &mux256s_25[0];
+ }
+ else {
+ mux = &mux256s[0];
+ }
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / mod;
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7, *c8;
+ c1 = &tempv[0];
+ c2 = &tempv[rows];
+ c3 = &tempv[rows * 2];
+ c4 = &tempv[rows * 3];
+ c5 = &tempv[rows * 4];
+ c6 = &tempv[rows * 5];
+ c7 = &tempv[rows * 6];
+ c8 = &tempv[rows * 7];
+ for (int k = 0; k < nbch; k++) {
+ tempu[k] = *in++;
+ }
+ for (int t = 0; t < q_val; t++) {
+ for (int s = 0; s < 360; s++) {
+ tempu[nbch + (360 * t) + s] = in[(q_val * s) + t];
+ }
+ }
+ in = in + (q_val * 360);
+ index = 0;
+ for (int col = 0; col < mod; col++) {
+ offset = twist256s[col];
+ for (int row = 0; row < rows; row++) {
+ tempv[offset + (rows * col)] = tempu[index++];
+ offset = (offset + 1) % rows;
+ }
+ }
+ index = 0;
+ for (int j = 0; j < rows; j++) {
+ tempu[index++] = c1[j];
+ tempu[index++] = c2[j];
+ tempu[index++] = c3[j];
+ tempu[index++] = c4[j];
+ tempu[index++] = c5[j];
+ tempu[index++] = c6[j];
+ tempu[index++] = c7[j];
+ tempu[index++] = c8[j];
+ }
+ index = 0;
+ for (int d = 0; d < frame_size / mod; d++) {
+ pack = 0;
+ for (int e = 0; e < mod; e++) {
+ offset = mux[e];
+ pack |= tempu[index + offset];
+ pack <<= 1;
+ }
+ pack >>= 1;
+ out[produced++] = pack & 0xff;
+ index += mod;
+ consumed += mod;
+ }
+ }
+ }
+ break;
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (consumed);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const int dvbt2_interleaver_bb_impl::twist16n[8] =
+ {
+ 0, 0, 2, 4, 4, 5, 7, 7
+ };
+
+ const int dvbt2_interleaver_bb_impl::twist64n[12] =
+ {
+ 0, 0, 2, 2, 3, 4, 4, 5, 5, 7, 8, 9
+ };
+
+ const int dvbt2_interleaver_bb_impl::twist256n[16] =
+ {
+ 0, 2, 2, 2, 2, 3, 7, 15, 16, 20, 22, 22, 27, 27, 28, 32
+ };
+
+ const int dvbt2_interleaver_bb_impl::twist16s[8] =
+ {
+ 0, 0, 0, 1, 7, 20, 20, 21
+ };
+
+ const int dvbt2_interleaver_bb_impl::twist64s[12] =
+ {
+ 0, 0, 0, 2, 2, 2, 3, 3, 3, 6, 7, 7
+ };
+
+ const int dvbt2_interleaver_bb_impl::twist256s[8] =
+ {
+ 0, 0, 0, 1, 7, 20, 20, 21
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux16[8] =
+ {
+ 7, 1, 3, 5, 2, 4, 6, 0
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux64[12] =
+ {
+ 11, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 0
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256[16] =
+ {
+ 15, 1, 13, 3, 10, 7, 9, 11, 4, 6, 8, 5, 12, 2, 14, 0
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux16_35[8] =
+ {
+ 0, 2, 3, 6, 4, 1, 7, 5
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux16_13[8] =
+ {
+ 1, 6, 5, 2, 3, 4, 0, 7
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux16_25[8] =
+ {
+ 3, 5, 6, 4, 2, 1, 7, 0
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux64_35[12] =
+ {
+ 4, 6, 0, 5, 8, 10, 2, 1, 7, 3, 11, 9
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux64_13[12] =
+ {
+ 2, 5, 1, 6, 0, 3, 4, 7, 8, 9, 10, 11
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux64_25[12] =
+ {
+ 1, 2, 4, 5, 0, 6, 3, 8, 7, 10, 9, 11
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256_35[16] =
+ {
+ 4, 6, 0, 2, 3, 14, 12, 10, 7, 5, 8, 1, 15, 9, 11, 13
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256_23[16] =
+ {
+ 3, 15, 1, 7, 4, 11, 5, 0, 12, 2, 9, 14, 13, 6, 8, 10
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256s[8] =
+ {
+ 7, 2, 4, 1, 6, 3, 5, 0
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256s_13[8] =
+ {
+ 1, 2, 3, 5, 0, 4, 6, 7
+ };
+
+ const int dvbt2_interleaver_bb_impl::mux256s_25[8] =
+ {
+ 1, 3, 4, 5, 0, 2, 6, 7
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.h
new file mode 100644
index 0000000..c737af0
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.h
@@ -0,0 +1,84 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_INTERLEAVER_BB_IMPL_H
+#define INCLUDED_DTV_DVBT2_INTERLEAVER_BB_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_interleaver_bb.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_interleaver_bb_impl : public dvbt2_interleaver_bb
+ {
+ private:
+ int frame_size;
+ int signal_constellation;
+ int code_rate;
+ int nbch;
+ int q_val;
+ int mod;
+ int packed_items;
+ unsigned char tempu[FRAME_SIZE_NORMAL];
+ unsigned char tempv[FRAME_SIZE_NORMAL];
+
+ const static int twist16n[8];
+ const static int twist64n[12];
+ const static int twist256n[16];
+
+ const static int twist16s[8];
+ const static int twist64s[12];
+ const static int twist256s[8];
+
+ const static int mux16[8];
+ const static int mux64[12];
+ const static int mux256[16];
+
+ const static int mux16_35[8];
+ const static int mux16_13[8];
+ const static int mux16_25[8];
+ const static int mux64_35[12];
+ const static int mux64_13[12];
+ const static int mux64_25[12];
+ const static int mux256_35[16];
+ const static int mux256_23[16];
+
+ const static int mux256s[8];
+ const static int mux256s_13[8];
+ const static int mux256s_25[8];
+
+ public:
+ dvbt2_interleaver_bb_impl(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation);
+ ~dvbt2_interleaver_bb_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_INTERLEAVER_BB_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.cc
new file mode 100644
index 0000000..f879806
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.cc
@@ -0,0 +1,596 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_miso_cc_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_miso_cc::sptr
+ dvbt2_miso_cc::make(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_miso_cc_impl(carriermode, fftsize, pilotpattern,
guardinterval, numdatasyms, paprmode));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbt2_miso_cc_impl::dvbt2_miso_cc_impl(dvbt2_extended_carrier_t
carriermode, dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode)
+ : gr::sync_block("dvbt2_miso_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(2, 2, sizeof(gr_complex)))
+ {
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 546;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1098;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2198;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4398;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8814;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 17612;
+ break;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 764;
+ N_FC = 568;
+ C_FC = 402;
+ break;
+ case PILOT_PP2:
+ C_DATA = 768;
+ N_FC = 710;
+ C_FC = 654;
+ break;
+ case PILOT_PP3:
+ C_DATA = 798;
+ N_FC = 710;
+ C_FC = 490;
+ break;
+ case PILOT_PP4:
+ C_DATA = 804;
+ N_FC = 780;
+ C_FC = 707;
+ break;
+ case PILOT_PP5:
+ C_DATA = 818;
+ N_FC = 780;
+ C_FC = 544;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 10;
+ }
+ if (N_FC != 0) {
+ N_FC -= 10;
+ }
+ if (C_FC != 0) {
+ C_FC -= 10;
+ }
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 1522;
+ N_FC = 1136;
+ C_FC = 804;
+ break;
+ case PILOT_PP2:
+ C_DATA = 1532;
+ N_FC = 1420;
+ C_FC = 1309;
+ break;
+ case PILOT_PP3:
+ C_DATA = 1596;
+ N_FC = 1420;
+ C_FC = 980;
+ break;
+ case PILOT_PP4:
+ C_DATA = 1602;
+ N_FC = 1562;
+ C_FC = 1415;
+ break;
+ case PILOT_PP5:
+ C_DATA = 1632;
+ N_FC = 1562;
+ C_FC = 1088;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 1646;
+ N_FC = 1632;
+ C_FC = 1396;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 18;
+ }
+ if (N_FC != 0) {
+ N_FC -= 18;
+ }
+ if (C_FC != 0) {
+ C_FC -= 18;
+ }
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 3084;
+ N_FC = 2272;
+ C_FC = 1609;
+ break;
+ case PILOT_PP2:
+ C_DATA = 3092;
+ N_FC = 2840;
+ C_FC = 2619;
+ break;
+ case PILOT_PP3:
+ C_DATA = 3228;
+ N_FC = 2840;
+ C_FC = 1961;
+ break;
+ case PILOT_PP4:
+ C_DATA = 3234;
+ N_FC = 3124;
+ C_FC = 2831;
+ break;
+ case PILOT_PP5:
+ C_DATA = 3298;
+ N_FC = 3124;
+ C_FC = 2177;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 3328;
+ N_FC = 3266;
+ C_FC = 2792;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 36;
+ }
+ if (N_FC != 0) {
+ N_FC -= 36;
+ }
+ if (C_FC != 0) {
+ C_FC -= 36;
+ }
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6208;
+ N_FC = 4544;
+ C_FC = 3218;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6214;
+ N_FC = 5680;
+ C_FC = 5238;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6494;
+ N_FC = 5680;
+ C_FC = 3922;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6498;
+ N_FC = 6248;
+ C_FC = 5662;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6634;
+ N_FC = 6248;
+ C_FC = 4354;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6698;
+ N_FC = 6532;
+ C_FC = 5585;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6698;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6296;
+ N_FC = 4608;
+ C_FC = 3264;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6298;
+ N_FC = 5760;
+ C_FC = 5312;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6584;
+ N_FC = 5760;
+ C_FC = 3978;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6588;
+ N_FC = 6336;
+ C_FC = 5742;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6728;
+ N_FC = 6336;
+ C_FC = 4416;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6788;
+ N_FC = 6624;
+ C_FC = 5664;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6788;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 72;
+ }
+ if (N_FC != 0) {
+ N_FC -= 72;
+ }
+ if (C_FC != 0) {
+ C_FC -= 72;
+ }
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12418;
+ N_FC = 9088;
+ C_FC = 6437;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12436;
+ N_FC = 11360;
+ C_FC = 10476;
+ break;
+ case PILOT_PP3:
+ C_DATA = 12988;
+ N_FC = 11360;
+ C_FC = 7845;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13002;
+ N_FC = 12496;
+ C_FC = 11324;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13272;
+ N_FC = 12496;
+ C_FC = 8709;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13288;
+ N_FC = 13064;
+ C_FC = 11801;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13416;
+ N_FC = 13064;
+ C_FC = 11170;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13406;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12678;
+ N_FC = 9280;
+ C_FC = 6573;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12698;
+ N_FC = 11600;
+ C_FC = 10697;
+ break;
+ case PILOT_PP3:
+ C_DATA = 13262;
+ N_FC = 11600;
+ C_FC = 8011;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13276;
+ N_FC = 12760;
+ C_FC = 11563;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13552;
+ N_FC = 12760;
+ C_FC = 8893;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13568;
+ N_FC = 13340;
+ C_FC = 12051;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13698;
+ N_FC = 13340;
+ C_FC = 11406;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13688;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 144;
+ }
+ if (N_FC != 0) {
+ N_FC -= 144;
+ }
+ if (C_FC != 0) {
+ C_FC -= 144;
+ }
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 24886;
+ N_FC = 22720;
+ C_FC = 20952;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26022;
+ N_FC = 24992;
+ C_FC = 22649;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 26592;
+ N_FC = 26128;
+ C_FC = 23603;
+ break;
+ case PILOT_PP7:
+ C_DATA = 26836;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 26812;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 25412;
+ N_FC = 23200;
+ C_FC = 21395;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26572;
+ N_FC = 25520;
+ C_FC = 23127;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 27152;
+ N_FC = 26680;
+ C_FC = 24102;
+ break;
+ case PILOT_PP7:
+ C_DATA = 27404;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 27376;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 288;
+ }
+ if (N_FC != 0) {
+ N_FC -= 288;
+ }
+ if (C_FC != 0) {
+ C_FC -= 288;
+ }
+ }
+ break;
+ }
+ if (N_FC == 0) {
+ set_output_multiple((N_P2 * C_P2) + (numdatasyms * C_DATA));
+ miso_items = (N_P2 * C_P2) + (numdatasyms * C_DATA);
+ }
+ else {
+ set_output_multiple((N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) +
N_FC);
+ miso_items = (N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) + N_FC;
+ }
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_miso_cc_impl::~dvbt2_miso_cc_impl()
+ {
+ }
+
+ int
+ dvbt2_miso_cc_impl::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out1 = (gr_complex *) output_items[0];
+ gr_complex *out2 = (gr_complex *) output_items[1];
+ gr_complex temp1, temp2;
+
+ for (int i = 0; i < noutput_items; i += miso_items) {
+ memcpy(out1, in, sizeof(gr_complex) * miso_items);
+ out1 += miso_items;
+ for (int j = 0; j < miso_items; j += 2) {
+ temp1 = *in++;
+ temp2 = *in++;
+ out2->real() = -temp2.real();
+ out2->imag() = temp2.imag();
+ out2++;
+ out2->real() = temp1.real();
+ out2->imag() = -temp1.imag();
+ out2++;
+ }
+ }
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.h
new file mode 100644
index 0000000..e33b201
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_miso_cc_impl.h
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_MISO_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_MISO_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_miso_cc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_miso_cc_impl : public dvbt2_miso_cc
+ {
+ private:
+ int miso_items;
+ int N_P2;
+ int C_P2;
+ int N_FC;
+ int C_FC;
+ int C_DATA;
+
+ public:
+ dvbt2_miso_cc_impl(dvbt2_extended_carrier_t carriermode, dvbt2_fftsize_t
fftsize, dvbt2_pilotpattern_t pilotpattern, dvbt2_guardinterval_t
guardinterval, int numdatasyms, dvbt2_papr_t paprmode);
+ ~dvbt2_miso_cc_impl();
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_MISO_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
new file mode 100644
index 0000000..48fe2aa
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
@@ -0,0 +1,964 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_modulator_bc_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_modulator_bc::sptr
+ dvbt2_modulator_bc::make(dvb_framesize_t framesize, dvb_constellation_t
constellation, dvbt2_rotation_t rotation)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_modulator_bc_impl(framesize, constellation, rotation));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbt2_modulator_bc_impl::dvbt2_modulator_bc_impl(dvb_framesize_t
framesize, dvb_constellation_t constellation, dvbt2_rotation_t rotation)
+ : gr::block("dvbt2_modulator_bc",
+ gr::io_signature::make(1, 1, sizeof(unsigned char)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ double normalization;
+ double rotation_angle;
+ gr_complex m_temp[1];
+ cyclic_delay = FALSE;
+ if (framesize == FECFRAME_NORMAL) {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 32400;
+ break;
+ case MOD_16QAM:
+ cell_size = 16200;
+ break;
+ case MOD_64QAM:
+ cell_size = 10800;
+ break;
+ case MOD_256QAM:
+ cell_size = 8100;
+ break;
+ default:
+ cell_size = 0;
+ break;
+ }
+ }
+ else {
+ switch (constellation) {
+ case MOD_QPSK:
+ cell_size = 8100;
+ break;
+ case MOD_16QAM:
+ cell_size = 4050;
+ break;
+ case MOD_64QAM:
+ cell_size = 2700;
+ break;
+ case MOD_256QAM:
+ cell_size = 2025;
+ break;
+ default:
+ cell_size = 0;
+ break;
+ }
+ }
+ switch (constellation) {
+ case MOD_QPSK:
+ normalization = sqrt(2);
+ m_qpsk[0].real() = 1.0 / normalization;
+ m_qpsk[0].imag() = 1.0 / normalization;
+ m_qpsk[1].real() = 1.0 / normalization;
+ m_qpsk[1].imag() = -1.0 / normalization;
+ m_qpsk[2].real() = -1.0 / normalization;
+ m_qpsk[2].imag() = 1.0 / normalization;
+ m_qpsk[3].real() = -1.0 / normalization;
+ m_qpsk[3].imag() = -1.0 / normalization;
+ if (rotation == ROTATION_ON) {
+ cyclic_delay = TRUE;
+ rotation_angle = (2.0 * M_PI * 29.0) / 360;
+ for (int i = 0; i < 4; i++) {
+ m_temp[0].real() = m_qpsk[i].real();
+ m_qpsk[i].real() = (m_qpsk[i].real() * cos(rotation_angle)) -
(m_qpsk[i].imag() * sin(rotation_angle));
+ m_qpsk[i].imag() = (m_temp[0].real() * sin(rotation_angle)) +
(m_qpsk[i].imag() * cos(rotation_angle));
+ }
+ }
+ break;
+ case MOD_16QAM:
+ normalization = sqrt(10);
+ m_16qam[0].real() = 3.0 / normalization;
+ m_16qam[0].imag() = 3.0 / normalization;
+ m_16qam[1].real() = 3.0 / normalization;
+ m_16qam[1].imag() = 1.0 / normalization;
+ m_16qam[2].real() = 1.0 / normalization;
+ m_16qam[2].imag() = 3.0 / normalization;
+ m_16qam[3].real() = 1.0 / normalization;
+ m_16qam[3].imag() = 1.0 / normalization;
+ m_16qam[4].real() = 3.0 / normalization;
+ m_16qam[4].imag() = -3.0 / normalization;
+ m_16qam[5].real() = 3.0 / normalization;
+ m_16qam[5].imag() = -1.0 / normalization;
+ m_16qam[6].real() = 1.0 / normalization;
+ m_16qam[6].imag() = -3.0 / normalization;
+ m_16qam[7].real() = 1.0 / normalization;
+ m_16qam[7].imag() = -1.0 / normalization;
+ m_16qam[8].real() = -3.0 / normalization;
+ m_16qam[8].imag() = 3.0 / normalization;
+ m_16qam[9].real() = -3.0 / normalization;
+ m_16qam[9].imag() = 1.0 / normalization;
+ m_16qam[10].real() = -1.0 / normalization;
+ m_16qam[10].imag() = 3.0 / normalization;
+ m_16qam[11].real() = -1.0 / normalization;
+ m_16qam[11].imag() = 1.0 / normalization;
+ m_16qam[12].real() = -3.0 / normalization;
+ m_16qam[12].imag() = -3.0 / normalization;
+ m_16qam[13].real() = -3.0 / normalization;
+ m_16qam[13].imag() = -1.0 / normalization;
+ m_16qam[14].real() = -1.0 / normalization;
+ m_16qam[14].imag() = -3.0 / normalization;
+ m_16qam[15].real() = -1.0 / normalization;
+ m_16qam[15].imag() = -1.0 / normalization;
+ if (rotation == ROTATION_ON) {
+ cyclic_delay = TRUE;
+ rotation_angle = (2.0 * M_PI * 16.8) / 360;
+ for (int i = 0; i < 16; i++) {
+ m_temp[0].real() = m_16qam[i].real();
+ m_16qam[i].real() = (m_16qam[i].real() * cos(rotation_angle)) -
(m_16qam[i].imag() * sin(rotation_angle));
+ m_16qam[i].imag() = (m_temp[0].real() * sin(rotation_angle)) +
(m_16qam[i].imag() * cos(rotation_angle));
+ }
+ }
+ break;
+ case MOD_64QAM:
+ normalization = sqrt(42);
+ m_64qam[0].real() = 7.0 / normalization;
+ m_64qam[0].imag() = 7.0 / normalization;
+ m_64qam[1].real() = 7.0 / normalization;
+ m_64qam[1].imag() = 5.0 / normalization;
+ m_64qam[2].real() = 5.0 / normalization;
+ m_64qam[2].imag() = 7.0 / normalization;
+ m_64qam[3].real() = 5.0 / normalization;
+ m_64qam[3].imag() = 5.0 / normalization;
+ m_64qam[4].real() = 7.0 / normalization;
+ m_64qam[4].imag() = 1.0 / normalization;
+ m_64qam[5].real() = 7.0 / normalization;
+ m_64qam[5].imag() = 3.0 / normalization;
+ m_64qam[6].real() = 5.0 / normalization;
+ m_64qam[6].imag() = 1.0 / normalization;
+ m_64qam[7].real() = 5.0 / normalization;
+ m_64qam[7].imag() = 3.0 / normalization;
+ m_64qam[8].real() = 1.0 / normalization;
+ m_64qam[8].imag() = 7.0 / normalization;
+ m_64qam[9].real() = 1.0 / normalization;
+ m_64qam[9].imag() = 5.0 / normalization;
+ m_64qam[10].real() = 3.0 / normalization;
+ m_64qam[10].imag() = 7.0 / normalization;
+ m_64qam[11].real() = 3.0 / normalization;
+ m_64qam[11].imag() = 5.0 / normalization;
+ m_64qam[12].real() = 1.0 / normalization;
+ m_64qam[12].imag() = 1.0 / normalization;
+ m_64qam[13].real() = 1.0 / normalization;
+ m_64qam[13].imag() = 3.0 / normalization;
+ m_64qam[14].real() = 3.0 / normalization;
+ m_64qam[14].imag() = 1.0 / normalization;
+ m_64qam[15].real() = 3.0 / normalization;
+ m_64qam[15].imag() = 3.0 / normalization;
+ m_64qam[16].real() = 7.0 / normalization;
+ m_64qam[16].imag() = -7.0 / normalization;
+ m_64qam[17].real() = 7.0 / normalization;
+ m_64qam[17].imag() = -5.0 / normalization;
+ m_64qam[18].real() = 5.0 / normalization;
+ m_64qam[18].imag() = -7.0 / normalization;
+ m_64qam[19].real() = 5.0 / normalization;
+ m_64qam[19].imag() = -5.0 / normalization;
+ m_64qam[20].real() = 7.0 / normalization;
+ m_64qam[20].imag() = -1.0 / normalization;
+ m_64qam[21].real() = 7.0 / normalization;
+ m_64qam[21].imag() = -3.0 / normalization;
+ m_64qam[22].real() = 5.0 / normalization;
+ m_64qam[22].imag() = -1.0 / normalization;
+ m_64qam[23].real() = 5.0 / normalization;
+ m_64qam[23].imag() = -3.0 / normalization;
+ m_64qam[24].real() = 1.0 / normalization;
+ m_64qam[24].imag() = -7.0 / normalization;
+ m_64qam[25].real() = 1.0 / normalization;
+ m_64qam[25].imag() = -5.0 / normalization;
+ m_64qam[26].real() = 3.0 / normalization;
+ m_64qam[26].imag() = -7.0 / normalization;
+ m_64qam[27].real() = 3.0 / normalization;
+ m_64qam[27].imag() = -5.0 / normalization;
+ m_64qam[28].real() = 1.0 / normalization;
+ m_64qam[28].imag() = -1.0 / normalization;
+ m_64qam[29].real() = 1.0 / normalization;
+ m_64qam[29].imag() = -3.0 / normalization;
+ m_64qam[30].real() = 3.0 / normalization;
+ m_64qam[30].imag() = -1.0 / normalization;
+ m_64qam[31].real() = 3.0 / normalization;
+ m_64qam[31].imag() = -3.0 / normalization;
+ m_64qam[32].real() = -7.0 / normalization;
+ m_64qam[32].imag() = 7.0 / normalization;
+ m_64qam[33].real() = -7.0 / normalization;
+ m_64qam[33].imag() = 5.0 / normalization;
+ m_64qam[34].real() = -5.0 / normalization;
+ m_64qam[34].imag() = 7.0 / normalization;
+ m_64qam[35].real() = -5.0 / normalization;
+ m_64qam[35].imag() = 5.0 / normalization;
+ m_64qam[36].real() = -7.0 / normalization;
+ m_64qam[36].imag() = 1.0 / normalization;
+ m_64qam[37].real() = -7.0 / normalization;
+ m_64qam[37].imag() = 3.0 / normalization;
+ m_64qam[38].real() = -5.0 / normalization;
+ m_64qam[38].imag() = 1.0 / normalization;
+ m_64qam[39].real() = -5.0 / normalization;
+ m_64qam[39].imag() = 3.0 / normalization;
+ m_64qam[40].real() = -1.0 / normalization;
+ m_64qam[40].imag() = 7.0 / normalization;
+ m_64qam[41].real() = -1.0 / normalization;
+ m_64qam[41].imag() = 5.0 / normalization;
+ m_64qam[42].real() = -3.0 / normalization;
+ m_64qam[42].imag() = 7.0 / normalization;
+ m_64qam[43].real() = -3.0 / normalization;
+ m_64qam[43].imag() = 5.0 / normalization;
+ m_64qam[44].real() = -1.0 / normalization;
+ m_64qam[44].imag() = 1.0 / normalization;
+ m_64qam[45].real() = -1.0 / normalization;
+ m_64qam[45].imag() = 3.0 / normalization;
+ m_64qam[46].real() = -3.0 / normalization;
+ m_64qam[46].imag() = 1.0 / normalization;
+ m_64qam[47].real() = -3.0 / normalization;
+ m_64qam[47].imag() = 3.0 / normalization;
+ m_64qam[48].real() = -7.0 / normalization;
+ m_64qam[48].imag() = -7.0 / normalization;
+ m_64qam[49].real() = -7.0 / normalization;
+ m_64qam[49].imag() = -5.0 / normalization;
+ m_64qam[50].real() = -5.0 / normalization;
+ m_64qam[50].imag() = -7.0 / normalization;
+ m_64qam[51].real() = -5.0 / normalization;
+ m_64qam[51].imag() = -5.0 / normalization;
+ m_64qam[52].real() = -7.0 / normalization;
+ m_64qam[52].imag() = -1.0 / normalization;
+ m_64qam[53].real() = -7.0 / normalization;
+ m_64qam[53].imag() = -3.0 / normalization;
+ m_64qam[54].real() = -5.0 / normalization;
+ m_64qam[54].imag() = -1.0 / normalization;
+ m_64qam[55].real() = -5.0 / normalization;
+ m_64qam[55].imag() = -3.0 / normalization;
+ m_64qam[56].real() = -1.0 / normalization;
+ m_64qam[56].imag() = -7.0 / normalization;
+ m_64qam[57].real() = -1.0 / normalization;
+ m_64qam[57].imag() = -5.0 / normalization;
+ m_64qam[58].real() = -3.0 / normalization;
+ m_64qam[58].imag() = -7.0 / normalization;
+ m_64qam[59].real() = -3.0 / normalization;
+ m_64qam[59].imag() = -5.0 / normalization;
+ m_64qam[60].real() = -1.0 / normalization;
+ m_64qam[60].imag() = -1.0 / normalization;
+ m_64qam[61].real() = -1.0 / normalization;
+ m_64qam[61].imag() = -3.0 / normalization;
+ m_64qam[62].real() = -3.0 / normalization;
+ m_64qam[62].imag() = -1.0 / normalization;
+ m_64qam[63].real() = -3.0 / normalization;
+ m_64qam[63].imag() = -3.0 / normalization;
+ if (rotation == ROTATION_ON) {
+ cyclic_delay = TRUE;
+ rotation_angle = (2.0 * M_PI * 8.6) / 360;
+ for (int i = 0; i < 64; i++) {
+ m_temp[0].real() = m_64qam[i].real();
+ m_64qam[i].real() = (m_64qam[i].real() * cos(rotation_angle)) -
(m_64qam[i].imag() * sin(rotation_angle));
+ m_64qam[i].imag() = (m_temp[0].real() * sin(rotation_angle)) +
(m_64qam[i].imag() * cos(rotation_angle));
+ }
+ }
+ break;
+ case MOD_256QAM:
+ normalization = sqrt(170);
+ m_256qam[0].real() = 15 / normalization;
+ m_256qam[0].imag() = 15 / normalization;
+ m_256qam[1].real() = 15 / normalization;
+ m_256qam[1].imag() = 13 / normalization;
+ m_256qam[2].real() = 13 / normalization;
+ m_256qam[2].imag() = 15 / normalization;
+ m_256qam[3].real() = 13 / normalization;
+ m_256qam[3].imag() = 13 / normalization;
+ m_256qam[4].real() = 15 / normalization;
+ m_256qam[4].imag() = 9 / normalization;
+ m_256qam[5].real() = 15 / normalization;
+ m_256qam[5].imag() = 11 / normalization;
+ m_256qam[6].real() = 13 / normalization;
+ m_256qam[6].imag() = 9 / normalization;
+ m_256qam[7].real() = 13 / normalization;
+ m_256qam[7].imag() = 11 / normalization;
+ m_256qam[8].real() = 9 / normalization;
+ m_256qam[8].imag() = 15 / normalization;
+ m_256qam[9].real() = 9 / normalization;
+ m_256qam[9].imag() = 13 / normalization;
+ m_256qam[10].real() = 11 / normalization;
+ m_256qam[10].imag() = 15 / normalization;
+ m_256qam[11].real() = 11 / normalization;
+ m_256qam[11].imag() = 13 / normalization;
+ m_256qam[12].real() = 9 / normalization;
+ m_256qam[12].imag() = 9 / normalization;
+ m_256qam[13].real() = 9 / normalization;
+ m_256qam[13].imag() = 11 / normalization;
+ m_256qam[14].real() = 11 / normalization;
+ m_256qam[14].imag() = 9 / normalization;
+ m_256qam[15].real() = 11 / normalization;
+ m_256qam[15].imag() = 11 / normalization;
+ m_256qam[16].real() = 15 / normalization;
+ m_256qam[16].imag() = 1 / normalization;
+ m_256qam[17].real() = 15 / normalization;
+ m_256qam[17].imag() = 3 / normalization;
+ m_256qam[18].real() = 13 / normalization;
+ m_256qam[18].imag() = 1 / normalization;
+ m_256qam[19].real() = 13 / normalization;
+ m_256qam[19].imag() = 3 / normalization;
+ m_256qam[20].real() = 15 / normalization;
+ m_256qam[20].imag() = 7 / normalization;
+ m_256qam[21].real() = 15 / normalization;
+ m_256qam[21].imag() = 5 / normalization;
+ m_256qam[22].real() = 13 / normalization;
+ m_256qam[22].imag() = 7 / normalization;
+ m_256qam[23].real() = 13 / normalization;
+ m_256qam[23].imag() = 5 / normalization;
+ m_256qam[24].real() = 9 / normalization;
+ m_256qam[24].imag() = 1 / normalization;
+ m_256qam[25].real() = 9 / normalization;
+ m_256qam[25].imag() = 3 / normalization;
+ m_256qam[26].real() = 11 / normalization;
+ m_256qam[26].imag() = 1 / normalization;
+ m_256qam[27].real() = 11 / normalization;
+ m_256qam[27].imag() = 3 / normalization;
+ m_256qam[28].real() = 9 / normalization;
+ m_256qam[28].imag() = 7 / normalization;
+ m_256qam[29].real() = 9 / normalization;
+ m_256qam[29].imag() = 5 / normalization;
+ m_256qam[30].real() = 11 / normalization;
+ m_256qam[30].imag() = 7 / normalization;
+ m_256qam[31].real() = 11 / normalization;
+ m_256qam[31].imag() = 5 / normalization;
+ m_256qam[32].real() = 1 / normalization;
+ m_256qam[32].imag() = 15 / normalization;
+ m_256qam[33].real() = 1 / normalization;
+ m_256qam[33].imag() = 13 / normalization;
+ m_256qam[34].real() = 3 / normalization;
+ m_256qam[34].imag() = 15 / normalization;
+ m_256qam[35].real() = 3 / normalization;
+ m_256qam[35].imag() = 13 / normalization;
+ m_256qam[36].real() = 1 / normalization;
+ m_256qam[36].imag() = 9 / normalization;
+ m_256qam[37].real() = 1 / normalization;
+ m_256qam[37].imag() = 11 / normalization;
+ m_256qam[38].real() = 3 / normalization;
+ m_256qam[38].imag() = 9 / normalization;
+ m_256qam[39].real() = 3 / normalization;
+ m_256qam[39].imag() = 11 / normalization;
+ m_256qam[40].real() = 7 / normalization;
+ m_256qam[40].imag() = 15 / normalization;
+ m_256qam[41].real() = 7 / normalization;
+ m_256qam[41].imag() = 13 / normalization;
+ m_256qam[42].real() = 5 / normalization;
+ m_256qam[42].imag() = 15 / normalization;
+ m_256qam[43].real() = 5 / normalization;
+ m_256qam[43].imag() = 13 / normalization;
+ m_256qam[44].real() = 7 / normalization;
+ m_256qam[44].imag() = 9 / normalization;
+ m_256qam[45].real() = 7 / normalization;
+ m_256qam[45].imag() = 11 / normalization;
+ m_256qam[46].real() = 5 / normalization;
+ m_256qam[46].imag() = 9 / normalization;
+ m_256qam[47].real() = 5 / normalization;
+ m_256qam[47].imag() = 11 / normalization;
+ m_256qam[48].real() = 1 / normalization;
+ m_256qam[48].imag() = 1 / normalization;
+ m_256qam[49].real() = 1 / normalization;
+ m_256qam[49].imag() = 3 / normalization;
+ m_256qam[50].real() = 3 / normalization;
+ m_256qam[50].imag() = 1 / normalization;
+ m_256qam[51].real() = 3 / normalization;
+ m_256qam[51].imag() = 3 / normalization;
+ m_256qam[52].real() = 1 / normalization;
+ m_256qam[52].imag() = 7 / normalization;
+ m_256qam[53].real() = 1 / normalization;
+ m_256qam[53].imag() = 5 / normalization;
+ m_256qam[54].real() = 3 / normalization;
+ m_256qam[54].imag() = 7 / normalization;
+ m_256qam[55].real() = 3 / normalization;
+ m_256qam[55].imag() = 5 / normalization;
+ m_256qam[56].real() = 7 / normalization;
+ m_256qam[56].imag() = 1 / normalization;
+ m_256qam[57].real() = 7 / normalization;
+ m_256qam[57].imag() = 3 / normalization;
+ m_256qam[58].real() = 5 / normalization;
+ m_256qam[58].imag() = 1 / normalization;
+ m_256qam[59].real() = 5 / normalization;
+ m_256qam[59].imag() = 3 / normalization;
+ m_256qam[60].real() = 7 / normalization;
+ m_256qam[60].imag() = 7 / normalization;
+ m_256qam[61].real() = 7 / normalization;
+ m_256qam[61].imag() = 5 / normalization;
+ m_256qam[62].real() = 5 / normalization;
+ m_256qam[62].imag() = 7 / normalization;
+ m_256qam[63].real() = 5 / normalization;
+ m_256qam[63].imag() = 5 / normalization;
+ m_256qam[64].real() = 15 / normalization;
+ m_256qam[64].imag() = -15 / normalization;
+ m_256qam[65].real() = 15 / normalization;
+ m_256qam[65].imag() = -13 / normalization;
+ m_256qam[66].real() = 13 / normalization;
+ m_256qam[66].imag() = -15 / normalization;
+ m_256qam[67].real() = 13 / normalization;
+ m_256qam[67].imag() = -13 / normalization;
+ m_256qam[68].real() = 15 / normalization;
+ m_256qam[68].imag() = -9 / normalization;
+ m_256qam[69].real() = 15 / normalization;
+ m_256qam[69].imag() = -11 / normalization;
+ m_256qam[70].real() = 13 / normalization;
+ m_256qam[70].imag() = -9 / normalization;
+ m_256qam[71].real() = 13 / normalization;
+ m_256qam[71].imag() = -11 / normalization;
+ m_256qam[72].real() = 9 / normalization;
+ m_256qam[72].imag() = -15 / normalization;
+ m_256qam[73].real() = 9 / normalization;
+ m_256qam[73].imag() = -13 / normalization;
+ m_256qam[74].real() = 11 / normalization;
+ m_256qam[74].imag() = -15 / normalization;
+ m_256qam[75].real() = 11 / normalization;
+ m_256qam[75].imag() = -13 / normalization;
+ m_256qam[76].real() = 9 / normalization;
+ m_256qam[76].imag() = -9 / normalization;
+ m_256qam[77].real() = 9 / normalization;
+ m_256qam[77].imag() = -11 / normalization;
+ m_256qam[78].real() = 11 / normalization;
+ m_256qam[78].imag() = -9 / normalization;
+ m_256qam[79].real() = 11 / normalization;
+ m_256qam[79].imag() = -11 / normalization;
+ m_256qam[80].real() = 15 / normalization;
+ m_256qam[80].imag() = -1 / normalization;
+ m_256qam[81].real() = 15 / normalization;
+ m_256qam[81].imag() = -3 / normalization;
+ m_256qam[82].real() = 13 / normalization;
+ m_256qam[82].imag() = -1 / normalization;
+ m_256qam[83].real() = 13 / normalization;
+ m_256qam[83].imag() = -3 / normalization;
+ m_256qam[84].real() = 15 / normalization;
+ m_256qam[84].imag() = -7 / normalization;
+ m_256qam[85].real() = 15 / normalization;
+ m_256qam[85].imag() = -5 / normalization;
+ m_256qam[86].real() = 13 / normalization;
+ m_256qam[86].imag() = -7 / normalization;
+ m_256qam[87].real() = 13 / normalization;
+ m_256qam[87].imag() = -5 / normalization;
+ m_256qam[88].real() = 9 / normalization;
+ m_256qam[88].imag() = -1 / normalization;
+ m_256qam[89].real() = 9 / normalization;
+ m_256qam[89].imag() = -3 / normalization;
+ m_256qam[90].real() = 11 / normalization;
+ m_256qam[90].imag() = -1 / normalization;
+ m_256qam[91].real() = 11 / normalization;
+ m_256qam[91].imag() = -3 / normalization;
+ m_256qam[92].real() = 9 / normalization;
+ m_256qam[92].imag() = -7 / normalization;
+ m_256qam[93].real() = 9 / normalization;
+ m_256qam[93].imag() = -5 / normalization;
+ m_256qam[94].real() = 11 / normalization;
+ m_256qam[94].imag() = -7 / normalization;
+ m_256qam[95].real() = 11 / normalization;
+ m_256qam[95].imag() = -5 / normalization;
+ m_256qam[96].real() = 1 / normalization;
+ m_256qam[96].imag() = -15 / normalization;
+ m_256qam[97].real() = 1 / normalization;
+ m_256qam[97].imag() = -13 / normalization;
+ m_256qam[98].real() = 3 / normalization;
+ m_256qam[98].imag() = -15 / normalization;
+ m_256qam[99].real() = 3 / normalization;
+ m_256qam[99].imag() = -13 / normalization;
+ m_256qam[100].real() = 1 / normalization;
+ m_256qam[100].imag() = -9 / normalization;
+ m_256qam[101].real() = 1 / normalization;
+ m_256qam[101].imag() = -11 / normalization;
+ m_256qam[102].real() = 3 / normalization;
+ m_256qam[102].imag() = -9 / normalization;
+ m_256qam[103].real() = 3 / normalization;
+ m_256qam[103].imag() = -11 / normalization;
+ m_256qam[104].real() = 7 / normalization;
+ m_256qam[104].imag() = -15 / normalization;
+ m_256qam[105].real() = 7 / normalization;
+ m_256qam[105].imag() = -13 / normalization;
+ m_256qam[106].real() = 5 / normalization;
+ m_256qam[106].imag() = -15 / normalization;
+ m_256qam[107].real() = 5 / normalization;
+ m_256qam[107].imag() = -13 / normalization;
+ m_256qam[108].real() = 7 / normalization;
+ m_256qam[108].imag() = -9 / normalization;
+ m_256qam[109].real() = 7 / normalization;
+ m_256qam[109].imag() = -11 / normalization;
+ m_256qam[110].real() = 5 / normalization;
+ m_256qam[110].imag() = -9 / normalization;
+ m_256qam[111].real() = 5 / normalization;
+ m_256qam[111].imag() = -11 / normalization;
+ m_256qam[112].real() = 1 / normalization;
+ m_256qam[112].imag() = -1 / normalization;
+ m_256qam[113].real() = 1 / normalization;
+ m_256qam[113].imag() = -3 / normalization;
+ m_256qam[114].real() = 3 / normalization;
+ m_256qam[114].imag() = -1 / normalization;
+ m_256qam[115].real() = 3 / normalization;
+ m_256qam[115].imag() = -3 / normalization;
+ m_256qam[116].real() = 1 / normalization;
+ m_256qam[116].imag() = -7 / normalization;
+ m_256qam[117].real() = 1 / normalization;
+ m_256qam[117].imag() = -5 / normalization;
+ m_256qam[118].real() = 3 / normalization;
+ m_256qam[118].imag() = -7 / normalization;
+ m_256qam[119].real() = 3 / normalization;
+ m_256qam[119].imag() = -5 / normalization;
+ m_256qam[120].real() = 7 / normalization;
+ m_256qam[120].imag() = -1 / normalization;
+ m_256qam[121].real() = 7 / normalization;
+ m_256qam[121].imag() = -3 / normalization;
+ m_256qam[122].real() = 5 / normalization;
+ m_256qam[122].imag() = -1 / normalization;
+ m_256qam[123].real() = 5 / normalization;
+ m_256qam[123].imag() = -3 / normalization;
+ m_256qam[124].real() = 7 / normalization;
+ m_256qam[124].imag() = -7 / normalization;
+ m_256qam[125].real() = 7 / normalization;
+ m_256qam[125].imag() = -5 / normalization;
+ m_256qam[126].real() = 5 / normalization;
+ m_256qam[126].imag() = -7 / normalization;
+ m_256qam[127].real() = 5 / normalization;
+ m_256qam[127].imag() = -5 / normalization;
+ m_256qam[128].real() = -15 / normalization;
+ m_256qam[128].imag() = 15 / normalization;
+ m_256qam[129].real() = -15 / normalization;
+ m_256qam[129].imag() = 13 / normalization;
+ m_256qam[130].real() = -13 / normalization;
+ m_256qam[130].imag() = 15 / normalization;
+ m_256qam[131].real() = -13 / normalization;
+ m_256qam[131].imag() = 13 / normalization;
+ m_256qam[132].real() = -15 / normalization;
+ m_256qam[132].imag() = 9 / normalization;
+ m_256qam[133].real() = -15 / normalization;
+ m_256qam[133].imag() = 11 / normalization;
+ m_256qam[134].real() = -13 / normalization;
+ m_256qam[134].imag() = 9 / normalization;
+ m_256qam[135].real() = -13 / normalization;
+ m_256qam[135].imag() = 11 / normalization;
+ m_256qam[136].real() = -9 / normalization;
+ m_256qam[136].imag() = 15 / normalization;
+ m_256qam[137].real() = -9 / normalization;
+ m_256qam[137].imag() = 13 / normalization;
+ m_256qam[138].real() = -11 / normalization;
+ m_256qam[138].imag() = 15 / normalization;
+ m_256qam[139].real() = -11 / normalization;
+ m_256qam[139].imag() = 13 / normalization;
+ m_256qam[140].real() = -9 / normalization;
+ m_256qam[140].imag() = 9 / normalization;
+ m_256qam[141].real() = -9 / normalization;
+ m_256qam[141].imag() = 11 / normalization;
+ m_256qam[142].real() = -11 / normalization;
+ m_256qam[142].imag() = 9 / normalization;
+ m_256qam[143].real() = -11 / normalization;
+ m_256qam[143].imag() = 11 / normalization;
+ m_256qam[144].real() = -15 / normalization;
+ m_256qam[144].imag() = 1 / normalization;
+ m_256qam[145].real() = -15 / normalization;
+ m_256qam[145].imag() = 3 / normalization;
+ m_256qam[146].real() = -13 / normalization;
+ m_256qam[146].imag() = 1 / normalization;
+ m_256qam[147].real() = -13 / normalization;
+ m_256qam[147].imag() = 3 / normalization;
+ m_256qam[148].real() = -15 / normalization;
+ m_256qam[148].imag() = 7 / normalization;
+ m_256qam[149].real() = -15 / normalization;
+ m_256qam[149].imag() = 5 / normalization;
+ m_256qam[150].real() = -13 / normalization;
+ m_256qam[150].imag() = 7 / normalization;
+ m_256qam[151].real() = -13 / normalization;
+ m_256qam[151].imag() = 5 / normalization;
+ m_256qam[152].real() = -9 / normalization;
+ m_256qam[152].imag() = 1 / normalization;
+ m_256qam[153].real() = -9 / normalization;
+ m_256qam[153].imag() = 3 / normalization;
+ m_256qam[154].real() = -11 / normalization;
+ m_256qam[154].imag() = 1 / normalization;
+ m_256qam[155].real() = -11 / normalization;
+ m_256qam[155].imag() = 3 / normalization;
+ m_256qam[156].real() = -9 / normalization;
+ m_256qam[156].imag() = 7 / normalization;
+ m_256qam[157].real() = -9 / normalization;
+ m_256qam[157].imag() = 5 / normalization;
+ m_256qam[158].real() = -11 / normalization;
+ m_256qam[158].imag() = 7 / normalization;
+ m_256qam[159].real() = -11 / normalization;
+ m_256qam[159].imag() = 5 / normalization;
+ m_256qam[160].real() = -1 / normalization;
+ m_256qam[160].imag() = 15 / normalization;
+ m_256qam[161].real() = -1 / normalization;
+ m_256qam[161].imag() = 13 / normalization;
+ m_256qam[162].real() = -3 / normalization;
+ m_256qam[162].imag() = 15 / normalization;
+ m_256qam[163].real() = -3 / normalization;
+ m_256qam[163].imag() = 13 / normalization;
+ m_256qam[164].real() = -1 / normalization;
+ m_256qam[164].imag() = 9 / normalization;
+ m_256qam[165].real() = -1 / normalization;
+ m_256qam[165].imag() = 11 / normalization;
+ m_256qam[166].real() = -3 / normalization;
+ m_256qam[166].imag() = 9 / normalization;
+ m_256qam[167].real() = -3 / normalization;
+ m_256qam[167].imag() = 11 / normalization;
+ m_256qam[168].real() = -7 / normalization;
+ m_256qam[168].imag() = 15 / normalization;
+ m_256qam[169].real() = -7 / normalization;
+ m_256qam[169].imag() = 13 / normalization;
+ m_256qam[170].real() = -5 / normalization;
+ m_256qam[170].imag() = 15 / normalization;
+ m_256qam[171].real() = -5 / normalization;
+ m_256qam[171].imag() = 13 / normalization;
+ m_256qam[172].real() = -7 / normalization;
+ m_256qam[172].imag() = 9 / normalization;
+ m_256qam[173].real() = -7 / normalization;
+ m_256qam[173].imag() = 11 / normalization;
+ m_256qam[174].real() = -5 / normalization;
+ m_256qam[174].imag() = 9 / normalization;
+ m_256qam[175].real() = -5 / normalization;
+ m_256qam[175].imag() = 11 / normalization;
+ m_256qam[176].real() = -1 / normalization;
+ m_256qam[176].imag() = 1 / normalization;
+ m_256qam[177].real() = -1 / normalization;
+ m_256qam[177].imag() = 3 / normalization;
+ m_256qam[178].real() = -3 / normalization;
+ m_256qam[178].imag() = 1 / normalization;
+ m_256qam[179].real() = -3 / normalization;
+ m_256qam[179].imag() = 3 / normalization;
+ m_256qam[180].real() = -1 / normalization;
+ m_256qam[180].imag() = 7 / normalization;
+ m_256qam[181].real() = -1 / normalization;
+ m_256qam[181].imag() = 5 / normalization;
+ m_256qam[182].real() = -3 / normalization;
+ m_256qam[182].imag() = 7 / normalization;
+ m_256qam[183].real() = -3 / normalization;
+ m_256qam[183].imag() = 5 / normalization;
+ m_256qam[184].real() = -7 / normalization;
+ m_256qam[184].imag() = 1 / normalization;
+ m_256qam[185].real() = -7 / normalization;
+ m_256qam[185].imag() = 3 / normalization;
+ m_256qam[186].real() = -5 / normalization;
+ m_256qam[186].imag() = 1 / normalization;
+ m_256qam[187].real() = -5 / normalization;
+ m_256qam[187].imag() = 3 / normalization;
+ m_256qam[188].real() = -7 / normalization;
+ m_256qam[188].imag() = 7 / normalization;
+ m_256qam[189].real() = -7 / normalization;
+ m_256qam[189].imag() = 5 / normalization;
+ m_256qam[190].real() = -5 / normalization;
+ m_256qam[190].imag() = 7 / normalization;
+ m_256qam[191].real() = -5 / normalization;
+ m_256qam[191].imag() = 5 / normalization;
+ m_256qam[192].real() = -15 / normalization;
+ m_256qam[192].imag() = -15 / normalization;
+ m_256qam[193].real() = -15 / normalization;
+ m_256qam[193].imag() = -13 / normalization;
+ m_256qam[194].real() = -13 / normalization;
+ m_256qam[194].imag() = -15 / normalization;
+ m_256qam[195].real() = -13 / normalization;
+ m_256qam[195].imag() = -13 / normalization;
+ m_256qam[196].real() = -15 / normalization;
+ m_256qam[196].imag() = -9 / normalization;
+ m_256qam[197].real() = -15 / normalization;
+ m_256qam[197].imag() = -11 / normalization;
+ m_256qam[198].real() = -13 / normalization;
+ m_256qam[198].imag() = -9 / normalization;
+ m_256qam[199].real() = -13 / normalization;
+ m_256qam[199].imag() = -11 / normalization;
+ m_256qam[200].real() = -9 / normalization;
+ m_256qam[200].imag() = -15 / normalization;
+ m_256qam[201].real() = -9 / normalization;
+ m_256qam[201].imag() = -13 / normalization;
+ m_256qam[202].real() = -11 / normalization;
+ m_256qam[202].imag() = -15 / normalization;
+ m_256qam[203].real() = -11 / normalization;
+ m_256qam[203].imag() = -13 / normalization;
+ m_256qam[204].real() = -9 / normalization;
+ m_256qam[204].imag() = -9 / normalization;
+ m_256qam[205].real() = -9 / normalization;
+ m_256qam[205].imag() = -11 / normalization;
+ m_256qam[206].real() = -11 / normalization;
+ m_256qam[206].imag() = -9 / normalization;
+ m_256qam[207].real() = -11 / normalization;
+ m_256qam[207].imag() = -11 / normalization;
+ m_256qam[208].real() = -15 / normalization;
+ m_256qam[208].imag() = -1 / normalization;
+ m_256qam[209].real() = -15 / normalization;
+ m_256qam[209].imag() = -3 / normalization;
+ m_256qam[210].real() = -13 / normalization;
+ m_256qam[210].imag() = -1 / normalization;
+ m_256qam[211].real() = -13 / normalization;
+ m_256qam[211].imag() = -3 / normalization;
+ m_256qam[212].real() = -15 / normalization;
+ m_256qam[212].imag() = -7 / normalization;
+ m_256qam[213].real() = -15 / normalization;
+ m_256qam[213].imag() = -5 / normalization;
+ m_256qam[214].real() = -13 / normalization;
+ m_256qam[214].imag() = -7 / normalization;
+ m_256qam[215].real() = -13 / normalization;
+ m_256qam[215].imag() = -5 / normalization;
+ m_256qam[216].real() = -9 / normalization;
+ m_256qam[216].imag() = -1 / normalization;
+ m_256qam[217].real() = -9 / normalization;
+ m_256qam[217].imag() = -3 / normalization;
+ m_256qam[218].real() = -11 / normalization;
+ m_256qam[218].imag() = -1 / normalization;
+ m_256qam[219].real() = -11 / normalization;
+ m_256qam[219].imag() = -3 / normalization;
+ m_256qam[220].real() = -9 / normalization;
+ m_256qam[220].imag() = -7 / normalization;
+ m_256qam[221].real() = -9 / normalization;
+ m_256qam[221].imag() = -5 / normalization;
+ m_256qam[222].real() = -11 / normalization;
+ m_256qam[222].imag() = -7 / normalization;
+ m_256qam[223].real() = -11 / normalization;
+ m_256qam[223].imag() = -5 / normalization;
+ m_256qam[224].real() = -1 / normalization;
+ m_256qam[224].imag() = -15 / normalization;
+ m_256qam[225].real() = -1 / normalization;
+ m_256qam[225].imag() = -13 / normalization;
+ m_256qam[226].real() = -3 / normalization;
+ m_256qam[226].imag() = -15 / normalization;
+ m_256qam[227].real() = -3 / normalization;
+ m_256qam[227].imag() = -13 / normalization;
+ m_256qam[228].real() = -1 / normalization;
+ m_256qam[228].imag() = -9 / normalization;
+ m_256qam[229].real() = -1 / normalization;
+ m_256qam[229].imag() = -11 / normalization;
+ m_256qam[230].real() = -3 / normalization;
+ m_256qam[230].imag() = -9 / normalization;
+ m_256qam[231].real() = -3 / normalization;
+ m_256qam[231].imag() = -11 / normalization;
+ m_256qam[232].real() = -7 / normalization;
+ m_256qam[232].imag() = -15 / normalization;
+ m_256qam[233].real() = -7 / normalization;
+ m_256qam[233].imag() = -13 / normalization;
+ m_256qam[234].real() = -5 / normalization;
+ m_256qam[234].imag() = -15 / normalization;
+ m_256qam[235].real() = -5 / normalization;
+ m_256qam[235].imag() = -13 / normalization;
+ m_256qam[236].real() = -7 / normalization;
+ m_256qam[236].imag() = -9 / normalization;
+ m_256qam[237].real() = -7 / normalization;
+ m_256qam[237].imag() = -11 / normalization;
+ m_256qam[238].real() = -5 / normalization;
+ m_256qam[238].imag() = -9 / normalization;
+ m_256qam[239].real() = -5 / normalization;
+ m_256qam[239].imag() = -11 / normalization;
+ m_256qam[240].real() = -1 / normalization;
+ m_256qam[240].imag() = -1 / normalization;
+ m_256qam[241].real() = -1 / normalization;
+ m_256qam[241].imag() = -3 / normalization;
+ m_256qam[242].real() = -3 / normalization;
+ m_256qam[242].imag() = -1 / normalization;
+ m_256qam[243].real() = -3 / normalization;
+ m_256qam[243].imag() = -3 / normalization;
+ m_256qam[244].real() = -1 / normalization;
+ m_256qam[244].imag() = -7 / normalization;
+ m_256qam[245].real() = -1 / normalization;
+ m_256qam[245].imag() = -5 / normalization;
+ m_256qam[246].real() = -3 / normalization;
+ m_256qam[246].imag() = -7 / normalization;
+ m_256qam[247].real() = -3 / normalization;
+ m_256qam[247].imag() = -5 / normalization;
+ m_256qam[248].real() = -7 / normalization;
+ m_256qam[248].imag() = -1 / normalization;
+ m_256qam[249].real() = -7 / normalization;
+ m_256qam[249].imag() = -3 / normalization;
+ m_256qam[250].real() = -5 / normalization;
+ m_256qam[250].imag() = -1 / normalization;
+ m_256qam[251].real() = -5 / normalization;
+ m_256qam[251].imag() = -3 / normalization;
+ m_256qam[252].real() = -7 / normalization;
+ m_256qam[252].imag() = -7 / normalization;
+ m_256qam[253].real() = -7 / normalization;
+ m_256qam[253].imag() = -5 / normalization;
+ m_256qam[254].real() = -5 / normalization;
+ m_256qam[254].imag() = -7 / normalization;
+ m_256qam[255].real() = -5 / normalization;
+ m_256qam[255].imag() = -5 / normalization;
+ if (rotation == ROTATION_ON) {
+ cyclic_delay = TRUE;
+ rotation_angle = (2.0 * M_PI * 3.576334375) / 360;
+ for (int i = 0; i < 256; i++) {
+ m_temp[0].real() = m_256qam[i].real();
+ m_256qam[i].real() = (m_256qam[i].real() * cos(rotation_angle))
- (m_256qam[i].imag() * sin(rotation_angle));
+ m_256qam[i].imag() = (m_temp[0].real() * sin(rotation_angle)) +
(m_256qam[i].imag() * cos(rotation_angle));
+ }
+ }
+ break;
+ default:
+ normalization = sqrt(2);
+ m_qpsk[0].real() = 1.0 / normalization;
+ m_qpsk[0].imag() = 1.0 / normalization;
+ m_qpsk[1].real() = 1.0 / normalization;
+ m_qpsk[1].imag() = -1.0 / normalization;
+ m_qpsk[2].real() = -1.0 / normalization;
+ m_qpsk[2].imag() = 1.0 / normalization;
+ m_qpsk[3].real() = -1.0 / normalization;
+ m_qpsk[3].imag() = -1.0 / normalization;
+ if (rotation == ROTATION_ON) {
+ cyclic_delay = TRUE;
+ rotation_angle = (2.0 * M_PI * 29.0) / 360;
+ for (int i = 0; i < 4; i++) {
+ m_temp[0].real() = m_qpsk[i].real();
+ m_qpsk[i].real() = (m_qpsk[i].real() * cos(rotation_angle)) -
(m_qpsk[i].imag() * sin(rotation_angle));
+ m_qpsk[i].imag() = (m_temp[0].real() * sin(rotation_angle)) +
(m_qpsk[i].imag() * cos(rotation_angle));
+ }
+ }
+ break;
+ }
+ signal_constellation = constellation;
+ set_output_multiple(cell_size);
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_modulator_bc_impl::~dvbt2_modulator_bc_impl()
+ {
+ }
+
+ void
+ dvbt2_modulator_bc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = noutput_items;
+ }
+
+ int
+ dvbt2_modulator_bc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (const unsigned char *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ const unsigned char *in_delay;
+ gr_complex f_temp[1], g_temp[1];
+ int index, index_delay;
+
+ switch (signal_constellation) {
+ case MOD_QPSK:
+ for (int i = 0; i < noutput_items; i += cell_size) {
+ if (cyclic_delay == FALSE) {
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ *out++ = m_qpsk[index & 0x3];
+ }
+ }
+ else {
+ in_delay = in;
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ index_delay = in_delay[(j + cell_size - 1) % cell_size];
+ f_temp[0] = m_qpsk[index & 0x3];
+ g_temp[0] = m_qpsk[index_delay & 0x3];
+ f_temp[0].imag() = g_temp[0].imag();
+ *out++ = f_temp[0];
+ }
+ }
+ }
+ break;
+ case MOD_16QAM:
+ for (int i = 0; i < noutput_items; i += cell_size) {
+ if (cyclic_delay == FALSE) {
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ *out++ = m_16qam[index & 0xf];
+ }
+ }
+ else {
+ in_delay = in;
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ index_delay = in_delay[(j + cell_size - 1) % cell_size];
+ f_temp[0] = m_16qam[index & 0xf];
+ g_temp[0] = m_16qam[index_delay & 0xf];
+ f_temp[0].imag() = g_temp[0].imag();
+ *out++ = f_temp[0];
+ }
+ }
+ }
+ break;
+ case MOD_64QAM:
+ for (int i = 0; i < noutput_items; i += cell_size) {
+ if (cyclic_delay == FALSE) {
+ for (int j = 0; j < noutput_items; j++) {
+ index = *in++;
+ *out++ = m_64qam[index & 0x3f];
+ }
+ }
+ else {
+ in_delay = in;
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ index_delay = in_delay[(j + cell_size - 1) % cell_size];
+ f_temp[0] = m_64qam[index & 0x3f];
+ g_temp[0] = m_64qam[index_delay & 0x3f];
+ f_temp[0].imag() = g_temp[0].imag();
+ *out++ = f_temp[0];
+ }
+ }
+ }
+ break;
+ case MOD_256QAM:
+ for (int i = 0; i < noutput_items; i += cell_size) {
+ if (cyclic_delay == FALSE) {
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ *out++ = m_256qam[index & 0xff];
+ }
+ }
+ else {
+ in_delay = in;
+ for (int j = 0; j < cell_size; j++) {
+ index = *in++;
+ index_delay = in_delay[(j + cell_size - 1) % cell_size];
+ f_temp[0] = m_256qam[index & 0xff];
+ g_temp[0] = m_256qam[index_delay & 0xff];
+ f_temp[0].imag() = g_temp[0].imag();
+ *out++ = f_temp[0];
+ }
+ }
+ }
+ break;
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (noutput_items);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.h
new file mode 100644
index 0000000..67f17e1
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_MODULATOR_BC_IMPL_H
+#define INCLUDED_DTV_DVBT2_MODULATOR_BC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_modulator_bc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_modulator_bc_impl : public dvbt2_modulator_bc
+ {
+ private:
+ int signal_constellation;
+ int cyclic_delay;
+ int cell_size;
+ gr_complex m_qpsk[4];
+ gr_complex m_16qam[16];
+ gr_complex m_64qam[64];
+ gr_complex m_256qam[256];
+
+ public:
+ dvbt2_modulator_bc_impl(dvb_framesize_t framesize, dvb_constellation_t
constellation, dvbt2_rotation_t rotation);
+ ~dvbt2_modulator_bc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_MODULATOR_BC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.cc
new file mode 100644
index 0000000..0d0bc5a
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.cc
@@ -0,0 +1,366 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_p1insertion_cc_impl.h"
+#include <stdio.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_p1insertion_cc::sptr
+ dvbt2_p1insertion_cc::make(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_guardinterval_t guardinterval, int numdatasyms,
dvbt2_preamble_t preamble, dvbt2_showlevels_t showlevels, float vclip)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_p1insertion_cc_impl(carriermode, fftsize, guardinterval,
numdatasyms, preamble, showlevels, vclip));
+ }
+
+ /*
+ * The private constructor
+ */
+
dvbt2_p1insertion_cc_impl::dvbt2_p1insertion_cc_impl(dvbt2_extended_carrier_t
carriermode, dvbt2_fftsize_t fftsize, dvbt2_guardinterval_t guardinterval, int
numdatasyms, dvbt2_preamble_t preamble, dvbt2_showlevels_t showlevels, float
vclip)
+ : gr::block("dvbt2_p1insertion_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ int s1, s2, index = 0;
+ int fef_present = FALSE; /* for testing only */
+ const gr_complex *in = (const gr_complex *) p1_freq;
+ gr_complex *out = (gr_complex *) p1_time;
+ s1 = preamble;
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ fft_size = 1024;
+ N_P2 = 16;
+ break;
+ case FFTSIZE_2K:
+ fft_size = 2048;
+ N_P2 = 8;
+ break;
+ case FFTSIZE_4K:
+ fft_size = 4096;
+ N_P2 = 4;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ fft_size = 8192;
+ N_P2 = 2;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ fft_size = 16384;
+ N_P2 = 1;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ fft_size = 32768;
+ N_P2 = 1;
+ break;
+ }
+ switch (guardinterval) {
+ case GI_1_32:
+ guard_interval = fft_size / 32;
+ break;
+ case GI_1_16:
+ guard_interval = fft_size / 16;
+ break;
+ case GI_1_8:
+ guard_interval = fft_size / 8;
+ break;
+ case GI_1_4:
+ guard_interval = fft_size / 4;
+ break;
+ case GI_1_128:
+ guard_interval = fft_size / 128;
+ break;
+ case GI_19_128:
+ guard_interval = (fft_size * 19) / 128;
+ break;
+ case GI_19_256:
+ guard_interval = (fft_size * 19) / 256;
+ break;
+ }
+ init_p1_randomizer();
+ s2 = (fftsize & 0x7) << 1;
+ if (fef_present == TRUE) {
+ s2 |= 1;
+ }
+ for (int i = 0; i < 8; i++) {
+ for (int j = 7; j >= 0; j--) {
+ modulation_sequence[index++] = (s1_modulation_patterns[s1][i] >> j)
& 0x1;
+ }
+ }
+ for (int i = 0; i < 32; i++) {
+ for (int j = 7; j >= 0; j--) {
+ modulation_sequence[index++] = (s2_modulation_patterns[s2][i] >> j)
& 0x1;
+ }
+ }
+ for (int i = 0; i < 8; i++) {
+ for (int j = 7; j >= 0; j--) {
+ modulation_sequence[index++] = (s1_modulation_patterns[s1][i] >> j)
& 0x1;
+ }
+ }
+ dbpsk_modulation_sequence[0] = 1;
+ for (int i = 1; i < 385; i++) {
+ dbpsk_modulation_sequence[i] = 0;
+ }
+ for (int i = 1; i < 385; i++) {
+ if (modulation_sequence[i - 1] == 1) {
+ dbpsk_modulation_sequence[i] = -dbpsk_modulation_sequence[i - 1];
+ }
+ else {
+ dbpsk_modulation_sequence[i] = dbpsk_modulation_sequence[i - 1];
+ }
+ }
+ for (int i = 0; i < 384; i++) {
+ dbpsk_modulation_sequence[i] = dbpsk_modulation_sequence[i + 1] *
p1_randomize[i];
+ }
+ for (int i = 0; i < 1024; i++) {
+ p1_freq[i].real() = 0.0;
+ p1_freq[i].imag() = 0.0;
+ }
+ for (int i = 0; i < 384; i++) {
+ p1_freq[p1_active_carriers[i] + 86].real() =
float(dbpsk_modulation_sequence[i]);
+ }
+ p1_fft_size = 1024;
+ p1_fft = new fft::fft_complex(p1_fft_size, false, 1);
+ gr_complex *dst = p1_fft->get_inbuf();
+ memcpy(&dst[p1_fft_size / 2], &in[0], sizeof(gr_complex) * p1_fft_size /
2);
+ memcpy(&dst[0], &in[p1_fft_size / 2], sizeof(gr_complex) * p1_fft_size /
2);
+ p1_fft->execute();
+ memcpy(out, p1_fft->get_outbuf(), sizeof(gr_complex) * p1_fft_size);
+ for (int i = 0; i < 1024; i++) {
+ p1_time[i].real() *= 1 / sqrt(384);
+ p1_time[i].imag() *= 1 / sqrt(384);
+ }
+ for (int i = 0; i < 1023; i++) {
+ p1_freqshft[i + 1] = p1_freq[i];
+ }
+ p1_freqshft[0] = p1_freq[1023];
+ in = (const gr_complex *) p1_freqshft;
+ out = (gr_complex *) p1_timeshft;
+ dst = p1_fft->get_inbuf();
+ memcpy(&dst[p1_fft_size / 2], &in[0], sizeof(gr_complex) * p1_fft_size /
2);
+ memcpy(&dst[0], &in[p1_fft_size / 2], sizeof(gr_complex) * p1_fft_size /
2);
+ p1_fft->execute();
+ memcpy(out, p1_fft->get_outbuf(), sizeof(gr_complex) * p1_fft_size);
+ for (int i = 0; i < 1024; i++) {
+ p1_timeshft[i].real() *= 1 / sqrt(384);
+ p1_timeshft[i].imag() *= 1 / sqrt(384);
+ }
+ frame_items = ((numdatasyms + N_P2) * fft_size) + ((numdatasyms + N_P2)
* guard_interval);
+ insertion_items = frame_items + 2048;
+ set_output_multiple(frame_items + 2048);
+ show_levels = showlevels;
+ real_positive = 0.0;
+ real_negative = 0.0;
+ imag_positive = 0.0;
+ imag_negative = 0.0;
+ real_positive_threshold = vclip;
+ real_negative_threshold = -vclip;
+ imag_positive_threshold = vclip;
+ imag_negative_threshold = -vclip;
+ real_positive_threshold_count = 0;
+ real_negative_threshold_count = 0;
+ imag_positive_threshold_count = 0;
+ imag_negative_threshold_count = 0;
+ }
+
+ void
+ dvbt2_p1insertion_cc_impl::init_p1_randomizer(void)
+ {
+ int sr = 0x4e46;
+ for (int i = 0; i < 384; i++) {
+ int b = ((sr) ^ (sr >> 1)) & 1;
+ if (b == 0) {
+ p1_randomize[i] = 1;
+ }
+ else {
+ p1_randomize[i] = -1;
+ }
+ sr >>= 1;
+ if(b) sr |= 0x4000;
+ }
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_p1insertion_cc_impl::~dvbt2_p1insertion_cc_impl()
+ {
+ delete p1_fft;
+ }
+
+ void
+ dvbt2_p1insertion_cc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = frame_items * (noutput_items /
insertion_items);
+ }
+
+ int
+ dvbt2_p1insertion_cc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ gr_complex *level;
+
+ for (int i = 0; i < noutput_items; i += insertion_items) {
+ level = out;
+ for (int j = 0; j < 542; j++) {
+ *out++ = p1_timeshft[j];
+ }
+ for (int j = 0; j < 1024; j++) {
+ *out++ = p1_time[j];
+ }
+ for (int j = 542; j < 1024; j++) {
+ *out++ = p1_timeshft[j];
+ }
+ memcpy(out, in, sizeof(gr_complex) * frame_items);
+ if (show_levels == TRUE) {
+ for (int j = 0; j < frame_items + 2048; j++) {
+ if (level[j].real() > real_positive) {
+ real_positive = level[j].real();
+ }
+ if (level[j].real() < real_negative) {
+ real_negative = level[j].real();
+ }
+ if (level[j].imag() > imag_positive) {
+ imag_positive = level[j].imag();
+ }
+ if (level[j].imag() < imag_negative) {
+ imag_negative = level[j].imag();
+ }
+ if (level[j].real() > real_positive_threshold) {
+ real_positive_threshold_count++;
+ }
+ if (level[j].real() < real_negative_threshold) {
+ real_negative_threshold_count++;
+ }
+ if (level[j].imag() > imag_positive_threshold) {
+ imag_positive_threshold_count++;
+ }
+ if (level[j].imag() < imag_negative_threshold) {
+ imag_negative_threshold_count++;
+ }
+ }
+ printf("peak real = %+e, %+e, %d, %d\n", real_positive,
real_negative, real_positive_threshold_count, real_negative_threshold_count);
+ printf("peak imag = %+e, %+e, %d, %d\n", imag_positive,
imag_negative, imag_positive_threshold_count, imag_negative_threshold_count);
+ }
+ out += frame_items;
+ in += frame_items;
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (frame_items);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const int dvbt2_p1insertion_cc_impl::p1_active_carriers[384] =
+ {
+ 44, 45, 47, 51, 54, 59, 62, 64, 65, 66, 70, 75, 78, 80, 81, 82, 84, 85,
87, 88, 89, 90,
+ 94, 96, 97, 98, 102, 107, 110, 112, 113, 114, 116, 117, 119, 120, 121,
122, 124,
+ 125, 127, 131, 132, 133, 135, 136, 137, 138, 142, 144, 145, 146, 148,
149, 151,
+ 152, 153, 154, 158, 160, 161, 162, 166, 171,
+
+ 172, 173, 175, 179, 182, 187, 190, 192, 193, 194, 198, 203, 206, 208,
209, 210,
+ 212, 213, 215, 216, 217, 218, 222, 224, 225, 226, 230, 235, 238, 240,
241, 242,
+ 244, 245, 247, 248, 249, 250, 252, 253, 255, 259, 260, 261, 263, 264,
265, 266,
+ 270, 272, 273, 274, 276, 277, 279, 280, 281, 282, 286, 288, 289, 290,
294, 299,
+ 300, 301, 303, 307, 310, 315, 318, 320, 321, 322, 326, 331, 334, 336,
337, 338,
+ 340, 341, 343, 344, 345, 346, 350, 352, 353, 354, 358, 363, 364, 365,
367, 371,
+ 374, 379, 382, 384, 385, 386, 390, 395, 396, 397, 399, 403, 406, 411,
412, 413,
+ 415, 419, 420, 421, 423, 424, 425, 426, 428, 429, 431, 435, 438, 443,
446, 448,
+ 449, 450, 454, 459, 462, 464, 465, 466, 468, 469, 471, 472, 473, 474,
478, 480,
+ 481, 482, 486, 491, 494, 496, 497, 498, 500, 501, 503, 504, 505, 506,
508, 509,
+ 511, 515, 516, 517, 519, 520, 521, 522, 526, 528, 529, 530, 532, 533,
535, 536,
+ 537, 538, 542, 544, 545, 546, 550, 555, 558, 560, 561, 562, 564, 565,
567, 568,
+ 569, 570, 572, 573, 575, 579, 580, 581, 583, 584, 585, 586, 588, 589,
591, 595,
+ 598, 603, 604, 605, 607, 611, 612, 613, 615, 616, 617, 618, 622, 624,
625, 626,
+ 628, 629, 631, 632, 633, 634, 636, 637, 639, 643, 644, 645, 647, 648,
649, 650,
+ 654, 656, 657, 658, 660, 661, 663, 664, 665, 666, 670, 672, 673, 674,
678, 683,
+
+ 684, 689, 692, 696, 698, 699, 701, 702, 703, 704, 706, 707, 708,
+ 712, 714, 715, 717, 718, 719, 720, 722, 723, 725, 726, 727, 729,
+ 733, 734, 735, 736, 738, 739, 740, 744, 746, 747, 748, 753, 756,
+ 760, 762, 763, 765, 766, 767, 768, 770, 771, 772, 776, 778, 779,
+ 780, 785, 788, 792, 794, 795, 796, 801, 805, 806, 807, 809
+ };
+
+ const unsigned char
dvbt2_p1insertion_cc_impl::s1_modulation_patterns[8][8] =
+ {
+ {0x12, 0x47, 0x21, 0x74, 0x1D, 0x48, 0x2E, 0x7B},
+ {0x47, 0x12, 0x74, 0x21, 0x48, 0x1D, 0x7B, 0x2E},
+ {0x21, 0x74, 0x12, 0x47, 0x2E, 0x7B, 0x1D, 0x48},
+ {0x74, 0x21, 0x47, 0x12, 0x7B, 0x2E, 0x48, 0x1D},
+ {0x1D, 0x48, 0x2E, 0x7B, 0x12, 0x47, 0x21, 0x74},
+ {0x48, 0x1D, 0x7B, 0x2E, 0x47, 0x12, 0x74, 0x21},
+ {0x2E, 0x7B, 0x1D, 0x48, 0x21, 0x74, 0x12, 0x47},
+ {0x7B, 0x2E, 0x48, 0x1D, 0x74, 0x21, 0x47, 0x12}
+ };
+
+ const unsigned char
dvbt2_p1insertion_cc_impl::s2_modulation_patterns[16][32] =
+ {
+ {0x12, 0x1D, 0x47, 0x48, 0x21, 0x2E, 0x74, 0x7B, 0x1D, 0x12, 0x48, 0x47,
0x2E, 0x21, 0x7B, 0x74,
+ 0x12, 0xE2, 0x47, 0xB7, 0x21, 0xD1, 0x74, 0x84, 0x1D, 0xED, 0x48, 0xB8,
0x2E, 0xDE, 0x7B, 0x8B},
+ {0x47, 0x48, 0x12, 0x1D, 0x74, 0x7B, 0x21, 0x2E, 0x48, 0x47, 0x1D, 0x12,
0x7B, 0x74, 0x2E, 0x21,
+ 0x47, 0xB7, 0x12, 0xE2, 0x74, 0x84, 0x21, 0xD1, 0x48, 0xB8, 0x1D, 0xED,
0x7B, 0x8B, 0x2E, 0xDE},
+ {0x21, 0x2E, 0x74, 0x7B, 0x12, 0x1D, 0x47, 0x48, 0x2E, 0x21, 0x7B, 0x74,
0x1D, 0x12, 0x48, 0x47,
+ 0x21, 0xD1, 0x74, 0x84, 0x12, 0xE2, 0x47, 0xB7, 0x2E, 0xDE, 0x7B, 0x8B,
0x1D, 0xED, 0x48, 0xB8},
+ {0x74, 0x7B, 0x21, 0x2E, 0x47, 0x48, 0x12, 0x1D, 0x7B, 0x74, 0x2E, 0x21,
0x48, 0x47, 0x1D, 0x12,
+ 0x74, 0x84, 0x21, 0xD1, 0x47, 0xB7, 0x12, 0xE2, 0x7B, 0x8B, 0x2E, 0xDE,
0x48, 0xB8, 0x1D, 0xED},
+ {0x1D, 0x12, 0x48, 0x47, 0x2E, 0x21, 0x7B, 0x74, 0x12, 0x1D, 0x47, 0x48,
0x21, 0x2E, 0x74, 0x7B,
+ 0x1D, 0xED, 0x48, 0xB8, 0x2E, 0xDE, 0x7B, 0x8B, 0x12, 0xE2, 0x47, 0xB7,
0x21, 0xD1, 0x74, 0x84},
+ {0x48, 0x47, 0x1D, 0x12, 0x7B, 0x74, 0x2E, 0x21, 0x47, 0x48, 0x12, 0x1D,
0x74, 0x7B, 0x21, 0x2E,
+ 0x48, 0xB8, 0x1D, 0xED, 0x7B, 0x8B, 0x2E, 0xDE, 0x47, 0xB7, 0x12, 0xE2,
0x74, 0x84, 0x21, 0xD1},
+ {0x2E, 0x21, 0x7B, 0x74, 0x1D, 0x12, 0x48, 0x47, 0x21, 0x2E, 0x74, 0x7B,
0x12, 0x1D, 0x47, 0x48,
+ 0x2E, 0xDE, 0x7B, 0x8B, 0x1D, 0xED, 0x48, 0xB8, 0x21, 0xD1, 0x74, 0x84,
0x12, 0xE2, 0x47, 0xB7},
+ {0x7B, 0x74, 0x2E, 0x21, 0x48, 0x47, 0x1D, 0x12, 0x74, 0x7B, 0x21, 0x2E,
0x47, 0x48, 0x12, 0x1D,
+ 0x7B, 0x8B, 0x2E, 0xDE, 0x48, 0xB8, 0x1D, 0xED, 0x74, 0x84, 0x21, 0xD1,
0x47, 0xB7, 0x12, 0xE2},
+ {0x12, 0xE2, 0x47, 0xB7, 0x21, 0xD1, 0x74, 0x84, 0x1D, 0xED, 0x48, 0xB8,
0x2E, 0xDE, 0x7B, 0x8B,
+ 0x12, 0x1D, 0x47, 0x48, 0x21, 0x2E, 0x74, 0x7B, 0x1D, 0x12, 0x48, 0x47,
0x2E, 0x21, 0x7B, 0x74},
+ {0x47, 0xB7, 0x12, 0xE2, 0x74, 0x84, 0x21, 0xD1, 0x48, 0xB8, 0x1D, 0xED,
0x7B, 0x8B, 0x2E, 0xDE,
+ 0x47, 0x48, 0x12, 0x1D, 0x74, 0x7B, 0x21, 0x2E, 0x48, 0x47, 0x1D, 0x12,
0x7B, 0x74, 0x2E, 0x21},
+ {0x21, 0xD1, 0x74, 0x84, 0x12, 0xE2, 0x47, 0xB7, 0x2E, 0xDE, 0x7B, 0x8B,
0x1D, 0xED, 0x48, 0xB8,
+ 0x21, 0x2E, 0x74, 0x7B, 0x12, 0x1D, 0x47, 0x48, 0x2E, 0x21, 0x7B, 0x74,
0x1D, 0x12, 0x48, 0x47},
+ {0x74, 0x84, 0x21, 0xD1, 0x47, 0xB7, 0x12, 0xE2, 0x7B, 0x8B, 0x2E, 0xDE,
0x48, 0xB8, 0x1D, 0xED,
+ 0x74, 0x7B, 0x21, 0x2E, 0x47, 0x48, 0x12, 0x1D, 0x7B, 0x74, 0x2E, 0x21,
0x48, 0x47, 0x1D, 0x12},
+ {0x1D, 0xED, 0x48, 0xB8, 0x2E, 0xDE, 0x7B, 0x8B, 0x12, 0xE2, 0x47, 0xB7,
0x21, 0xD1, 0x74, 0x84,
+ 0x1D, 0x12, 0x48, 0x47, 0x2E, 0x21, 0x7B, 0x74, 0x12, 0x1D, 0x47, 0x48,
0x21, 0x2E, 0x74, 0x7B},
+ {0x48, 0xB8, 0x1D, 0xED, 0x7B, 0x8B, 0x2E, 0xDE, 0x47, 0xB7, 0x12, 0xE2,
0x74, 0x84, 0x21, 0xD1,
+ 0x48, 0x47, 0x1D, 0x12, 0x7B, 0x74, 0x2E, 0x21, 0x47, 0x48, 0x12, 0x1D,
0x74, 0x7B, 0x21, 0x2E},
+ {0x2E, 0xDE, 0x7B, 0x8B, 0x1D, 0xED, 0x48, 0xB8, 0x21, 0xD1, 0x74, 0x84,
0x12, 0xE2, 0x47, 0xB7,
+ 0x2E, 0x21, 0x7B, 0x74, 0x1D, 0x12, 0x48, 0x47, 0x21, 0x2E, 0x74, 0x7B,
0x12, 0x1D, 0x47, 0x48},
+ {0x7B, 0x8B, 0x2E, 0xDE, 0x48, 0xB8, 0x1D, 0xED, 0x74, 0x84, 0x21, 0xD1,
0x47, 0xB7, 0x12, 0xE2,
+ 0x7B, 0x74, 0x2E, 0x21, 0x48, 0x47, 0x1D, 0x12, 0x74, 0x7B, 0x21, 0x2E,
0x47, 0x48, 0x12, 0x1D}
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.h
new file mode 100644
index 0000000..85537b5
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_p1insertion_cc_impl.h
@@ -0,0 +1,85 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_P1INSERTION_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_P1INSERTION_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_p1insertion_cc.h>
+#include <gnuradio/fft/fft.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_p1insertion_cc_impl : public dvbt2_p1insertion_cc
+ {
+ private:
+ int fft_size;
+ int guard_interval;
+ int frame_items;
+ int insertion_items;
+ int N_P2;
+ int p1_randomize[384];
+ int modulation_sequence[384];
+ int dbpsk_modulation_sequence[385];
+ gr_complex p1_freq[1024];
+ gr_complex p1_freqshft[1024];
+ gr_complex p1_time[1024];
+ gr_complex p1_timeshft[1024];
+ void init_p1_randomizer(void);
+
+ int show_levels;
+ float real_positive;
+ float real_negative;
+ float imag_positive;
+ float imag_negative;
+ float real_positive_threshold;
+ float real_negative_threshold;
+ float imag_positive_threshold;
+ float imag_negative_threshold;
+ int real_positive_threshold_count;
+ int real_negative_threshold_count;
+ int imag_positive_threshold_count;
+ int imag_negative_threshold_count;
+
+ fft::fft_complex *p1_fft;
+ int p1_fft_size;
+
+ const static int p1_active_carriers[384];
+ const static unsigned char s1_modulation_patterns[8][8];
+ const static unsigned char s2_modulation_patterns[16][32];
+
+ public:
+ dvbt2_p1insertion_cc_impl(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_guardinterval_t guardinterval, int numdatasyms,
dvbt2_preamble_t preamble, dvbt2_showlevels_t showlevels, float vclip);
+ ~dvbt2_p1insertion_cc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_P1INSERTION_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
new file mode 100644
index 0000000..94d252d
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
@@ -0,0 +1,984 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_paprtr_cc_impl.h"
+#include <complex.h>
+#include <volk/volk.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_paprtr_cc::sptr
+ dvbt2_paprtr_cc::make(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, float vclip, int iterations, int vlength)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_paprtr_cc_impl(carriermode, fftsize, pilotpattern,
guardinterval, numdatasyms, paprmode, version, vclip, iterations, vlength));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbt2_paprtr_cc_impl::dvbt2_paprtr_cc_impl(dvbt2_extended_carrier_t
carriermode, dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, float vclip, int iterations, int vlength)
+ : gr::sync_block("dvbt2_paprtr_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex) * vlength),
+ gr::io_signature::make(1, 1, sizeof(gr_complex) * vlength))
+ {
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_PS = 853;
+ K_EXT = 0;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_PS = 1705;
+ K_EXT = 0;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_PS = 3409;
+ K_EXT = 0;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 6817;
+ K_EXT = 0;
+ }
+ else {
+ C_PS = 6913;
+ K_EXT = 48;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 13633;
+ K_EXT = 0;
+ }
+ else {
+ C_PS = 13921;
+ K_EXT = 144;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 27265;
+ K_EXT = 0;
+ }
+ else {
+ C_PS = 27841;
+ K_EXT = 288;
+ }
+ break;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 568;
+ break;
+ case PILOT_PP2:
+ N_FC = 710;
+ break;
+ case PILOT_PP3:
+ N_FC = 710;
+ break;
+ case PILOT_PP4:
+ N_FC = 780;
+ break;
+ case PILOT_PP5:
+ N_FC = 780;
+ break;
+ case PILOT_PP6:
+ N_FC = 0;
+ break;
+ case PILOT_PP7:
+ N_FC = 0;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 10;
+ }
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 1136;
+ break;
+ case PILOT_PP2:
+ N_FC = 1420;
+ break;
+ case PILOT_PP3:
+ N_FC = 1420;
+ break;
+ case PILOT_PP4:
+ N_FC = 1562;
+ break;
+ case PILOT_PP5:
+ N_FC = 1562;
+ break;
+ case PILOT_PP6:
+ N_FC = 0;
+ break;
+ case PILOT_PP7:
+ N_FC = 1632;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 18;
+ }
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 2272;
+ break;
+ case PILOT_PP2:
+ N_FC = 2840;
+ break;
+ case PILOT_PP3:
+ N_FC = 2840;
+ break;
+ case PILOT_PP4:
+ N_FC = 3124;
+ break;
+ case PILOT_PP5:
+ N_FC = 3124;
+ break;
+ case PILOT_PP6:
+ N_FC = 0;
+ break;
+ case PILOT_PP7:
+ N_FC = 3266;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 36;
+ }
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 4544;
+ break;
+ case PILOT_PP2:
+ N_FC = 5680;
+ break;
+ case PILOT_PP3:
+ N_FC = 5680;
+ break;
+ case PILOT_PP4:
+ N_FC = 6248;
+ break;
+ case PILOT_PP5:
+ N_FC = 6248;
+ break;
+ case PILOT_PP6:
+ N_FC = 0;
+ break;
+ case PILOT_PP7:
+ N_FC = 6532;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 4608;
+ break;
+ case PILOT_PP2:
+ N_FC = 5760;
+ break;
+ case PILOT_PP3:
+ N_FC = 5760;
+ break;
+ case PILOT_PP4:
+ N_FC = 6336;
+ break;
+ case PILOT_PP5:
+ N_FC = 6336;
+ break;
+ case PILOT_PP6:
+ N_FC = 0;
+ break;
+ case PILOT_PP7:
+ N_FC = 6624;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 72;
+ }
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 9088;
+ break;
+ case PILOT_PP2:
+ N_FC = 11360;
+ break;
+ case PILOT_PP3:
+ N_FC = 11360;
+ break;
+ case PILOT_PP4:
+ N_FC = 12496;
+ break;
+ case PILOT_PP5:
+ N_FC = 12496;
+ break;
+ case PILOT_PP6:
+ N_FC = 13064;
+ break;
+ case PILOT_PP7:
+ N_FC = 13064;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 9280;
+ break;
+ case PILOT_PP2:
+ N_FC = 11600;
+ break;
+ case PILOT_PP3:
+ N_FC = 11600;
+ break;
+ case PILOT_PP4:
+ N_FC = 12760;
+ break;
+ case PILOT_PP5:
+ N_FC = 12760;
+ break;
+ case PILOT_PP6:
+ N_FC = 13340;
+ break;
+ case PILOT_PP7:
+ N_FC = 13340;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 144;
+ }
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 0;
+ break;
+ case PILOT_PP2:
+ N_FC = 22720;
+ break;
+ case PILOT_PP3:
+ N_FC = 0;
+ break;
+ case PILOT_PP4:
+ N_FC = 24992;
+ break;
+ case PILOT_PP5:
+ N_FC = 0;
+ break;
+ case PILOT_PP6:
+ N_FC = 26128;
+ break;
+ case PILOT_PP7:
+ N_FC = 0;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ N_FC = 0;
+ break;
+ case PILOT_PP2:
+ N_FC = 23200;
+ break;
+ case PILOT_PP3:
+ N_FC = 0;
+ break;
+ case PILOT_PP4:
+ N_FC = 25520;
+ break;
+ case PILOT_PP5:
+ N_FC = 0;
+ break;
+ case PILOT_PP6:
+ N_FC = 26680;
+ break;
+ case PILOT_PP7:
+ N_FC = 0;
+ break;
+ case PILOT_PP8:
+ N_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (N_FC != 0) {
+ N_FC -= 288;
+ }
+ }
+ break;
+ }
+ if (guardinterval == GI_1_128 && pilotpattern == PILOT_PP7) {
+ N_FC = 0;
+ }
+ if (guardinterval == GI_1_32 && pilotpattern == PILOT_PP4) {
+ N_FC = 0;
+ }
+ if (guardinterval == GI_1_16 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ }
+ if (guardinterval == GI_19_256 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ }
+ for (int i = 0; i < C_PS; i++) {
+ p2_carrier_map[i] = DATA_CARRIER;
+ fc_carrier_map[i] = DATA_CARRIER;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ for (int i = 0; i < 10; i++) {
+ p2_carrier_map[p2_papr_map_1k[i]] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_1k[i]] = TRPAPR_CARRIER;
+ }
+ N_TR = 10;
+ p2_papr_map = p2_papr_map_1k;
+ tr_papr_map = tr_papr_map_1k;
+ break;
+ case FFTSIZE_2K:
+ for (int i = 0; i < 18; i++) {
+ p2_carrier_map[p2_papr_map_2k[i]] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_2k[i]] = TRPAPR_CARRIER;
+ }
+ N_TR = 18;
+ p2_papr_map = p2_papr_map_2k;
+ tr_papr_map = tr_papr_map_2k;
+ break;
+ case FFTSIZE_4K:
+ for (int i = 0; i < 36; i++) {
+ p2_carrier_map[p2_papr_map_4k[i]] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_4k[i]] = TRPAPR_CARRIER;
+ }
+ N_TR = 36;
+ p2_papr_map = p2_papr_map_4k;
+ tr_papr_map = tr_papr_map_4k;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ for (int i = 0; i < 72; i++) {
+ p2_carrier_map[p2_papr_map_8k[i] + K_EXT] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_8k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ N_TR = 72;
+ p2_papr_map = p2_papr_map_8k;
+ tr_papr_map = tr_papr_map_8k;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ for (int i = 0; i < 144; i++) {
+ p2_carrier_map[p2_papr_map_16k[i] + K_EXT] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_16k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ N_TR = 144;
+ p2_papr_map = p2_papr_map_16k;
+ tr_papr_map = tr_papr_map_16k;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ for (int i = 0; i < 288; i++) {
+ p2_carrier_map[p2_papr_map_32k[i] + K_EXT] = P2PAPR_CARRIER;
+ fc_carrier_map[p2_papr_map_32k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ N_TR = 288;
+ p2_papr_map = p2_papr_map_32k;
+ tr_papr_map = tr_papr_map_32k;
+ break;
+ }
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ dx = 3;
+ dy = 4;
+ break;
+ case PILOT_PP2:
+ dx = 6;
+ dy = 2;
+ break;
+ case PILOT_PP3:
+ dx = 6;
+ dy = 4;
+ break;
+ case PILOT_PP4:
+ dx = 12;
+ dy = 2;
+ break;
+ case PILOT_PP5:
+ dx = 12;
+ dy = 4;
+ break;
+ case PILOT_PP6:
+ dx = 24;
+ dy = 2;
+ break;
+ case PILOT_PP7:
+ dx = 24;
+ dy = 4;
+ break;
+ case PILOT_PP8:
+ dx = 6;
+ dy = 16;
+ break;
+ }
+ fft_size = fftsize;
+ pilot_pattern = pilotpattern;
+ carrier_mode = carriermode;
+ papr_mode = paprmode;
+ version_num = version;
+ if (version == VERSION_131 && papr_mode == PAPR_OFF) {
+ v_clip = 3.0;
+ num_iterations = 1;
+ }
+ else {
+ v_clip = vclip;
+ num_iterations = iterations;
+ }
+ left_nulls = ((vlength - C_PS) / 2) + 1;
+ right_nulls = (vlength - C_PS) / 2;
+ papr_fft_size = vlength;
+ papr_fft = new fft::fft_complex(papr_fft_size, false, 1);
+ ones_freq = (gr_complex*) volk_malloc(sizeof(gr_complex) *
papr_fft_size, volk_get_alignment());
+ if (ones_freq == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 1st volk_malloc, Out of
memory.\n");
+ delete papr_fft;
+ exit(1);
+ }
+ ones_time = (gr_complex*) volk_malloc(sizeof(gr_complex) *
papr_fft_size, volk_get_alignment());
+ if (ones_time == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 2nd volk_malloc, Out of
memory.\n");
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ c = (gr_complex*) volk_malloc(sizeof(gr_complex) * papr_fft_size,
volk_get_alignment());
+ if (c == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 3rd volk_malloc, Out of
memory.\n");
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ ctemp = (gr_complex*) volk_malloc(sizeof(gr_complex) * papr_fft_size,
volk_get_alignment());
+ if (ctemp == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 4th volk_malloc, Out of
memory.\n");
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ magnitude = (float*) volk_malloc(sizeof(float) * papr_fft_size,
volk_get_alignment());
+ if (magnitude == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 5th volk_malloc, Out of
memory.\n");
+ volk_free(ctemp);
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ r = (gr_complex*) volk_malloc(sizeof(gr_complex) * N_TR,
volk_get_alignment());
+ if (r == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 6th volk_malloc, Out of
memory.\n");
+ volk_free(magnitude);
+ volk_free(ctemp);
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ rNew = (gr_complex*) volk_malloc(sizeof(gr_complex) * N_TR,
volk_get_alignment());
+ if (rNew == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 7th volk_malloc, Out of
memory.\n");
+ volk_free(r);
+ volk_free(magnitude);
+ volk_free(ctemp);
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ v = (gr_complex*) volk_malloc(sizeof(gr_complex) * N_TR,
volk_get_alignment());
+ if (v == NULL) {
+ fprintf(stderr, "Tone reservation PAPR 8th volk_malloc, Out of
memory.\n");
+ volk_free(rNew);
+ volk_free(r);
+ volk_free(magnitude);
+ volk_free(ctemp);
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ exit(1);
+ }
+ num_symbols = numdatasyms + N_P2;
+ set_output_multiple(num_symbols);
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_paprtr_cc_impl::~dvbt2_paprtr_cc_impl()
+ {
+ volk_free(v);
+ volk_free(rNew);
+ volk_free(r);
+ volk_free(magnitude);
+ volk_free(ctemp);
+ volk_free(c);
+ volk_free(ones_time);
+ volk_free(ones_freq);
+ delete papr_fft;
+ }
+
+ void
+ dvbt2_paprtr_cc_impl::init_pilots(int symbol)
+ {
+ for (int i = 0; i < C_PS; i++) {
+ data_carrier_map[i] = DATA_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_NORMAL) {
+ shift = dx * (symbol % dy);
+ }
+ else {
+ shift = dx * ((symbol + (K_EXT / dx)) % dy);
+ }
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ for (int i = 0; i < 10; i++) {
+ data_carrier_map[tr_papr_map_1k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_2K:
+ for (int i = 0; i < 18; i++) {
+ data_carrier_map[tr_papr_map_2k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_4K:
+ for (int i = 0; i < 36; i++) {
+ data_carrier_map[tr_papr_map_4k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ for (int i = 0; i < 72; i++) {
+ data_carrier_map[tr_papr_map_8k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ for (int i = 0; i < 144; i++) {
+ data_carrier_map[tr_papr_map_16k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ for (int i = 0; i < 288; i++) {
+ data_carrier_map[tr_papr_map_32k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ }
+ }
+
+ int
+ dvbt2_paprtr_cc_impl::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ gr_complex zero, one;
+ int index, valid;
+ int L_FC = 0;
+ gr_complex *dst;
+ float normalization = 1.0 / N_TR;
+ int m = 0;
+ float y, a, alpha, center = (C_PS - 1) / 2;
+ float aMax = 5.0 * N_TR * sqrt(10.0 / (27.0 * C_PS));
+ gr_complex u, result, temp;
+ double _Complex vtemp;
+
+ one.real() = 1.0;
+ one.imag() = 0.0;
+ zero.real() = 0.0;
+ zero.imag() = 0.0;
+ if (N_FC != 0) {
+ L_FC = 1;
+ }
+ for (int i = 0; i < noutput_items; i += num_symbols) {
+ if (papr_mode == PAPR_TR || papr_mode == PAPR_BOTH || (version_num ==
VERSION_131 && papr_mode == PAPR_OFF)) {
+ for (int j = 0; j < num_symbols; j++) {
+ init_pilots(j);
+ valid = FALSE;
+ if (j < N_P2) {
+ index = 0;
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * left_nulls);
+ index = left_nulls;
+ for (int n = 0; n < C_PS; n++) {
+ if (p2_carrier_map[n] == P2PAPR_CARRIER) {
+ ones_freq[index++] = one;
+ }
+ else {
+ ones_freq[index++] = zero;
+ }
+ }
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * right_nulls);
+ papr_map = p2_papr_map;
+ valid = TRUE;
+ }
+ else if (j == (num_symbols - L_FC) && (papr_mode == PAPR_TR ||
papr_mode == PAPR_BOTH)) {
+ index = 0;
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * left_nulls);
+ index = left_nulls;
+ for (int n = 0; n < C_PS; n++) {
+ if (fc_carrier_map[n] == TRPAPR_CARRIER) {
+ ones_freq[index++] = one;
+ }
+ else {
+ ones_freq[index++] = zero;
+ }
+ }
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * right_nulls);
+ papr_map = p2_papr_map;
+ valid = TRUE;
+ }
+ else if (papr_mode == PAPR_TR || papr_mode == PAPR_BOTH) {
+ index = 0;
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * left_nulls);
+ index = left_nulls;
+ for (int n = 0; n < C_PS; n++) {
+ if (data_carrier_map[n] == TRPAPR_CARRIER) {
+ ones_freq[index++] = one;
+ }
+ else {
+ ones_freq[index++] = zero;
+ }
+ }
+ memset(&ones_freq[index], 0, sizeof(gr_complex) * right_nulls);
+ papr_map = tr_papr_map;
+ valid = TRUE;
+ }
+ if (valid == TRUE) {
+ dst = papr_fft->get_inbuf();
+ memcpy(&dst[papr_fft_size / 2], &ones_freq[0],
sizeof(gr_complex) * papr_fft_size / 2);
+ memcpy(&dst[0], &ones_freq[papr_fft_size / 2],
sizeof(gr_complex) * papr_fft_size / 2);
+ papr_fft->execute();
+ memcpy(ones_time, papr_fft->get_outbuf(), sizeof(gr_complex) *
papr_fft_size);
+ volk_32fc_s32fc_multiply_32fc(ones_time, ones_time,
normalization, papr_fft_size);
+ memset(&r[0], 0, sizeof(gr_complex) * N_TR);
+ memset(&c[0], 0, sizeof(gr_complex) * papr_fft_size);
+ for (int k = 1; k <= num_iterations; k++) {
+ y = 0.0;
+ volk_32f_x2_add_32f((float*)ctemp, (float*)in, (float*)c,
papr_fft_size * 2);
+ volk_32fc_magnitude_32f(magnitude, ctemp, papr_fft_size);
+ for (int n = 0; n < papr_fft_size; n++) {
+ if (magnitude[n] > y) {
+ y = magnitude[n];
+ m = n;
+ }
+ }
+ if (y < v_clip + 0.01) {
+ break;
+ }
+ u.real() = (in[m].real() + c[m].real()) / y;
+ u.imag() = (in[m].imag() + c[m].imag()) / y;
+ alpha = y - v_clip;
+ for (int n = 0; n < N_TR; n++) {
+ vtemp = 0.0 + ((2 * M_PI * m * ((papr_map[n] + shift) -
center)) / papr_fft_size * _Complex_I);
+ vtemp = cexp(vtemp);
+ ctemp[n].real() = creal(vtemp);
+ ctemp[n].imag() = -cimag(vtemp);
+ }
+ volk_32fc_s32fc_multiply_32fc(v, ctemp, u, N_TR);
+ temp.real() = alpha;
+ temp.imag() = 0.0;
+ volk_32fc_s32fc_multiply_32fc(rNew, v, temp, N_TR);
+ volk_32f_x2_subtract_32f((float*)rNew, (float*)r,
(float*)rNew, N_TR * 2);
+ volk_32fc_x2_multiply_conjugate_32fc(ctemp, r, v, N_TR);
+ for (int n = 0; n < N_TR; n++) {
+ alphaLimit[n] = sqrt((aMax * aMax) - (ctemp[n].imag() *
ctemp[n].imag())) + ctemp[n].real();
+ }
+ index = 0;
+ volk_32fc_magnitude_32f(magnitude, rNew, N_TR);
+ for (int n = 0; n < N_TR; n++) {
+ if (magnitude[n] > aMax) {
+ alphaLimitMax[index++] = alphaLimit[n];
+ }
+ }
+ if (index != 0) {
+ a = 1.0e+30;
+ for (int n = 0; n < index; n++) {
+ if (alphaLimitMax[n] < a) {
+ a = alphaLimitMax[n];
+ }
+ }
+ alpha = a;
+ temp.real() = alpha;
+ temp.imag() = 0.0;
+ volk_32fc_s32fc_multiply_32fc(rNew, v, temp, N_TR);
+ volk_32f_x2_subtract_32f((float*)rNew, (float*)r,
(float*)rNew, N_TR * 2);
+ }
+ for (int n = 0; n < papr_fft_size; n++) {
+ ones_freq[(n + m) % papr_fft_size] = ones_time[n];
+ }
+ temp.real() = alpha;
+ temp.imag() = 0.0;
+ result.real() = (u.real() * temp.real()) - (u.imag() *
temp.imag());
+ result.imag() = (u.imag() * temp.real()) + (u.real() *
temp.imag());
+ volk_32fc_s32fc_multiply_32fc(ctemp, ones_freq, result,
papr_fft_size);
+ volk_32f_x2_subtract_32f((float*)c, (float*)c, (float*)ctemp,
papr_fft_size * 2);
+ memcpy(r, rNew, sizeof(gr_complex) * N_TR);
+ }
+ volk_32f_x2_add_32f((float*)out, (float*)in, (float*)c,
papr_fft_size * 2);
+ in = in + papr_fft_size;
+ out = out + papr_fft_size;
+ }
+ else {
+ memcpy(out, in, sizeof(gr_complex) * papr_fft_size);
+ in = in + papr_fft_size;
+ out = out + papr_fft_size;
+ }
+ }
+ }
+ else {
+ for (int j = 0; j < num_symbols; j++) {
+ memcpy(out, in, sizeof(gr_complex) * papr_fft_size);
+ in = in + papr_fft_size;
+ out = out + papr_fft_size;
+ }
+ }
+ }
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_1k[10] =
+ {
+ 116, 130, 134, 157, 182, 256, 346, 478, 479, 532
+ };
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_2k[18] =
+ {
+ 113, 124, 262, 467, 479, 727, 803, 862, 910, 946,
+ 980, 1201, 1322, 1342, 1396, 1397, 1562, 1565
+ };
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_4k[36] =
+ {
+ 104, 116, 119, 163, 170, 173, 664, 886, 1064, 1151, 1196, 1264, 1531,
+ 1736, 1951, 1960, 2069, 2098, 2311, 2366, 2473, 2552, 2584, 2585, 2645,
+ 2774, 2846, 2882, 3004, 3034, 3107, 3127, 3148, 3191, 3283, 3289
+ };
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_8k[72] =
+ {
+ 106, 109, 110, 112, 115, 118, 133, 142, 163, 184, 206, 247, 445, 461,
+ 503, 565, 602, 656, 766, 800, 922, 1094, 1108, 1199, 1258, 1726, 1793,
+ 1939, 2128, 2714, 3185, 3365, 3541, 3655, 3770, 3863, 4066, 4190, 4282,
+ 4565, 4628, 4727, 4882, 4885, 5143, 5192, 5210, 5257, 5261, 5459, 5651,
+ 5809, 5830, 5986, 6020, 6076, 6253, 6269, 6410, 6436, 6467, 6475, 6509,
+ 6556, 6611, 6674, 6685, 6689, 6691, 6695, 6698, 6701
+ };
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_16k[144] =
+ {
+ 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119, 121, 122, 125,
128,
+ 131, 134, 137, 140, 143, 161, 223, 230, 398, 482, 497, 733, 809, 850,
922,
+ 962, 1196, 1256, 1262, 1559, 1691, 1801, 1819, 1937, 2005, 2095, 2308,
2383,
+ 2408, 2425, 2428, 2479, 2579, 2893, 2902, 3086, 3554, 4085, 4127, 4139,
4151,
+ 4163, 4373, 4400, 4576, 4609, 4952, 4961, 5444, 5756, 5800, 6094, 6208,
6658,
+ 6673, 6799, 7208, 7682, 8101, 8135, 8230, 8692, 8788, 8933, 9323, 9449,
9478,
+ 9868, 10192, 10261, 10430, 10630, 10685, 10828, 10915, 10930, 10942,
11053,
+ 11185, 11324, 11369, 11468, 11507, 11542, 11561, 11794, 11912, 11974,
11978,
+ 12085, 12179, 12193, 12269, 12311, 12758, 12767, 12866, 12938, 12962,
12971,
+ 13099, 13102, 13105, 13120, 13150, 13280, 13282, 13309, 13312, 13321,
13381,
+ 13402, 13448, 13456, 13462, 13463, 13466, 13478, 13492, 13495, 13498,
13501,
+ 13502, 13504, 13507, 13510, 13513, 13514, 13516
+ };
+
+ const int dvbt2_paprtr_cc_impl::p2_papr_map_32k[288] =
+ {
+ 104, 106, 107, 109, 110, 112, 113, 115, 118, 121, 124, 127, 130, 133,
136,
+ 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178,
181,
+ 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 404, 452, 455, 467,
509,
+ 539, 568, 650, 749, 1001, 1087, 1286, 1637, 1823, 1835, 1841, 1889, 1898,
+ 1901, 2111, 2225, 2252, 2279, 2309, 2315, 2428, 2452, 2497, 2519, 3109,
3154,
+ 3160, 3170, 3193, 3214, 3298, 3331, 3346, 3388, 3397, 3404, 3416, 3466,
3491,
+ 3500, 3572, 4181, 4411, 4594, 4970, 5042, 5069, 5081, 5086, 5095, 5104,
5320,
+ 5465, 5491, 6193, 6541, 6778, 6853, 6928, 6934, 7030, 7198, 7351, 7712,
7826,
+ 7922, 8194, 8347, 8350, 8435, 8518, 8671, 8861, 8887, 9199, 9980, 10031,
10240,
+ 10519, 10537, 10573, 10589, 11078, 11278, 11324, 11489, 11642, 12034,
12107, 12184,
+ 12295, 12635, 12643, 12941, 12995, 13001, 13133, 13172, 13246, 13514,
13522, 13939,
+ 14362, 14720, 14926, 15338, 15524, 15565, 15662, 15775, 16358, 16613,
16688, 16760,
+ 17003, 17267, 17596, 17705, 18157, 18272, 18715, 18994, 19249, 19348,
20221, 20855,
+ 21400, 21412, 21418, 21430, 21478, 21559, 21983, 21986, 22331, 22367,
22370, 22402,
+ 22447, 22535, 22567, 22571, 22660, 22780, 22802, 22844, 22888, 22907,
23021, 23057,
+ 23086, 23213, 23240, 23263, 23333, 23369, 23453, 23594, 24143, 24176,
24319, 24325,
+ 24565, 24587, 24641, 24965, 25067, 25094, 25142, 25331, 25379, 25465,
25553, 25589,
+ 25594, 25655, 25664, 25807, 25823, 25873, 25925, 25948, 26002, 26008,
26102, 26138,
+ 26141, 26377, 26468, 26498, 26510, 26512, 26578, 26579, 26588, 26594,
26597, 26608,
+ 26627, 26642, 26767, 26776, 26800, 26876, 26882, 26900, 26917, 26927,
26951, 26957,
+ 26960, 26974, 26986, 27010, 27013, 27038, 27044, 27053, 27059, 27061,
27074, 27076,
+ 27083, 27086, 27092, 27094, 27098, 27103, 27110, 27115, 27118, 27119,
27125, 27128,
+ 27130, 27133, 27134, 27140, 27143, 27145, 27146, 27148, 27149
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_1k[10] =
+ {
+ 109, 117, 122, 129, 139, 321, 350, 403, 459, 465
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_2k[18] =
+ {
+ 250, 404, 638, 677, 700, 712, 755, 952, 1125, 1145,
+ 1190, 1276, 1325, 1335, 1406, 1431, 1472, 1481
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_4k[36] =
+ {
+ 170, 219, 405, 501, 597, 654, 661, 745, 995, 1025, 1319, 1361, 1394,
+ 1623, 1658, 1913, 1961, 1971, 2106, 2117, 2222, 2228, 2246, 2254, 2361,
+ 2468, 2469, 2482, 2637, 2679, 2708, 2825, 2915, 2996, 3033, 3119
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_8k[72] =
+ {
+ 111, 115, 123, 215, 229, 392, 613, 658, 831, 842, 997, 1503, 1626, 1916,
+ 1924, 1961, 2233, 2246, 2302, 2331, 2778, 2822, 2913, 2927, 2963, 2994,
+ 3087, 3162, 3226, 3270, 3503, 3585, 3711, 3738, 3874, 3902, 4013, 4017,
+ 4186, 4253, 4292, 4339, 4412, 4453, 4669, 4910, 5015, 5030, 5061, 5170,
+ 5263, 5313, 5360, 5384, 5394, 5493, 5550, 5847, 5901, 5999, 6020, 6165,
+ 6174, 6227, 6245, 6314, 6316, 6327, 6503, 6507, 6545, 6565
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_16k[144] =
+ {
+ 109, 122, 139, 171, 213, 214, 251, 585, 763, 1012, 1021, 1077, 1148,
1472,
+ 1792, 1883, 1889, 1895, 1900, 2013, 2311, 2582, 2860, 2980, 3011, 3099,
3143,
+ 3171, 3197, 3243, 3257, 3270, 3315, 3436, 3470, 3582, 3681, 3712, 3767,
3802,
+ 3979, 4045, 4112, 4197, 4409, 4462, 4756, 5003, 5007, 5036, 5246, 5483,
5535,
+ 5584, 5787, 5789, 6047, 6349, 6392, 6498, 6526, 6542, 6591, 6680, 6688,
6785,
+ 6860, 7134, 7286, 7387, 7415, 7417, 7505, 7526, 7541, 7551, 7556, 7747,
7814,
+ 7861, 7880, 8045, 8179, 8374, 8451, 8514, 8684, 8698, 8804, 8924, 9027,
9113,
+ 9211, 9330, 9479, 9482, 9487, 9619, 9829, 10326, 10394, 10407, 10450,
10528,
+ 10671, 10746, 10774, 10799, 10801, 10912, 11113, 11128, 11205, 11379,
11459,
+ 11468, 11658, 11776, 11791, 11953, 11959, 12021, 12028, 12135, 12233,
12407,
+ 12441, 12448, 12470, 12501, 12548, 12642, 12679, 12770, 12788, 12899,
12923,
+ 12939, 13050, 13103, 13147, 13256, 13339, 13409
+ };
+
+ const int dvbt2_paprtr_cc_impl::tr_papr_map_32k[288] =
+ {
+ 164, 320, 350, 521, 527, 578, 590, 619, 635, 651, 662, 664, 676, 691,
723,
+ 940, 1280, 1326, 1509, 1520, 1638, 1682, 1805, 1833, 1861, 1891, 1900,
1902,
+ 1949, 1967, 1978, 1998, 2006, 2087, 2134, 2165, 2212, 2427, 2475, 2555,
2874,
+ 3067, 3091, 3101, 3146, 3188, 3322, 3353, 3383, 3503, 3523, 3654, 3856,
4150,
+ 4158, 4159, 4174, 4206, 4318, 4417, 4629, 4631, 4875, 5104, 5106, 5111,
5131,
+ 5145, 5146, 5177, 5181, 5246, 5269, 5458, 5474, 5500, 5509, 5579, 5810,
5823,
+ 6058, 6066, 6098, 6411, 6741, 6775, 6932, 7103, 7258, 7303, 7413, 7586,
7591,
+ 7634, 7636, 7655, 7671, 7675, 7756, 7760, 7826, 7931, 7937, 7951, 8017,
8061,
+ 8071, 8117, 8317, 8321, 8353, 8806, 9010, 9237, 9427, 9453, 9469, 9525,
9558,
+ 9574, 9584, 9820, 9973, 10011, 10043, 10064, 10066, 10081, 10136, 10193,
10249,
+ 10511, 10537, 11083, 11350, 11369, 11428, 11622, 11720, 11924, 11974,
11979, 12944,
+ 12945, 13009, 13070, 13110, 13257, 13364, 13370, 13449, 13503, 13514,
13520, 13583,
+ 13593, 13708, 13925, 14192, 14228, 14235, 14279, 14284, 14370, 14393,
14407, 14422,
+ 14471, 14494, 14536, 14617, 14829, 14915, 15094, 15138, 15155, 15170,
15260, 15283,
+ 15435, 15594, 15634, 15810, 16178, 16192, 16196, 16297, 16366, 16498,
16501, 16861,
+ 16966, 17039, 17057, 17240, 17523, 17767, 18094, 18130, 18218, 18344,
18374, 18657,
+ 18679, 18746, 18772, 18779, 18786, 18874, 18884, 18955, 19143, 19497,
19534, 19679,
+ 19729, 19738, 19751, 19910, 19913, 20144, 20188, 20194, 20359, 20490,
20500, 20555,
+ 20594, 20633, 20656, 21099, 21115, 21597, 22139, 22208, 22244, 22530,
22547, 22562,
+ 22567, 22696, 22757, 22798, 22854, 22877, 23068, 23102, 23141, 23154,
23170, 23202,
+ 23368, 23864, 24057, 24215, 24219, 24257, 24271, 24325, 24447, 25137,
25590, 25702,
+ 25706, 25744, 25763, 25811, 25842, 25853, 25954, 26079, 26158, 26285,
26346, 26488,
+ 26598, 26812, 26845, 26852, 26869, 26898, 26909, 26927, 26931, 26946,
26975, 26991,
+ 27039
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.h
new file mode 100644
index 0000000..96c669f
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.h
@@ -0,0 +1,112 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_PAPRTR_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_PAPRTR_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_paprtr_cc.h>
+#include <gnuradio/fft/fft.h>
+#include "dvb/dvb_defines.h"
+
+#define MAX_CARRIERS 27841
+#define MAX_FFTSIZE 32768
+#define MAX_PAPRTONES 288
+
+enum dvbt2_carrier_type_t {
+ DATA_CARRIER = 1,
+ P2PILOT_CARRIER,
+ P2PAPR_CARRIER,
+ TRPAPR_CARRIER,
+ SCATTERED_CARRIER,
+ CONTINUAL_CARRIER
+};
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_paprtr_cc_impl : public dvbt2_paprtr_cc
+ {
+ private:
+ int num_symbols;
+ int fft_size;
+ int left_nulls;
+ int right_nulls;
+ int pilot_pattern;
+ int carrier_mode;
+ int papr_mode;
+ int version_num;
+ double v_clip;
+ int num_iterations;
+ const int *papr_map;
+ const int *p2_papr_map;
+ const int *tr_papr_map;
+ int p2_carrier_map[MAX_CARRIERS];
+ int data_carrier_map[MAX_CARRIERS];
+ int fc_carrier_map[MAX_CARRIERS];
+ gr_complex *ones_freq;
+ gr_complex *ones_time;
+ gr_complex *c;
+ gr_complex *ctemp;
+ float *magnitude;
+ gr_complex *r;
+ gr_complex *rNew;
+ gr_complex *v;
+ float alphaLimit[MAX_PAPRTONES];
+ float alphaLimitMax[MAX_PAPRTONES];
+ int N_P2;
+ int N_FC;
+ int K_EXT;
+ int C_PS;
+ int N_TR;
+ int dx;
+ int dy;
+ int shift;
+ void init_pilots(int);
+
+ fft::fft_complex *papr_fft;
+ int papr_fft_size;
+
+ const static int p2_papr_map_1k[10];
+ const static int p2_papr_map_2k[18];
+ const static int p2_papr_map_4k[36];
+ const static int p2_papr_map_8k[72];
+ const static int p2_papr_map_16k[144];
+ const static int p2_papr_map_32k[288];
+ const static int tr_papr_map_1k[10];
+ const static int tr_papr_map_2k[18];
+ const static int tr_papr_map_4k[36];
+ const static int tr_papr_map_8k[72];
+ const static int tr_papr_map_16k[144];
+ const static int tr_papr_map_32k[288];
+
+ public:
+ dvbt2_paprtr_cc_impl(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, float vclip, int iterations, int vlength);
+ ~dvbt2_paprtr_cc_impl();
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_PAPRTR_CC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
new file mode 100644
index 0000000..7a4bd26
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
@@ -0,0 +1,3375 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbt2_pilotgenerator_cc_impl.h"
+#include <volk/volk.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbt2_pilotgenerator_cc::sptr
+ dvbt2_pilotgenerator_cc::make(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble, dvbt2_misogroup_t
misogroup, dvbt2_equalization_t equalization, dvbt2_bandwidth_t bandwidth, int
vlength)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbt2_pilotgenerator_cc_impl(carriermode, fftsize, pilotpattern,
guardinterval, numdatasyms, paprmode, version, preamble, misogroup,
equalization, bandwidth, vlength));
+ }
+
+ /*
+ * The private constructor
+ */
+
dvbt2_pilotgenerator_cc_impl::dvbt2_pilotgenerator_cc_impl(dvbt2_extended_carrier_t
carriermode, dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble, dvbt2_misogroup_t
misogroup, dvbt2_equalization_t equalization, dvbt2_bandwidth_t bandwidth, int
vlength)
+ : gr::block("dvbt2_pilotgenerator_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex) * vlength))
+ {
+ int step, ki;
+ double x, sinc, sincrms = 0.0;
+ double fs, fstep, f = 0.0;
+ miso_group = misogroup;
+ if ((preamble == PREAMBLE_T2_SISO) || (preamble ==
PREAMBLE_T2_LITE_SISO)) {
+ miso = FALSE;
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 558;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1118;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2236;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4472;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8944;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 22432;
+ break;
+ }
+ }
+ else {
+ miso = TRUE;
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ N_P2 = 16;
+ C_P2 = 546;
+ break;
+ case FFTSIZE_2K:
+ N_P2 = 8;
+ C_P2 = 1098;
+ break;
+ case FFTSIZE_4K:
+ N_P2 = 4;
+ C_P2 = 2198;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ N_P2 = 2;
+ C_P2 = 4398;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ N_P2 = 1;
+ C_P2 = 8814;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ N_P2 = 1;
+ C_P2 = 17612;
+ break;
+ }
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ C_PS = 853;
+ K_EXT = 0;
+ K_OFFSET = 0;
+ break;
+ case FFTSIZE_2K:
+ C_PS = 1705;
+ K_EXT = 0;
+ K_OFFSET = 0;
+ break;
+ case FFTSIZE_4K:
+ C_PS = 3409;
+ K_EXT = 0;
+ K_OFFSET = 0;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 6817;
+ K_EXT = 0;
+ K_OFFSET = 48;
+ }
+ else {
+ C_PS = 6913;
+ K_EXT = 48;
+ K_OFFSET = 0;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 13633;
+ K_EXT = 0;
+ K_OFFSET = 144;
+ }
+ else {
+ C_PS = 13921;
+ K_EXT = 144;
+ K_OFFSET = 0;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ C_PS = 27265;
+ K_EXT = 0;
+ K_OFFSET = 288;
+ }
+ else {
+ C_PS = 27841;
+ K_EXT = 288;
+ K_OFFSET = 0;
+ }
+ break;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 764;
+ N_FC = 568;
+ C_FC = 402;
+ break;
+ case PILOT_PP2:
+ C_DATA = 768;
+ N_FC = 710;
+ C_FC = 654;
+ break;
+ case PILOT_PP3:
+ C_DATA = 798;
+ N_FC = 710;
+ C_FC = 490;
+ break;
+ case PILOT_PP4:
+ C_DATA = 804;
+ N_FC = 780;
+ C_FC = 707;
+ break;
+ case PILOT_PP5:
+ C_DATA = 818;
+ N_FC = 780;
+ C_FC = 544;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 10;
+ }
+ if (N_FC != 0) {
+ N_FC -= 10;
+ }
+ if (C_FC != 0) {
+ C_FC -= 10;
+ }
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 1522;
+ N_FC = 1136;
+ C_FC = 804;
+ break;
+ case PILOT_PP2:
+ C_DATA = 1532;
+ N_FC = 1420;
+ C_FC = 1309;
+ break;
+ case PILOT_PP3:
+ C_DATA = 1596;
+ N_FC = 1420;
+ C_FC = 980;
+ break;
+ case PILOT_PP4:
+ C_DATA = 1602;
+ N_FC = 1562;
+ C_FC = 1415;
+ break;
+ case PILOT_PP5:
+ C_DATA = 1632;
+ N_FC = 1562;
+ C_FC = 1088;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 1646;
+ N_FC = 1632;
+ C_FC = 1396;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 18;
+ }
+ if (N_FC != 0) {
+ N_FC -= 18;
+ }
+ if (C_FC != 0) {
+ C_FC -= 18;
+ }
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 3084;
+ N_FC = 2272;
+ C_FC = 1609;
+ break;
+ case PILOT_PP2:
+ C_DATA = 3092;
+ N_FC = 2840;
+ C_FC = 2619;
+ break;
+ case PILOT_PP3:
+ C_DATA = 3228;
+ N_FC = 2840;
+ C_FC = 1961;
+ break;
+ case PILOT_PP4:
+ C_DATA = 3234;
+ N_FC = 3124;
+ C_FC = 2831;
+ break;
+ case PILOT_PP5:
+ C_DATA = 3298;
+ N_FC = 3124;
+ C_FC = 2177;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 3328;
+ N_FC = 3266;
+ C_FC = 2792;
+ break;
+ case PILOT_PP8:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 36;
+ }
+ if (N_FC != 0) {
+ N_FC -= 36;
+ }
+ if (C_FC != 0) {
+ C_FC -= 36;
+ }
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6208;
+ N_FC = 4544;
+ C_FC = 3218;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6214;
+ N_FC = 5680;
+ C_FC = 5238;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6494;
+ N_FC = 5680;
+ C_FC = 3922;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6498;
+ N_FC = 6248;
+ C_FC = 5662;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6634;
+ N_FC = 6248;
+ C_FC = 4354;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6698;
+ N_FC = 6532;
+ C_FC = 5585;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6698;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 6296;
+ N_FC = 4608;
+ C_FC = 3264;
+ break;
+ case PILOT_PP2:
+ C_DATA = 6298;
+ N_FC = 5760;
+ C_FC = 5312;
+ break;
+ case PILOT_PP3:
+ C_DATA = 6584;
+ N_FC = 5760;
+ C_FC = 3978;
+ break;
+ case PILOT_PP4:
+ C_DATA = 6588;
+ N_FC = 6336;
+ C_FC = 5742;
+ break;
+ case PILOT_PP5:
+ C_DATA = 6728;
+ N_FC = 6336;
+ C_FC = 4416;
+ break;
+ case PILOT_PP6:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP7:
+ C_DATA = 6788;
+ N_FC = 6624;
+ C_FC = 5664;
+ break;
+ case PILOT_PP8:
+ C_DATA = 6788;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 72;
+ }
+ if (N_FC != 0) {
+ N_FC -= 72;
+ }
+ if (C_FC != 0) {
+ C_FC -= 72;
+ }
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12418;
+ N_FC = 9088;
+ C_FC = 6437;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12436;
+ N_FC = 11360;
+ C_FC = 10476;
+ break;
+ case PILOT_PP3:
+ C_DATA = 12988;
+ N_FC = 11360;
+ C_FC = 7845;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13002;
+ N_FC = 12496;
+ C_FC = 11324;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13272;
+ N_FC = 12496;
+ C_FC = 8709;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13288;
+ N_FC = 13064;
+ C_FC = 11801;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13416;
+ N_FC = 13064;
+ C_FC = 11170;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13406;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 12678;
+ N_FC = 9280;
+ C_FC = 6573;
+ break;
+ case PILOT_PP2:
+ C_DATA = 12698;
+ N_FC = 11600;
+ C_FC = 10697;
+ break;
+ case PILOT_PP3:
+ C_DATA = 13262;
+ N_FC = 11600;
+ C_FC = 8011;
+ break;
+ case PILOT_PP4:
+ C_DATA = 13276;
+ N_FC = 12760;
+ C_FC = 11563;
+ break;
+ case PILOT_PP5:
+ C_DATA = 13552;
+ N_FC = 12760;
+ C_FC = 8893;
+ break;
+ case PILOT_PP6:
+ C_DATA = 13568;
+ N_FC = 13340;
+ C_FC = 12051;
+ break;
+ case PILOT_PP7:
+ C_DATA = 13698;
+ N_FC = 13340;
+ C_FC = 11406;
+ break;
+ case PILOT_PP8:
+ C_DATA = 13688;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 144;
+ }
+ if (N_FC != 0) {
+ N_FC -= 144;
+ }
+ if (C_FC != 0) {
+ C_FC -= 144;
+ }
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ if (carriermode == CARRIERS_NORMAL) {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 24886;
+ N_FC = 22720;
+ C_FC = 20952;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26022;
+ N_FC = 24992;
+ C_FC = 22649;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 26592;
+ N_FC = 26128;
+ C_FC = 23603;
+ break;
+ case PILOT_PP7:
+ C_DATA = 26836;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 26812;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ else {
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP2:
+ C_DATA = 25412;
+ N_FC = 23200;
+ C_FC = 21395;
+ break;
+ case PILOT_PP3:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP4:
+ C_DATA = 26572;
+ N_FC = 25520;
+ C_FC = 23127;
+ break;
+ case PILOT_PP5:
+ C_DATA = 0;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP6:
+ C_DATA = 27152;
+ N_FC = 26680;
+ C_FC = 24102;
+ break;
+ case PILOT_PP7:
+ C_DATA = 27404;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ case PILOT_PP8:
+ C_DATA = 27376;
+ N_FC = 0;
+ C_FC = 0;
+ break;
+ }
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ if (C_DATA != 0) {
+ C_DATA -= 288;
+ }
+ if (N_FC != 0) {
+ N_FC -= 288;
+ }
+ if (C_FC != 0) {
+ C_FC -= 288;
+ }
+ }
+ break;
+ }
+ if (miso == FALSE) {
+ if (guardinterval == GI_1_128 && pilotpattern == PILOT_PP7) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_32 && pilotpattern == PILOT_PP4) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_1_16 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ if (guardinterval == GI_19_256 && pilotpattern == PILOT_PP2) {
+ N_FC = 0;
+ C_FC = 0;
+ }
+ }
+ init_prbs();
+ for (int i = 0; i < C_PS; i++) {
+ p2_carrier_map[i] = DATA_CARRIER;
+ }
+ if ((fftsize == FFTSIZE_32K || fftsize == FFTSIZE_32K_T2GI) && (miso ==
FALSE)) {
+ step = 6;
+ }
+ else {
+ step = 3;
+ }
+ for (int i = 0; i < C_PS; i += step) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((i / 3) % 2) && (i % 3 == 0)) {
+ p2_carrier_map[i] = P2PILOT_CARRIER_INVERTED;
+ }
+ else {
+ p2_carrier_map[i] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ p2_carrier_map[i] = P2PILOT_CARRIER;
+ }
+ }
+ if (carriermode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < K_EXT; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((i / 3) % 2) && (i % 3 == 0)) {
+ p2_carrier_map[i] = P2PILOT_CARRIER_INVERTED;
+ }
+ else {
+ p2_carrier_map[i] = P2PILOT_CARRIER;
+ }
+ if ((((i + (C_PS - K_EXT)) / 3) % 2) && ((i + (C_PS - K_EXT)) % 3
== 0)) {
+ p2_carrier_map[i + (C_PS - K_EXT)] = P2PILOT_CARRIER_INVERTED;
+ }
+ else {
+ p2_carrier_map[i + (C_PS - K_EXT)] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ p2_carrier_map[i] = P2PILOT_CARRIER;
+ p2_carrier_map[i + (C_PS - K_EXT)] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ if (miso == TRUE) {
+ p2_carrier_map[K_EXT + 1] = P2PILOT_CARRIER;
+ p2_carrier_map[K_EXT + 2] = P2PILOT_CARRIER;
+ p2_carrier_map[C_PS - K_EXT - 2] = P2PILOT_CARRIER;
+ p2_carrier_map[C_PS - K_EXT - 3] = P2PILOT_CARRIER;
+ }
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ for (int i = 0; i < 10; i++) {
+ p2_carrier_map[p2_papr_map_1k[i]] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 10; i++) {
+ ki = p2_papr_map_1k[i] + K_EXT;
+ if (i < 9) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_1k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_1k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = 4.0 / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -4.0 / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -4.0 / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = 4.0 / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ case FFTSIZE_2K:
+ for (int i = 0; i < 18; i++) {
+ p2_carrier_map[p2_papr_map_2k[i]] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 18; i++) {
+ ki = p2_papr_map_2k[i] + K_EXT;
+ if (i < 17) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_2k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_2k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = 4.0 / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -4.0 / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -4.0 / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = 4.0 / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ case FFTSIZE_4K:
+ for (int i = 0; i < 36; i++) {
+ p2_carrier_map[p2_papr_map_4k[i]] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 36; i++) {
+ ki = p2_papr_map_4k[i] + K_EXT;
+ if (i < 35) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_4k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_4k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = (4.0 * sqrt(2)) / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -(4.0 * sqrt(2)) / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -(4.0 * sqrt(2)) / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = (4.0 * sqrt(2)) / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ for (int i = 0; i < 72; i++) {
+ p2_carrier_map[p2_papr_map_8k[i] + K_EXT] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 72; i++) {
+ ki = p2_papr_map_8k[i] + K_EXT;
+ if (i < 71) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_8k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_8k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = 8.0 / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -8.0 / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -8.0 / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = 8.0 / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ for (int i = 0; i < 144; i++) {
+ p2_carrier_map[p2_papr_map_16k[i] + K_EXT] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 144; i++) {
+ ki = p2_papr_map_16k[i] + K_EXT;
+ if (i < 143) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_16k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_16k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = 8.0 / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -8.0 / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -8.0 / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = 8.0 / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ for (int i = 0; i < 288; i++) {
+ p2_carrier_map[p2_papr_map_32k[i] + K_EXT] = P2PAPR_CARRIER;
+ }
+ if (miso == TRUE) {
+ for (int i = 0; i < 288; i++) {
+ ki = p2_papr_map_32k[i] + K_EXT;
+ if (i < 287) {
+ if (((ki % 3) == 1) && ((ki + 1) != (p2_papr_map_32k[i + 1] +
K_EXT))) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 1) {
+ p2_carrier_map[ki + 1] = P2PILOT_CARRIER;
+ }
+ }
+ if (i > 0) {
+ if (((ki % 3) == 2) && ((ki - 1) != (p2_papr_map_32k[i - 1] +
K_EXT))) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ else {
+ if ((ki % 3) == 2) {
+ p2_carrier_map[ki - 1] = P2PILOT_CARRIER;
+ }
+ }
+ }
+ }
+ cp_bpsk[0].real() = 8.0 / 3.0;
+ cp_bpsk[0].imag() = 0.0;
+ cp_bpsk[1].real() = -8.0 / 3.0;
+ cp_bpsk[1].imag() = 0.0;
+ cp_bpsk_inverted[0].real() = -8.0 / 3.0;
+ cp_bpsk_inverted[0].imag() = 0.0;
+ cp_bpsk_inverted[1].real() = 8.0 / 3.0;
+ cp_bpsk_inverted[1].imag() = 0.0;
+ break;
+ }
+ switch (pilotpattern) {
+ case PILOT_PP1:
+ sp_bpsk[0].real() = 4.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -4.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -4.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 4.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 3;
+ dy = 4;
+ break;
+ case PILOT_PP2:
+ sp_bpsk[0].real() = 4.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -4.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -4.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 4.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 6;
+ dy = 2;
+ break;
+ case PILOT_PP3:
+ sp_bpsk[0].real() = 7.0 / 4.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 4.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 4.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 4.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 6;
+ dy = 4;
+ break;
+ case PILOT_PP4:
+ sp_bpsk[0].real() = 7.0 / 4.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 4.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 4.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 4.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 12;
+ dy = 2;
+ break;
+ case PILOT_PP5:
+ sp_bpsk[0].real() = 7.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 12;
+ dy = 4;
+ break;
+ case PILOT_PP6:
+ sp_bpsk[0].real() = 7.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 24;
+ dy = 2;
+ break;
+ case PILOT_PP7:
+ sp_bpsk[0].real() = 7.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 24;
+ dy = 4;
+ break;
+ case PILOT_PP8:
+ sp_bpsk[0].real() = 7.0 / 3.0;
+ sp_bpsk[0].imag() = 0.0;
+ sp_bpsk[1].real() = -7.0 / 3.0;
+ sp_bpsk[1].imag() = 0.0;
+ sp_bpsk_inverted[0].real() = -7.0 / 3.0;
+ sp_bpsk_inverted[0].imag() = 0.0;
+ sp_bpsk_inverted[1].real() = 7.0 / 3.0;
+ sp_bpsk_inverted[1].imag() = 0.0;
+ dx = 6;
+ dy = 16;
+ break;
+ }
+ for (int i = 0; i < C_PS; i++) {
+ fc_carrier_map[i] = DATA_CARRIER;
+ }
+ for (int i = 0; i < C_PS; i++) {
+ if (i % dx == 0) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((i / dx) % 2) {
+ fc_carrier_map[i] = SCATTERED_CARRIER_INVERTED;
+ }
+ else {
+ fc_carrier_map[i] = SCATTERED_CARRIER;
+ }
+ }
+ else {
+ fc_carrier_map[i] = SCATTERED_CARRIER;
+ }
+ }
+ }
+ if (fftsize == FFTSIZE_1K && pilotpattern == PILOT_PP4) {
+ fc_carrier_map[C_PS - 2] = SCATTERED_CARRIER;
+ }
+ else if (fftsize == FFTSIZE_1K && pilotpattern == PILOT_PP5) {
+ fc_carrier_map[C_PS - 2] = SCATTERED_CARRIER;
+ }
+ else if (fftsize == FFTSIZE_2K && pilotpattern == PILOT_PP7) {
+ fc_carrier_map[C_PS - 2] = SCATTERED_CARRIER;
+ }
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((numdatasyms + N_P2 - 1) % 2) {
+ fc_carrier_map[0] = SCATTERED_CARRIER_INVERTED;
+ fc_carrier_map[C_PS - 1] = SCATTERED_CARRIER_INVERTED;
+ }
+ else {
+ fc_carrier_map[0] = SCATTERED_CARRIER;
+ fc_carrier_map[C_PS - 1] = SCATTERED_CARRIER;
+ }
+ }
+ else {
+ fc_carrier_map[0] = SCATTERED_CARRIER;
+ fc_carrier_map[C_PS - 1] = SCATTERED_CARRIER;
+ }
+ if (paprmode == PAPR_TR || paprmode == PAPR_BOTH) {
+ switch (fftsize) {
+ case FFTSIZE_1K:
+ for (int i = 0; i < 10; i++) {
+ fc_carrier_map[p2_papr_map_1k[i]] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_2K:
+ for (int i = 0; i < 18; i++) {
+ fc_carrier_map[p2_papr_map_2k[i]] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_4K:
+ for (int i = 0; i < 36; i++) {
+ fc_carrier_map[p2_papr_map_4k[i]] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ for (int i = 0; i < 72; i++) {
+ fc_carrier_map[p2_papr_map_8k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ for (int i = 0; i < 144; i++) {
+ fc_carrier_map[p2_papr_map_16k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ for (int i = 0; i < 288; i++) {
+ fc_carrier_map[p2_papr_map_32k[i] + K_EXT] = TRPAPR_CARRIER;
+ }
+ break;
+ }
+ }
+ if (N_FC == 0) {
+ active_items = (N_P2 * C_P2) + (numdatasyms * C_DATA);
+ }
+ else {
+ active_items = (N_P2 * C_P2) + ((numdatasyms - 1) * C_DATA) + N_FC;
+ }
+ fft_size = fftsize;
+ pilot_pattern = pilotpattern;
+ carrier_mode = carriermode;
+ papr_mode = paprmode;
+ left_nulls = ((vlength - C_PS) / 2) + 1;
+ right_nulls = (vlength - C_PS) / 2;
+ if ((fftsize == FFTSIZE_32K || fftsize == FFTSIZE_32K_T2GI) && (miso ==
FALSE)) {
+ p2_bpsk[0].real() = sqrt(37.0) / 5.0;
+ p2_bpsk[0].imag() = 0.0;
+ p2_bpsk[1].real() = -(sqrt(37.0) / 5.0);
+ p2_bpsk[1].imag() = 0.0;
+ p2_bpsk_inverted[0].real() = -(sqrt(37.0) / 5.0);
+ p2_bpsk_inverted[0].imag() = 0.0;
+ p2_bpsk_inverted[1].real() = sqrt(37.0) / 5.0;
+ p2_bpsk_inverted[1].imag() = 0.0;
+ }
+ else {
+ p2_bpsk[0].real() = sqrt(31.0) / 5.0;
+ p2_bpsk[0].imag() = 0.0;
+ p2_bpsk[1].real() = -(sqrt(31.0) / 5.0);
+ p2_bpsk[1].imag() = 0.0;
+ p2_bpsk_inverted[0].real() = -(sqrt(31.0) / 5.0);
+ p2_bpsk_inverted[0].imag() = 0.0;
+ p2_bpsk_inverted[1].real() = sqrt(31.0) / 5.0;
+ p2_bpsk_inverted[1].imag() = 0.0;
+ }
+ normalization = 5.0 / sqrt(27.0 * C_PS);
+ switch (bandwidth) {
+ case BANDWIDTH_1_7_MHZ:
+ fs = 131.0 * 1000000.0 / 71.0;
+ break;
+ case BANDWIDTH_5_0_MHZ:
+ fs = 5.0 * 8000000.0 / 7.0;
+ break;
+ case BANDWIDTH_6_0_MHZ:
+ fs = 6.0 * 8000000.0 / 7.0;
+ break;
+ case BANDWIDTH_7_0_MHZ:
+ fs = 7.0 * 8000000.0 / 7.0;
+ break;
+ case BANDWIDTH_8_0_MHZ:
+ fs = 8.0 * 8000000.0 / 7.0;
+ break;
+ case BANDWIDTH_10_0_MHZ:
+ fs = 10.0 * 8000000.0 / 7.0;
+ break;
+ default:
+ fs = 1.0;
+ break;
+ }
+ fstep = fs / vlength;
+ for (int i = 0; i < vlength / 2; i++) {
+ x = M_PI * f / fs;
+ if (i == 0) {
+ sinc = 1.0;
+ }
+ else {
+ sinc = sin(x) / x;
+ }
+ sincrms += sinc * sinc;
+ inverse_sinc[i + (vlength / 2)].real() = 1.0 / sinc;
+ inverse_sinc[i + (vlength / 2)].imag() = 0.0;
+ inverse_sinc[(vlength / 2) - i - 1].real() = 1.0 / sinc;
+ inverse_sinc[(vlength / 2) - i - 1].imag() = 0.0;
+ f = f + fstep;
+ }
+ sincrms = sqrt(sincrms / (vlength / 2));
+ for (int i = 0; i < vlength; i++) {
+ inverse_sinc[i].real() *= sincrms;
+ }
+ equalization_enable = equalization;
+ ofdm_fft_size = vlength;
+ ofdm_fft = new fft::fft_complex(ofdm_fft_size, false, 1);
+ num_symbols = numdatasyms + N_P2;
+ set_output_multiple(num_symbols);
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbt2_pilotgenerator_cc_impl::~dvbt2_pilotgenerator_cc_impl()
+ {
+ delete ofdm_fft;
+ }
+
+ void
+ dvbt2_pilotgenerator_cc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = active_items * (noutput_items / num_symbols);
+ }
+
+ void
+ dvbt2_pilotgenerator_cc_impl::init_prbs(void)
+ {
+ int sr = 0x7ff;
+ int j = 0;
+
+ for (int i = 0; i < MAX_CARRIERS; i++) {
+ int b = ((sr) ^ (sr >> 2)) & 1;
+ prbs[i] = sr & 1;
+ sr >>= 1;
+ if(b) {
+ sr |= 0x400;
+ }
+ }
+
+ for (int i = 0; i < (CHIPS / 8); i++) {
+ for (int k = 7; k >= 0; k--) {
+ pn_sequence[j] = (pn_sequence_table[i] >> k) & 0x1;
+ j = j + 1;
+ }
+ }
+ }
+
+ void
+ dvbt2_pilotgenerator_cc_impl::init_pilots(int symbol)
+ {
+ int remainder, shift;
+ for (int i = 0; i < C_PS; i++) {
+ data_carrier_map[i] = DATA_CARRIER;
+ }
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp1[i] % 1632) / dx)) % 2 && (((pp1_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp1_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp2_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp1[i] % 1632) / dx)) % 2 && (((pp3_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp3_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp4_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ data_carrier_map[pp5_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP6:
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP8:
+ break;
+ }
+ break;
+ case FFTSIZE_2K:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp1[i] % 1632) / dx)) % 2 && (((pp1_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp1_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 25; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp2[i] % 1632) / dx)) % 2 && (((pp1_cp2[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp1_cp2[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp2_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 22; i++) {
+ data_carrier_map[pp2_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp1[i] % 1632) / dx)) % 2 && (((pp3_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp3_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp2[i] % 1632) / dx)) % 2 && (((pp3_cp2[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp3_cp2[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp1[i] % 1632) / dx)) % 2 && (((pp4_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp4_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp2[i] % 1632) / dx)) % 2 && (((pp4_cp2[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp4_cp2[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp1[i] % 1632) / dx)) % 2 && (((pp5_cp1[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp5_cp1[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp2[i] % 1632) / dx)) % 2 && (((pp5_cp2[i] %
1632) % dx) == 0)) {
+ data_carrier_map[pp5_cp2[i] % 1632] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP6:
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 30; i++) {
+ data_carrier_map[pp7_cp2[i] % 1632] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP8:
+ break;
+ }
+ break;
+ case FFTSIZE_4K:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp1[i] % 3264) / dx)) % 2 && (((pp1_cp1[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp1_cp1[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 25; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp2[i] % 3264) / dx)) % 2 && (((pp1_cp2[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp1_cp2[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp2_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 22; i++) {
+ data_carrier_map[pp2_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp1[i] % 3264) / dx)) % 2 && (((pp3_cp1[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp3_cp1[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp2[i] % 3264) / dx)) % 2 && (((pp3_cp2[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp3_cp2[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp3[i] % 3264) / dx)) % 2 && (((pp3_cp3[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp3_cp3[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp1[i] % 3264) / dx)) % 2 && (((pp4_cp1[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp4_cp1[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp2[i] % 3264) / dx)) % 2 && (((pp4_cp2[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp4_cp2[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp3[i] % 3264) / dx)) % 2 && (((pp4_cp3[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp4_cp3[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp1[i] % 3264) / dx)) % 2 && (((pp5_cp1[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp5_cp1[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp2[i] % 3264) / dx)) % 2 && (((pp5_cp2[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp5_cp2[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 3; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp3[i] % 3264) / dx)) % 2 && (((pp5_cp3[i] %
3264) % dx) == 0)) {
+ data_carrier_map[pp5_cp3[i] % 3264] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP6:
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 30; i++) {
+ data_carrier_map[pp7_cp2[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 5; i++) {
+ data_carrier_map[pp7_cp3[i] % 3264] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP8:
+ break;
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp1[i] % 6528) / dx)) % 2 && (((pp1_cp1[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp1_cp1[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 25; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp2[i] % 6528) / dx)) % 2 && (((pp1_cp2[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp1_cp2[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp2_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 22; i++) {
+ data_carrier_map[pp2_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 4; i++) {
+ data_carrier_map[pp2_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp1[i] % 6528) / dx)) % 2 && (((pp3_cp1[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp3_cp1[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp2[i] % 6528) / dx)) % 2 && (((pp3_cp2[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp3_cp2[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp3[i] % 6528) / dx)) % 2 && (((pp3_cp3[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp3_cp3[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp3_8k[i] / dx)) % 2 && ((pp3_8k[i] % dx) == 0)) {
+ data_carrier_map[pp3_8k[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp1[i] % 6528) / dx)) % 2 && (((pp4_cp1[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp4_cp1[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp2[i] % 6528) / dx)) % 2 && (((pp4_cp2[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp4_cp2[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp3[i] % 6528) / dx)) % 2 && (((pp4_cp3[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp4_cp3[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp4[i] % 6528) / dx)) % 2 && (((pp4_cp4[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp4_cp4[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_8k[i] / dx)) % 2 && ((pp4_8k[i] % dx) == 0)) {
+ data_carrier_map[pp4_8k[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp1[i] % 6528) / dx)) % 2 && (((pp5_cp1[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp5_cp1[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp2[i] % 6528) / dx)) % 2 && (((pp5_cp2[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp5_cp2[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 3; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp3[i] % 6528) / dx)) % 2 && (((pp5_cp3[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp5_cp3[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp4[i] % 6528) / dx)) % 2 && (((pp5_cp4[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp5_cp4[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP6:
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 30; i++) {
+ data_carrier_map[pp7_cp2[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 5; i++) {
+ data_carrier_map[pp7_cp3[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 3; i++) {
+ data_carrier_map[pp7_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 5; i++) {
+ data_carrier_map[pp7_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP8:
+ for (int i = 0; i < 47; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp8_cp4[i] % 6528) / dx)) % 2 && (((pp8_cp4[i] %
6528) % dx) == 0)) {
+ data_carrier_map[pp8_cp4[i] % 6528] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp4[i] % 6528] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 5; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_8k[i] / dx)) % 2 && ((pp8_8k[i] % dx) == 0)) {
+ data_carrier_map[pp8_8k[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_8k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp1[i] % 13056) / dx)) % 2 && (((pp1_cp1[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp1_cp1[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 25; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp2[i] % 13056) / dx)) % 2 && (((pp1_cp2[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp1_cp2[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 44; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp1_cp5[i] % 13056) / dx)) % 2 && (((pp1_cp5[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp1_cp5[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 4; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp1_16k[i] / dx)) % 2 && ((pp1_16k[i] % dx) == 0)) {
+ data_carrier_map[pp1_16k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp1_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp1_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp2_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 22; i++) {
+ data_carrier_map[pp2_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 41; i++) {
+ data_carrier_map[pp2_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp2_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp1[i] % 13056) / dx)) % 2 && (((pp3_cp1[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp3_cp1[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp2[i] % 13056) / dx)) % 2 && (((pp3_cp2[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp3_cp2[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp3[i] % 13056) / dx)) % 2 && (((pp3_cp3[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp3_cp3[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 44; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp3_cp5[i] % 13056) / dx)) % 2 && (((pp3_cp5[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp3_cp5[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp3_16k[i] / dx)) % 2 && ((pp3_16k[i] % dx) == 0)) {
+ data_carrier_map[pp3_16k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp3_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp3_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp1[i] % 13056) / dx)) % 2 && (((pp4_cp1[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp4_cp1[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp2[i] % 13056) / dx)) % 2 && (((pp4_cp2[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp4_cp2[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp3[i] % 13056) / dx)) % 2 && (((pp4_cp3[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp4_cp3[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp4[i] % 13056) / dx)) % 2 && (((pp4_cp4[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp4_cp4[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 44; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp4_cp5[i] % 13056) / dx)) % 2 && (((pp4_cp5[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp4_cp5[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_16k[i] / dx)) % 2 && ((pp4_16k[i] % dx) == 0)) {
+ data_carrier_map[pp4_16k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp1[i] % 13056) / dx)) % 2 && (((pp5_cp1[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp5_cp1[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp2[i] % 13056) / dx)) % 2 && (((pp5_cp2[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp5_cp2[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 3; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp3[i] % 13056) / dx)) % 2 && (((pp5_cp3[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp5_cp3[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp4[i] % 13056) / dx)) % 2 && (((pp5_cp4[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp5_cp4[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 44; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp5_cp5[i] % 13056) / dx)) % 2 && (((pp5_cp5[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp5_cp5[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp5_16k[i] / dx)) % 2 && ((pp5_16k[i] % dx) == 0)) {
+ data_carrier_map[pp5_16k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp5_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp5_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP6:
+ for (int i = 0; i < 88; i++) {
+ data_carrier_map[pp6_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp6_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 30; i++) {
+ data_carrier_map[pp7_cp2[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 5; i++) {
+ data_carrier_map[pp7_cp3[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 3; i++) {
+ data_carrier_map[pp7_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 35; i++) {
+ data_carrier_map[pp7_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 3; i++) {
+ data_carrier_map[pp7_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP8:
+ for (int i = 0; i < 47; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp8_cp4[i] % 13056) / dx)) % 2 && (((pp8_cp4[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp8_cp4[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp4[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 39; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((((pp8_cp5[i] % 13056) / dx)) % 2 && (((pp8_cp5[i] %
13056) % dx) == 0)) {
+ data_carrier_map[pp8_cp5[i] % 13056] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp5[i] % 13056] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 3; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_16k[i] / dx)) % 2 && ((pp8_16k[i] % dx) == 0)) {
+ data_carrier_map[pp8_16k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_16k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ switch (pilot_pattern) {
+ case PILOT_PP1:
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp1_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 25; i++) {
+ data_carrier_map[pp1_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 44; i++) {
+ data_carrier_map[pp1_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP2:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp1[i] / dx)) % 2 && ((pp2_cp1[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp1[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 22; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp2[i] / dx)) % 2 && ((pp2_cp2[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp2[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp3[i] / dx)) % 2 && ((pp2_cp3[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp3[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp4[i] / dx)) % 2 && ((pp2_cp4[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp4[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 41; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp5[i] / dx)) % 2 && ((pp2_cp5[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp5[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 88; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_cp6[i] / dx)) % 2 && ((pp2_cp6[i] % dx) == 0)) {
+ data_carrier_map[pp2_cp6[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp2_32k[i] / dx)) % 2 && ((pp2_32k[i] % dx) == 0)) {
+ data_carrier_map[pp2_32k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp2_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp2_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP3:
+ for (int i = 0; i < 22; i++) {
+ data_carrier_map[pp3_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 20; i++) {
+ data_carrier_map[pp3_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 1; i++) {
+ data_carrier_map[pp3_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 44; i++) {
+ data_carrier_map[pp3_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 49; i++) {
+ data_carrier_map[pp3_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP4:
+ for (int i = 0; i < 20; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp1[i] / dx)) % 2 && ((pp4_cp1[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp1[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 23; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp2[i] / dx)) % 2 && ((pp4_cp2[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp2[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 1; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp3[i] / dx)) % 2 && ((pp4_cp3[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp3[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp4[i] / dx)) % 2 && ((pp4_cp4[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp4[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 44; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp5[i] / dx)) % 2 && ((pp4_cp5[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp5[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 86; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_cp6[i] / dx)) % 2 && ((pp4_cp6[i] % dx) == 0)) {
+ data_carrier_map[pp4_cp6[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp4_32k[i] / dx)) % 2 && ((pp4_32k[i] % dx) == 0)) {
+ data_carrier_map[pp4_32k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp4_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp4_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP5:
+ for (int i = 0; i < 19; i++) {
+ data_carrier_map[pp5_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 23; i++) {
+ data_carrier_map[pp5_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 3; i++) {
+ data_carrier_map[pp5_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 1; i++) {
+ data_carrier_map[pp5_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 44; i++) {
+ data_carrier_map[pp5_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ break;
+ case PILOT_PP6:
+ for (int i = 0; i < 88; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp6_cp5[i] / dx)) % 2 && ((pp6_cp5[i] % dx) == 0)) {
+ data_carrier_map[pp6_cp5[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp6_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp6_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 88; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp6_cp6[i] / dx)) % 2 && ((pp6_cp6[i] % dx) == 0)) {
+ data_carrier_map[pp6_cp6[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp6_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp6_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 4; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp6_32k[i] / dx)) % 2 && ((pp6_32k[i] % dx) == 0)) {
+ data_carrier_map[pp6_32k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp6_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp6_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ case PILOT_PP7:
+ for (int i = 0; i < 15; i++) {
+ data_carrier_map[pp7_cp1[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 30; i++) {
+ data_carrier_map[pp7_cp2[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 5; i++) {
+ data_carrier_map[pp7_cp3[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 3; i++) {
+ data_carrier_map[pp7_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 35; i++) {
+ data_carrier_map[pp7_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ for (int i = 0; i < 92; i++) {
+ data_carrier_map[pp7_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 2; i++) {
+ data_carrier_map[pp7_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ break;
+ case PILOT_PP8:
+ for (int i = 0; i < 47; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_cp4[i] / dx)) % 2 && ((pp8_cp4[i] % dx) == 0)) {
+ data_carrier_map[pp8_cp4[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp4[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 39; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_cp5[i] / dx)) % 2 && ((pp8_cp5[i] % dx) == 0)) {
+ data_carrier_map[pp8_cp5[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp5[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ for (int i = 0; i < 89; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_cp6[i] / dx)) % 2 && ((pp8_cp6[i] % dx) == 0)) {
+ data_carrier_map[pp8_cp6[i]] = CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_cp6[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ if (carrier_mode == CARRIERS_EXTENDED) {
+ for (int i = 0; i < 6; i++) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (((pp8_32k[i] / dx)) % 2 && ((pp8_32k[i] % dx) == 0)) {
+ data_carrier_map[pp8_32k[i]] =
CONTINUAL_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[pp8_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[pp8_32k[i]] = CONTINUAL_CARRIER;
+ }
+ }
+ }
+ break;
+ }
+ break;
+ }
+ for (int i = 0; i < C_PS; i++) {
+ remainder = (i - K_EXT) % (dx * dy);
+ if (remainder < 0) {
+ remainder += (dx * dy);
+ }
+ if (remainder == (dx * (symbol % dy))) {
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if ((i / dx) % 2) {
+ data_carrier_map[i] = SCATTERED_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[i] = SCATTERED_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[i] = SCATTERED_CARRIER;
+ }
+ }
+ }
+ if (miso == TRUE && miso_group == MISO_TX2) {
+ if (symbol % 2) {
+ data_carrier_map[0] = SCATTERED_CARRIER_INVERTED;
+ data_carrier_map[C_PS - 1] = SCATTERED_CARRIER_INVERTED;
+ }
+ else {
+ data_carrier_map[0] = SCATTERED_CARRIER;
+ data_carrier_map[C_PS - 1] = SCATTERED_CARRIER;
+ }
+ }
+ else {
+ data_carrier_map[0] = SCATTERED_CARRIER;
+ data_carrier_map[C_PS - 1] = SCATTERED_CARRIER;
+ }
+ if (papr_mode == PAPR_TR || papr_mode == PAPR_BOTH) {
+ if (carrier_mode == CARRIERS_NORMAL) {
+ shift = dx * (symbol % dy);
+ }
+ else {
+ shift = dx * ((symbol + (K_EXT / dx)) % dy);
+ }
+ switch (fft_size) {
+ case FFTSIZE_1K:
+ for (int i = 0; i < 10; i++) {
+ data_carrier_map[tr_papr_map_1k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_2K:
+ for (int i = 0; i < 18; i++) {
+ data_carrier_map[tr_papr_map_2k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_4K:
+ for (int i = 0; i < 36; i++) {
+ data_carrier_map[tr_papr_map_4k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_8K:
+ case FFTSIZE_8K_T2GI:
+ for (int i = 0; i < 72; i++) {
+ data_carrier_map[tr_papr_map_8k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_16K:
+ case FFTSIZE_16K_T2GI:
+ for (int i = 0; i < 144; i++) {
+ data_carrier_map[tr_papr_map_16k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ case FFTSIZE_32K:
+ case FFTSIZE_32K_T2GI:
+ for (int i = 0; i < 288; i++) {
+ data_carrier_map[tr_papr_map_32k[i] + shift] = TRPAPR_CARRIER;
+ }
+ break;
+ }
+ }
+ }
+
+ int
+ dvbt2_pilotgenerator_cc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ gr_complex zero;
+ gr_complex *dst;
+ int L_FC = 0;
+
+ zero.real() = 0.0;
+ zero.imag() = 0.0;
+ if (N_FC != 0) {
+ L_FC = 1;
+ }
+ for (int i = 0; i < noutput_items; i += num_symbols) {
+ for (int j = 0; j < num_symbols; j++) {
+ init_pilots(j);
+ if (j < N_P2) {
+ for (int n = 0; n < left_nulls; n++) {
+ *out++ = zero;
+ }
+ for (int n = 0; n < C_PS; n++) {
+ if (p2_carrier_map[n] == P2PILOT_CARRIER) {
+ *out++ = p2_bpsk[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (p2_carrier_map[n] == P2PILOT_CARRIER_INVERTED) {
+ *out++ = p2_bpsk_inverted[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (p2_carrier_map[n] == P2PAPR_CARRIER) {
+ *out++ = zero;
+ }
+ else {
+ *out++ = *in++;
+ }
+ }
+ for (int n = 0; n < right_nulls; n++) {
+ *out++ = zero;
+ }
+ }
+ else if (j == (num_symbols - L_FC)) {
+ for (int n = 0; n < left_nulls; n++) {
+ *out++ = zero;
+ }
+ for (int n = 0; n < C_PS; n++) {
+ if (fc_carrier_map[n] == SCATTERED_CARRIER) {
+ *out++ = sp_bpsk[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (fc_carrier_map[n] == SCATTERED_CARRIER_INVERTED) {
+ *out++ = sp_bpsk_inverted[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (fc_carrier_map[n] == TRPAPR_CARRIER) {
+ *out++ = zero;
+ }
+ else {
+ *out++ = *in++;
+ }
+ }
+ for (int n = 0; n < right_nulls; n++) {
+ *out++ = zero;
+ }
+ }
+ else {
+ for (int n = 0; n < left_nulls; n++) {
+ *out++ = zero;
+ }
+ for (int n = 0; n < C_PS; n++) {
+ if (data_carrier_map[n] == SCATTERED_CARRIER) {
+ *out++ = sp_bpsk[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (data_carrier_map[n] == SCATTERED_CARRIER_INVERTED) {
+ *out++ = sp_bpsk_inverted[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (data_carrier_map[n] == CONTINUAL_CARRIER) {
+ *out++ = cp_bpsk[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (data_carrier_map[n] == CONTINUAL_CARRIER_INVERTED) {
+ *out++ = cp_bpsk_inverted[prbs[n + K_OFFSET] ^ pn_sequence[j]];
+ }
+ else if (data_carrier_map[n] == TRPAPR_CARRIER) {
+ *out++ = zero;
+ }
+ else {
+ *out++ = *in++;
+ }
+ }
+ for (int n = 0; n < right_nulls; n++) {
+ *out++ = zero;
+ }
+ }
+ out -= ofdm_fft_size;
+ if (equalization_enable == EQUALIZATION_ON) {
+ volk_32fc_x2_multiply_32fc(out, out, inverse_sinc, ofdm_fft_size);
+ }
+ dst = ofdm_fft->get_inbuf();
+ memcpy(&dst[ofdm_fft_size / 2], &out[0], sizeof(gr_complex) *
ofdm_fft_size / 2);
+ memcpy(&dst[0], &out[ofdm_fft_size / 2], sizeof(gr_complex) *
ofdm_fft_size / 2);
+ ofdm_fft->execute();
+ volk_32fc_s32fc_multiply_32fc(out, ofdm_fft->get_outbuf(),
normalization, ofdm_fft_size);
+ out += ofdm_fft_size;
+ }
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (active_items);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const unsigned char dvbt2_pilotgenerator_cc_impl::pn_sequence_table[CHIPS
/ 8] =
+ {
+ 0x4D, 0xC2, 0xAF, 0x7B, 0xD8, 0xC3, 0xC9, 0xA1, 0xE7, 0x6C, 0x9A, 0x09,
0x0A, 0xF1, 0xC3, 0x11,
+ 0x4F, 0x07, 0xFC, 0xA2, 0x80, 0x8E, 0x94, 0x62, 0xE9, 0xAD, 0x7B, 0x71,
0x2D, 0x6F, 0x4A, 0xC8,
+ 0xA5, 0x9B, 0xB0, 0x69, 0xCC, 0x50, 0xBF, 0x11, 0x49, 0x92, 0x7E, 0x6B,
0xB1, 0xC9, 0xFC, 0x8C,
+ 0x18, 0xBB, 0x94, 0x9B, 0x30, 0xCD, 0x09, 0xDD, 0xD7, 0x49, 0xE7, 0x04,
0xF5, 0x7B, 0x41, 0xDE,
+ 0xC7, 0xE7, 0xB1, 0x76, 0xE1, 0x2C, 0x56, 0x57, 0x43, 0x2B, 0x51, 0xB0,
0xB8, 0x12, 0xDF, 0x0E,
+ 0x14, 0x88, 0x7E, 0x24, 0xD8, 0x0C, 0x97, 0xF0, 0x93, 0x74, 0xAD, 0x76,
0x27, 0x0E, 0x58, 0xFE,
+ 0x17, 0x74, 0xB2, 0x78, 0x1D, 0x8D, 0x38, 0x21, 0xE3, 0x93, 0xF2, 0xEA,
0x0F, 0xFD, 0x4D, 0x24,
+ 0xDE, 0x20, 0xC0, 0x5D, 0x0B, 0xA1, 0x70, 0x3D, 0x10, 0xE5, 0x2D, 0x61,
0xE0, 0x13, 0xD8, 0x37,
+ 0xAA, 0x62, 0xD0, 0x07, 0xCC, 0x2F, 0xD7, 0x6D, 0x23, 0xA3, 0xE1, 0x25,
0xBD, 0xE8, 0xA9, 0xA7,
+ 0xC0, 0x2A, 0x98, 0xB7, 0x02, 0x51, 0xC5, 0x56, 0xF6, 0x34, 0x1E, 0xBD,
0xEC, 0xB8, 0x01, 0xAA,
+ 0xD5, 0xD9, 0xFB, 0x8C, 0xBE, 0xA8, 0x0B, 0xB6, 0x19, 0x09, 0x65, 0x27,
0xA8, 0xC4, 0x75, 0xB3,
+ 0xD8, 0xDB, 0x28, 0xAF, 0x85, 0x43, 0xA0, 0x0E, 0xC3, 0x48, 0x0D, 0xFF,
0x1E, 0x2C, 0xDA, 0x9F,
+ 0x98, 0x5B, 0x52, 0x3B, 0x87, 0x90, 0x07, 0xAA, 0x5D, 0x0C, 0xE5, 0x8D,
0x21, 0xB1, 0x86, 0x31,
+ 0x00, 0x66, 0x17, 0xF6, 0xF7, 0x69, 0xEB, 0x94, 0x7F, 0x92, 0x4E, 0xA5,
0x16, 0x1E, 0xC2, 0xC0,
+ 0x48, 0x8B, 0x63, 0xED, 0x79, 0x93, 0xBA, 0x8E, 0xF4, 0xE5, 0x52, 0xFA,
0x32, 0xFC, 0x3F, 0x1B,
+ 0xDB, 0x19, 0x92, 0x39, 0x02, 0xBC, 0xBB, 0xE5, 0xDD, 0xAB, 0xB8, 0x24,
0x12, 0x6E, 0x08, 0x45,
+ 0x9C, 0xA6, 0xCF, 0xA0, 0x26, 0x7E, 0x52, 0x94, 0xA9, 0x8C, 0x63, 0x25,
0x69, 0x79, 0x1E, 0x60,
+ 0xEF, 0x65, 0x9A, 0xEE, 0x95, 0x18, 0xCD, 0xF0, 0x8D, 0x87, 0x83, 0x36,
0x90, 0xC1, 0xB7, 0x91,
+ 0x83, 0xED, 0x12, 0x7E, 0x53, 0x36, 0x0C, 0xD8, 0x65, 0x14, 0x85, 0x9A,
0x28, 0xB5, 0x49, 0x4F,
+ 0x51, 0xAA, 0x48, 0x82, 0x41, 0x9A, 0x25, 0xA2, 0xD0, 0x1A, 0x5F, 0x47,
0xAA, 0x27, 0x30, 0x1E,
+ 0x79, 0xA5, 0x37, 0x0C, 0xCB, 0x3E, 0x19, 0x7F
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_1k[10] =
+ {
+ 116, 130, 134, 157, 182, 256, 346, 478, 479, 532
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_2k[18] =
+ {
+ 113, 124, 262, 467, 479, 727, 803, 862, 910, 946,
+ 980, 1201, 1322, 1342, 1396, 1397, 1562, 1565
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_4k[36] =
+ {
+ 104, 116, 119, 163, 170, 173, 664, 886, 1064, 1151, 1196, 1264, 1531,
+ 1736, 1951, 1960, 2069, 2098, 2311, 2366, 2473, 2552, 2584, 2585, 2645,
+ 2774, 2846, 2882, 3004, 3034, 3107, 3127, 3148, 3191, 3283, 3289
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_8k[72] =
+ {
+ 106, 109, 110, 112, 115, 118, 133, 142, 163, 184, 206, 247, 445, 461,
+ 503, 565, 602, 656, 766, 800, 922, 1094, 1108, 1199, 1258, 1726, 1793,
+ 1939, 2128, 2714, 3185, 3365, 3541, 3655, 3770, 3863, 4066, 4190, 4282,
+ 4565, 4628, 4727, 4882, 4885, 5143, 5192, 5210, 5257, 5261, 5459, 5651,
+ 5809, 5830, 5986, 6020, 6076, 6253, 6269, 6410, 6436, 6467, 6475, 6509,
+ 6556, 6611, 6674, 6685, 6689, 6691, 6695, 6698, 6701
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_16k[144] =
+ {
+ 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119, 121, 122, 125,
128,
+ 131, 134, 137, 140, 143, 161, 223, 230, 398, 482, 497, 733, 809, 850,
922,
+ 962, 1196, 1256, 1262, 1559, 1691, 1801, 1819, 1937, 2005, 2095, 2308,
2383,
+ 2408, 2425, 2428, 2479, 2579, 2893, 2902, 3086, 3554, 4085, 4127, 4139,
4151,
+ 4163, 4373, 4400, 4576, 4609, 4952, 4961, 5444, 5756, 5800, 6094, 6208,
6658,
+ 6673, 6799, 7208, 7682, 8101, 8135, 8230, 8692, 8788, 8933, 9323, 9449,
9478,
+ 9868, 10192, 10261, 10430, 10630, 10685, 10828, 10915, 10930, 10942,
11053,
+ 11185, 11324, 11369, 11468, 11507, 11542, 11561, 11794, 11912, 11974,
11978,
+ 12085, 12179, 12193, 12269, 12311, 12758, 12767, 12866, 12938, 12962,
12971,
+ 13099, 13102, 13105, 13120, 13150, 13280, 13282, 13309, 13312, 13321,
13381,
+ 13402, 13448, 13456, 13462, 13463, 13466, 13478, 13492, 13495, 13498,
13501,
+ 13502, 13504, 13507, 13510, 13513, 13514, 13516
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::p2_papr_map_32k[288] =
+ {
+ 104, 106, 107, 109, 110, 112, 113, 115, 118, 121, 124, 127, 130, 133,
136,
+ 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178,
181,
+ 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 404, 452, 455, 467,
509,
+ 539, 568, 650, 749, 1001, 1087, 1286, 1637, 1823, 1835, 1841, 1889, 1898,
+ 1901, 2111, 2225, 2252, 2279, 2309, 2315, 2428, 2452, 2497, 2519, 3109,
3154,
+ 3160, 3170, 3193, 3214, 3298, 3331, 3346, 3388, 3397, 3404, 3416, 3466,
3491,
+ 3500, 3572, 4181, 4411, 4594, 4970, 5042, 5069, 5081, 5086, 5095, 5104,
5320,
+ 5465, 5491, 6193, 6541, 6778, 6853, 6928, 6934, 7030, 7198, 7351, 7712,
7826,
+ 7922, 8194, 8347, 8350, 8435, 8518, 8671, 8861, 8887, 9199, 9980, 10031,
10240,
+ 10519, 10537, 10573, 10589, 11078, 11278, 11324, 11489, 11642, 12034,
12107, 12184,
+ 12295, 12635, 12643, 12941, 12995, 13001, 13133, 13172, 13246, 13514,
13522, 13939,
+ 14362, 14720, 14926, 15338, 15524, 15565, 15662, 15775, 16358, 16613,
16688, 16760,
+ 17003, 17267, 17596, 17705, 18157, 18272, 18715, 18994, 19249, 19348,
20221, 20855,
+ 21400, 21412, 21418, 21430, 21478, 21559, 21983, 21986, 22331, 22367,
22370, 22402,
+ 22447, 22535, 22567, 22571, 22660, 22780, 22802, 22844, 22888, 22907,
23021, 23057,
+ 23086, 23213, 23240, 23263, 23333, 23369, 23453, 23594, 24143, 24176,
24319, 24325,
+ 24565, 24587, 24641, 24965, 25067, 25094, 25142, 25331, 25379, 25465,
25553, 25589,
+ 25594, 25655, 25664, 25807, 25823, 25873, 25925, 25948, 26002, 26008,
26102, 26138,
+ 26141, 26377, 26468, 26498, 26510, 26512, 26578, 26579, 26588, 26594,
26597, 26608,
+ 26627, 26642, 26767, 26776, 26800, 26876, 26882, 26900, 26917, 26927,
26951, 26957,
+ 26960, 26974, 26986, 27010, 27013, 27038, 27044, 27053, 27059, 27061,
27074, 27076,
+ 27083, 27086, 27092, 27094, 27098, 27103, 27110, 27115, 27118, 27119,
27125, 27128,
+ 27130, 27133, 27134, 27140, 27143, 27145, 27146, 27148, 27149
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_1k[10] =
+ {
+ 109, 117, 122, 129, 139, 321, 350, 403, 459, 465
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_2k[18] =
+ {
+ 250, 404, 638, 677, 700, 712, 755, 952, 1125, 1145,
+ 1190, 1276, 1325, 1335, 1406, 1431, 1472, 1481
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_4k[36] =
+ {
+ 170, 219, 405, 501, 597, 654, 661, 745, 995, 1025, 1319, 1361, 1394,
+ 1623, 1658, 1913, 1961, 1971, 2106, 2117, 2222, 2228, 2246, 2254, 2361,
+ 2468, 2469, 2482, 2637, 2679, 2708, 2825, 2915, 2996, 3033, 3119
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_8k[72] =
+ {
+ 111, 115, 123, 215, 229, 392, 613, 658, 831, 842, 997, 1503, 1626, 1916,
+ 1924, 1961, 2233, 2246, 2302, 2331, 2778, 2822, 2913, 2927, 2963, 2994,
+ 3087, 3162, 3226, 3270, 3503, 3585, 3711, 3738, 3874, 3902, 4013, 4017,
+ 4186, 4253, 4292, 4339, 4412, 4453, 4669, 4910, 5015, 5030, 5061, 5170,
+ 5263, 5313, 5360, 5384, 5394, 5493, 5550, 5847, 5901, 5999, 6020, 6165,
+ 6174, 6227, 6245, 6314, 6316, 6327, 6503, 6507, 6545, 6565
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_16k[144] =
+ {
+ 109, 122, 139, 171, 213, 214, 251, 585, 763, 1012, 1021, 1077, 1148,
1472,
+ 1792, 1883, 1889, 1895, 1900, 2013, 2311, 2582, 2860, 2980, 3011, 3099,
3143,
+ 3171, 3197, 3243, 3257, 3270, 3315, 3436, 3470, 3582, 3681, 3712, 3767,
3802,
+ 3979, 4045, 4112, 4197, 4409, 4462, 4756, 5003, 5007, 5036, 5246, 5483,
5535,
+ 5584, 5787, 5789, 6047, 6349, 6392, 6498, 6526, 6542, 6591, 6680, 6688,
6785,
+ 6860, 7134, 7286, 7387, 7415, 7417, 7505, 7526, 7541, 7551, 7556, 7747,
7814,
+ 7861, 7880, 8045, 8179, 8374, 8451, 8514, 8684, 8698, 8804, 8924, 9027,
9113,
+ 9211, 9330, 9479, 9482, 9487, 9619, 9829, 10326, 10394, 10407, 10450,
10528,
+ 10671, 10746, 10774, 10799, 10801, 10912, 11113, 11128, 11205, 11379,
11459,
+ 11468, 11658, 11776, 11791, 11953, 11959, 12021, 12028, 12135, 12233,
12407,
+ 12441, 12448, 12470, 12501, 12548, 12642, 12679, 12770, 12788, 12899,
12923,
+ 12939, 13050, 13103, 13147, 13256, 13339, 13409
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::tr_papr_map_32k[288] =
+ {
+ 164, 320, 350, 521, 527, 578, 590, 619, 635, 651, 662, 664, 676, 691,
723,
+ 940, 1280, 1326, 1509, 1520, 1638, 1682, 1805, 1833, 1861, 1891, 1900,
1902,
+ 1949, 1967, 1978, 1998, 2006, 2087, 2134, 2165, 2212, 2427, 2475, 2555,
2874,
+ 3067, 3091, 3101, 3146, 3188, 3322, 3353, 3383, 3503, 3523, 3654, 3856,
4150,
+ 4158, 4159, 4174, 4206, 4318, 4417, 4629, 4631, 4875, 5104, 5106, 5111,
5131,
+ 5145, 5146, 5177, 5181, 5246, 5269, 5458, 5474, 5500, 5509, 5579, 5810,
5823,
+ 6058, 6066, 6098, 6411, 6741, 6775, 6932, 7103, 7258, 7303, 7413, 7586,
7591,
+ 7634, 7636, 7655, 7671, 7675, 7756, 7760, 7826, 7931, 7937, 7951, 8017,
8061,
+ 8071, 8117, 8317, 8321, 8353, 8806, 9010, 9237, 9427, 9453, 9469, 9525,
9558,
+ 9574, 9584, 9820, 9973, 10011, 10043, 10064, 10066, 10081, 10136, 10193,
10249,
+ 10511, 10537, 11083, 11350, 11369, 11428, 11622, 11720, 11924, 11974,
11979, 12944,
+ 12945, 13009, 13070, 13110, 13257, 13364, 13370, 13449, 13503, 13514,
13520, 13583,
+ 13593, 13708, 13925, 14192, 14228, 14235, 14279, 14284, 14370, 14393,
14407, 14422,
+ 14471, 14494, 14536, 14617, 14829, 14915, 15094, 15138, 15155, 15170,
15260, 15283,
+ 15435, 15594, 15634, 15810, 16178, 16192, 16196, 16297, 16366, 16498,
16501, 16861,
+ 16966, 17039, 17057, 17240, 17523, 17767, 18094, 18130, 18218, 18344,
18374, 18657,
+ 18679, 18746, 18772, 18779, 18786, 18874, 18884, 18955, 19143, 19497,
19534, 19679,
+ 19729, 19738, 19751, 19910, 19913, 20144, 20188, 20194, 20359, 20490,
20500, 20555,
+ 20594, 20633, 20656, 21099, 21115, 21597, 22139, 22208, 22244, 22530,
22547, 22562,
+ 22567, 22696, 22757, 22798, 22854, 22877, 23068, 23102, 23141, 23154,
23170, 23202,
+ 23368, 23864, 24057, 24215, 24219, 24257, 24271, 24325, 24447, 25137,
25590, 25702,
+ 25706, 25744, 25763, 25811, 25842, 25853, 25954, 26079, 26158, 26285,
26346, 26488,
+ 26598, 26812, 26845, 26852, 26869, 26898, 26909, 26927, 26931, 26946,
26975, 26991,
+ 27039
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp1_cp1[20] =
+ {
+ 116, 255, 285, 430, 518, 546, 601, 646, 744, 1662, 1893, 1995, 2322,
3309, 3351,
+ 3567, 3813, 4032, 5568, 5706
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp1_cp2[25] =
+ {
+ 1022, 1224, 1302, 1371, 1495, 2261, 2551, 2583, 2649, 2833, 2925, 3192,
4266, 5395,
+ 5710, 5881, 8164, 10568, 11069, 11560, 12631, 12946, 13954, 16745, 21494
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp1_cp5[44] =
+ {
+ 1369, 7013, 7215, 7284, 7649, 7818, 8025, 8382, 8733, 8880, 9249, 9432,
9771, 10107,
+ 10110, 10398, 10659, 10709, 10785, 10872, 11115, 11373, 11515, 11649,
11652, 12594,
+ 12627, 12822, 12984, 15760, 16612, 17500, 18358, 19078, 19930, 20261,
20422, 22124,
+ 22867, 23239, 24934, 25879, 26308, 26674
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp1[20] =
+ {
+ 116, 318, 390, 430, 474, 518, 601, 646, 708, 726, 1752, 1758, 1944,
2100, 2208, 2466,
+ 3792, 5322, 5454, 5640
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp2[22] =
+ {
+ 1022, 1092, 1369, 1416, 1446, 1495, 2598, 2833, 2928, 3144, 4410, 4800,
5710, 5881,
+ 6018, 6126, 10568, 11515, 12946, 13954, 15559, 16681
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp3[2] =
+ {
+ 2261, 8164
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp4[2] =
+ {
+ 10709, 19930
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp5[41] =
+ {
+ 6744, 7013, 7020, 7122, 7308, 7649, 7674, 7752, 7764, 8154, 8190, 8856,
8922, 9504,
+ 9702, 9882, 9924, 10032, 10092, 10266, 10302, 10494, 10530, 10716,
11016, 11076,
+ 11160, 11286, 11436, 11586, 12582, 13002, 17500, 18358, 19078, 22124,
23239, 24073,
+ 24934, 25879, 26308
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_cp6[88] =
+ {
+ 13164, 13206, 13476, 13530, 13536, 13764, 13848, 13938, 13968, 14028,
14190, 14316,
+ 14526, 14556, 14562, 14658, 14910, 14946, 15048, 15186, 15252, 15468,
15540, 15576,
+ 15630, 15738, 15840, 16350, 16572, 16806, 17028, 17064, 17250, 17472,
17784, 17838,
+ 18180, 18246, 18480, 18900, 18960, 19254, 19482, 19638, 19680, 20082,
20310, 20422,
+ 20454, 20682, 20874, 21240, 21284, 21444, 21450, 21522, 21594, 21648,
21696, 21738,
+ 22416, 22824, 23016, 23124, 23196, 23238, 23316, 23418, 23922, 23940,
24090, 24168,
+ 24222, 24324, 24342, 24378, 24384, 24540, 24744, 24894, 24990, 25002,
25194, 25218,
+ 25260, 25566, 26674, 26944
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_cp1[22] =
+ {
+ 116, 318, 342, 426, 430, 518, 582, 601, 646, 816, 1758, 1764, 2400,
3450, 3504,
+ 3888, 4020, 4932, 5154, 5250, 5292, 5334
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_cp2[20] =
+ {
+ 1022, 1495, 2261, 2551, 2802, 2820, 2833, 2922, 4422, 4752, 4884, 5710,
8164,
+ 10568, 11069, 11560, 12631, 12946, 16745, 21494
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_cp3[1] =
+ {
+ 13954
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_cp5[44] =
+ {
+ 1369, 5395, 5881, 6564, 6684, 7013, 7649, 8376, 8544, 8718, 8856, 9024,
9132, 9498,
+ 9774, 9840, 10302, 10512, 10566, 10770, 10914, 11340, 11418, 11730,
11742, 12180,
+ 12276, 12474, 12486, 15760, 16612, 17500, 18358, 19078, 19930, 20261,
20422, 22124,
+ 22867, 23239, 24934, 25879, 26308, 26674
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_cp6[49] =
+ {
+ 13320, 13350, 13524, 13566, 13980, 14148, 14340, 14964, 14982, 14994,
15462, 15546,
+ 15984, 16152, 16314, 16344, 16488, 16614, 16650, 16854, 17028, 17130,
17160, 17178,
+ 17634, 17844, 17892, 17958, 18240, 18270, 18288, 18744, 18900, 18930,
18990, 19014,
+ 19170, 19344, 19662, 19698, 20022, 20166, 20268, 20376, 20466, 20550,
20562, 20904,
+ 21468
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp1[20] =
+ {
+ 108, 116, 144, 264, 288, 430, 518, 564, 636, 646, 828, 2184, 3360, 3396,
3912, 4032,
+ 4932, 5220, 5676, 5688
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp2[23] =
+ {
+ 601, 1022, 1092, 1164, 1369, 1392, 1452, 1495, 2261, 2580, 2833, 3072,
4320, 4452,
+ 5710, 5881, 6048, 10568, 11515, 12946, 13954, 15559, 16681
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp3[1] =
+ {
+ 8164
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp4[2] =
+ {
+ 10709, 19930
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp5[44] =
+ {
+ 6612, 6708, 7013, 7068, 7164, 7224, 7308, 7464, 7649, 7656, 7716, 7752,
7812, 7860,
+ 8568, 8808, 8880, 9072, 9228, 9516, 9696, 9996, 10560, 10608, 10728,
11148, 11232,
+ 11244, 11496, 11520, 11664, 11676, 11724, 11916, 17500, 18358, 19078,
21284, 22124,
+ 23239, 24073, 24934, 25879, 26308
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_cp6[86] =
+ {
+ 13080, 13152, 13260, 13380, 13428, 13572, 13884, 13956, 14004, 14016,
14088, 14232,
+ 14304, 14532, 14568, 14760, 14940, 15168, 15288, 15612, 15684, 15888,
16236, 16320,
+ 16428, 16680, 16812, 16908, 17184, 17472, 17508, 17580, 17892, 17988,
18000, 18336,
+ 18480, 18516, 19020, 19176, 19188, 19320, 19776, 19848, 20112, 20124,
20184, 20388,
+ 20532, 20556, 20676, 20772, 21156, 21240, 21276, 21336, 21384, 21816,
21888, 22068,
+ 22092, 22512, 22680, 22740, 22800, 22836, 22884, 23304, 23496, 23568,
23640, 24120,
+ 24168, 24420, 24444, 24456, 24492, 24708, 24864, 25332, 25536, 25764,
25992, 26004,
+ 26674, 26944
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_cp1[19] =
+ {
+ 108, 116, 228, 430, 518, 601, 646, 804, 1644, 1680, 1752, 1800, 1836,
3288, 3660,
+ 4080, 4932, 4968, 5472
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_cp2[23] =
+ {
+ 852, 1022, 1495, 2508, 2551, 2604, 2664, 2736, 2833, 3120, 4248, 4512,
4836, 5710,
+ 5940, 6108, 8164, 10568, 11069, 11560, 12946, 13954, 21494
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_cp3[3] =
+ {
+ 648, 4644, 16745
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_cp4[1] =
+ {
+ 12631
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_cp5[44] =
+ {
+ 1369, 2261, 5395, 5881, 6552, 6636, 6744, 6900, 7032, 7296, 7344, 7464,
7644, 7649,
+ 7668, 7956, 8124, 8244, 8904, 8940, 8976, 9216, 9672, 9780, 10224,
10332, 10709,
+ 10776, 10944, 11100, 11292, 11364, 11496, 11532, 11904, 12228, 12372,
12816, 15760,
+ 16612, 17500, 19078, 22867, 25879
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp6_cp5[88] =
+ {
+ 116, 384, 408, 518, 601, 646, 672, 960, 1022, 1272, 1344, 1369, 1495,
1800, 2040,
+ 2261, 2833, 3192, 3240, 3768, 3864, 3984, 4104, 4632, 4728, 4752, 4944,
5184, 5232,
+ 5256, 5376, 5592, 5616, 5710, 5808, 5881, 6360, 6792, 6960, 7013, 7272,
7344, 7392,
+ 7536, 7649, 7680, 7800, 8064, 8160, 8164, 8184, 8400, 8808, 8832, 9144,
9648, 9696,
+ 9912, 10008, 10200, 10488, 10568, 10656, 10709, 11088, 11160, 11515,
11592, 12048,
+ 12264, 12288, 12312, 12552, 12672, 12946, 13954, 15559, 16681, 17500,
19078, 20422,
+ 21284, 22124, 23239, 24934, 25879, 26308, 26674
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp6_cp6[88] =
+ {
+ 13080, 13368, 13464, 13536, 13656, 13728, 13824, 14112, 14232, 14448,
14472, 14712,
+ 14808, 14952, 15000, 15336, 15360, 15408, 15600, 15624, 15648, 16128,
16296, 16320,
+ 16416, 16536, 16632, 16824, 16848, 17184, 17208, 17280, 17352, 17520,
17664, 17736,
+ 17784, 18048, 18768, 18816, 18840, 19296, 19392, 19584, 19728, 19752,
19776, 20136,
+ 20184, 20208, 20256, 21096, 21216, 21360, 21408, 21744, 21768, 22200,
22224, 22320,
+ 22344, 22416, 22848, 22968, 23016, 23040, 23496, 23688, 23904, 24048,
24168, 24360,
+ 24408, 24984, 25152, 25176, 25224, 25272, 25344, 25416, 25488, 25512,
25536, 25656,
+ 25680, 25752, 25992, 26016
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp1[15] =
+ {
+ 264, 360, 1848, 2088, 2112, 2160, 2256, 2280, 3936, 3960, 3984, 5016,
5136, 5208,
+ 5664
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp2[30] =
+ {
+ 116, 430, 518, 601, 646, 1022, 1296, 1368, 1369, 1495, 2833, 3024, 4416,
4608,
+ 4776, 5710, 5881, 6168, 7013, 8164, 10568, 10709, 11515, 12946, 15559,
23239,
+ 24934, 25879, 26308, 26674
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp3[5] =
+ {
+ 456, 480, 2261, 6072, 17500
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp4[3] =
+ {
+ 1008, 6120, 13954
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp5[35] =
+ {
+ 6984, 7032, 7056, 7080, 7152, 7320, 7392, 7536, 7649, 7704, 7728, 7752,
8088, 8952,
+ 9240, 9288, 9312, 9480, 9504, 9840, 9960, 10320, 10368, 10728, 10752,
11448, 11640,
+ 11688, 11808, 12192, 12240, 12480, 12816, 16681, 22124
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_cp6[92] =
+ {
+ 13416, 13440, 13536, 13608, 13704, 13752, 14016, 14040, 14112, 14208,
14304, 14376,
+ 14448, 14616, 14712, 14760, 14832, 14976, 15096, 15312, 15336, 15552,
15816, 15984,
+ 16224, 16464, 16560, 17088, 17136, 17256, 17352, 17400, 17448, 17544,
17928, 18048,
+ 18336, 18456, 18576, 18864, 19032, 19078, 19104, 19320, 19344, 19416,
19488, 19920,
+ 19930, 19992, 20424, 20664, 20808, 21168, 21284, 21360, 21456, 21816,
22128, 22200,
+ 22584, 22608, 22824, 22848, 22944, 22992, 23016, 23064, 23424, 23448,
23472, 23592,
+ 24192, 24312, 24360, 24504, 24552, 24624, 24648, 24672, 24768, 24792,
25080, 25176,
+ 25224, 25320, 25344, 25584, 25680, 25824, 26064, 26944
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_cp4[47] =
+ {
+ 116, 132, 180, 430, 518, 601, 646, 1022, 1266, 1369, 1495, 2261, 2490,
2551, 2712,
+ 2833, 3372, 3438, 4086, 4098, 4368, 4572, 4614, 4746, 4830, 4968, 5395,
5710, 5881,
+ 7649, 8164, 10568, 11069, 11560, 12631, 12946, 13954, 15760, 16612,
16745, 17500,
+ 19078, 19930, 21494, 22867, 25879, 26308
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_cp5[39] =
+ {
+ 6720, 6954, 7013, 7026, 7092, 7512, 7536, 7596, 7746, 7758, 7818, 7986,
8160, 8628,
+ 9054, 9096, 9852, 9924, 10146, 10254, 10428, 10704, 11418, 11436, 11496,
11550,
+ 11766, 11862, 12006, 12132, 12216, 12486, 12762, 18358, 20261, 20422,
22124,
+ 23239, 24934
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_cp6[89] =
+ {
+ 10709, 11515, 13254, 13440, 13614, 13818, 14166, 14274, 14304, 14364,
14586, 14664,
+ 15030, 15300, 15468, 15474, 15559, 15732, 15774, 16272, 16302, 16428,
16500, 16662,
+ 16681, 16872, 17112, 17208, 17862, 18036, 18282, 18342, 18396, 18420,
18426, 18732,
+ 19050, 19296, 19434, 19602, 19668, 19686, 19728, 19938, 20034, 21042,
21120, 21168,
+ 21258, 21284, 21528, 21594, 21678, 21930, 21936, 21990, 22290, 22632,
22788, 23052,
+ 23358, 23448, 23454, 23706, 23772, 24048, 24072, 24073, 24222, 24384,
24402, 24444,
+ 24462, 24600, 24738, 24804, 24840, 24918, 24996, 25038, 25164, 25314,
25380, 25470,
+ 25974, 26076, 26674, 26753, 26944
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_8k[4] =
+ {
+ 6820, 6847, 6869, 6898
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_8k[2] =
+ {
+ 6820, 6869
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_8k[2] =
+ {
+ 6820, 6869
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_8k[5] =
+ {
+ 6820, 6833, 6869, 6887, 6898
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_8k[5] =
+ {
+ 6820, 6833, 6869, 6887, 6898
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp1_16k[4] =
+ {
+ 3636, 13724, 13790, 13879
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_16k[2] =
+ {
+ 13636, 13790
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp3_16k[2] =
+ {
+ 13636, 13790
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_16k[2] =
+ {
+ 13636, 13790
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp5_16k[2] =
+ {
+ 13636, 13790
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp6_16k[2] =
+ {
+ 13636, 13790
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_16k[3] =
+ {
+ 13636, 13724, 13879
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_16k[3] =
+ {
+ 13636, 13724, 13879
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp2_32k[2] =
+ {
+ 27268, 27688
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp4_32k[2] =
+ {
+ 27268, 27688
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp6_32k[4] =
+ {
+ 27268, 27448, 27688, 27758
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp7_32k[2] =
+ {
+ 27268, 27688
+ };
+
+ const int dvbt2_pilotgenerator_cc_impl::pp8_32k[6] =
+ {
+ 27268, 27368, 27448, 27580, 27688, 27758
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.h
b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.h
new file mode 100644
index 0000000..e419872
--- /dev/null
+++ b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.h
@@ -0,0 +1,173 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_IMPL_H
+#define INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbt2_pilotgenerator_cc.h>
+#include <gnuradio/fft/fft.h>
+#include "dvb/dvb_defines.h"
+
+#define CHIPS 2624
+#define MAX_CARRIERS 27841
+
+enum dvbt2_carrier_type_t {
+ DATA_CARRIER = 1,
+ P2PILOT_CARRIER,
+ P2PAPR_CARRIER,
+ TRPAPR_CARRIER,
+ SCATTERED_CARRIER,
+ CONTINUAL_CARRIER,
+ P2PILOT_CARRIER_INVERTED,
+ SCATTERED_CARRIER_INVERTED,
+ CONTINUAL_CARRIER_INVERTED
+};
+
+namespace gr {
+ namespace dtv {
+
+ class dvbt2_pilotgenerator_cc_impl : public dvbt2_pilotgenerator_cc
+ {
+ private:
+ int active_items;
+ int num_symbols;
+ int fft_size;
+ int left_nulls;
+ int right_nulls;
+ int pilot_pattern;
+ int carrier_mode;
+ int papr_mode;
+ int equalization_enable;
+ float normalization;
+ gr_complex p2_bpsk[2];
+ gr_complex sp_bpsk[2];
+ gr_complex cp_bpsk[2];
+ gr_complex p2_bpsk_inverted[2];
+ gr_complex sp_bpsk_inverted[2];
+ gr_complex cp_bpsk_inverted[2];
+ gr_complex inverse_sinc[32768];
+ int prbs[MAX_CARRIERS];
+ int pn_sequence[CHIPS];
+ int p2_carrier_map[MAX_CARRIERS];
+ int data_carrier_map[MAX_CARRIERS];
+ int fc_carrier_map[MAX_CARRIERS];
+ int N_P2;
+ int C_P2;
+ int N_FC;
+ int C_FC;
+ int C_DATA;
+ int K_EXT;
+ int C_PS;
+ int K_OFFSET;
+ int dx;
+ int dy;
+ int miso;
+ int miso_group;
+ void init_prbs(void);
+ void init_pilots(int);
+
+ fft::fft_complex *ofdm_fft;
+ int ofdm_fft_size;
+
+ const static unsigned char pn_sequence_table[CHIPS / 8];
+ const static int p2_papr_map_1k[10];
+ const static int p2_papr_map_2k[18];
+ const static int p2_papr_map_4k[36];
+ const static int p2_papr_map_8k[72];
+ const static int p2_papr_map_16k[144];
+ const static int p2_papr_map_32k[288];
+ const static int tr_papr_map_1k[10];
+ const static int tr_papr_map_2k[18];
+ const static int tr_papr_map_4k[36];
+ const static int tr_papr_map_8k[72];
+ const static int tr_papr_map_16k[144];
+ const static int tr_papr_map_32k[288];
+ const static int pp1_cp1[20];
+ const static int pp1_cp2[25];
+ const static int pp1_cp5[44];
+ const static int pp2_cp1[20];
+ const static int pp2_cp2[22];
+ const static int pp2_cp3[2];
+ const static int pp2_cp4[2];
+ const static int pp2_cp5[41];
+ const static int pp2_cp6[88];
+ const static int pp3_cp1[22];
+ const static int pp3_cp2[20];
+ const static int pp3_cp3[1];
+ const static int pp3_cp5[44];
+ const static int pp3_cp6[49];
+ const static int pp4_cp1[20];
+ const static int pp4_cp2[23];
+ const static int pp4_cp3[1];
+ const static int pp4_cp4[2];
+ const static int pp4_cp5[44];
+ const static int pp4_cp6[86];
+ const static int pp5_cp1[19];
+ const static int pp5_cp2[23];
+ const static int pp5_cp3[3];
+ const static int pp5_cp4[1];
+ const static int pp5_cp5[44];
+ const static int pp6_cp5[88];
+ const static int pp6_cp6[88];
+ const static int pp7_cp1[15];
+ const static int pp7_cp2[30];
+ const static int pp7_cp3[5];
+ const static int pp7_cp4[3];
+ const static int pp7_cp5[35];
+ const static int pp7_cp6[92];
+ const static int pp8_cp4[47];
+ const static int pp8_cp5[39];
+ const static int pp8_cp6[89];
+ const static int pp2_8k[4];
+ const static int pp3_8k[2];
+ const static int pp4_8k[2];
+ const static int pp7_8k[5];
+ const static int pp8_8k[5];
+ const static int pp1_16k[4];
+ const static int pp2_16k[2];
+ const static int pp3_16k[2];
+ const static int pp4_16k[2];
+ const static int pp5_16k[2];
+ const static int pp6_16k[2];
+ const static int pp7_16k[3];
+ const static int pp8_16k[3];
+ const static int pp2_32k[2];
+ const static int pp4_32k[2];
+ const static int pp6_32k[4];
+ const static int pp7_32k[2];
+ const static int pp8_32k[6];
+
+ public:
+ dvbt2_pilotgenerator_cc_impl(dvbt2_extended_carrier_t carriermode,
dvbt2_fftsize_t fftsize, dvbt2_pilotpattern_t pilotpattern,
dvbt2_guardinterval_t guardinterval, int numdatasyms, dvbt2_papr_t paprmode,
dvbt2_version_t version, dvbt2_preamble_t preamble, dvbt2_misogroup_t
misogroup, dvbt2_equalization_t equalization, dvbt2_bandwidth_t bandwidth, int
vlength);
+ ~dvbt2_pilotgenerator_cc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBT2_PILOTGENERATOR_CC_IMPL_H */
+
diff --git a/gr-dtv/swig/dtv_swig.i b/gr-dtv/swig/dtv_swig.i
index 0c01456..2194e4e 100644
--- a/gr-dtv/swig/dtv_swig.i
+++ b/gr-dtv/swig/dtv_swig.i
@@ -50,6 +50,15 @@
#include "gnuradio/dtv/dvb_bbscrambler_bb.h"
#include "gnuradio/dtv/dvb_bch_bb.h"
#include "gnuradio/dtv/dvb_ldpc_bb.h"
+#include "gnuradio/dtv/dvbt2_interleaver_bb.h"
+#include "gnuradio/dtv/dvbt2_modulator_bc.h"
+#include "gnuradio/dtv/dvbt2_cellinterleaver_cc.h"
+#include "gnuradio/dtv/dvbt2_framemapper_cc.h"
+#include "gnuradio/dtv/dvbt2_freqinterleaver_cc.h"
+#include "gnuradio/dtv/dvbt2_pilotgenerator_cc.h"
+#include "gnuradio/dtv/dvbt2_paprtr_cc.h"
+#include "gnuradio/dtv/dvbt2_p1insertion_cc.h"
+#include "gnuradio/dtv/dvbt2_miso_cc.h"
%}
%include "gnuradio/dtv/atsc_deinterleaver.h"
@@ -74,6 +83,15 @@
%include "gnuradio/dtv/dvb_bbscrambler_bb.h"
%include "gnuradio/dtv/dvb_bch_bb.h"
%include "gnuradio/dtv/dvb_ldpc_bb.h"
+%include "gnuradio/dtv/dvbt2_interleaver_bb.h"
+%include "gnuradio/dtv/dvbt2_modulator_bc.h"
+%include "gnuradio/dtv/dvbt2_cellinterleaver_cc.h"
+%include "gnuradio/dtv/dvbt2_framemapper_cc.h"
+%include "gnuradio/dtv/dvbt2_freqinterleaver_cc.h"
+%include "gnuradio/dtv/dvbt2_pilotgenerator_cc.h"
+%include "gnuradio/dtv/dvbt2_paprtr_cc.h"
+%include "gnuradio/dtv/dvbt2_p1insertion_cc.h"
+%include "gnuradio/dtv/dvbt2_miso_cc.h"
GR_SWIG_BLOCK_MAGIC2(dtv, atsc_deinterleaver);
GR_SWIG_BLOCK_MAGIC2(dtv, atsc_depad);
@@ -94,3 +112,12 @@ GR_SWIG_BLOCK_MAGIC2(dtv, dvb_bbheader_bb);
GR_SWIG_BLOCK_MAGIC2(dtv, dvb_bbscrambler_bb);
GR_SWIG_BLOCK_MAGIC2(dtv, dvb_bch_bb);
GR_SWIG_BLOCK_MAGIC2(dtv, dvb_ldpc_bb);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_interleaver_bb);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_modulator_bc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_cellinterleaver_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_framemapper_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_freqinterleaver_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_pilotgenerator_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_paprtr_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_p1insertion_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_miso_cc);
- [Commit-gnuradio] [gnuradio] branch master updated (8a3ad1a -> 9024682), git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 03/06: Merge branch 'maint', git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 02/06: modtool: Added sample manifest file, git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 05/06: Merge branch 'maint', git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'mbr0wn/modtool/cgran', git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 04/06: Merge remote-tracking branch 'drmpeg/dvb-t2', git, 2015/03/22
- [Commit-gnuradio] [gnuradio] 01/06: gr-dtv: Add DVB-T2 transmitter.,
git <=