diff options
102 files changed, 2710 insertions, 1814 deletions
diff --git a/docs/doxygen/other/stream_tags.dox b/docs/doxygen/other/stream_tags.dox index 01b91f5e21..2af431b526 100644 --- a/docs/doxygen/other/stream_tags.dox +++ b/docs/doxygen/other/stream_tags.dox @@ -201,7 +201,7 @@ would have to use the TPP_DONT tag propagation policy and handle the propagation internally. In no case is the value of the tag modified when propagating through a -block. This becomes relevent when using \ref page_tagged_stream_blocks. +block. This becomes relevant when using \ref page_tagged_stream_blocks. \section stream_tags_issues Notes on How to Use Tags diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h index a484ccf429..3e85f22823 100644 --- a/gnuradio-runtime/include/gnuradio/block.h +++ b/gnuradio-runtime/include/gnuradio/block.h @@ -171,7 +171,7 @@ namespace gr { * \brief Called to enable drivers, etc for i/o devices. * * This allows a block to enable an associated driver to begin - * transfering data just before we start to execute the scheduler. + * transferring data just before we start to execute the scheduler. * The end result is that this reduces latency in the pipeline * when dealing with audio devices, usrps, etc. */ @@ -343,7 +343,7 @@ namespace gr { * * Use this value to clear the 'is_set' flag so the scheduler will * ignore this. Use the set_max_noutput_items(m) call to both set - * a new value for max_noutput_items and to reenable its use in + * a new value for max_noutput_items and to re-enable its use in * the scheduler. */ void unset_max_noutput_items(); @@ -411,7 +411,7 @@ namespace gr { long min_output_buffer(size_t i); /*! - * \brief Request limit on the mininum buffer size on all output + * \brief Request limit on the minimum buffer size on all output * ports. * * \details diff --git a/gnuradio-runtime/include/gnuradio/block_gateway.h b/gnuradio-runtime/include/gnuradio/block_gateway.h index 8a6fa9d15c..bc04c0c915 100644 --- a/gnuradio-runtime/include/gnuradio/block_gateway.h +++ b/gnuradio-runtime/include/gnuradio/block_gateway.h @@ -143,6 +143,14 @@ namespace gr { return gr::block::set_output_multiple(multiple); } + void block__set_min_output_buffer(int port, long size) { + return gr::block::set_min_output_buffer(port, size); + } + + void block__set_min_output_buffer(long size) { + return gr::block::set_min_output_buffer(size); + } + int block__output_multiple(void) const { return gr::block::output_multiple(); } diff --git a/gnuradio-runtime/lib/top_block_impl.cc b/gnuradio-runtime/lib/top_block_impl.cc index 48404a6832..3f94867bc2 100644 --- a/gnuradio-runtime/lib/top_block_impl.cc +++ b/gnuradio-runtime/lib/top_block_impl.cc @@ -80,7 +80,7 @@ namespace gr { top_block_impl::top_block_impl(top_block *owner) : d_owner(owner), d_ffg(), - d_state(IDLE), d_lock_count(0) + d_state(IDLE), d_lock_count(0), d_retry_wait(false) { } @@ -125,8 +125,12 @@ namespace gr { void top_block_impl::stop() { + gr::thread::scoped_lock lock(d_mutex); + if(d_scheduler) d_scheduler->stop(); + + d_state = IDLE; } void @@ -137,6 +141,11 @@ namespace gr { { gr::thread::scoped_lock lock(d_mutex); if (!d_lock_count) { + if(d_retry_wait) { + d_retry_wait = false; + continue; + } + d_state = IDLE; break; } d_lock_cond.wait(lock); @@ -149,8 +158,6 @@ namespace gr { { if(d_scheduler) d_scheduler->wait(); - - d_state = IDLE; } // N.B. lock() and unlock() cannot be called from a flow graph @@ -159,7 +166,8 @@ namespace gr { top_block_impl::lock() { gr::thread::scoped_lock lock(d_mutex); - stop(); + if(d_scheduler) + d_scheduler->stop(); d_lock_count++; } @@ -177,8 +185,8 @@ namespace gr { if(d_lock_count > 0 || d_state == IDLE) // nothing to do return; - d_lock_cond.notify_all(); restart(); + d_lock_cond.notify_all(); } /* @@ -197,7 +205,7 @@ namespace gr { // Create a new scheduler to execute it d_scheduler = make_scheduler(d_ffg, d_max_noutput_items); - d_state = RUNNING; + d_retry_wait = true; } std::string diff --git a/gnuradio-runtime/lib/top_block_impl.h b/gnuradio-runtime/lib/top_block_impl.h index 1ac5136ddf..de0a67b4c1 100644 --- a/gnuradio-runtime/lib/top_block_impl.h +++ b/gnuradio-runtime/lib/top_block_impl.h @@ -82,6 +82,7 @@ namespace gr { gr::thread::mutex d_mutex; // protects d_state and d_lock_count tb_state d_state; int d_lock_count; + bool d_retry_wait; boost::condition_variable d_lock_cond; int d_max_noutput_items; diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc b/gnuradio-runtime/lib/tpb_thread_body.cc index e3f57eef53..93591feee2 100644 --- a/gnuradio-runtime/lib/tpb_thread_body.cc +++ b/gnuradio-runtime/lib/tpb_thread_body.cc @@ -152,7 +152,7 @@ namespace gr { while(!d->d_tpb.input_changed && block->empty_handled_p()){ boost::system_time const timeout=boost::get_system_time()+ boost::posix_time::milliseconds(250); if(!d->d_tpb.input_cond.timed_wait(guard, timeout)){ - goto tpb_loop_top; // timeout occured (perform sanity checks up top) + goto tpb_loop_top; // timeout occurred (perform sanity checks up top) } } diff --git a/gr-analog/include/gnuradio/analog/phase_modulator_fc.h b/gr-analog/include/gnuradio/analog/phase_modulator_fc.h index e9e29fbf9a..a1d47fd38b 100644 --- a/gr-analog/include/gnuradio/analog/phase_modulator_fc.h +++ b/gr-analog/include/gnuradio/analog/phase_modulator_fc.h @@ -37,7 +37,7 @@ namespace gr { * output = complex(cos(in*sensitivity), sin(in*sensitivity)) * * Input stream 0: floats - * Ouput stream 0: complex + * Output stream 0: complex */ class ANALOG_API phase_modulator_fc : virtual public sync_block { diff --git a/gr-atsc/include/gnuradio/atsc/CMakeLists.txt b/gr-atsc/include/gnuradio/atsc/CMakeLists.txt index cdf818aab2..342f55c03d 100644 --- a/gr-atsc/include/gnuradio/atsc/CMakeLists.txt +++ b/gr-atsc/include/gnuradio/atsc/CMakeLists.txt @@ -24,7 +24,6 @@ install(FILES api.h basic_trellis_encoder_impl.h bit_timing_loop.h - CMakeLists.txt consts.h convolutional_interleaver.h create_atsci_equalizer.h @@ -41,7 +40,6 @@ install(FILES equalizer_lms2_impl.h equalizer_lms_impl.h equalizer_nop_impl.h - exp2_lp_impl.h fake_single_viterbi_impl.h field_sync_demux.h field_sync_mux.h @@ -51,29 +49,7 @@ install(FILES fs_checker_naive_impl.h fs_correlator_impl.h fs_correlator_naive_impl.h - GrAtscBitTimingLoop2.h - GrAtscBitTimingLoop3.h - GrAtscBitTimingLoop.h - GrAtscConvert2xTo20.h - GrAtscDataSegToSoftDataSeg.h - GrAtscDeinterleaver.h - GrAtscDerandomizer.h - GrAtscEqualizer.h - GrAtscFieldSyncChecker.h - GrAtscFieldSyncCorrelator.h - GrAtscFieldSyncDemux.h - GrAtscFieldSyncMux.h - GrAtscFPLL.h - GrAtscInterleaver.h - GrAtscRandomizer.h - GrAtscRSDecoder.h - GrAtscRSEncoder.h - GrAtscSegSymSync.h GrAtscSegSymSyncImpl_export.h - GrAtscSegSymSyncImpl.h - GrAtscSymbolMapper.h - GrAtscTrellisEncoder.h - GrAtscViterbiDecoder.h interleaver_fifo.h interleaver.h pad.h @@ -81,8 +57,6 @@ install(FILES randomizer.h randomizer_impl.h reed_solomon_impl.h - root_raised_cosine_bandpass_impl.h - root_raised_cosine_impl.h rs_decoder.h rs_encoder.h single_viterbi_impl.h @@ -96,7 +70,6 @@ install(FILES types.h viterbi_decoder.h viterbi_decoder_impl.h - vsbtx_lp_impl.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/atsc COMPONENT "atsc_devel" ) diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop.h b/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop.h deleted file mode 100644 index e42d37c581..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCBITTIMINGLOOP_H_ -#define _GRATSCBITTIMINGLOOP_H_ - -#include <gnuradio/blocks/nco.h> -#include <VrSigProc.h> -#include <VrHistoryProc.h> -#include <VrDecimatingSigProc.h> -#include <gnuradio/atsc/interleaver_fifo.h> -#include <gnuradio/filter/single_pole_iir.h> -#include <gnuradio/filter/mmse_fir_interpolator.h> -#include <gnuradio/atsc/slicer_agc_impl.h> -#include <stdio.h> -#include <gnuradio/atsc/diag_output_impl.h> - - -/*! - * \brief ATSC BitTimingLoop - * - * This class accepts a single real input and produces a single real output - */ - -class GrAtscBitTimingLoop : public VrDecimatingSigProc<float,float> { - - public: - - GrAtscBitTimingLoop (); - virtual ~GrAtscBitTimingLoop () { }; - - virtual const char *name () { return "GrAtscBitTimingLoop"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - // debug - void set_mu (double a_mu) { mu = a_mu; } - void set_no_update (bool a_no_update) { debug_no_update = a_no_update; } - void set_loop_filter_tap (double tap) { loop.set_taps (tap); } - void set_timing_rate (double rate) { d_timing_rate = rate; } - - protected: - - typedef float iType; - typedef float oType; - - iType produce_sample (const iType *in, unsigned int &index); - double filter_error (double e); - - VrSampleIndex next_input; - gr_mmse_fir_interpolator intr; - double w; // timing control word - double mu; // fractional delay - iType last_right; // last right hand sample - gr_single_pole_iir<double,double,double> loop; - bool debug_no_update;// debug - - double d_loop_filter_tap; - double d_timing_rate; - -#ifdef _BT_DIAG_OUTPUT_ - FILE *fp_loop; - FILE *fp_ps; -#endif -}; - -#endif // _GRATSCBITTIMINGLOOP_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop2.h b/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop2.h deleted file mode 100644 index 7acdbb6140..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop2.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCBITTIMINGLOOP2_H_ -#define _GRATSCBITTIMINGLOOP2_H_ - -#include <gnuradio/blocks/nco.h> -#include <VrSigProc.h> -#include <VrHistoryProc.h> -#include <VrDecimatingSigProc.h> -#include <gnuradio/atsc/interleaver_fifo.h> -#include <filtersingle_pole_iir.h> -#include <gnuradio/filter/mmse_fir_interpolator.h> - -/*! - * \brief ATSC BitTimingLoop - * - * This class accepts a single real input and produces a single real output - */ - -class GrAtscBitTimingLoop2 : public VrDecimatingSigProc<float,float> { - - public: - - GrAtscBitTimingLoop2 (); - virtual ~GrAtscBitTimingLoop2 () { }; - - virtual const char *name () { return "GrAtscBitTimingLoop2"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - // debug - void set_mu (float a_mu) { - assert (0 <= a_mu && a_mu <= 1.9); - use_right_p = a_mu < 1.0; - mu = a_mu - floor (a_mu); - cerr << "BTL2: mu: " << mu << " use_right_p: " << use_right_p << endl; - } - - protected: - - typedef float iType; - typedef float oType; - - iType produce_sample (const iType *in, unsigned int &index); - float filter_error (float e); - - VrSampleIndex next_input; - gr_single_pole_iir<float,float,float> dc; // used to estimate DC component - gr_mmse_fir_interpolator intr; - float mu; // fractional delay - iType last_right; // last right hand sample - - bool use_right_p; // ...else middle -}; - -#endif // _GRATSCBITTIMINGLOOP2_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop3.h b/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop3.h deleted file mode 100644 index cc90e667b6..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscBitTimingLoop3.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCBITTIMINGLOOP3_H_ -#define _GRATSCBITTIMINGLOOP3_H_ - -#include <cstdio> -#include <VrDecimatingSigProc.h> -#include <gnuradio/atsc/diag_output_impl.h> -#include <gnuradio/atsc/sssr_impl.h> -#include <gnuradio/atsc/syminfo_impl.h> - -/*! - * \brief ATSC BitTimingLoop3 - * - * This class accepts a single real input and produces two outputs, - * the raw symbol (float) and the tag (atsc_syminfo) - */ - -class GrAtscBitTimingLoop3 : public VrDecimatingSigProc<float,float> { - - public: - - GrAtscBitTimingLoop3 (double ratio_of_rx_clock_to_symbol_freq); - virtual ~GrAtscBitTimingLoop3 () { }; - - virtual const char *name () { return "GrAtscBitTimingLoop3"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - // debug (NOPs) - void set_mu (double a_mu) { } - void set_no_update (bool a_no_update) { } - void set_loop_filter_tap (double tap) { } - void set_timing_rate (double rate) { } - - protected: - - typedef float iType; - typedef float oDataType; - typedef atsc::syminfo oTagType; - - atsci_sssr d_sssr; - atsci_interpolator d_interp; - VrSampleIndex d_next_input; - double d_rx_clock_to_symbol_freq; -}; - -#endif // _GRATSCBITTIMINGLOOP3_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscConvert2xTo20.h b/gr-atsc/include/gnuradio/atsc/GrAtscConvert2xTo20.h deleted file mode 100644 index 5920832bba..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscConvert2xTo20.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef _GRATSCCONVERT2XTO20_H_ -#define _GRATSCCONVERT2XTO20_H_ - -#include <VrDecimatingSigProc.h> -#include <gnuradio/filter/mmse_fir_interpolator.h> - -class GrAtscConvert2xTo20 : public VrDecimatingSigProc<float,float> { - gr_mmse_fir_interpolator d_interp; - double d_frac_part; - VrSampleIndex d_next_input; - -public: - GrAtscConvert2xTo20 (); - ~GrAtscConvert2xTo20 (); - - virtual const char *name () { return "GrAtscConvert2xTo20"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - void pre_initialize (); - int checkOutputSamplingFrequency(float) { return 0; } // bogus, but required - -}; - -#endif /* _GRATSCCONVERT2XTO20_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscDataSegToSoftDataSeg.h b/gr-atsc/include/gnuradio/atsc/GrAtscDataSegToSoftDataSeg.h deleted file mode 100644 index c0f5cf8c33..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscDataSegToSoftDataSeg.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCDATASEGTOSOFTDATASEG_H_ -#define _GRATSCDATASEGTOSOFTDATASEG_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> - -/*! - * \brief Debug glue routine (atsc_data_segment --> atsc_soft_data_segment) - */ - -class GrAtscDataSegToSoftDataSeg : public VrHistoryProc<atsc_data_segment, - atsc_soft_data_segment> -{ - -public: - - GrAtscDataSegToSoftDataSeg (); - ~GrAtscDataSegToSoftDataSeg (); - - const char *name () { return "GrAtscDataSegToSoftDataSeg"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: -}; - -#endif /* _GRATSCDATASEGTOSOFTDATASEG_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscDeinterleaver.h b/gr-atsc/include/gnuradio/atsc/GrAtscDeinterleaver.h deleted file mode 100644 index 5cb59c057d..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscDeinterleaver.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCDEINTERLEAVER_H_ -#define _GRATSCDEINTERLEAVER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/data_interleaver_impl.h> - -/*! - * \brief Deinterleave RS encoded ATSC data ( atsc_mpeg_packet_rs_encoded --> atsc_mpeg_packet_rs_encoded) - */ - -class GrAtscDeinterleaver : public VrHistoryProc<atsc_mpeg_packet_rs_encoded, atsc_mpeg_packet_rs_encoded> -{ - -public: - - GrAtscDeinterleaver (); - ~GrAtscDeinterleaver (); - - const char *name () { return "GrAtscDeinterleaver"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_data_deinterleaver deinterleaver; -}; - -#endif /* _GRATSCDEINTERLEAVER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscDerandomizer.h b/gr-atsc/include/gnuradio/atsc/GrAtscDerandomizer.h deleted file mode 100644 index 2fb6ce3308..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscDerandomizer.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCDERANDOMIZER_H_ -#define _GRATSCDERANDOMIZER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/randomizer_impl.h> - -/*! - * \brief Derandomize ATSC data (atsc_mpeg_packet_no_sync --> atsc_mpeg_packet) - */ - -class GrAtscDerandomizer : public VrHistoryProc<atsc_mpeg_packet_no_sync, atsc_mpeg_packet> -{ - -public: - - GrAtscDerandomizer (); - ~GrAtscDerandomizer (); - - const char *name () { return "GrAtscDerandomizer"; } - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_randomizer rand; -}; - -#endif /* _GRATSCDERANDOMIZER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscEqualizer.h b/gr-atsc/include/gnuradio/atsc/GrAtscEqualizer.h deleted file mode 100644 index ff944deb7d..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscEqualizer.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCEQUALIZER_H_ -#define _GRATSCEQUALIZER_H_ - -#include <VrHistoryProc.h> - -class atsci_equalizer; - -/*! - * \brief ATSC equalizer (float,syminfo --> float,syminfo) - * - * first inputs are data samples, second inputs are tags. - * first outputs are equalized data samples, second outputs are tags. - * - * tag values are defined in atsci_syminfo.h - */ - -class GrAtscEqualizer : public VrHistoryProc<float,float> -{ - -public: - - GrAtscEqualizer (atsci_equalizer *equalizer); - ~GrAtscEqualizer (); - - const char *name () { return "GrAtscEqualizer"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - // we've got a non-standard forecast routine - int forecast (VrSampleRange output, VrSampleRange inputs[]); - -protected: - atsci_equalizer *d_equalizer; -}; - -#endif /* _GRATSCEQUALIZER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscFPLL.h b/gr-atsc/include/gnuradio/atsc/GrAtscFPLL.h deleted file mode 100644 index 39d053299b..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscFPLL.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef _GRATSCFPLL_H_ -#define _GRATSCFPLL_H_ - -#include <gnuradio/blocks/nco.h> -#include <gnuradio/filter/iir.h> -#include <gnuradio/filter/single_pole_iir.h> -#include <gnuradio/analog/agc.h> -#include <VrSigProc.h> -#include <stdio.h> -#include <gnuradio/atsc/diag_output_impl.h> - -/*! - * \brief ATSC FPLL (2nd Version) - * - * Used as follows: - * float float - * A/D --> GrFIRfilterFFF ----> GrAtscFPLL ----> - * - * We use GrFIRfilterFFF to bandpass filter the signal of interest. - * - * This class accepts a single real input and produces a single real output - */ - -class GrAtscFPLL : public VrSigProc { - protected: - - typedef float iType; - typedef float oType; - - public: - - GrAtscFPLL (double a_initial_freq); - virtual ~GrAtscFPLL () {} - - virtual const char *name () { return "GrAtscFPLL"; } - - virtual void initialize (); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - - // diagnostic routines - void set_initial_phase (double phase) { initial_phase = phase; } // radians - void set_no_update (bool a_no_update) { debug_no_update = a_no_update; } - - - protected: - - double initial_freq; - double initial_phase; - bool debug_no_update; - gr_nco<float,float> nco; - gr_agc agc; // automatic gain control - gr_single_pole_iir<float,float,float> afci; - gr_single_pole_iir<float,float,float> afcq; - -#ifdef _FPLL_DIAG_OUTPUT_ - FILE *fp; -#endif - -}; - - -#endif // _GRATSCFPLL_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncChecker.h b/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncChecker.h deleted file mode 100644 index 28458a19b5..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncChecker.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCFIELDSYNCCHECKER_H_ -#define _GRATSCFIELDSYNCCHECKER_H_ - -#include <VrHistoryProc.h> - -class atsci_fs_checker; - -/*! - * \brief ATSC field sync checker (float,syminfo --> float,syminfo) - * - * first output is delayed version of input. - * second output is set of tags, one-for-one with first output. - */ - -class GrAtscFieldSyncChecker : public VrHistoryProc<float,float> -{ - -public: - - GrAtscFieldSyncChecker (); - ~GrAtscFieldSyncChecker (); - - const char *name () { return "GrAtscFieldSyncChecker"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_fs_checker *d_fsc; -}; - -#endif /* _GRATSCFIELDSYNCCHECKER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncCorrelator.h b/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncCorrelator.h deleted file mode 100644 index 1a16048b22..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncCorrelator.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCFIELDSYNCCORRELATOR_H_ -#define _GRATSCFIELDSYNCCORRELATOR_H_ - -#include <VrHistoryProc.h> - -class atsci_fs_correlator; - -/*! - * \brief ATSC field sync correlator (float --> float,float) - * - * first output is delayed version of input. - * second output is set of tags, one-for-one with first output. - * - * tag values are defined in atsci_sync_tag.h - */ - -class GrAtscFieldSyncCorrelator : public VrHistoryProc<float,float> -{ - -public: - - GrAtscFieldSyncCorrelator (); - ~GrAtscFieldSyncCorrelator (); - - const char *name () { return "GrAtscFieldSyncCorrelator"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_fs_correlator *d_fsc; -}; - -#endif /* _GRATSCFIELDSYNCCORRELATOR_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncDemux.h b/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncDemux.h deleted file mode 100644 index ed7eb16215..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncDemux.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCFIELDSYNCDEMUX_H_ -#define _GRATSCFIELDSYNCDEMUX_H_ - -#include <VrDecimatingSigProc.h> -#include <gnuradio/atsc/types.h> - -/*! - * \brief ATSC Field Sync Demux - * - * This class accepts 1 stream of floats (data), and 1 stream of tags (syminfo). - * It outputs one stream of atsc_soft_data_segment packets - */ - -class GrAtscFieldSyncDemux : public VrDecimatingSigProc<float,atsc_soft_data_segment> { - - public: - - GrAtscFieldSyncDemux (); - virtual ~GrAtscFieldSyncDemux (); - - virtual const char *name () { return "GrAtscFieldSyncDemux"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - protected: - - bool d_locked; - bool d_in_field2; - int d_segment_number; - VrSampleIndex d_next_input; - VrSampleIndex d_lost_index; // diagnostic fluff -}; - -#endif // _GRATSCFIELDSYNCDEMUX_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncMux.h b/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncMux.h deleted file mode 100644 index 7998d9a8e1..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscFieldSyncMux.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCFIELDSYNCMUX_H_ -#define _GRATSCFIELDSYNCMUX_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> - -/*! - * \brief Insert ATSC Field Syncs as required (atsc_data_segment --> atsc_data_segment) - */ - -class GrAtscFieldSyncMux : public VrHistoryProc<atsc_data_segment, atsc_data_segment> -{ - -public: - - GrAtscFieldSyncMux (); - ~GrAtscFieldSyncMux (); - - const char *name () { return "GrAtscFieldSyncMux"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - int forecast (VrSampleRange output, VrSampleRange inputs[]); - - void pre_initialize (); - - static const int N_SAVED_SYMBOLS = 12; - -protected: - VrSampleIndex d_current_index; - bool d_already_output_field_sync; - unsigned char d_saved_symbols[N_SAVED_SYMBOLS]; -}; - -#endif /* _GRATSCFIELDSYNCMUX_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscInterleaver.h b/gr-atsc/include/gnuradio/atsc/GrAtscInterleaver.h deleted file mode 100644 index 158c6a6a17..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscInterleaver.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCINTERLEAVER_H_ -#define _GRATSCINTERLEAVER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/data_interleaver_impl.h> - -/*! - * \brief Interleave RS encoded ATSC data ( atsc_mpeg_packet_rs_encoded --> atsc_mpeg_packet_rs_encoded) - */ - -class GrAtscInterleaver : public VrHistoryProc<atsc_mpeg_packet_rs_encoded, atsc_mpeg_packet_rs_encoded> -{ - -public: - - GrAtscInterleaver (); - ~GrAtscInterleaver (); - - const char *name () { return "GrAtscInterleaver"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_data_interleaver interleaver; -}; - -#endif /* _GRATSCINTERLEAVER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscRSDecoder.h b/gr-atsc/include/gnuradio/atsc/GrAtscRSDecoder.h deleted file mode 100644 index 160adc5413..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscRSDecoder.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCRSDECODER_H_ -#define _GRATSCRSDECODER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/reed_solomon_impl.h> - -/*! - * \brief Pass ATSC data Reed-Solomon decoder( atsc_mpeg_packet_rs_encoded --> atsc_mpeg_rs_no_sync) - */ - -class GrAtscRSDecoder : public VrHistoryProc<atsc_mpeg_packet_rs_encoded, atsc_mpeg_packet_no_sync> -{ - -public: - - GrAtscRSDecoder (); - ~GrAtscRSDecoder (); - - const char *name () { return "GrAtscRSDecoder"; } - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_reed_solomon rs_decoder; -}; - -#endif /* _GRATSCRSDECODER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscRSEncoder.h b/gr-atsc/include/gnuradio/atsc/GrAtscRSEncoder.h deleted file mode 100644 index b59e28dcb5..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscRSEncoder.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCRSENCODER_H_ -#define _GRATSCRSENCODER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/reed_solomon_impl.h> - -/*! - * \brief Encode using Reed Solomon ATSC data (atsc_mpeg_packet_no_sync --> atsc_mpeg_packet_rs_encoded) - */ - -class GrAtscRSEncoder : public VrHistoryProc<atsc_mpeg_packet_no_sync, atsc_mpeg_packet_rs_encoded> -{ - -public: - - GrAtscRSEncoder (); - ~GrAtscRSEncoder (); - - const char *name () { return "GrAtscRSEncoder"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_reed_solomon rs_encoder; -}; - -#endif /* _GRATSCRSENCODER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscRandomizer.h b/gr-atsc/include/gnuradio/atsc/GrAtscRandomizer.h deleted file mode 100644 index 44be87349f..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscRandomizer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCRANDOMIZER_H_ -#define _GRATSCRANDOMIZER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/atsc/randomizer_impl.h> - -/*! - * \brief Randomize ATSC data (atsc_mpeg_packet --> atsc_mpeg_packet_no_sync) - */ - -class GrAtscRandomizer : public VrHistoryProc<atsc_mpeg_packet, atsc_mpeg_packet_no_sync> -{ - -public: - - GrAtscRandomizer (); - ~GrAtscRandomizer (); - - const char *name () { return "GrAtscRandomizer"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_randomizer rand; - - // used to initialize plinfo in output - bool field2; - int segno; -}; - -#endif /* _GRATSCRANDOMIZER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSync.h b/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSync.h deleted file mode 100644 index 750483f544..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSync.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCSEGSYMSYNC_H_ -#define _GRATSCSEGSYMSYNC_H_ - -#include <VrDecimatingSigProc.h> - -/*! - * \brief ATSC SegSymSync - * - * Abstract class that establishes symbol timing and synchronizes - * with data segment boundaries. - * - * Takes a single stream of floats as the input and - * produces two streams as output. The first stream is the data samples - * and is of type float. The second stream is the tags, and is of type syminfo. - * - * The current GNU Radio interface doesn't currently support different - * types on the input ports (or output ports for that matter), but - * since they are the same size, it works. - */ - -#include <atsci_syminfo.h> - -class GrAtscSegSymSync : public VrDecimatingSigProc<float,float> { - -public: - - GrAtscSegSymSync (); - ~GrAtscSegSymSync (); - - /*! - * \brief reset bit timing loop on channel change - */ - virtual void reset () = 0; - - /*! - * \brief create an instance of GrAtscSegSymSync - */ - static GrAtscSegSymSync *create (double nominal_ratio_of_rx_clock_to_symbol_freq); - -}; - -#endif // _GRATSCSEGSYMSYNC_H_ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSyncImpl.h b/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSyncImpl.h deleted file mode 100644 index e7b3a83018..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscSegSymSyncImpl.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef _GRATSCSEGSYMSYNCIMPL_H_ -#define _GRATSCSEGSYMSYNCIMPL_H_ - -#include <GrAtscSegSymSync.h> -#include <gnuradio/atsc/sssr_impl.h> - - -/*! - * \brief concrete implementation of GrAtscSegSymSync - * - * This class implements data segment sync tracking and symbol timing - * using a variation of the method described in - * "ATSC/VSB Tutorial - Receiver Technology" by Wayne E. Bretl of - * Zenith, pgs 41-45. - */ - -class GrAtscSegSymSyncImpl : public GrAtscSegSymSync { - - atsci_sssr d_sssr; - atsci_interpolator d_interp; - VrSampleIndex d_next_input; - double d_rx_clock_to_symbol_freq; // nominal ratio - -public: - - // the standard methods... - - GrAtscSegSymSyncImpl (double nominal_ratio_of_rx_clock_to_symbol_freq); - virtual ~GrAtscSegSymSyncImpl (); - - virtual const char *name () { return "GrAtscSegSymSyncImpl"; } - - virtual int forecast (VrSampleRange output, - VrSampleRange inputs[]); - - virtual int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - - void pre_initialize (); - - - // reset on channel change - - virtual void reset (); - -}; - -#endif /* _GRATSCSEGSYMSYNCIMPL_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscSymbolMapper.h b/gr-atsc/include/gnuradio/atsc/GrAtscSymbolMapper.h deleted file mode 100644 index a67b860a45..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscSymbolMapper.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCSYMBOLMAPPER_H_ -#define _GRATSCSYMBOLMAPPER_H_ - - -#include <VrInterpolatingSigProcNoWork.h> -#include <gnuradio/atsc/types.h> -#include <gnuradio/blocks/nco.h> - -/*! - * \brief take atsc_data_segments and map them to symbols. - * - * Input is a stream of atsc_data_segments. - * Output is a stream of symbols at 1x the symbol rate - * - * This module performs the signal mapping & pilot addition. - */ - -template<class oType> -class GrAtscSymbolMapper - : public VrInterpolatingSigProcNoWork<atsc_data_segment, oType> { - -public: - GrAtscSymbolMapper () - : VrInterpolatingSigProcNoWork<atsc_data_segment, oType>(1, INTERP_FACTOR) {}; - - ~GrAtscSymbolMapper () {}; - - const char *name () { return "GrAtscSymbolMapper"; } - - int work (VrSampleRange output, void *ao[], - VrSampleRange inputs[], void *ai[]); - -protected: - static const int INTERP_FACTOR = ATSC_DATA_SEGMENT_LENGTH; -}; - - -template<class oType> -int -GrAtscSymbolMapper<oType>::work (VrSampleRange output, void *ao[], - VrSampleRange inputs[], void *ai[]) -{ - atsc_data_segment *in = ((atsc_data_segment **) ai)[0]; - oType *out = ((oType **) ao)[0]; - - assert ((output.size % INTERP_FACTOR) == 0); - - static const float pilot_add = 1.25; - static const float map[8] = { - -7 + pilot_add, - -5 + pilot_add, - -3 + pilot_add, - -1 + pilot_add, - 1 + pilot_add, - 3 + pilot_add, - 5 + pilot_add, - 7 + pilot_add - }; - - unsigned int oo = 0; - unsigned int nsegs = output.size / INTERP_FACTOR; - - for (unsigned int n = 0; n < nsegs; n++){ - unsigned char *symbol = in[n].data; - - for (int i = 0; i < ATSC_DATA_SEGMENT_LENGTH; i++){ - out[oo++] = (oType) map[symbol[i] & 0x7]; - } - } - - assert (oo == output.size); - return output.size; -} - -#endif /* _GRATSCSYMBOLMAPPER_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscTrellisEncoder.h b/gr-atsc/include/gnuradio/atsc/GrAtscTrellisEncoder.h deleted file mode 100644 index 5e8115e677..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscTrellisEncoder.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCTRELLISENCODER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/trellis_encoder_impl.h> - -/*! - * \brief ATSC 12-way interleaved trellis encoder (atsc_mpeg_packet_rs_encoded --> atsc_data_segment) - */ - -class GrAtscTrellisEncoder : public VrHistoryProc<atsc_mpeg_packet_rs_encoded,atsc_data_segment> -{ - -public: - - GrAtscTrellisEncoder (); - ~GrAtscTrellisEncoder (); - - const char *name () { return "GrAtscTrellisEncoder"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_trellis_encoder encoder; - int last_start; -}; - -#endif diff --git a/gr-atsc/include/gnuradio/atsc/GrAtscViterbiDecoder.h b/gr-atsc/include/gnuradio/atsc/GrAtscViterbiDecoder.h deleted file mode 100644 index e33aba04ce..0000000000 --- a/gr-atsc/include/gnuradio/atsc/GrAtscViterbiDecoder.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _GRATSCVITERBIDECODER_H_ - -#include <VrHistoryProc.h> -#include <gnuradio/atsc/viterbi_decoder_impl.h> - -/*! - * \brief ATSC 12-way interleaved viterbi decoder (atsc_soft_data_segment --> atsc_mpeg_packet_rs_encoded) - */ - -class GrAtscViterbiDecoder : public VrHistoryProc<atsc_soft_data_segment, - atsc_mpeg_packet_rs_encoded> -{ - -public: - - GrAtscViterbiDecoder (); - ~GrAtscViterbiDecoder (); - - const char *name () { return "GrAtscViterbiDecoder"; } - - int work (VrSampleRange output, void *o[], - VrSampleRange inputs[], void *i[]); - -protected: - atsci_viterbi_decoder decoder; - int last_start; -}; - -#endif diff --git a/gr-atsc/include/gnuradio/atsc/exp2_lp_impl.h b/gr-atsc/include/gnuradio/atsc/exp2_lp_impl.h deleted file mode 100644 index 2d61fc8667..0000000000 --- a/gr-atsc/include/gnuradio/atsc/exp2_lp_impl.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _ATSC_EXP2_LP_H_ -#define _ATSC_EXP2_LP_H_ - -#include <gnuradio/atsc/api.h> -#include <gr_fir_builder.h> - -class ATSC_API atsci_exp2_lp : public gr_fir_builder -{ -public: - virtual std::vector<float> taps (double sampling_freq); -}; - -#endif /* _ATSC_EXP2_LP_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/root_raised_cosine_bandpass_impl.h b/gr-atsc/include/gnuradio/atsc/root_raised_cosine_bandpass_impl.h deleted file mode 100644 index 318d888712..0000000000 --- a/gr-atsc/include/gnuradio/atsc/root_raised_cosine_bandpass_impl.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _ATSC_RRC_BANDPASS_H_ -#define _ATSC_RRC_BANDPASS_H_ - -#include <gnuradio/atsc/api.h> -#include <gnuradio/atsc/root_raised_cosine_impl.h> - -class ATSC_API atsc_root_raised_cosine_bandpass : public atsc_root_raised_cosine -{ -public: - atsc_root_raised_cosine_bandpass (double center_freq) : _center_freq (center_freq) {} - virtual std::vector<float> taps (double sampling_freq); - -protected: - double _center_freq; -}; - - -#endif /* _ATSC_RRC_BANDPASS_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/root_raised_cosine_impl.h b/gr-atsc/include/gnuradio/atsc/root_raised_cosine_impl.h deleted file mode 100644 index 3489a7a908..0000000000 --- a/gr-atsc/include/gnuradio/atsc/root_raised_cosine_impl.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _ATSC_RRC_H_ -#define _ATSC_RRC_H_ - -#include <gnuradio/atsc/api.h> -#include <gr_fir_builder.h> - -class ATSC_API atsc_root_raised_cosine : public gr_fir_builder -{ -public: - virtual std::vector<float> taps (double sampling_freq); -}; - - -#endif /* _ATSC_RRC_H_ */ diff --git a/gr-atsc/include/gnuradio/atsc/vsbtx_lp_impl.h b/gr-atsc/include/gnuradio/atsc/vsbtx_lp_impl.h deleted file mode 100644 index ce6f8bfefb..0000000000 --- a/gr-atsc/include/gnuradio/atsc/vsbtx_lp_impl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio 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. - * - * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _ATSC_VSBTX_LP_H_ -#define _ATSC_VSBTX_LP_H_ - -#include <gnuradio/atsc/api.h> -#include <gr_fir_builder.h> - -class ATSC_API atsc_vsbtx_lp : public gr_fir_builder -{ -public: - virtual std::vector<float> taps (double sampling_freq); -}; - - - -#endif /* _ATSC_VSBTX_LP_H_ */ diff --git a/gr-atsc/lib/qa_atsci_fake_single_viterbi.cc b/gr-atsc/lib/qa_atsci_fake_single_viterbi.cc index 5edb5acbb7..8c761986c3 100644 --- a/gr-atsc/lib/qa_atsci_fake_single_viterbi.cc +++ b/gr-atsc/lib/qa_atsci_fake_single_viterbi.cc @@ -82,7 +82,7 @@ qa_atsci_fake_single_viterbi::t0 () // printf (" Delay is %d.\n", delay); - srandom (27); // reproducable sequence of "random" values + srandom (27); // reproducible sequence of "random" values for (int nt = 0; nt < NTRIALS; nt++){ @@ -143,4 +143,3 @@ qa_atsci_fake_single_viterbi::t0 () CPPUNIT_ASSERT (decoder_errors == 0); } - diff --git a/gr-atsc/lib/qa_atsci_single_viterbi.cc b/gr-atsc/lib/qa_atsci_single_viterbi.cc index cd5b0451b6..f813666c27 100644 --- a/gr-atsc/lib/qa_atsci_single_viterbi.cc +++ b/gr-atsc/lib/qa_atsci_single_viterbi.cc @@ -79,7 +79,7 @@ qa_atsci_single_viterbi::t0 () // printf (" Delay is %d.\n", delay); - srandom (27); // reproducable sequence of "random" values + srandom (27); // reproducible sequence of "random" values for (int nt = 0; nt < NTRIALS; nt++){ @@ -157,7 +157,7 @@ qa_atsci_single_viterbi::t1 () // printf (" Delay is %d.\n", delay); - srandom (1); // reproducable sequence of "random" values + srandom (1); // reproducible sequence of "random" values for (int nt = 0; nt < NTRIALS; nt++){ diff --git a/gr-audio/lib/osx/osx_source.cc b/gr-audio/lib/osx/osx_source.cc index e37fc07d96..bac94fbd72 100644 --- a/gr-audio/lib/osx/osx_source.cc +++ b/gr-audio/lib/osx/osx_source.cc @@ -436,7 +436,7 @@ namespace gr { kAudioUnitScope_Output, 1, &d_asbd_client, prop_size); check_error_and_throw - (err, "Set Device Ouput Stream Format failed", + (err, "Set Device Output Stream Format failed", "audio_osx_source::setup"); // Get the Stream Format (client side), again diff --git a/gr-blocks/include/gnuradio/blocks/endian_swap.h b/gr-blocks/include/gnuradio/blocks/endian_swap.h index f73eae3306..379ee734c7 100644 --- a/gr-blocks/include/gnuradio/blocks/endian_swap.h +++ b/gr-blocks/include/gnuradio/blocks/endian_swap.h @@ -30,7 +30,7 @@ namespace gr { namespace blocks { /*! - * \brief Convert stream of items into thier byte swapped version + * \brief Convert stream of items into their byte swapped version * \ingroup stream_operators_blk */ class BLOCKS_API endian_swap : virtual public sync_block diff --git a/gr-blocks/include/gnuradio/blocks/pack_k_bits.h b/gr-blocks/include/gnuradio/blocks/pack_k_bits.h index ed1971de2b..4197225ad4 100644 --- a/gr-blocks/include/gnuradio/blocks/pack_k_bits.h +++ b/gr-blocks/include/gnuradio/blocks/pack_k_bits.h @@ -32,7 +32,7 @@ namespace gr { /*! * \brief Converts a vector of bytes with 1 bit in the LSB to a - * byte with k relevent bits. + * byte with k relevant bits. * * Example: * k = 4 diff --git a/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h b/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h index af77aec18f..d71e73c580 100644 --- a/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h +++ b/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h @@ -31,7 +31,7 @@ namespace gr { /*! * \brief Converts a stream of bytes with 1 bit in the LSB to a - * byte with k relevent bits. + * byte with k relevant bits. * * This block takes in K bytes at a time, and uses the least significant * bit to form a new byte. diff --git a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t b/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t index 2885a9b8ff..a255e46f0b 100644 --- a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t +++ b/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t @@ -56,7 +56,7 @@ namespace gr { * \param threshold_factor_fall The threshold factor determins * when a peak has ended. An average of the signal is * calculated and when the value of the signal goes - * bellow threshold_factor_fall*average, we stop looking + * below threshold_factor_fall*average, we stop looking * for a peak. * \param look_ahead The look-ahead value is used when the * threshold is found to look if there another peak diff --git a/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h b/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h index 389579a2f8..8d46e57edd 100644 --- a/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h +++ b/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h @@ -31,7 +31,7 @@ namespace gr { namespace kernel { /*! - * \brief Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB. + * \brief Converts a byte with k relevant bits to k output bytes with 1 bit in the LSB. * * This is the algorithm kernel for the gr::blocks::unpack_k_bits_bb block. * diff --git a/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h b/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h index 73e3ca2ac4..2ed57e08bd 100644 --- a/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h +++ b/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h @@ -30,7 +30,7 @@ namespace gr { namespace blocks { /*! - * \brief Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB. + * \brief Converts a byte with k relevant bits to k output bytes with 1 bit in the LSB. * * This block picks the K least significant bits from a byte, and expands * them into K bytes of 0 or 1. diff --git a/gr-blocks/lib/tagged_file_sink_impl.cc b/gr-blocks/lib/tagged_file_sink_impl.cc index 830791181b..e81209ab6e 100644 --- a/gr-blocks/lib/tagged_file_sink_impl.cc +++ b/gr-blocks/lib/tagged_file_sink_impl.cc @@ -137,7 +137,7 @@ namespace gr { double tfrac = pmt::to_double(pmt::tuple_ref(time, 1)); // Get new time from last time tag + difference in time to when - // burst tag occured based on the sample rate + // burst tag occurred based on the sample rate double delta = (double)(N - time_nitems) / d_sample_rate; d_timeval = (double)tsecs + tfrac + delta; diff --git a/gr-blocks/python/blocks/qa_hier_block2.py b/gr-blocks/python/blocks/qa_hier_block2.py index 97206a248d..3e780806bc 100755 --- a/gr-blocks/python/blocks/qa_hier_block2.py +++ b/gr-blocks/python/blocks/qa_hier_block2.py @@ -2,6 +2,7 @@ from gnuradio import gr, gr_unittest, blocks import numpy +import threading import time class add_ff(gr.sync_block): @@ -427,7 +428,7 @@ class test_hier_block2(gr_unittest.TestCase): procs = hblock.processor_affinity() self.assertEquals((0,), procs) - def test_lock_unlock(self): + def test_34a_lock_unlock(self): hblock = gr.top_block("test_block") src = blocks.null_source(gr.sizeof_float) throttle = blocks.throttle(gr.sizeof_float, 32000) @@ -442,5 +443,28 @@ class test_hier_block2(gr_unittest.TestCase): hblock.stop() hblock.wait() + def test_34b_lock_unlock(self): + hblock = gr.top_block("test_block") + src = blocks.null_source(gr.sizeof_float) + throttle = blocks.throttle(gr.sizeof_float, 32000) + sink = blocks.null_sink(gr.sizeof_float) + hblock.connect(src, throttle, sink) + hblock.set_processor_affinity([0,]) + def thread_01(hblock, cls): + cls.test_34b_val = 10 + hblock.lock() + cls.test_34b_val = 20 + hblock.unlock() + cls.test_34b_val = 30 + time.sleep(0.5) + cls.test_34b_val = 40 + hblock.stop() + hblock.start() + self.test_34b_val = 0 + t1 = threading.Thread(target=thread_01, args=(hblock, self, )) + t1.start() + hblock.wait() + self.assertEqual(40, self.test_34b_val) + if __name__ == "__main__": gr_unittest.run(test_hier_block2, "test_hier_block2.xml") diff --git a/gr-channels/include/gnuradio/channels/channel_model.h b/gr-channels/include/gnuradio/channels/channel_model.h index fb2258e342..548cc0f894 100644 --- a/gr-channels/include/gnuradio/channels/channel_model.h +++ b/gr-channels/include/gnuradio/channels/channel_model.h @@ -42,7 +42,7 @@ namespace gr { * This model allows the user to set the voltage of an AWGN noise * source (\p noise_voltage), a (normalized) frequency offset (\p * frequency_offset), a sample timing offset (\p epsilon), and a - * seed (\p noise_seed) to randomize or make reproducable the AWGN + * seed (\p noise_seed) to randomize or make reproducible the AWGN * noise source. * * Multipath can be approximated in this model by using a FIR diff --git a/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h b/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h index 309c23a496..c041f5a39a 100644 --- a/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h +++ b/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h @@ -107,7 +107,7 @@ namespace gr { * \brief Set the number of samples per symbol * * Set's the number of samples per symbol the system should - * use. This value is uesd to calculate the filter taps and will + * use. This value is used to calculate the filter taps and will * force a recalculation. * * \param sps (float) new samples per symbol diff --git a/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h b/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h index 60fa01afa3..ce8d04d1cb 100644 --- a/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h +++ b/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h @@ -45,7 +45,7 @@ namespace gr { * e[n] = d[n] - y[n] * w[n+1] = w[n] + mu u[n] conj(e[n]) * - * Where mu is a gain value (between 0 and 1 and usualy small, + * Where mu is a gain value (between 0 and 1 and usually small, * around 0.001 - 0.01. * * This block uses the digital_constellation object for making the diff --git a/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h b/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h index 118435289c..9bbe5bdbff 100644 --- a/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h +++ b/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h @@ -196,7 +196,7 @@ namespace gr { * differential filterbank. * * WARNING: this should not be used externally and will be moved - * to a private funtion in the next API. + * to a private function in the next API. */ virtual void set_taps(const std::vector<float> &taps, std::vector< std::vector<float> > &ourtaps, diff --git a/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h b/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h index b774ee49aa..67c3d2d17e 100644 --- a/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h +++ b/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h @@ -196,7 +196,7 @@ namespace gr { * differential filterbank. * * WARNING: this should not be used externally and will be moved - * to a private funtion in the next API. + * to a private function in the next API. */ virtual void set_taps(const std::vector<float> &taps, std::vector< std::vector<float> > &ourtaps, diff --git a/gr-dtv/examples/dvbs2_tx.grc b/gr-dtv/examples/dvbs2_tx.grc index c6de308ae3..99c797d066 100644 --- a/gr-dtv/examples/dvbs2_tx.grc +++ b/gr-dtv/examples/dvbs2_tx.grc @@ -244,7 +244,7 @@ </param> <param> <key>_coordinate</key> - <value>(784, 547)</value> + <value>(776, 548)</value> </param> <param> <key>_rotation</key> @@ -291,7 +291,7 @@ </param> <param> <key>_coordinate</key> - <value>(176, 43)</value> + <value>(176, 36)</value> </param> <param> <key>_rotation</key> @@ -326,7 +326,7 @@ <key>dtv_dvb_bbheader_bb</key> <param> <key>mode</key> - <value>FECFRAME_NORMAL</value> + <value>INPUTMODE_NORMAL</value> </param> <param> <key>alias</key> @@ -346,6 +346,10 @@ </param> <param> <key>rate4</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate5</key> <value>C1_4</value> </param> <param> @@ -365,12 +369,16 @@ <value>168</value> </param> <param> - <key>framesize</key> + <key>framesize1</key> + <value>FECFRAME_NORMAL</value> + </param> + <param> + <key>framesize2</key> <value>FECFRAME_NORMAL</value> </param> <param> <key>_coordinate</key> - <value>(400, 27)</value> + <value>(408, 24)</value> </param> <param> <key>_rotation</key> @@ -425,6 +433,10 @@ </param> <param> <key>rate4</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate5</key> <value>C1_4</value> </param> <param> @@ -440,12 +452,16 @@ <value>True</value> </param> <param> - <key>framesize</key> + <key>framesize1</key> + <value>FECFRAME_NORMAL</value> + </param> + <param> + <key>framesize2</key> <value>FECFRAME_NORMAL</value> </param> <param> <key>_coordinate</key> - <value>(608, 35)</value> + <value>(624, 28)</value> </param> <param> <key>_rotation</key> @@ -488,6 +504,10 @@ </param> <param> <key>rate4</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate5</key> <value>C1_4</value> </param> <param> @@ -503,12 +523,16 @@ <value>True</value> </param> <param> - <key>framesize</key> + <key>framesize1</key> + <value>FECFRAME_NORMAL</value> + </param> + <param> + <key>framesize2</key> <value>FECFRAME_NORMAL</value> </param> <param> <key>_coordinate</key> - <value>(824, 35)</value> + <value>(848, 28)</value> </param> <param> <key>_rotation</key> @@ -551,6 +575,10 @@ </param> <param> <key>rate4</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate5</key> <value>C1_4</value> </param> <param> @@ -570,12 +598,16 @@ <value>True</value> </param> <param> - <key>framesize</key> + <key>framesize1</key> + <value>FECFRAME_NORMAL</value> + </param> + <param> + <key>framesize2</key> <value>FECFRAME_NORMAL</value> </param> <param> <key>_coordinate</key> - <value>(1048, 27)</value> + <value>(1064, 24)</value> </param> <param> <key>_rotation</key> @@ -605,8 +637,16 @@ <value></value> </param> <param> - <key>rate</key> - <value>C_OTHER</value> + <key>rate1</key> + <value>C9_10</value> + </param> + <param> + <key>rate2</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate3</key> + <value>C1_4</value> </param> <param> <key>comment</key> @@ -630,7 +670,7 @@ </param> <param> <key>_coordinate</key> - <value>(192, 235)</value> + <value>(184, 220)</value> </param> <param> <key>_rotation</key> @@ -660,10 +700,18 @@ <value></value> </param> <param> - <key>rate</key> + <key>rate1</key> <value>C9_10</value> </param> <param> + <key>rate2</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate3</key> + <value>C1_4</value> + </param> + <param> <key>comment</key> <value></value> </param> @@ -685,7 +733,7 @@ </param> <param> <key>_coordinate</key> - <value>(472, 227)</value> + <value>(448, 216)</value> </param> <param> <key>_rotation</key> @@ -711,10 +759,18 @@ <value></value> </param> <param> - <key>rate</key> + <key>rate1</key> <value>C9_10</value> </param> <param> + <key>rate2</key> + <value>C1_5_MEDIUM</value> + </param> + <param> + <key>rate3</key> + <value>C1_4</value> + </param> + <param> <key>comment</key> <value></value> </param> @@ -736,7 +792,7 @@ </param> <param> <key>_coordinate</key> - <value>(192, 443)</value> + <value>(184, 432)</value> </param> <param> <key>_rotation</key> @@ -787,7 +843,7 @@ </param> <param> <key>_coordinate</key> - <value>(472, 459)</value> + <value>(464, 444)</value> </param> <param> <key>_rotation</key> @@ -1742,7 +1798,7 @@ </param> <param> <key>_coordinate</key> - <value>(1040, 243)</value> + <value>(1040, 228)</value> </param> <param> <key>_rotation</key> @@ -2509,7 +2565,7 @@ </param> <param> <key>_coordinate</key> - <value>(1040, 427)</value> + <value>(1048, 416)</value> </param> <param> <key>_rotation</key> @@ -2636,6 +2692,10 @@ <value>False</value> </param> <param> + <key>hide_lo_controls</key> + <value>True</value> + </param> + <param> <key>stream_args</key> <value></value> </param> @@ -2696,7 +2756,7 @@ </param> <param> <key>_coordinate</key> - <value>(784, 203)</value> + <value>(776, 196)</value> </param> <param> <key>_rotation</key> @@ -2720,7 +2780,7 @@ </param> <param> <key>ref_level</key> - <value>0</value> + <value>-20</value> </param> <param> <key>ref_scale</key> @@ -2744,7 +2804,7 @@ </param> <param> <key>win_size</key> - <value></value> + <value>800,600</value> </param> <param> <key>win</key> diff --git a/gr-dtv/grc/dtv_dvb_bbheader_bb.xml b/gr-dtv/grc/dtv_dvb_bbheader_bb.xml index 49b85953a3..b18b87b604 100644 --- a/gr-dtv/grc/dtv_dvb_bbheader_bb.xml +++ b/gr-dtv/grc/dtv_dvb_bbheader_bb.xml @@ -8,18 +8,25 @@ <name>BBheader</name> <key>dtv_dvb_bbheader_bb</key> <import>from gnuradio import dtv</import> - <make>dtv.dvb_bbheader_bb($standard.val, $framesize.val, #slurp + <make>dtv.dvb_bbheader_bb($standard.val, #slurp #if str($standard) == 'STANDARD_DVBT2' -#if str($framesize) == 'FECFRAME_NORMAL' +$framesize1.val, #slurp +#else +$framesize2.val, #slurp +#end if +#if str($standard) == 'STANDARD_DVBT2' +#if str($framesize1) == 'FECFRAME_NORMAL' $rate1.val, #slurp #else $rate2.val, #slurp #end if #else -#if str($framesize) == 'FECFRAME_NORMAL' +#if str($framesize2) == 'FECFRAME_NORMAL' $rate3.val, #slurp -#else +#else if str($framesize2) == 'FECFRAME_MEDIUM' $rate4.val, #slurp +#else +$rate5.val, #slurp #end if #end if $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> @@ -44,13 +51,15 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> </param> <param> <name>FECFRAME size</name> - <key>framesize</key> + <key>framesize1</key> <type>enum</type> + <hide>$standard.hide_dvbt2</hide> <option> <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> <opt>hide_short:all</opt> </option> <option> @@ -58,6 +67,37 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> + </option> + </param> + <param> + <name>FECFRAME size</name> + <key>framesize2</key> + <type>enum</type> + <hide>$standard.hide_dvbs2</hide> + <option> + <name>Normal</name> + <key>FECFRAME_NORMAL</key> + <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Short</name> + <key>FECFRAME_SHORT</key> + <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> <opt>hide_short:</opt> </option> </param> @@ -65,7 +105,7 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <name>Code rate</name> <key>rate1</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all'</hide> <option> <name>1/2</name> <key>C1_2</key> @@ -101,7 +141,7 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <name>Code rate</name> <key>rate2</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all'</hide> <option> <name>1/3</name> <key>C1_3</key> @@ -147,7 +187,7 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <name>Code rate</name> <key>rate3</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -204,6 +244,11 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> <name>13/45</name> <key>C13_45</key> <opt>val:dtv.C13_45</opt> @@ -323,7 +368,28 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <name>Code rate</name> <key>rate4</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all'</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate5</key> + <type>enum</type> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -409,6 +475,31 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <param> <name>Rolloff factor</name> @@ -453,12 +544,12 @@ $rolloff.val, $mode.val, $inband.val, $fecblocks, $tsrate)</make> <hide>$standard.hide_dvbt2</hide> <option> <name>Normal</name> - <key>FECFRAME_NORMAL</key> + <key>INPUTMODE_NORMAL</key> <opt>val:dtv.INPUTMODE_NORMAL</opt> </option> <option> <name>High Efficiency</name> - <key>FECFRAME_SHORT</key> + <key>INPUTMODE_HIEFF</key> <opt>val:dtv.INPUTMODE_HIEFF</opt> </option> </param> diff --git a/gr-dtv/grc/dtv_dvb_bbscrambler_bb.xml b/gr-dtv/grc/dtv_dvb_bbscrambler_bb.xml index f14d8dd4ea..1dbf39611e 100644 --- a/gr-dtv/grc/dtv_dvb_bbscrambler_bb.xml +++ b/gr-dtv/grc/dtv_dvb_bbscrambler_bb.xml @@ -8,18 +8,25 @@ <name>BBscrambler</name> <key>dtv_dvb_bbscrambler_bb</key> <import>from gnuradio import dtv</import> - <make>dtv.dvb_bbscrambler_bb($standard.val, $framesize.val, #slurp + <make>dtv.dvb_bbscrambler_bb($standard.val, #slurp #if str($standard) == 'STANDARD_DVBT2' -#if str($framesize) == 'FECFRAME_NORMAL' +$framesize1.val, #slurp +#else +$framesize2.val, #slurp +#end if +#if str($standard) == 'STANDARD_DVBT2' +#if str($framesize1) == 'FECFRAME_NORMAL' $rate1.val, #slurp #else $rate2.val, #slurp #end if #else -#if str($framesize) == 'FECFRAME_NORMAL' +#if str($framesize2) == 'FECFRAME_NORMAL' $rate3.val, #slurp -#else +#else if str($framesize2) == 'FECFRAME_MEDIUM' $rate4.val, #slurp +#else +$rate5.val, #slurp #end if #end if )</make> @@ -44,13 +51,15 @@ $rate4.val, #slurp </param> <param> <name>FECFRAME size</name> - <key>framesize</key> + <key>framesize1</key> <type>enum</type> + <hide>$standard.hide_dvbt2</hide> <option> <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> <opt>hide_short:all</opt> </option> <option> @@ -58,6 +67,37 @@ $rate4.val, #slurp <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> + </option> + </param> + <param> + <name>FECFRAME size</name> + <key>framesize2</key> + <type>enum</type> + <hide>$standard.hide_dvbs2</hide> + <option> + <name>Normal</name> + <key>FECFRAME_NORMAL</key> + <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Short</name> + <key>FECFRAME_SHORT</key> + <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> <opt>hide_short:</opt> </option> </param> @@ -65,7 +105,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate1</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all'</hide> <option> <name>1/2</name> <key>C1_2</key> @@ -101,7 +141,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate2</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all'</hide> <option> <name>1/3</name> <key>C1_3</key> @@ -147,7 +187,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate3</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -204,6 +244,11 @@ $rate4.val, #slurp <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> <name>13/45</name> <key>C13_45</key> <opt>val:dtv.C13_45</opt> @@ -323,7 +368,28 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate4</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all'</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate5</key> + <type>enum</type> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -409,6 +475,31 @@ $rate4.val, #slurp <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <sink> <name>in</name> diff --git a/gr-dtv/grc/dtv_dvb_bch_bb.xml b/gr-dtv/grc/dtv_dvb_bch_bb.xml index dd63b0581f..12ac8c6cbb 100644 --- a/gr-dtv/grc/dtv_dvb_bch_bb.xml +++ b/gr-dtv/grc/dtv_dvb_bch_bb.xml @@ -8,18 +8,25 @@ <name>BCH Encoder</name> <key>dtv_dvb_bch_bb</key> <import>from gnuradio import dtv</import> - <make>dtv.dvb_bch_bb($standard.val, $framesize.val, #slurp + <make>dtv.dvb_bch_bb($standard.val, #slurp #if str($standard) == 'STANDARD_DVBT2' -#if str($framesize) == 'FECFRAME_NORMAL' +$framesize1.val, #slurp +#else +$framesize2.val, #slurp +#end if +#if str($standard) == 'STANDARD_DVBT2' +#if str($framesize1) == 'FECFRAME_NORMAL' $rate1.val, #slurp #else $rate2.val, #slurp #end if #else -#if str($framesize) == 'FECFRAME_NORMAL' +#if str($framesize2) == 'FECFRAME_NORMAL' $rate3.val, #slurp -#else +#else if str($framesize2) == 'FECFRAME_MEDIUM' $rate4.val, #slurp +#else +$rate5.val, #slurp #end if #end if )</make> @@ -44,13 +51,15 @@ $rate4.val, #slurp </param> <param> <name>FECFRAME size</name> - <key>framesize</key> + <key>framesize1</key> <type>enum</type> + <hide>$standard.hide_dvbt2</hide> <option> <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> <opt>hide_short:all</opt> </option> <option> @@ -58,6 +67,37 @@ $rate4.val, #slurp <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> + </option> + </param> + <param> + <name>FECFRAME size</name> + <key>framesize2</key> + <type>enum</type> + <hide>$standard.hide_dvbs2</hide> + <option> + <name>Normal</name> + <key>FECFRAME_NORMAL</key> + <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Short</name> + <key>FECFRAME_SHORT</key> + <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> <opt>hide_short:</opt> </option> </param> @@ -65,7 +105,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate1</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all'</hide> <option> <name>1/2</name> <key>C1_2</key> @@ -101,7 +141,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate2</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all'</hide> <option> <name>1/3</name> <key>C1_3</key> @@ -147,7 +187,7 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate3</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -204,6 +244,11 @@ $rate4.val, #slurp <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> <name>13/45</name> <key>C13_45</key> <opt>val:dtv.C13_45</opt> @@ -323,7 +368,28 @@ $rate4.val, #slurp <name>Code rate</name> <key>rate4</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all'</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate5</key> + <type>enum</type> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -409,6 +475,31 @@ $rate4.val, #slurp <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <sink> <name>in</name> diff --git a/gr-dtv/grc/dtv_dvb_ldpc_bb.xml b/gr-dtv/grc/dtv_dvb_ldpc_bb.xml index 45187d53f3..f1cff16091 100644 --- a/gr-dtv/grc/dtv_dvb_ldpc_bb.xml +++ b/gr-dtv/grc/dtv_dvb_ldpc_bb.xml @@ -8,18 +8,25 @@ <name>LDPC Encoder</name> <key>dtv_dvb_ldpc_bb</key> <import>from gnuradio import dtv</import> - <make>dtv.dvb_ldpc_bb($standard.val, $framesize.val, #slurp + <make>dtv.dvb_ldpc_bb($standard.val, #slurp #if str($standard) == 'STANDARD_DVBT2' -#if str($framesize) == 'FECFRAME_NORMAL' +$framesize1.val, #slurp +#else +$framesize2.val, #slurp +#end if +#if str($standard) == 'STANDARD_DVBT2' +#if str($framesize1) == 'FECFRAME_NORMAL' $rate1.val, #slurp #else $rate2.val, #slurp #end if #else -#if str($framesize) == 'FECFRAME_NORMAL' +#if str($framesize2) == 'FECFRAME_NORMAL' $rate3.val, #slurp -#else +#else if str($framesize2) == 'FECFRAME_MEDIUM' $rate4.val, #slurp +#else +$rate5.val, #slurp #end if #end if $constellation.val)</make> @@ -44,13 +51,45 @@ $constellation.val)</make> </param> <param> <name>FECFRAME size</name> - <key>framesize</key> + <key>framesize1</key> + <type>enum</type> + <hide>$standard.hide_dvbt2</hide> + <option> + <name>Normal</name> + <key>FECFRAME_NORMAL</key> + <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Short</name> + <key>FECFRAME_SHORT</key> + <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> + </option> + </param> + <param> + <name>FECFRAME size</name> + <key>framesize2</key> <type>enum</type> + <hide>$standard.hide_dvbs2</hide> <option> <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> <opt>hide_short:all</opt> </option> <option> @@ -58,6 +97,7 @@ $constellation.val)</make> <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> <opt>hide_short:</opt> </option> </param> @@ -65,7 +105,7 @@ $constellation.val)</make> <name>Code rate</name> <key>rate1</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_normal else 'all'</hide> <option> <name>1/2</name> <key>C1_2</key> @@ -101,7 +141,7 @@ $constellation.val)</make> <name>Code rate</name> <key>rate2</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBT2' then $framesize1.hide_short else 'all'</hide> <option> <name>1/3</name> <key>C1_3</key> @@ -147,7 +187,7 @@ $constellation.val)</make> <name>Code rate</name> <key>rate3</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_normal else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_normal else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -204,6 +244,11 @@ $constellation.val)</make> <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> <name>13/45</name> <key>C13_45</key> <opt>val:dtv.C13_45</opt> @@ -323,7 +368,28 @@ $constellation.val)</make> <name>Code rate</name> <key>rate4</key> <type>enum</type> - <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize.hide_short else 'all'</hide> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_medium else 'all'</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate5</key> + <type>enum</type> + <hide>#if str($standard) == 'STANDARD_DVBS2' then $framesize2.hide_short else 'all'</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -409,6 +475,31 @@ $constellation.val)</make> <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <param> <name>Constellation</name> diff --git a/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml b/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml index 9a6d2ef378..675f70d26a 100644 --- a/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml +++ b/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml @@ -8,7 +8,15 @@ <name>Interleaver</name> <key>dtv_dvbs2_interleaver_bb</key> <import>from gnuradio import dtv</import> - <make>dtv.dvbs2_interleaver_bb($framesize.val, $rate.val, $constellation.val)</make> + <make>dtv.dvbs2_interleaver_bb($framesize.val, #slurp +#if str($framesize) == 'FECFRAME_NORMAL' +$rate1.val, #slurp +#else if str($framesize) == 'FECFRAME_MEDIUM' +$rate2.val, #slurp +#else +$rate3.val, #slurp +#end if +$constellation.val)</make> <param> <name>FECFRAME size</name> <key>framesize</key> @@ -17,21 +25,51 @@ <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> </option> <option> <name>Short</name> <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> </option> </param> <param> <name>Code rate</name> - <key>rate</key> + <key>rate1</key> <type>enum</type> + <hide>$framesize.hide_normal</hide> + <option> + <name>1/4</name> + <key>C1_4</key> + <opt>val:dtv.C1_4</opt> + </option> + <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>Other</name> - <key>C_OTHER</key> - <opt>val:dtv.C_OTHER</opt> + <name>1/2</name> + <key>C1_2</key> + <opt>val:dtv.C1_2</opt> </option> <option> <name>3/5</name> @@ -44,6 +82,11 @@ <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> @@ -54,6 +97,31 @@ <opt>val:dtv.C5_6</opt> </option> <option> + <name>8/9</name> + <key>C8_9</key> + <opt>val:dtv.C8_9</opt> + </option> + <option> + <name>9/10</name> + <key>C9_10</key> + <opt>val:dtv.C9_10</opt> + </option> + <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> + <name>13/45</name> + <key>C13_45</key> + <opt>val:dtv.C13_45</opt> + </option> + <option> + <name>9/20</name> + <key>C9_20</key> + <opt>val:dtv.C9_20</opt> + </option> + <option> <name>90/180</name> <key>C90_180</key> <opt>val:dtv.C90_180</opt> @@ -64,16 +132,31 @@ <opt>val:dtv.C96_180</opt> </option> <option> + <name>11/20</name> + <key>C11_20</key> + <opt>val:dtv.C11_20</opt> + </option> + <option> <name>100/180</name> <key>C100_180</key> <opt>val:dtv.C100_180</opt> </option> <option> + <name>104/180</name> + <key>C104_180</key> + <opt>val:dtv.C104_180</opt> + </option> + <option> <name>26/45</name> <key>C26_45</key> <opt>val:dtv.C26_45</opt> </option> <option> + <name>18/30</name> + <key>C18_30</key> + <opt>val:dtv.C18_30</opt> + </option> + <option> <name>28/45</name> <key>C28_45</key> <opt>val:dtv.C28_45</opt> @@ -89,6 +172,11 @@ <opt>val:dtv.C116_180</opt> </option> <option> + <name>20/30</name> + <key>C20_30</key> + <opt>val:dtv.C20_30</opt> + </option> + <option> <name>124/180</name> <key>C124_180</key> <opt>val:dtv.C124_180</opt> @@ -109,6 +197,16 @@ <opt>val:dtv.C13_18</opt> </option> <option> + <name>132/180</name> + <key>C132_180</key> + <opt>val:dtv.C132_180</opt> + </option> + <option> + <name>22/30</name> + <key>C22_30</key> + <opt>val:dtv.C22_30</opt> + </option> + <option> <name>135/180</name> <key>C135_180</key> <opt>val:dtv.C135_180</opt> @@ -124,6 +222,103 @@ <opt>val:dtv.C7_9</opt> </option> <option> + <name>154/180</name> + <key>C154_180</key> + <opt>val:dtv.C154_180</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate2</key> + <type>enum</type> + <hide>$framesize.hide_medium</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate3</key> + <type>enum</type> + <hide>$framesize.hide_short</hide> + <option> + <name>1/4</name> + <key>C1_4</key> + <opt>val:dtv.C1_4</opt> + </option> + <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> + <option> + <name>8/9</name> + <key>C8_9</key> + <opt>val:dtv.C8_9</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45</key> + <opt>val:dtv.C11_45</opt> + </option> + <option> + <name>4/15</name> + <key>C4_15</key> + <opt>val:dtv.C4_15</opt> + </option> + <option> + <name>14/45</name> + <key>C14_45</key> + <opt>val:dtv.C14_45</opt> + </option> + <option> <name>7/15</name> <key>C7_15</key> <opt>val:dtv.C7_15</opt> @@ -134,10 +329,40 @@ <opt>val:dtv.C8_15</opt> </option> <option> + <name>26/45</name> + <key>C26_45</key> + <opt>val:dtv.C26_45</opt> + </option> + <option> <name>32/45</name> <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <param> <name>Constellation</name> @@ -208,6 +433,16 @@ <key>MOD_256APSK</key> <opt>val:dtv.MOD_256APSK</opt> </option> + <option> + <name>PI/2 BPSK</name> + <key>MOD_BPSK</key> + <opt>val:dtv.MOD_BPSK</opt> + </option> + <option> + <name>PI/2 BPSK-SF2</name> + <key>MOD_BPSK_SF2</key> + <opt>val:dtv.MOD_BPSK_SF2</opt> + </option> </param> <sink> <name>in</name> diff --git a/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml b/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml index 8de645d585..5f848ec82d 100644 --- a/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml +++ b/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml @@ -8,7 +8,15 @@ <name>DVB-S2X Modulator</name> <key>dtv_dvbs2_modulator_bc</key> <import>from gnuradio import dtv</import> - <make>dtv.dvbs2_modulator_bc($framesize.val, $rate.val, $constellation.val, $interpolation.val)</make> + <make>dtv.dvbs2_modulator_bc($framesize.val, +#if str($framesize) == 'FECFRAME_NORMAL' +$rate1.val, #slurp +#else if str($framesize) == 'FECFRAME_MEDIUM' +$rate2.val, #slurp +#else +$rate3.val, #slurp +#end if +$constellation.val, $interpolation.val)</make> <param> <name>FECFRAME size</name> <key>framesize</key> @@ -17,21 +25,51 @@ <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> </option> <option> <name>Short</name> <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> </option> </param> <param> <name>Code rate</name> - <key>rate</key> + <key>rate1</key> <type>enum</type> + <hide>$framesize.hide_normal</hide> + <option> + <name>1/4</name> + <key>C1_4</key> + <opt>val:dtv.C1_4</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3</key> + <opt>val:dtv.C1_3</opt> + </option> <option> - <name>Other</name> - <key>C_OTHER</key> - <opt>val:dtv.C_OTHER</opt> + <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> @@ -69,6 +107,21 @@ <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> + <name>13/45</name> + <key>C13_45</key> + <opt>val:dtv.C13_45</opt> + </option> + <option> + <name>9/20</name> + <key>C9_20</key> + <opt>val:dtv.C9_20</opt> + </option> + <option> <name>90/180</name> <key>C90_180</key> <opt>val:dtv.C90_180</opt> @@ -79,6 +132,11 @@ <opt>val:dtv.C96_180</opt> </option> <option> + <name>11/20</name> + <key>C11_20</key> + <opt>val:dtv.C11_20</opt> + </option> + <option> <name>100/180</name> <key>C100_180</key> <opt>val:dtv.C100_180</opt> @@ -168,6 +226,98 @@ <key>C154_180</key> <opt>val:dtv.C154_180</opt> </option> + </param> + <param> + <name>Code rate</name> + <key>rate2</key> + <type>enum</type> + <hide>$framesize.hide_medium</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate3</key> + <type>enum</type> + <hide>$framesize.hide_short</hide> + <option> + <name>1/4</name> + <key>C1_4</key> + <opt>val:dtv.C1_4</opt> + </option> + <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> + <option> + <name>8/9</name> + <key>C8_9</key> + <opt>val:dtv.C8_9</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45</key> + <opt>val:dtv.C11_45</opt> + </option> + <option> + <name>4/15</name> + <key>C4_15</key> + <opt>val:dtv.C4_15</opt> + </option> + <option> + <name>14/45</name> + <key>C14_45</key> + <opt>val:dtv.C14_45</opt> + </option> <option> <name>7/15</name> <key>C7_15</key> @@ -179,10 +329,40 @@ <opt>val:dtv.C8_15</opt> </option> <option> + <name>26/45</name> + <key>C26_45</key> + <opt>val:dtv.C26_45</opt> + </option> + <option> <name>32/45</name> <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <param> <name>Constellation</name> @@ -234,7 +414,7 @@ <opt>val:dtv.MOD_64APSK</opt> </option> <option> - <name>8+6+20+20APSK</name> + <name>8+16+20+20APSK</name> <key>MOD_8_16_20_20APSK</key> <opt>val:dtv.MOD_8_16_20_20APSK</opt> </option> @@ -254,10 +434,20 @@ <opt>val:dtv.MOD_256APSK</opt> </option> <option> - <name>64QAM</name> + <name>64QAM (ITU-T J.83B)</name> <key>MOD_64QAM</key> <opt>val:dtv.MOD_64QAM</opt> </option> + <option> + <name>PI/2 BPSK</name> + <key>MOD_BPSK</key> + <opt>val:dtv.MOD_BPSK</opt> + </option> + <option> + <name>PI/2 BPSK-SF2</name> + <key>MOD_BPSK_SF2</key> + <opt>val:dtv.MOD_BPSK_SF2</opt> + </option> </param> <param> <name>2X Interpolation</name> diff --git a/gr-dtv/grc/dtv_dvbs2_physical_cc.xml b/gr-dtv/grc/dtv_dvbs2_physical_cc.xml index ad9eb9ae01..91d03ae9ab 100644 --- a/gr-dtv/grc/dtv_dvbs2_physical_cc.xml +++ b/gr-dtv/grc/dtv_dvbs2_physical_cc.xml @@ -8,7 +8,15 @@ <name>Physical Layer Framer</name> <key>dtv_dvbs2_physical_cc</key> <import>from gnuradio import dtv</import> - <make>dtv.dvbs2_physical_cc($framesize.val, $rate.val, $constellation.val, $pilots.val, $goldcode)</make> + <make>dtv.dvbs2_physical_cc($framesize.val, #slurp +#if str($framesize) == 'FECFRAME_NORMAL' +$rate1.val, #slurp +#else if str($framesize) == 'FECFRAME_MEDIUM' +$rate2.val, #slurp +#else +$rate3.val, #slurp +#end if +$constellation.val, $pilots.val, $goldcode)</make> <param> <name>FECFRAME size</name> <key>framesize</key> @@ -17,17 +25,32 @@ <name>Normal</name> <key>FECFRAME_NORMAL</key> <opt>val:dtv.FECFRAME_NORMAL</opt> + <opt>hide_normal:</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:all</opt> + </option> + <option> + <name>Medium</name> + <key>FECFRAME_MEDIUM</key> + <opt>val:dtv.FECFRAME_MEDIUM</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:</opt> + <opt>hide_short:all</opt> </option> <option> <name>Short</name> <key>FECFRAME_SHORT</key> <opt>val:dtv.FECFRAME_SHORT</opt> + <opt>hide_normal:all</opt> + <opt>hide_medium:all</opt> + <opt>hide_short:</opt> </option> </param> <param> <name>Code rate</name> - <key>rate</key> + <key>rate1</key> <type>enum</type> + <hide>$framesize.hide_normal</hide> <option> <name>1/4</name> <key>C1_4</key> @@ -84,6 +107,11 @@ <opt>val:dtv.C9_10</opt> </option> <option> + <name>2/9 VL-SNR</name> + <key>C2_9_VLSNR</key> + <opt>val:dtv.C2_9_VLSNR</opt> + </option> + <option> <name>13/45</name> <key>C13_45</key> <opt>val:dtv.C13_45</opt> @@ -198,6 +226,83 @@ <key>C154_180</key> <opt>val:dtv.C154_180</opt> </option> + </param> + <param> + <name>Code rate</name> + <key>rate2</key> + <type>enum</type> + <hide>$framesize.hide_medium</hide> + <option> + <name>1/5</name> + <key>C1_5_MEDIUM</key> + <opt>val:dtv.C1_5_MEDIUM</opt> + </option> + <option> + <name>11/45</name> + <key>C11_45_MEDIUM</key> + <opt>val:dtv.C11_45_MEDIUM</opt> + </option> + <option> + <name>1/3</name> + <key>C1_3_MEDIUM</key> + <opt>val:dtv.C1_3_MEDIUM</opt> + </option> + </param> + <param> + <name>Code rate</name> + <key>rate3</key> + <type>enum</type> + <hide>$framesize.hide_short</hide> + <option> + <name>1/4</name> + <key>C1_4</key> + <opt>val:dtv.C1_4</opt> + </option> + <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> + <option> + <name>8/9</name> + <key>C8_9</key> + <opt>val:dtv.C8_9</opt> + </option> <option> <name>11/45</name> <key>C11_45</key> @@ -224,10 +329,40 @@ <opt>val:dtv.C8_15</opt> </option> <option> + <name>26/45</name> + <key>C26_45</key> + <opt>val:dtv.C26_45</opt> + </option> + <option> <name>32/45</name> <key>C32_45</key> <opt>val:dtv.C32_45</opt> </option> + <option> + <name>1/5 VL-SNR SF2</name> + <key>C1_5_VLSNR_SF2</key> + <opt>val:dtv.C1_5_VLSNR_SF2</opt> + </option> + <option> + <name>11/45 VL-SNR SF2</name> + <key>C11_45_VLSNR_SF2</key> + <opt>val:dtv.C11_45_VLSNR_SF2</opt> + </option> + <option> + <name>1/5 VL-SNR</name> + <key>C1_5_VLSNR</key> + <opt>val:dtv.C1_5_VLSNR</opt> + </option> + <option> + <name>4/15 VL-SNR</name> + <key>C4_15_VLSNR</key> + <opt>val:dtv.C4_15_VLSNR</opt> + </option> + <option> + <name>1/3 VL-SNR</name> + <key>C1_3_VLSNR</key> + <opt>val:dtv.C1_3_VLSNR</opt> + </option> </param> <param> <name>Constellation</name> @@ -279,7 +414,7 @@ <opt>val:dtv.MOD_64APSK</opt> </option> <option> - <name>8+6+20+20APSK</name> + <name>8+16+20+20APSK</name> <key>MOD_8_16_20_20APSK</key> <opt>val:dtv.MOD_8_16_20_20APSK</opt> </option> @@ -298,6 +433,16 @@ <key>MOD_256APSK</key> <opt>val:dtv.MOD_256APSK</opt> </option> + <option> + <name>PI/2 BPSK</name> + <key>MOD_BPSK</key> + <opt>val:dtv.MOD_BPSK</opt> + </option> + <option> + <name>PI/2 BPSK-SF2</name> + <key>MOD_BPSK_SF2</key> + <opt>val:dtv.MOD_BPSK_SF2</opt> + </option> </param> <param> <name>Pilots</name> diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h b/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h index 48b6b4c5e0..0fb6c94f7a 100644 --- a/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h +++ b/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -49,7 +49,7 @@ namespace gr { * \brief Create a baseband header formatter. * * \param standard DVB standard (DVB-S2 or DVB-T2). - * \param framesize FEC frame size (normal or short). + * \param framesize FEC frame size (normal, medium or short). * \param rate FEC code rate. * \param rolloff DVB-S2 root-raised-cosine filter roll-off. * \param mode DVB-T2 input processing mode. diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h b/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h index dc14f55186..f8ee7bdb30 100644 --- a/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h +++ b/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -45,7 +45,7 @@ namespace gr { * \brief Create a baseband frame scrambler. * * \param standard DVB standard (DVB-S2 or DVB-T2). - * \param framesize FEC frame size (normal or short). + * \param framesize FEC frame size (normal, medium or short). * \param rate FEC code rate. */ static sptr make(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate); diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h b/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h index 31dff47268..59dd162545 100644 --- a/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h +++ b/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -46,7 +46,7 @@ namespace gr { * \brief Create a baseband frame BCH encoder. * * \param standard DVB standard (DVB-S2 or DVB-T2). - * \param framesize FEC frame size (normal or short). + * \param framesize FEC frame size (normal, medium or short). * \param rate FEC code rate. */ static sptr make(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate); diff --git a/gr-dtv/include/gnuradio/dtv/dvb_config.h b/gr-dtv/include/gnuradio/dtv/dvb_config.h index 9405f966b0..601fd5c569 100644 --- a/gr-dtv/include/gnuradio/dtv/dvb_config.h +++ b/gr-dtv/include/gnuradio/dtv/dvb_config.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -70,12 +70,22 @@ namespace gr { C7_15, C8_15, C32_45, + C2_9_VLSNR, + C1_5_MEDIUM, + C11_45_MEDIUM, + C1_3_MEDIUM, + C1_5_VLSNR_SF2, + C11_45_VLSNR_SF2, + C1_5_VLSNR, + C4_15_VLSNR, + C1_3_VLSNR, C_OTHER, }; enum dvb_framesize_t { FECFRAME_SHORT = 0, FECFRAME_NORMAL, + FECFRAME_MEDIUM, }; enum dvb_constellation_t { @@ -95,6 +105,8 @@ namespace gr { MOD_4_12_20_28APSK, MOD_128APSK, MOD_256APSK, + MOD_BPSK, + MOD_BPSK_SF2, MOD_OTHER, }; diff --git a/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h b/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h index 76923a80b1..2ed17f3ed3 100644 --- a/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h +++ b/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -33,7 +33,7 @@ namespace gr { * \ingroup dtv * * Input: Variable length FEC baseband frames with appended BCH (BCHFEC). - * Output: Normal or short FEC baseband frames with appended LPDC (LDPCFEC). + * Output: Normal, medium or short FEC baseband frames with appended LPDC (LDPCFEC). */ class DTV_API dvb_ldpc_bb : virtual public gr::block { @@ -44,7 +44,7 @@ namespace gr { * \brief Create a baseband frame LDPC encoder. * * \param standard DVB standard (DVB-S2 or DVB-T2). - * \param framesize FEC frame size (normal or short). + * \param framesize FEC frame size (normal, medium or short). * \param rate FEC code rate. * \param constellation DVB-S2 constellation. */ diff --git a/gr-dtv/include/gnuradio/dtv/dvbt_inner_coder.h b/gr-dtv/include/gnuradio/dtv/dvbt_inner_coder.h index e88596e09b..bd693c3fb6 100644 --- a/gr-dtv/include/gnuradio/dtv/dvbt_inner_coder.h +++ b/gr-dtv/include/gnuradio/dtv/dvbt_inner_coder.h @@ -54,7 +54,7 @@ namespace gr { * \brief Create an Inner coder with Puncturing. * * \param ninput length of input. \n - * \param noutput lenght of output. \n + * \param noutput length of output. \n * \param constellation type of constellation. \n * \param hierarchy type of hierarchy used. \n * \param coderate coderate used. diff --git a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc index 551191c0e5..6961c2265c 100644 --- a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc +++ b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -48,6 +48,8 @@ namespace gr { crc = 0x0; dvbs2x = FALSE; alternate = TRUE; + nibble = TRUE; + frame_size = framesize; BBHeader *f = &m_format[0].bb_header; if (framesize == FECFRAME_NORMAL) { switch (rate) { @@ -84,6 +86,9 @@ namespace gr { case C9_10: kbch = 58192; break; + case C2_9_VLSNR: + kbch = 14208; + break; case C13_45: kbch = 18528; break; @@ -158,7 +163,7 @@ namespace gr { break; } } - else { + else if (framesize == FECFRAME_SHORT) { switch (rate) { case C1_4: kbch = 3072; @@ -211,6 +216,37 @@ namespace gr { case C32_45: kbch = 11352; break; + case C1_5_VLSNR_SF2: + kbch = 2512; + break; + case C11_45_VLSNR_SF2: + kbch = 3792; + break; + case C1_5_VLSNR: + kbch = 3072; + break; + case C4_15_VLSNR: + kbch = 4152; + break; + case C1_3_VLSNR: + kbch = 5232; + break; + default: + kbch = 0; + break; + } + } + else { + switch (rate) { + case C1_5_MEDIUM: + kbch = 5660; + break; + case C11_45_MEDIUM: + kbch = 7740; + break; + case C1_3_MEDIUM: + kbch = 10620; + break; default: kbch = 0; break; @@ -253,7 +289,12 @@ namespace gr { fec_block = 0; ts_rate = tsrate; extra = (((kbch - 80) / 8) / 187) + 1; - set_output_multiple(kbch); + if (framesize != FECFRAME_MEDIUM) { + set_output_multiple(kbch); + } + else { + set_output_multiple(kbch * 2); + } } /* @@ -267,7 +308,12 @@ namespace gr { dvb_bbheader_bb_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) { if (input_mode == INPUTMODE_NORMAL) { - ninput_items_required[0] = ((noutput_items - 80) / 8); + if (frame_size != FECFRAME_MEDIUM) { + ninput_items_required[0] = ((noutput_items - 80) / 8); + } + else { + ninput_items_required[0] = ((noutput_items - 160) / 8); + } } else { ninput_items_required[0] = ((noutput_items - 80) / 8) + extra; @@ -329,7 +375,7 @@ namespace gr { } void - dvb_bbheader_bb_impl::add_bbheader(unsigned char *out, int count, int padding) + dvb_bbheader_bb_impl::add_bbheader(unsigned char *out, int count, int padding, bool nibble) { int temp, m_frame_offset_bits; unsigned char *m_frame = out; @@ -389,6 +435,9 @@ namespace gr { else { temp = (188 - count) * 8; } + if (nibble == FALSE) { + temp += 4; + } for (int n = 15; n >= 0; n--) { m_frame[m_frame_offset_bits++] = temp & (1 << n) ? 1 : 0; } @@ -441,65 +490,101 @@ namespace gr { unsigned char b; for (int i = 0; i < noutput_items; i += kbch) { - if (fec_block == 0 && inband_type_b == TRUE) { - padding = 104; - } - else { - padding = 0; - } - add_bbheader(&out[offset], count, padding); - offset = offset + 80; + if (frame_size != FECFRAME_MEDIUM) { + if (fec_block == 0 && inband_type_b == TRUE) { + padding = 104; + } + else { + padding = 0; + } + add_bbheader(&out[offset], count, padding, TRUE); + offset = offset + 80; - if (input_mode == INPUTMODE_HIEFF) { - for (int j = 0; j < (int)((kbch - 80 - padding) / 8); j++) { - if (count == 0) { - if (*in != 0x47) { - printf("Transport Stream sync error!\n"); + if (input_mode == INPUTMODE_HIEFF) { + for (int j = 0; j < (int)((kbch - 80 - padding) / 8); j++) { + if (count == 0) { + if (*in != 0x47) { + printf("Transport Stream sync error!\n"); + } + j--; + in++; } - j--; - in++; + else { + b = *in++; + for (int n = 7; n >= 0; n--) { + out[offset++] = b & (1 << n) ? 1 : 0; + } + } + count = (count + 1) % 188; + consumed++; } - else { - b = *in++; + if (fec_block == 0 && inband_type_b == TRUE) { + add_inband_type_b(&out[offset], ts_rate); + offset = offset + 104; + } + } + else { + for (int j = 0; j < (int)((kbch - 80 - padding) / 8); j++) { + if (count == 0) { + if (*in != 0x47) { + printf("Transport Stream sync error!\n"); + } + in++; + b = crc; + crc = 0; + } + else { + b = *in++; + crc = crc_tab[b ^ crc]; + } + count = (count + 1) % 188; + consumed++; for (int n = 7; n >= 0; n--) { out[offset++] = b & (1 << n) ? 1 : 0; } } - count = (count + 1) % 188; - consumed++; + if (fec_block == 0 && inband_type_b == TRUE) { + add_inband_type_b(&out[offset], ts_rate); + offset = offset + 104; + } } - if (fec_block == 0 && inband_type_b == TRUE) { - add_inband_type_b(&out[offset], ts_rate); - offset = offset + 104; + if (inband_type_b == TRUE) { + fec_block = (fec_block + 1) % fec_blocks; } } else { - for (int j = 0; j < (int)((kbch - 80 - padding) / 8); j++) { - if (count == 0) { - if (*in != 0x47) { - printf("Transport Stream sync error!\n"); + padding = 0; + add_bbheader(&out[offset], count, padding, nibble); + offset = offset + 80; + for (int j = 0; j < (int)((kbch - 80) / 4); j++) { + if (nibble == TRUE) { + if (count == 0) { + if (*in != 0x47) { + printf("Transport Stream sync error!\n"); + } + in++; + b = crc; + crc = 0; + } + else { + b = *in++; + crc = crc_tab[b ^ crc]; } - in++; - b = crc; - crc = 0; + bsave = b; + count = (count + 1) % 188; + consumed++; + for (int n = 7; n >= 4; n--) { + out[offset++] = b & (1 << n) ? 1 : 0; + } + nibble = FALSE; } else { - b = *in++; - crc = crc_tab[b ^ crc]; - } - count = (count + 1) % 188; - consumed++; - for (int n = 7; n >= 0; n--) { - out[offset++] = b & (1 << n) ? 1 : 0; + for (int n = 3; n >= 0; n--) { + out[offset++] = bsave & (1 << n) ? 1 : 0; + } + nibble = TRUE; } } - if (fec_block == 0 && inband_type_b == TRUE) { - add_inband_type_b(&out[offset], ts_rate); - offset = offset + 104; - } - } - if (inband_type_b == TRUE) { - fec_block = (fec_block + 1) % fec_blocks; } } diff --git a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h index 97e0751757..76f3369922 100644 --- a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h +++ b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -53,15 +53,18 @@ namespace gr { unsigned char crc; unsigned int input_mode; unsigned int extra; + unsigned int frame_size; + unsigned char bsave; int inband_type_b; int fec_blocks; int fec_block; int ts_rate; bool dvbs2x; bool alternate; + bool nibble; FrameFormat m_format[1]; unsigned char crc_tab[256]; - void add_bbheader(unsigned char *, int, int); + void add_bbheader(unsigned char *, int, int, bool); void build_crc8_table(void); int add_crc8_bits(unsigned char *, int); void add_inband_type_b(unsigned char *, int); diff --git a/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc index 46a8d78976..ef1c1841ad 100644 --- a/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc +++ b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -78,6 +78,9 @@ namespace gr { case C9_10: kbch = 58192; break; + case C2_9_VLSNR: + kbch = 14208; + break; case C13_45: kbch = 18528; break; @@ -152,7 +155,7 @@ namespace gr { break; } } - else { + else if (framesize == FECFRAME_SHORT) { switch (rate) { case C1_4: kbch = 3072; @@ -205,6 +208,37 @@ namespace gr { case C32_45: kbch = 11352; break; + case C1_5_VLSNR_SF2: + kbch = 2512; + break; + case C11_45_VLSNR_SF2: + kbch = 3792; + break; + case C1_5_VLSNR: + kbch = 3072; + break; + case C4_15_VLSNR: + kbch = 4152; + break; + case C1_3_VLSNR: + kbch = 5232; + break; + default: + kbch = 0; + break; + } + } + else { + switch (rate) { + case C1_5_MEDIUM: + kbch = 5660; + break; + case C11_45_MEDIUM: + kbch = 7740; + break; + case C1_3_MEDIUM: + kbch = 10620; + break; default: kbch = 0; break; diff --git a/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc index f035750f3c..b1ebb6db79 100644 --- a/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc +++ b/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -100,6 +100,11 @@ namespace gr { nbch = 58320; bch_code = BCH_CODE_N8; break; + case C2_9_VLSNR: + kbch = 14208; + nbch = 14400; + bch_code = BCH_CODE_N12; + break; case C13_45: kbch = 18528; nbch = 18720; @@ -222,7 +227,7 @@ namespace gr { break; } } - else { + else if (framesize == FECFRAME_SHORT) { switch (rate) { case C1_4: kbch = 3072; @@ -309,6 +314,55 @@ namespace gr { nbch = 11520; bch_code = BCH_CODE_S12; break; + case C1_5_VLSNR_SF2: + kbch = 2512; + nbch = 2680; + bch_code = BCH_CODE_S12; + break; + case C11_45_VLSNR_SF2: + kbch = 3792; + nbch = 3960; + bch_code = BCH_CODE_S12; + break; + case C1_5_VLSNR: + kbch = 3072; + nbch = 3240; + bch_code = BCH_CODE_S12; + break; + case C4_15_VLSNR: + kbch = 4152; + nbch = 4320; + bch_code = BCH_CODE_S12; + break; + case C1_3_VLSNR: + kbch = 5232; + nbch = 5400; + bch_code = BCH_CODE_S12; + break; + default: + kbch = 0; + nbch = 0; + bch_code = 0; + break; + } + } + else { + switch (rate) { + case C1_5_MEDIUM: + kbch = 5660; + nbch = 5840; + bch_code = BCH_CODE_M12; + break; + case C11_45_MEDIUM: + kbch = 7740; + nbch = 7920; + bch_code = BCH_CODE_M12; + break; + case C1_3_MEDIUM: + kbch = 10620; + nbch = 10800; + bch_code = BCH_CODE_M12; + break; default: kbch = 0; nbch = 0; @@ -453,6 +507,20 @@ namespace gr { const int polyn11[]={1,0,1,1,0,1,0,0,0,1,0,1,1,1,0,0,1}; const int polyn12[]={1,1,0,0,0,1,1,1,0,1,0,1,1,0,0,0,1}; + // Medium polynomials + const int polym01[]={1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,1}; + const int polym02[]={1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,1}; + const int polym03[]={1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1}; + const int polym04[]={1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,1}; + const int polym05[]={1,1,1,0,1,0,1,1,0,0,1,0,1,0,0,1}; + const int polym06[]={1,0,0,0,1,0,1,1,0,0,0,0,1,1,0,1}; + const int polym07[]={1,0,1,0,1,1,0,1,0,0,0,1,1,0,1,1}; + const int polym08[]={1,0,1,0,1,0,1,0,1,1,0,1,0,0,1,1}; + const int polym09[]={1,1,1,0,1,1,0,1,0,1,0,1,1,1,0,1}; + const int polym10[]={1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,1}; + const int polym11[]={1,1,1,0,1,0,0,0,0,1,0,1,0,0,0,1}; + const int polym12[]={1,0,1,0,1,0,0,0,1,0,1,1,0,1,1,1}; + // 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}; @@ -499,6 +567,19 @@ namespace gr { 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); + + len = poly_mult(polym01, 16, polym02, 16, polyout[0]); + len = poly_mult(polym03, 16, polyout[0], len, polyout[1]); + len = poly_mult(polym04, 16, polyout[1], len, polyout[0]); + len = poly_mult(polym05, 16, polyout[0], len, polyout[1]); + len = poly_mult(polym06, 16, polyout[1], len, polyout[0]); + len = poly_mult(polym07, 16, polyout[0], len, polyout[1]); + len = poly_mult(polym08, 16, polyout[1], len, polyout[0]); + len = poly_mult(polym09, 16, polyout[0], len, polyout[1]); + len = poly_mult(polym10, 16, polyout[1], len, polyout[0]); + len = poly_mult(polym11, 16, polyout[0], len, polyout[1]); + len = poly_mult(polym12, 16, polyout[1], len, polyout[0]); + poly_pack(polyout[0], m_poly_m_12, 180); } int @@ -619,6 +700,33 @@ namespace gr { } } break; + case BCH_CODE_M12: + for (int i = 0; i < noutput_items; i += nbch) { + //Zero the shift register + memset(shift, 0, sizeof(unsigned int) * 6); + // MSB of the codeword first + for (int j = 0; j < (int)kbch; j++) { + temp = *in++; + *out++ = temp; + consumed++; + b = (temp ^ ((shift[5] & 0x00001000) ? 1 : 0)); + reg_6_shift(shift); + if (b) { + shift[0] ^= m_poly_m_12[0]; + shift[1] ^= m_poly_m_12[1]; + shift[2] ^= m_poly_m_12[2]; + shift[3] ^= m_poly_m_12[3]; + shift[4] ^= m_poly_m_12[4]; + shift[5] ^= m_poly_m_12[5]; + } + } + // Now add the parity bits to the output + for (int n = 0; n < 180; n++) { + *out++ = (shift[5] & 0x00001000) ? 1 : 0; + reg_6_shift(shift); + } + } + break; } // Tell runtime system how many input items we consumed on diff --git a/gr-dtv/lib/dvb/dvb_bch_bb_impl.h b/gr-dtv/lib/dvb/dvb_bch_bb_impl.h index 5cba0a10ff..56b4772b26 100644 --- a/gr-dtv/lib/dvb/dvb_bch_bb_impl.h +++ b/gr-dtv/lib/dvb/dvb_bch_bb_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -37,6 +37,7 @@ namespace gr { unsigned int m_poly_n_10[5]; unsigned int m_poly_n_12[6]; unsigned int m_poly_s_12[6]; + unsigned int m_poly_m_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); diff --git a/gr-dtv/lib/dvb/dvb_defines.h b/gr-dtv/lib/dvb/dvb_defines.h index 2c2603af6a..97be4d04a3 100644 --- a/gr-dtv/lib/dvb/dvb_defines.h +++ b/gr-dtv/lib/dvb/dvb_defines.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -45,6 +45,7 @@ #define NPD_NOT_ACTIVE 0 #define FRAME_SIZE_NORMAL 64800 +#define FRAME_SIZE_MEDIUM 32400 #define FRAME_SIZE_SHORT 16200 // BCH Code @@ -52,8 +53,21 @@ #define BCH_CODE_N10 1 #define BCH_CODE_N12 2 #define BCH_CODE_S12 3 +#define BCH_CODE_M12 4 #define LDPC_ENCODE_TABLE_LENGTH (FRAME_SIZE_NORMAL * 10) +#define NORMAL_PUNCTURING 3240 +#define MEDIUM_PUNCTURING 1620 +#define SHORT_PUNCTURING_SET1 810 +#define SHORT_PUNCTURING_SET2 1224 + +#define VLSNR_OFF 0 +#define VLSNR_SET1 1 +#define VLSNR_SET2 2 + +#define EXTRA_PILOT_SYMBOLS_SET1 ((18 * 34) + (3 * 36)) +#define EXTRA_PILOT_SYMBOLS_SET2 ((9 * 32) + 36) + #endif /* INCLUDED_DTV_DVB_DEFINES_H */ diff --git a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc index c1738e1245..568aac940a 100644 --- a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc +++ b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -41,8 +41,12 @@ namespace gr { dvb_ldpc_bb_impl::dvb_ldpc_bb_impl(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate, dvb_constellation_t constellation) : gr::block("dvb_ldpc_bb", gr::io_signature::make(1, 1, sizeof(unsigned char)), - gr::io_signature::make(1, 1, sizeof(unsigned char))) + gr::io_signature::make(1, 1, sizeof(unsigned char))), + Xs(0), + P(0), + Xp(0) { + frame_size_type = framesize; if (framesize == FECFRAME_NORMAL) { frame_size = FRAME_SIZE_NORMAL; frame_size_real = FRAME_SIZE_NORMAL; @@ -91,6 +95,14 @@ namespace gr { nbch = 58320; q_val = 18; break; + case C2_9_VLSNR: + nbch = 14400; + q_val = 140; + frame_size -= NORMAL_PUNCTURING; + frame_size_real -= NORMAL_PUNCTURING; + P = 15; + Xp = NORMAL_PUNCTURING; + break; case C13_45: nbch = 18720; q_val = 128; @@ -189,7 +201,7 @@ namespace gr { break; } } - else { + else if (framesize == FECFRAME_SHORT) { frame_size = FRAME_SIZE_SHORT; frame_size_real = FRAME_SIZE_SHORT; switch (rate) { @@ -261,6 +273,76 @@ namespace gr { nbch = 11520; q_val = 13; break; + case C1_5_VLSNR_SF2: + nbch = 2680; + q_val = 135; + frame_size -= SHORT_PUNCTURING_SET1; + frame_size_real -= SHORT_PUNCTURING_SET1; + Xs = 560; + P = 30; + Xp = 250; + break; + case C11_45_VLSNR_SF2: + nbch = 3960; + q_val = 34; + frame_size -= SHORT_PUNCTURING_SET1; + frame_size_real -= SHORT_PUNCTURING_SET1; + P = 15; + Xp = SHORT_PUNCTURING_SET1; + break; + case C1_5_VLSNR: + nbch = 3240; + q_val = 135; + frame_size -= SHORT_PUNCTURING_SET2; + frame_size_real -= SHORT_PUNCTURING_SET2; + P = 10; + Xp = SHORT_PUNCTURING_SET2; + break; + case C4_15_VLSNR: + nbch = 4320; + q_val = 33; + frame_size -= SHORT_PUNCTURING_SET2; + frame_size_real -= SHORT_PUNCTURING_SET2; + P = 8; + Xp = SHORT_PUNCTURING_SET2; + break; + case C1_3_VLSNR: + nbch = 5400; + q_val = 120; + frame_size -= SHORT_PUNCTURING_SET2; + frame_size_real -= SHORT_PUNCTURING_SET2; + P = 8; + Xp = SHORT_PUNCTURING_SET2; + break; + default: + nbch = 0; + q_val = 0; + break; + } + } + else { + frame_size = FRAME_SIZE_MEDIUM - MEDIUM_PUNCTURING; + frame_size_real = FRAME_SIZE_MEDIUM - MEDIUM_PUNCTURING; + switch (rate) { + case C1_5_MEDIUM: + nbch = 5840; + q_val = 72; + Xs = 640; + P = 25; + Xp = 980; + break; + case C11_45_MEDIUM: + nbch = 7920; + q_val = 68; + P = 15; + Xp = MEDIUM_PUNCTURING; + break; + case C1_3_MEDIUM: + nbch = 10800; + q_val = 60; + P = 13; + Xp = MEDIUM_PUNCTURING; + break; default: nbch = 0; q_val = 0; @@ -312,10 +394,10 @@ for (int row = 0; row < ROWS; row++) { \ index = 0; im = 0; - pbits = frame_size - nbch; //number of parity bits + pbits = (frame_size_real + Xp) - nbch; //number of parity bits q = q_val; - if (frame_size_real == FRAME_SIZE_NORMAL) { + if (frame_size_type == FECFRAME_NORMAL) { if (code_rate == C1_4) { LDPC_BF(ldpc_tab_1_4N, 45); } @@ -354,6 +436,9 @@ for (int row = 0; row < ROWS; row++) { \ if (code_rate == C9_10) { LDPC_BF(ldpc_tab_9_10N, 162); } + if (code_rate == C2_9_VLSNR) { + LDPC_BF(ldpc_tab_2_9N, 40); + } if (code_rate == C13_45) { LDPC_BF(ldpc_tab_13_45N, 52); } @@ -424,7 +509,7 @@ for (int row = 0; row < ROWS; row++) { \ LDPC_BF(ldpc_tab_154_180N, 154); } } - else { + else if (frame_size_type == FECFRAME_SHORT) { if (code_rate == C1_4) { LDPC_BF(ldpc_tab_1_4S, 9); } @@ -481,6 +566,32 @@ for (int row = 0; row < ROWS; row++) { \ if (code_rate == C32_45) { LDPC_BF(ldpc_tab_32_45S, 32); } + if (code_rate == C1_5_VLSNR_SF2) { + LDPC_BF(ldpc_tab_1_4S, 9); + } + if (code_rate == C11_45_VLSNR_SF2) { + LDPC_BF(ldpc_tab_11_45S, 11); + } + if (code_rate == C1_5_VLSNR) { + LDPC_BF(ldpc_tab_1_4S, 9); + } + if (code_rate == C4_15_VLSNR) { + LDPC_BF(ldpc_tab_4_15S, 12); + } + if (code_rate == C1_3_VLSNR) { + LDPC_BF(ldpc_tab_1_3S, 15); + } + } + else { + if (code_rate == C1_5_MEDIUM) { + LDPC_BF(ldpc_tab_1_5M, 18); + } + if (code_rate == C11_45_MEDIUM) { + LDPC_BF(ldpc_tab_11_45M, 22); + } + if (code_rate == C1_3_MEDIUM) { + LDPC_BF(ldpc_tab_1_3M, 30); + } } ldpc_encode.table_length = index; } @@ -495,24 +606,54 @@ for (int row = 0; row < ROWS; row++) { \ unsigned char *out = (unsigned char *) output_items[0]; const unsigned char *d; unsigned char *p; + unsigned char *b; + unsigned char *s; // Calculate the number of parity bits - int plen = frame_size_real - nbch; + int plen = (frame_size_real + Xp) - nbch; d = in; p = &out[nbch]; int consumed = 0; + int puncture, index; for (int i = 0; i < noutput_items; i += frame_size) { + if (Xs != 0) { + s = &shortening_buffer[0]; + memset(s, 0, sizeof(unsigned char) * Xs); + memcpy(&s[Xs], &in[consumed], sizeof(unsigned char) * nbch); + d = s; + } + if (P != 0) { + p = &puncturing_buffer[nbch]; + b = &out[i + nbch]; + } // First zero all the parity bits - memset(p, 0, sizeof(unsigned char)*plen); - for(int j = 0; j < (int)nbch; j++) { + memset(p, 0, sizeof(unsigned char) * plen); + for (int j = 0; j < (int)nbch; j++) { out[i + j] = in[consumed]; consumed++; } // now do the parity checking - for(int j = 0; j < ldpc_encode.table_length; j++) { + for (int j = 0; j < ldpc_encode.table_length; j++) { p[ldpc_encode.p[j]] ^= d[ldpc_encode.d[j]]; } - for(int j = 1; j < plen; j++) { + if (P != 0) { + puncture = 0; + for (int j = 0; j < plen; j += P) { + p[j] = 0x55; + puncture++; + if (puncture == Xp) { + break; + } + } + index = 0; + for (int j = 0; j < plen; j++) { + if (p[j] != 0x55) { + b[index++] = p[j]; + } + } + p = &out[nbch]; + } + for (int j = 1; j < (plen - Xp); j++) { p[j] ^= p[j-1]; } if (signal_constellation == MOD_128APSK) { @@ -1946,6 +2087,50 @@ for (int row = 0; row < ROWS; row++) { \ {3,17,3392,1991,0} }; + const int dvb_ldpc_bb_impl::ldpc_tab_2_9N[40][12]= + { + {11,5332,8018,35444,13098,9655,41945,44273,22741,9371,8727,43219}, + {11,41410,43593,14611,46707,16041,1459,29246,12748,32996,676,46909}, + {11,9340,35072,35640,17537,10512,44339,30965,25175,9918,21079,29835}, + {11,3332,12088,47966,25168,50180,42842,40914,46726,17073,41812,34356}, + {11,15159,2209,7971,22590,20020,27567,4853,10294,38839,15314,49808}, + {11,20936,14497,23365,22630,38728,28361,34659,956,8559,44957,22222}, + {11,28043,4641,25208,47039,30612,25796,14661,44139,27335,12884,6980}, + {11,32584,33453,1867,20185,36106,30357,809,28513,46045,27862,4802}, + {11,43744,13375,36066,23604,30766,6233,45051,23660,20815,19525,25207}, + {11,27522,3854,9311,21925,41107,25773,26323,24237,24344,46187,44503}, + {11,10256,20038,12177,26635,5214,14191,34404,45807,4938,4173,31344}, + {11,32043,26501,46725,4648,16718,31060,26633,19036,14222,13886,26535}, + {11,18103,8498,36814,34600,36495,36712,29833,27396,11877,42861,1834}, + {11,36592,1645,3649,30521,14674,3630,890,13307,41412,24682,9907}, + {11,4401,44543,13784,5828,32862,25179,29736,39614,5186,49749,38317}, + {11,41460,39101,50080,40137,32691,26528,35332,44067,8467,14286,10470}, + {11,12211,34019,37870,36918,36419,33153,50070,41498,47741,30538,12342}, + {11,33751,23988,33624,41882,34075,25552,3106,17611,13190,29336,312}, + {11,5667,35483,35460,16153,37267,28308,50009,46345,34204,32756,38243}, + {11,5657,24157,36834,6890,49576,46244,43875,16738,47225,2944,36882}, + {3,30341,48485,3700,0,0,0,0,0,0,0,0}, + {3,14451,20438,18875,0,0,0,0,0,0,0,0}, + {3,13634,41138,42962,0,0,0,0,0,0,0,0}, + {3,46459,13369,27974,0,0,0,0,0,0,0,0}, + {3,21493,14629,2369,0,0,0,0,0,0,0,0}, + {3,11351,40226,42457,0,0,0,0,0,0,0,0}, + {3,34749,39000,3912,0,0,0,0,0,0,0,0}, + {3,18128,46776,47055,0,0,0,0,0,0,0,0}, + {3,2221,26806,11345,0,0,0,0,0,0,0,0}, + {3,35143,630,2229,0,0,0,0,0,0,0,0}, + {3,44009,41295,34646,0,0,0,0,0,0,0,0}, + {3,32163,16657,26544,0,0,0,0,0,0,0,0}, + {3,31770,23641,43623,0,0,0,0,0,0,0,0}, + {3,45826,10902,39490,0,0,0,0,0,0,0,0}, + {3,7514,20480,28511,0,0,0,0,0,0,0,0}, + {3,11429,19834,35430,0,0,0,0,0,0,0,0}, + {3,50112,38163,5738,0,0,0,0,0,0,0,0}, + {3,16191,16862,6783,0,0,0,0,0,0,0,0}, + {3,6085,39149,34988,0,0,0,0,0,0,0,0}, + {3,41497,32023,28688,0,0,0,0,0,0,0,0} + }; + const int dvb_ldpc_bb_impl::ldpc_tab_13_45N[52][13]= { {12,15210,4519,18217,34427,18474,16813,28246,17687,44527,31465,13004,43601}, @@ -5178,6 +5363,88 @@ for (int row = 0; row < ROWS; row++) { \ {3,1523,3311,389,0,0,0,0,0,0,0,0,0} }; + const int dvb_ldpc_bb_impl::ldpc_tab_1_5M[18][14]= + { + {13,18222,6715,4908,21568,22821,11708,4769,4495,22243,25872,9051,19072,13956}, + {13,2038,5205,21215,21009,9584,2403,23652,20866,20130,677,9509,6136,773}, + {13,19936,14590,17829,473,4432,23171,11386,17937,22084,24450,267,8822,19335}, + {13,16376,16769,5111,9794,18907,827,12385,12370,21647,10938,23619,11633,15865}, + {13,23417,7631,12243,21546,4192,22117,14757,4118,9686,17021,8531,15989,8807}, + {13,15533,16584,18529,19699,17821,4252,1254,5952,3163,20295,6944,1022,19743}, + {13,129,16579,23524,25897,14690,11222,16250,9925,4268,999,7102,24528,152}, + {13,18361,3708,3454,16604,1551,5809,20324,4775,22418,19091,19674,10975,7327}, + {13,24133,10950,22779,11388,13818,20668,7556,12333,16446,19684,12510,25118,8162}, + {3,17026,6850,1269,0,0,0,0,0,0,0,0,0,0}, + {3,21895,7137,25270,0,0,0,0,0,0,0,0,0,0}, + {3,11858,24153,13303,0,0,0,0,0,0,0,0,0,0}, + {3,7885,16438,12805,0,0,0,0,0,0,0,0,0,0}, + {3,10473,15004,8052,0,0,0,0,0,0,0,0,0,0}, + {3,2088,10379,10067,0,0,0,0,0,0,0,0,0,0}, + {3,21438,13426,10440,0,0,0,0,0,0,0,0,0,0}, + {3,17696,727,12164,0,0,0,0,0,0,0,0,0,0}, + {3,22623,8408,17849,0,0,0,0,0,0,0,0,0,0} + }; + + const int dvb_ldpc_bb_impl::ldpc_tab_11_45M[22][11]= + { + {10,20617,6867,14845,11974,22563,190,17207,4052,7406,16007}, + {10,21448,14846,2543,23380,16633,20365,16869,13411,19853,795}, + {10,5200,2330,2775,23620,20643,10745,14742,6493,14222,20939}, + {10,9445,9523,12769,7332,21792,18717,16397,14016,9481,22162}, + {10,2922,6427,4497,4116,17658,2581,14364,3781,18851,22974}, + {10,10383,2184,1433,3889,12828,17424,17580,20936,1390,21374}, + {10,425,2063,22398,20907,9445,14790,4457,723,7048,4072}, + {10,11771,9640,23212,9613,12042,8335,21386,20129,13521,16301}, + {10,14867,12501,1086,21526,17701,17731,20907,8790,19224,5784}, + {10,7107,19690,17616,5800,9501,23320,16878,794,15931,17539}, + {3,4556,21783,1524,0,0,0,0,0,0,0}, + {3,20100,11706,23663,0,0,0,0,0,0,0}, + {3,2535,15530,6116,0,0,0,0,0,0,0}, + {3,12078,3867,2663,0,0,0,0,0,0,0}, + {3,19629,20246,7024,0,0,0,0,0,0,0}, + {3,11748,11426,19802,0,0,0,0,0,0,0}, + {3,15942,12333,5316,0,0,0,0,0,0,0}, + {3,11521,3170,17818,0,0,0,0,0,0,0}, + {3,2289,23780,16575,0,0,0,0,0,0,0}, + {3,6649,16991,13025,0,0,0,0,0,0,0}, + {3,20050,10619,10250,0,0,0,0,0,0,0}, + {3,3944,13063,5656,0,0,0,0,0,0,0} + }; + + const int dvb_ldpc_bb_impl::ldpc_tab_1_3M[30][13]= + { + {12,7416,4093,16722,1023,20586,12219,9175,16284,1554,10113,19849,17545}, + {12,13140,3257,2110,13888,3023,1537,1598,15018,18931,13905,10617,1014}, + {12,339,14366,3309,15360,18358,3196,4412,6023,7070,17380,2777,6691}, + {12,12720,17634,4141,1400,8247,18201,16077,11314,11928,3494,3155,2865}, + {12,21038,6928,3860,1943,20292,6526,12939,15182,3957,5651,356,2673}, + {12,20555,17905,5724,13932,1218,17763,5912,5164,6233,6220,1277,19209}, + {12,19190,4498,4950,6645,5482,5667,13701,16334,15231,735,8589,12344}, + {12,679,17849,17807,16033,10181,3368,5778,8275,2736,14042,17506,6005}, + {12,1576,10259,10525,3007,16522,697,7726,8641,14323,2893,8168,11070}, + {12,17270,10180,18740,847,4969,14715,19316,5530,17428,11193,9861,13562}, + {3,6156,18787,10467,0,0,0,0,0,0,0,0,0}, + {3,2422,3723,10769,0,0,0,0,0,0,0,0,0}, + {3,8015,18716,13406,0,0,0,0,0,0,0,0,0}, + {3,5969,15949,3084,0,0,0,0,0,0,0,0,0}, + {3,6855,13990,3764,0,0,0,0,0,0,0,0,0}, + {3,10351,15779,10392,0,0,0,0,0,0,0,0,0}, + {3,16078,19034,11279,0,0,0,0,0,0,0,0,0}, + {3,11747,6608,4188,0,0,0,0,0,0,0,0,0}, + {3,19699,8928,8045,0,0,0,0,0,0,0,0,0}, + {3,4598,7219,11391,0,0,0,0,0,0,0,0,0}, + {3,19766,11871,5692,0,0,0,0,0,0,0,0,0}, + {3,7487,15905,17621,0,0,0,0,0,0,0,0,0}, + {3,8554,7751,16516,0,0,0,0,0,0,0,0,0}, + {3,4981,20250,16146,0,0,0,0,0,0,0,0,0}, + {3,12524,21364,10793,0,0,0,0,0,0,0,0,0}, + {3,17083,2051,8862,0,0,0,0,0,0,0,0,0}, + {3,1315,6246,7721,0,0,0,0,0,0,0,0,0}, + {3,18043,16652,5502,0,0,0,0,0,0,0,0,0}, + {3,1432,5674,2224,0,0,0,0,0,0,0,0,0}, + {3,11257,1312,8453,0,0,0,0,0,0,0,0,0} + }; + } /* namespace dtv */ } /* namespace gr */ diff --git a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h index 92c9eb370e..c8f0fab698 100644 --- a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h +++ b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -38,11 +38,17 @@ namespace gr { private: unsigned int frame_size; unsigned int frame_size_real; + unsigned int frame_size_type; unsigned int signal_constellation; unsigned int nbch; unsigned int code_rate; unsigned int q_val; unsigned int dvb_standard; + int Xs; + int P; + int Xp; + unsigned char puncturing_buffer[FRAME_SIZE_NORMAL]; + unsigned char shortening_buffer[FRAME_SIZE_NORMAL]; void ldpc_lookup_generate(void); ldpc_encode_table ldpc_encode; @@ -71,6 +77,7 @@ namespace gr { const static int ldpc_tab_5_6S[37][14]; const static int ldpc_tab_8_9S[40][5]; + const static int ldpc_tab_2_9N[40][12]; const static int ldpc_tab_13_45N[52][13]; const static int ldpc_tab_9_20N[81][13]; const static int ldpc_tab_11_20N[99][14]; @@ -103,6 +110,10 @@ namespace gr { const static int ldpc_tab_26_45S[26][14]; const static int ldpc_tab_32_45S[32][13]; + const static int ldpc_tab_1_5M[18][14]; + const static int ldpc_tab_11_45M[22][11]; + const static int ldpc_tab_1_3M[30][13]; + public: dvb_ldpc_bb_impl(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate, dvb_constellation_t constellation); ~dvb_ldpc_bb_impl(); diff --git a/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc index 7abfbe3f79..35e2973647 100644 --- a/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc +++ b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -48,11 +48,35 @@ namespace gr { code_rate = rate; if (framesize == FECFRAME_NORMAL) { frame_size = FRAME_SIZE_NORMAL; + if (rate == C2_9_VLSNR) { + frame_size = FRAME_SIZE_NORMAL - NORMAL_PUNCTURING; + } } - else { + else if (framesize == FECFRAME_SHORT) { frame_size = FRAME_SIZE_SHORT; + if (rate == C1_5_VLSNR_SF2 || rate == C11_45_VLSNR_SF2) { + frame_size = FRAME_SIZE_SHORT - SHORT_PUNCTURING_SET1; + } + if (rate == C1_5_VLSNR || rate == C4_15_VLSNR || rate == C1_3_VLSNR) { + frame_size = FRAME_SIZE_SHORT - SHORT_PUNCTURING_SET2; + } + } + else { + frame_size = FRAME_SIZE_MEDIUM - MEDIUM_PUNCTURING; } switch (constellation) { + case MOD_BPSK: + mod = 1; + rows = frame_size / mod; + set_output_multiple(rows); + packed_items = rows; + break; + case MOD_BPSK_SF2: + mod = 1; + rows = frame_size / mod; + set_output_multiple(rows * 2); + packed_items = rows * 2; + break; case MOD_QPSK: mod = 2; rows = frame_size / mod; @@ -69,7 +93,7 @@ namespace gr { rowaddr2 = 0; } /* 102 */ - else if (rate == C25_36 || rate == C13_18 || rate == C7_15 || rate == C8_15) { + else if (rate == C25_36 || rate == C13_18 || rate == C7_15 || rate == C8_15 || rate == C26_45) { rowaddr0 = rows; rowaddr1 = 0; rowaddr2 = rows * 2; @@ -156,6 +180,20 @@ namespace gr { rowaddr2 = 0; rowaddr3 = rows * 3; } + /* 3210 */ + else if (rate == C140_180) { + rowaddr0 = rows * 3; + rowaddr1 = rows * 2; + rowaddr2 = rows; + rowaddr3 = 0; + } + /* 0321 */ + else if (rate == C154_180) { + rowaddr0 = 0; + rowaddr1 = rows * 3; + rowaddr2 = rows * 2; + rowaddr3 = rows; + } /* 0123 */ else { rowaddr0 = 0; @@ -434,6 +472,9 @@ namespace gr { if (signal_constellation == MOD_128APSK) { ninput_items_required[0] = ((noutput_items / 9270) * 9258) * mod; } + else if (signal_constellation == MOD_BPSK_SF2) { + ninput_items_required[0] = (noutput_items * mod) / 2; + } else { ninput_items_required[0] = noutput_items * mod; } @@ -452,6 +493,23 @@ namespace gr { int rows; switch (signal_constellation) { + case MOD_BPSK: + for (int i = 0; i < noutput_items; i += packed_items) { + rows = frame_size; + for (int j = 0; j < rows; j++) { + out[produced++] = in[consumed++]; + } + } + break; + case MOD_BPSK_SF2: + for (int i = 0; i < noutput_items; i += packed_items) { + rows = frame_size; + for (int j = 0; j < rows; j++) { + out[produced++] = in[consumed]; + out[produced++] = in[consumed++]; + } + } + break; case MOD_QPSK: for (int i = 0; i < noutput_items; i += packed_items) { rows = frame_size / 2; diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc index d1f3b4aa27..844359333d 100644 --- a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc +++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc @@ -47,6 +47,12 @@ namespace gr { double m = 1.0; r1 = m; switch (constellation) { + case MOD_BPSK: + case MOD_BPSK_SF2: + m_bpsk[0][0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0))); + m_bpsk[0][1] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(5.0 * M_PI / 4.0))); + m_bpsk[1][0] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(M_PI / 4.0))); + m_bpsk[1][1] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(5.0 * M_PI /4.0))); case MOD_QPSK: m_qpsk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0))); m_qpsk[1] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0))); @@ -1771,6 +1777,13 @@ namespace gr { if (signal_interpolation == INTERPOLATION_OFF) { switch (signal_constellation) { + case MOD_BPSK: + case MOD_BPSK_SF2: + for (int i = 0; i < noutput_items; i++) { + index = *in++; + *out++ = m_bpsk[i & 1][index & 0x1]; + } + break; case MOD_QPSK: for (int i = 0; i < noutput_items; i++) { index = *in++; @@ -1830,6 +1843,14 @@ namespace gr { } else { switch (signal_constellation) { + case MOD_BPSK: + case MOD_BPSK_SF2: + for (int i = 0; i < noutput_items; i++) { + index = *in++; + *out++ = m_bpsk[i & 1][index & 0x1]; + *out++ = zero; + } + break; case MOD_QPSK: for (int i = 0; i < noutput_items / 2; i++) { index = *in++; diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h index 4fdbb149df..ca042c25dc 100644 --- a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h +++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -32,6 +32,7 @@ namespace gr { private: int signal_constellation; int signal_interpolation; + gr_complex m_bpsk[2][2]; gr_complex m_qpsk[4]; gr_complex m_8psk[8]; gr_complex m_16apsk[16]; diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc index 4a0472a5c1..4f38581e5b 100644 --- a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc +++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -47,14 +47,32 @@ namespace gr { int type, modcod; double r0 = 1.0; + signal_constellation = constellation; modcod = 0; if (framesize == FECFRAME_NORMAL) { frame_size = FRAME_SIZE_NORMAL; type = 0; + if (rate == C2_9_VLSNR) { + frame_size = (FRAME_SIZE_NORMAL - NORMAL_PUNCTURING) + (EXTRA_PILOT_SYMBOLS_SET1 * 2); + type = 1; /* force pilots on for VL-SNR */ + } } - else { + + else if (framesize == FECFRAME_SHORT) { frame_size = FRAME_SIZE_SHORT; type = 2; + if (rate == C1_5_VLSNR_SF2 || rate == C11_45_VLSNR_SF2) { + frame_size = ((FRAME_SIZE_SHORT - SHORT_PUNCTURING_SET1) * 2) + EXTRA_PILOT_SYMBOLS_SET1; + type = 1; /* force pilots on for VL-SNR */ + } + if (rate == C1_5_VLSNR || rate == C4_15_VLSNR || rate == C1_3_VLSNR) { + frame_size = (FRAME_SIZE_SHORT - SHORT_PUNCTURING_SET2) + EXTRA_PILOT_SYMBOLS_SET2; + type = 1; /* force pilots on for VL-SNR */ + } + } + else { + frame_size = FRAME_SIZE_MEDIUM - MEDIUM_PUNCTURING + EXTRA_PILOT_SYMBOLS_SET1; + type = 1; /* force pilots on for VL-SNR */ } pilot_mode = pilots; @@ -68,6 +86,49 @@ namespace gr { } gold_code = goldcode; + vlsnr_set = VLSNR_OFF; + switch (rate) { + case C2_9_VLSNR: + vlsnr_header = 0; + vlsnr_set = VLSNR_SET1; + break; + case C1_5_MEDIUM: + vlsnr_header = 1; + vlsnr_set = VLSNR_SET1; + break; + case C11_45_MEDIUM: + vlsnr_header = 2; + vlsnr_set = VLSNR_SET1; + break; + case C1_3_MEDIUM: + vlsnr_header = 3; + vlsnr_set = VLSNR_SET1; + break; + case C1_5_VLSNR_SF2: + vlsnr_header = 4; + vlsnr_set = VLSNR_SET1; + break; + case C11_45_VLSNR_SF2: + vlsnr_header = 5; + vlsnr_set = VLSNR_SET1; + break; + case C1_5_VLSNR: + vlsnr_header = 9; + vlsnr_set = VLSNR_SET2; + break; + case C4_15_VLSNR: + vlsnr_header = 10; + vlsnr_set = VLSNR_SET2; + break; + case C1_3_VLSNR: + vlsnr_header = 11; + vlsnr_set = VLSNR_SET2; + break; + default: + vlsnr_header = 12; + break; + } + m_bpsk[0][0] = gr_complex((r0 * cos(M_PI / 4.0)), (r0 * sin(M_PI / 4.0))); m_bpsk[0][1] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(5.0 * M_PI / 4.0))); m_bpsk[1][0] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(M_PI / 4.0))); @@ -80,6 +141,46 @@ namespace gr { m_zero = gr_complex(0.0, 0.0); // Mode and code rate + if (constellation == MOD_BPSK) { + slots = (frame_size / 1) / 90; + pilot_symbols = (slots / 16) * 36; + if (!(slots % 16)) { + pilot_symbols -= 36; + } + switch (rate) { + case C1_5_MEDIUM: + case C11_45_MEDIUM: + case C1_3_MEDIUM: + modcod = 128; + break; + case C1_5_VLSNR: + case C4_15_VLSNR: + case C1_3_VLSNR: + modcod = 130; + break; + default: + modcod = 0; + break; + } + } + + if (constellation == MOD_BPSK_SF2) { + slots = (frame_size / 1) / 90; + pilot_symbols = (slots / 16) * 36; + if (!(slots % 16)) { + pilot_symbols -= 36; + } + switch (rate) { + case C1_5_VLSNR_SF2: + case C11_45_VLSNR_SF2: + modcod = 128; + break; + default: + modcod = 0; + break; + } + } + if (constellation == MOD_QPSK) { slots = (frame_size / 2) / 90; pilot_symbols = (slots / 16) * 36; @@ -87,6 +188,9 @@ namespace gr { pilot_symbols -= 36; } switch (rate) { + case C2_9_VLSNR: + modcod = 128; + break; case C1_4: modcod = 1; break; @@ -506,7 +610,6 @@ namespace gr { } // Now create the PL header. - int b[90]; // Add the sync sequence SOF for (int i = 0; i < 26; i++) { b[i] = ph_sync_seq[i]; @@ -516,23 +619,46 @@ namespace gr { // BPSK modulate and create the header for (int i = 0; i < 26; i++) { - m_pl[i] = m_bpsk[i & 1][b[i]]; + m_pl[i] = m_bpsk[i & 1][b[i]]; } if (modcod & 0x80) { for (int i = 26; i < 90; i++) { - m_pl[i] = m_bpsk[(i & 1) + 2][b[i]]; + m_pl[i] = m_bpsk[(i & 1) + 2][b[i]]; } } else { for (int i = 26; i < 90; i++) { - m_pl[i] = m_bpsk[i & 1][b[i]]; + m_pl[i] = m_bpsk[i & 1][b[i]]; } } + + // Create the VL-SNR header. + // Add leading zeroes + for (int i = 0; i < 2; i++) { + b[i] = 0; + } + for (int i = 2; i < 898; i++) { + b[i] = ph_vlsnr_seq[vlsnr_header][i - 2]; + } + // Add trailing zeroes + for (int i = 898; i < VLSNR_HEADER_LENGTH; i++) { + b[i] = 0; + } + // BPSK modulate and create the VL-SNR header + for (int i = 0; i < VLSNR_HEADER_LENGTH; i++) { + m_vlsnr_header[i] = m_bpsk[i & 1][b[i]]; + } + build_symbol_scrambler_table(); if (!pilot_mode) { pilot_symbols = 0; } - set_output_multiple((((slots * 90) + 90) + pilot_symbols) * 2); + if (vlsnr_set == VLSNR_OFF) { + set_output_multiple((((slots * 90) + 90) + pilot_symbols) * 2); + } + else { + set_output_multiple((((slots * 90) + 90) + (pilot_symbols + 36) + VLSNR_HEADER_LENGTH) * 2); + } } /* @@ -545,7 +671,15 @@ namespace gr { void dvbs2_physical_cc_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) { - ninput_items_required[0] = (noutput_items / ((((slots * 90) + 90) + pilot_symbols) * 2)) * (slots * 90); + if (vlsnr_set == VLSNR_OFF) { + ninput_items_required[0] = (noutput_items / ((((slots * 90) + 90) + pilot_symbols) * 2)) * (slots * 90); + } + else if (vlsnr_set == VLSNR_SET1) { + ninput_items_required[0] = (noutput_items / ((((slots * 90) + 90) + (pilot_symbols + 36) + VLSNR_HEADER_LENGTH) * 2)) * ((slots * 90) - EXTRA_PILOT_SYMBOLS_SET1); + } + else { + ninput_items_required[0] = (noutput_items / ((((slots * 90) + 90) + (pilot_symbols + 36) + VLSNR_HEADER_LENGTH) * 2)) * ((slots * 90) - EXTRA_PILOT_SYMBOLS_SET2); + } } void @@ -595,7 +729,7 @@ namespace gr { unsigned char code; if (modcod & 0x80) { - code = modcod | type; + code = modcod | (type & 0x1); } else { code = (modcod << 2) | type; @@ -673,42 +807,84 @@ namespace gr { gr_complex *out = (gr_complex *) output_items[0]; int consumed = 0; int produced = 0; - int slot_count = 0; - int n; + int slot_count, n; + int group; + int symbols = 0; gr_complex tempin, tempout; - for (int i = 0; i < noutput_items / 2; i += (((slots * 90) + 90) + pilot_symbols)) { - n = 0; - for (int plh = 0; plh < 90; plh++) { - out[produced++] = m_pl[plh]; - out[produced++] = m_zero; - } - for (int j = 0; j < slots; j++) { - for (int k = 0; k < 90; k++) { - tempin = in[consumed++]; - switch (m_cscram[n++]) { - case 0: - tempout = tempin; - break; - case 1: - tempout = gr_complex(-tempin.imag(), tempin.real()); - break; - case 2: - tempout = -tempin; - break; - case 3: - tempout = gr_complex( tempin.imag(), -tempin.real()); - break; + if (vlsnr_set == VLSNR_OFF) { + for (int i = 0; i < noutput_items / 2; i += (((slots * 90) + 90) + pilot_symbols)) { + n = 0; + slot_count = 0; + for (int plh = 0; plh < 90; plh++) { + out[produced++] = m_pl[plh]; + out[produced++] = m_zero; + } + for (int j = 0; j < slots; j++) { + for (int k = 0; k < 90; k++) { + tempin = in[consumed++]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; } - out[produced++] = tempout; + slot_count = (slot_count + 1) % 16; + if ((slot_count == 0) && (j < slots - 1)) { + if (pilot_mode) { + // Add pilots if needed + for (int p = 0; p < 36; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + } + } + } + } + } + else if (vlsnr_set == VLSNR_SET1) { + for (int i = 0; i < noutput_items / 2; i += (((slots * 90) + 90) + pilot_symbols + VLSNR_HEADER_LENGTH + 36)) { + n = 0; + slot_count = 10; + group = 0; + for (int plh = 0; plh < 90; plh++) { + out[produced++] = m_pl[plh]; + out[produced++] = m_zero; + } + for (int vlh = 0; vlh < VLSNR_HEADER_LENGTH; vlh++) { + out[produced++] = m_vlsnr_header[vlh]; out[produced++] = m_zero; } - slot_count = (slot_count + 1) % 16; - if ((slot_count == 0) && (j < slots - 1)) { - if (pilot_mode) { - // Add pilots if needed - for (int p = 0; p < 36; p++) { - tempin = m_bpsk[0][0]; + for (int j = 0; j < slots; j++) { + for (int k = 0; k < 90; k++) { + tempin = in[consumed++]; + if (signal_constellation == MOD_QPSK) { switch (m_cscram[n++]) { case 0: tempout = tempin; @@ -719,12 +895,332 @@ namespace gr { case 2: tempout = -tempin; break; - case 03: + case 3: tempout = gr_complex( tempin.imag(), -tempin.real()); break; } - out[produced++] = tempout; - out[produced++] = m_zero; + } + else { + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + if (group <= 18 && symbols == 703) { + for (int p = 0; p < 34; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + for (int x = (k + 1 + 34) - 90; x < 90; x++) { + tempin = in[consumed++]; + if (signal_constellation == MOD_QPSK) { + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + } + else { + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + } + slot_count = (slot_count + 1) % 16; + j++; + break; + } + else if ((group > 18 && group <= 21) && symbols == 702) { + for (int p = 0; p < 36; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + for (int x = (k + 1 + 36) - 90; x < 90; x++) { + tempin = in[consumed++]; + if (signal_constellation == MOD_QPSK) { + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + } + else { + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + } + slot_count = (slot_count + 1) % 16; + j++; + break; + } + } + slot_count = (slot_count + 1) % 16; + if ((slot_count == 0) && (j < slots - 1)) { + if (pilot_mode) { + // Add pilots if needed + group++; + symbols = 0; + for (int p = 0; p < 36; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + } + } + } + } + } + else { /* VL-SNR set 2 */ + for (int i = 0; i < noutput_items / 2; i += (((slots * 90) + 90) + pilot_symbols + VLSNR_HEADER_LENGTH + 36)) { + n = 0; + slot_count = 10; + group = 0; + for (int plh = 0; plh < 90; plh++) { + out[produced++] = m_pl[plh]; + out[produced++] = m_zero; + } + for (int vlh = 0; vlh < VLSNR_HEADER_LENGTH; vlh++) { + out[produced++] = m_vlsnr_header[vlh]; + out[produced++] = m_zero; + } + for (int j = 0; j < slots; j++) { + for (int k = 0; k < 90; k++) { + tempin = in[consumed++]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + if (group <= 9 && symbols == 704) { + for (int p = 0; p < 32; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + for (int x = (k + 1 + 32) - 90; x < 90; x++) { + tempin = in[consumed++]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + } + slot_count = (slot_count + 1) % 16; + j++; + break; + } + else if ((group == 10) && symbols == 702) { + for (int p = 0; p < 36; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } + for (int x = (k + 1 + 36) - 90; x < 90; x++) { + tempin = in[consumed++]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = -tempin; + break; + case 2: + tempout = tempin; + break; + case 3: + tempout = -tempin; + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + symbols++; + } + slot_count = (slot_count + 1) % 16; + j++; + break; + } + } + slot_count = (slot_count + 1) % 16; + if ((slot_count == 0) && (j < slots - 1)) { + if (pilot_mode) { + // Add pilots if needed + group++; + symbols = 0; + for (int p = 0; p < 36; p++) { + tempin = m_bpsk[0][0]; + switch (m_cscram[n++]) { + case 0: + tempout = tempin; + break; + case 1: + tempout = gr_complex(-tempin.imag(), tempin.real()); + break; + case 2: + tempout = -tempin; + break; + case 3: + tempout = gr_complex( tempin.imag(), -tempin.real()); + break; + } + out[produced++] = tempout; + out[produced++] = m_zero; + } } } } @@ -755,25 +1251,279 @@ namespace gr { 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0 }; - /* for future implementation */ - const int dvbs2_physical_cc_impl::ph_vlsnr_seq[896] = + const int dvbs2_physical_cc_impl::ph_vlsnr_seq[16][896] = { - 1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,0,0, - 1,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,0,1,0,0,0,1,0,1,1,1,1,0, - 1,1,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1, - 1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,1,1,1,1,1,0,0,1,1,0,0,1,0,1,1,1,1,0,1,0, - 0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,1,0,1,0, - 0,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,1,0,1,1,0,1,0,1,0,1,0,0,0,1,1,0,1,0, - 0,0,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,1,1,0,0,1,0,1,0,1,0,0,0,0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,0,0,1,1,1, + 1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,1,1,0,1,0,0,0,0,1,1,1,0,1,0,0,1,1,0,1,1,0, + 0,1,0,1,1,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0, + 0,0,0,1,0,1,1,0,0,1,0,1,0,0,0,0,1,1,1,1,1,1,1,0,1,0,0,0,1,1,0,1,0,0,1,1,0,0,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,0,0,0, + 1,1,0,0,0,0,0,0,1,0,1,1,0,1,1,1,1,1,0,0,1,0,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0, + 0,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,0,0,1,1,1,1,0,0,1,0,1,1,1,0,1,1,0,1,0,1,0,0,0,0,0,1} }; } /* namespace dtv */ diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h index 69107765a5..47a0a3e19b 100644 --- a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h +++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 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 @@ -24,6 +24,8 @@ #include <gnuradio/dtv/dvbs2_physical_cc.h> #include "dvb/dvb_defines.h" +#define VLSNR_HEADER_LENGTH 900 + namespace gr { namespace dtv { @@ -31,12 +33,17 @@ namespace gr { { private: int frame_size; + int signal_constellation; int slots; int pilot_mode; int pilot_symbols; int gold_code; + int vlsnr_header; + int vlsnr_set; + int b[VLSNR_HEADER_LENGTH]; gr_complex m_bpsk[4][2]; gr_complex m_pl[90]; + gr_complex m_vlsnr_header[VLSNR_HEADER_LENGTH]; gr_complex m_zero; int m_cscram[FRAME_SIZE_NORMAL]; void b_64_8_code(unsigned char, int *); @@ -47,7 +54,7 @@ namespace gr { const static unsigned long g[7]; const static int ph_scram_tab[64]; const static int ph_sync_seq[26]; - const static int ph_vlsnr_seq[896]; + const static int ph_vlsnr_seq[16][VLSNR_HEADER_LENGTH - 4]; public: dvbs2_physical_cc_impl(dvb_framesize_t framesize, dvb_code_rate_t rate, dvb_constellation_t constellation, dvbs2_pilots_t pilots, int goldcode); diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt b/gr-fec/include/gnuradio/fec/CMakeLists.txt index aca8c8da84..57594b47d8 100644 --- a/gr-fec/include/gnuradio/fec/CMakeLists.txt +++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt @@ -47,6 +47,11 @@ install(FILES puncture_bb.h puncture_ff.h depuncture_bb.h + cldpc.h + alist.h + gf2mat.h + gf2vec.h + awgn_bp.h ldpc_encoder.h ldpc_decoder.h polar_encoder.h diff --git a/gr-fec/include/gnuradio/fec/async_decoder.h b/gr-fec/include/gnuradio/fec/async_decoder.h index eda091568e..3c83ffa370 100644 --- a/gr-fec/include/gnuradio/fec/async_decoder.h +++ b/gr-fec/include/gnuradio/fec/async_decoder.h @@ -87,7 +87,7 @@ namespace gr { * \param my_decoder An FECAPI decoder object child of the generic_decoder class. * \param packed Sets output to packed bytes if true; otherwise, 1 bit per byte. * \param rev_pack If packing bits, should they be reversed? - * \param mtu The Maxium Transmission Unit (MTU) of the output + * \param mtu The Maximum Transmission Unit (MTU) of the output * frame that the block will be able to * process. Specified in bytes and defaults to 1500. */ diff --git a/gr-fec/include/gnuradio/fec/async_encoder.h b/gr-fec/include/gnuradio/fec/async_encoder.h index ed68334fb5..98ccf0a32a 100644 --- a/gr-fec/include/gnuradio/fec/async_encoder.h +++ b/gr-fec/include/gnuradio/fec/async_encoder.h @@ -82,7 +82,7 @@ namespace gr { * \param packed True if working on packed bytes (like PDUs). * \param rev_unpack Reverse the unpacking order from input bytes to bits. * \param rev_pack Reverse the packing order from bits to output bytes. - * \param mtu The Maxium Transmission Unit (MTU) of the input + * \param mtu The Maximum Transmission Unit (MTU) of the input * frame that the block will be able to * process. Specified in bytes and defaults to 1500. */ diff --git a/gr-fec/include/gnuradio/fec/ber_bf.h b/gr-fec/include/gnuradio/fec/ber_bf.h index 5128d98d3e..5e219defc1 100644 --- a/gr-fec/include/gnuradio/fec/ber_bf.h +++ b/gr-fec/include/gnuradio/fec/ber_bf.h @@ -53,7 +53,7 @@ namespace gr { * berminerrors are observed and then produces a BER * calculation. The parameter \p ber_limit helps make sure that * the simulation is controlled. If the BER calculation drops - * bellow the \p ber_limit setting, the block will exit and simply + * below the \p ber_limit setting, the block will exit and simply * return the set limit; the real BER is therefore some amount * lower than this. * diff --git a/gr-fec/include/gnuradio/fec/tagged_decoder.h b/gr-fec/include/gnuradio/fec/tagged_decoder.h index 7c8058cf39..9ff472f372 100644 --- a/gr-fec/include/gnuradio/fec/tagged_decoder.h +++ b/gr-fec/include/gnuradio/fec/tagged_decoder.h @@ -76,7 +76,7 @@ namespace gr { * \param input_item_size The size of the input items (often the my_decoder object can tell us this). * \param output_item_size The size of the output items (often the my_decoder object can tell us this). * \param lengthtagname Key name of the tagged stream frame size. - * \param mtu The Maxium Transmission Unit (MTU) of the output + * \param mtu The Maximum Transmission Unit (MTU) of the output * frame that the block will be able to * process. Specified in bytes and defaults to 1500. */ diff --git a/gr-fec/include/gnuradio/fec/tagged_encoder.h b/gr-fec/include/gnuradio/fec/tagged_encoder.h index 435584db4b..90cb16e8e4 100644 --- a/gr-fec/include/gnuradio/fec/tagged_encoder.h +++ b/gr-fec/include/gnuradio/fec/tagged_encoder.h @@ -56,7 +56,7 @@ namespace gr { * \param input_item_size size of a block of data for the encoder. * \param output_item_size size of a block of data the encoder will produce. * \param lengthtagname Key name of the tagged stream frame size. - * \param mtu The Maxium Transmission Unit (MTU) of the input + * \param mtu The Maximum Transmission Unit (MTU) of the input * frame that the block will be able to * process. Specified in bytes and defaults to 1500. */ diff --git a/gr-filter/include/gnuradio/filter/fft_filter_ccc.h b/gr-filter/include/gnuradio/filter/fft_filter_ccc.h index 2cff4585d2..b9c5cca2b2 100644 --- a/gr-filter/include/gnuradio/filter/fft_filter_ccc.h +++ b/gr-filter/include/gnuradio/filter/fft_filter_ccc.h @@ -36,7 +36,7 @@ namespace gr { * \details * This block implements a complex decimating filter using the * fast convolution method via an FFT. The decimation factor is an - * interger that is greater than or equal to 1. + * integer that is greater than or equal to 1. * * The filter takes a set of complex (or real) taps to use in the * filtering operation. These taps can be defined as anything that diff --git a/gr-filter/include/gnuradio/filter/fft_filter_ccf.h b/gr-filter/include/gnuradio/filter/fft_filter_ccf.h index b0230f8263..28a7e11bfe 100644 --- a/gr-filter/include/gnuradio/filter/fft_filter_ccf.h +++ b/gr-filter/include/gnuradio/filter/fft_filter_ccf.h @@ -36,7 +36,7 @@ namespace gr { * \details * This block implements a complex decimating filter using the * fast convolution method via an FFT. The decimation factor is an - * interger that is greater than or equal to 1. + * integer that is greater than or equal to 1. * * The filter takes a set of complex (or real) taps to use in the * filtering operation. These taps can be defined as anything that diff --git a/gr-filter/include/gnuradio/filter/fft_filter_fff.h b/gr-filter/include/gnuradio/filter/fft_filter_fff.h index dc56077679..2c1b012b39 100644 --- a/gr-filter/include/gnuradio/filter/fft_filter_fff.h +++ b/gr-filter/include/gnuradio/filter/fft_filter_fff.h @@ -36,7 +36,7 @@ namespace gr { * \details * This block implements a real-value decimating filter using the * fast convolution method via an FFT. The decimation factor is an - * interger that is greater than or equal to 1. + * integer that is greater than or equal to 1. * * The filter takes a set of real-valued taps to use in the * filtering operation. These taps can be defined as anything that diff --git a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccc.h b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccc.h index c473846c5e..2814f7be05 100644 --- a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccc.h +++ b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccc.h @@ -50,7 +50,7 @@ namespace gr { typedef boost::shared_ptr<pfb_arb_resampler_ccc> sptr; /*! - * Build the polyphase filterbank arbitray resampler. + * Build the polyphase filterbank arbitrary resampler. * \param rate (float) Specifies the resampling rate to use * \param taps (vector/list of complex) The prototype filter to populate the filterbank. The taps * should be generated at the filter_size sampling rate. diff --git a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccf.h b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccf.h index 453d0cdb5f..fcd6c29a72 100644 --- a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccf.h +++ b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_ccf.h @@ -50,7 +50,7 @@ namespace gr { typedef boost::shared_ptr<pfb_arb_resampler_ccf> sptr; /*! - * Build the polyphase filterbank arbitray resampler. + * Build the polyphase filterbank arbitrary resampler. * \param rate (float) Specifies the resampling rate to use * \param taps (vector/list of floats) The prototype filter to populate the filterbank. The taps * should be generated at the filter_size sampling rate. diff --git a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_fff.h b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_fff.h index 7ae3dcb38f..aadfb778dc 100644 --- a/gr-filter/include/gnuradio/filter/pfb_arb_resampler_fff.h +++ b/gr-filter/include/gnuradio/filter/pfb_arb_resampler_fff.h @@ -99,7 +99,7 @@ namespace gr { typedef boost::shared_ptr<pfb_arb_resampler_fff> sptr; /*! - * Build the polyphase filterbank arbitray resampler. + * Build the polyphase filterbank arbitrary resampler. * \param rate (float) Specifies the resampling rate to use * \param taps (vector/list of floats) The prototype filter to populate the filterbank. The taps * should be generated at the filter_size sampling rate. diff --git a/gr-filter/include/gnuradio/filter/pfb_channelizer_ccf.h b/gr-filter/include/gnuradio/filter/pfb_channelizer_ccf.h index b6da9e19f5..91ef57e728 100644 --- a/gr-filter/include/gnuradio/filter/pfb_channelizer_ccf.h +++ b/gr-filter/include/gnuradio/filter/pfb_channelizer_ccf.h @@ -50,7 +50,7 @@ namespace gr { * filter has the same number of taps. * * Each filter operates using the gr::blocks::fir_filter_XXX - * classs of GNU Radio, which takes the input stream at <EM>i</EM> + * class of GNU Radio, which takes the input stream at <EM>i</EM> * and performs the inner product calculation to <EM>i+(n-1)</EM> * where <EM>n</EM> is the number of filter taps. To efficiently * handle this in the GNU Radio structure, each filter input must diff --git a/gr-filter/include/gnuradio/filter/pfb_decimator_ccf.h b/gr-filter/include/gnuradio/filter/pfb_decimator_ccf.h index 06f329a03e..5f0f2700b7 100644 --- a/gr-filter/include/gnuradio/filter/pfb_decimator_ccf.h +++ b/gr-filter/include/gnuradio/filter/pfb_decimator_ccf.h @@ -36,7 +36,7 @@ namespace gr { * \ingroup channelizers_blk * * \details - * This block takes in a signal stream and performs interger down- + * This block takes in a signal stream and performs integer down- * sampling (decimation) with a polyphase filterbank. The first * input is the integer specifying how much to decimate by. The * second input is a vector (Python list) of floating-point taps diff --git a/gr-filter/include/gnuradio/filter/pfb_interpolator_ccf.h b/gr-filter/include/gnuradio/filter/pfb_interpolator_ccf.h index 096c8fd1db..7624f9ef25 100644 --- a/gr-filter/include/gnuradio/filter/pfb_interpolator_ccf.h +++ b/gr-filter/include/gnuradio/filter/pfb_interpolator_ccf.h @@ -36,7 +36,7 @@ namespace gr { * \ingroup channelizers_blk * * \details - * This block takes in a signal stream and performs interger up- + * This block takes in a signal stream and performs integer up- * sampling (interpolation) with a polyphase filterbank. The first * input is the integer specifying how much to interpolate by. The * second input is a vector (Python list) of floating-point taps diff --git a/gr-filter/include/gnuradio/filter/pfb_synthesizer_ccf.h b/gr-filter/include/gnuradio/filter/pfb_synthesizer_ccf.h index d0a061fdd3..b0872054db 100644 --- a/gr-filter/include/gnuradio/filter/pfb_synthesizer_ccf.h +++ b/gr-filter/include/gnuradio/filter/pfb_synthesizer_ccf.h @@ -37,7 +37,7 @@ namespace gr { * * \details * - * The PFB sythesis filterbank combines multiple baseband signals + * The PFB synthesis filterbank combines multiple baseband signals * into a single channelized signal. Each input stream is, * essentially, modulated onto an output channel according the the * channel mapping (see set_channel_map for details). diff --git a/gr-filter/include/gnuradio/filter/pm_remez.h b/gr-filter/include/gnuradio/filter/pm_remez.h index 98683cd637..c7e1130d90 100644 --- a/gr-filter/include/gnuradio/filter/pm_remez.h +++ b/gr-filter/include/gnuradio/filter/pm_remez.h @@ -36,8 +36,8 @@ namespace gr { * * \details * Calculates the optimal (in the Chebyshev/minimax sense) FIR - * filter inpulse reponse given a set of band edges, the desired - * reponse on those bands, and the weight given to the error in + * filter inpulse response given a set of band edges, the desired + * response on those bands, and the weight given to the error in * those bands. * * \param order filter order (number of taps in the returned filter - 1) diff --git a/gr-filter/include/gnuradio/filter/polyphase_filterbank.h b/gr-filter/include/gnuradio/filter/polyphase_filterbank.h index 1745a470ab..f3bedd811b 100644 --- a/gr-filter/include/gnuradio/filter/polyphase_filterbank.h +++ b/gr-filter/include/gnuradio/filter/polyphase_filterbank.h @@ -55,7 +55,7 @@ namespace gr { * number of taps. * * Each filter operates using the gr::filter::fir_filter_XXX - * classs of GNU Radio, which takes the input stream at + * class of GNU Radio, which takes the input stream at * <EM>i</EM> and performs the inner product calculation to * <EM>i+(n-1)</EM> where <EM>n</EM> is the number of filter * taps. To efficiently handle this in the GNU Radio structure, diff --git a/gr-filter/lib/pm_remez.cc b/gr-filter/lib/pm_remez.cc index ea351766a5..e55466fd8a 100644 --- a/gr-filter/lib/pm_remez.cc +++ b/gr-filter/lib/pm_remez.cc @@ -575,7 +575,7 @@ namespace gr { *======= * Calculates the optimal (in the Chebyshev/minimax sense) * FIR filter impulse response given a set of band edges, - * the desired reponse on those bands, and the weight given to + * the desired response on those bands, and the weight given to * the error in those bands. * * INPUT: diff --git a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt index 5d22f112af..991c7583a8 100644 --- a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt +++ b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt @@ -46,8 +46,6 @@ install(FILES qtgui_types.h sink_c.h sink_f.h - spectrumdisplayform.h - SpectrumGUIClass.h spectrumUpdateEvents.h timedisplayform.h timecontrolpanel.h diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc index 98f603a8b0..209f03340f 100644 --- a/gr-qtgui/lib/time_sink_c_impl.cc +++ b/gr-qtgui/lib/time_sink_c_impl.cc @@ -698,6 +698,7 @@ namespace gr { { size_t len; pmt::pmt_t dict, samples; + std::vector< std::vector<gr::tag_t> > t(1); // Test to make sure this is either a PDU or a uniform vector of // samples. Get the samples PMT and the dictionary if it's a PDU. @@ -714,6 +715,29 @@ namespace gr { "a PDU or a uniform vector of samples."); } + // add tag info if it is present in metadata + if(pmt::is_dict(dict)){ + if(pmt::dict_has_key(dict, pmt::mp("tags"))){ + d_tags.clear(); + pmt::pmt_t tags = pmt::dict_ref(dict, pmt::mp("tags"), pmt::PMT_NIL); + int len = pmt::length(tags); + for(int i=0; i<len; i++){ + // get tag info from list + pmt::pmt_t tup = pmt::vector_ref(tags, i); + int tagval = pmt::to_long(pmt::tuple_ref(tup,0)); + pmt::pmt_t k = pmt::tuple_ref(tup,1); + pmt::pmt_t v = pmt::tuple_ref(tup,2); + + // add the tag + t[0].push_back( gr::tag_t() ); + t[0][t[0].size()-1].offset = tagval; + t[0][t[0].size()-1].key = k; + t[0][t[0].size()-1].value = v; + t[0][t[0].size()-1].srcid = pmt::PMT_NIL; + } + } + } + len = pmt::length(samples); const gr_complex *in; @@ -735,7 +759,6 @@ namespace gr { d_buffers[2*d_nconnections+1], in, len); - std::vector< std::vector<gr::tag_t> > t; d_qApplication->postEvent(d_main_gui, new TimeUpdateEvent(d_buffers, len, t)); } diff --git a/gr-uhd/include/gnuradio/uhd/usrp_block.h b/gr-uhd/include/gnuradio/uhd/usrp_block.h index 3c159056b7..6e4245e862 100644 --- a/gr-uhd/include/gnuradio/uhd/usrp_block.h +++ b/gr-uhd/include/gnuradio/uhd/usrp_block.h @@ -393,7 +393,7 @@ namespace gr { virtual ::uhd::time_spec_t get_time_now(size_t mboard = 0) = 0; /*! - * Get the time when the last pps pulse occured. + * Get the time when the last pps pulse occurred. * \param mboard the motherboard index 0 to M-1 * \return the current usrp time */ diff --git a/gr-utils/python/utils/gr_plot_qt b/gr-utils/python/utils/gr_plot_qt index 153359f0c6..9205d23a7e 100755 --- a/gr-utils/python/utils/gr_plot_qt +++ b/gr-utils/python/utils/gr_plot_qt @@ -26,7 +26,7 @@ except ImportError: raise SystemExit, 1 try: - # FIXME: reenable this before committing + # FIXME: re-enable this before committing #from gnuradio.pyqt_plot import Ui_MainWindow from gnuradio.pyqt_plot import Ui_MainWindow except ImportError: diff --git a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt index 1ad2f711fc..60f75e7913 100644 --- a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt +++ b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt @@ -24,9 +24,6 @@ install(FILES api.h alaw_decode_bs.h alaw_encode_sb.h - codec2.h - codec2_decode_ps.h - codec2_encode_sp.h cvsd_decode_bs.h cvsd_encode_sb.h g721_decode_bs.h diff --git a/grc/gui/FileDialogs.py b/grc/gui/FileDialogs.py index e9430b1f88..9d047b1ffd 100644 --- a/grc/gui/FileDialogs.py +++ b/grc/gui/FileDialogs.py @@ -199,7 +199,7 @@ class FileDialog(FileDialogHelper): Get the filename and destroy the dialog. Returns: - the filename or None if a close/cancel occured. + the filename or None if a close/cancel occurred. """ filename = self.get_rectified_filename() self.destroy() |