summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-runtime/include/gnuradio/block.h12
-rw-r--r--gnuradio-runtime/include/gnuradio/block_gateway.h5
-rw-r--r--gnuradio-runtime/include/gnuradio/rpccallbackregister_base.h6
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcserver_aggregator.h12
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcserver_base.h6
-rw-r--r--gnuradio-runtime/lib/block_executor.cc4
-rw-r--r--gnuradio-runtime/lib/controlport/rpcserver_aggregator.cc6
-rw-r--r--gr-blocks/grc/blocks_multiply_matrix_xx.xml2
-rw-r--r--gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t22
-rw-r--r--gr-blocks/lib/multiply_matrix_cc_impl.cc16
-rw-r--r--gr-blocks/lib/multiply_matrix_cc_impl.h5
-rw-r--r--gr-blocks/lib/multiply_matrix_ff_impl.cc14
-rw-r--r--gr-blocks/lib/multiply_matrix_ff_impl.h5
-rw-r--r--gr-digital/lib/header_payload_demux_impl.cc3
-rw-r--r--gr-dtv/include/gnuradio/dtv/catv_frame_sync_enc_bb.h7
-rw-r--r--gr-dtv/include/gnuradio/dtv/catv_randomizer_bb.h3
-rw-r--r--gr-dtv/include/gnuradio/dtv/catv_trellis_enc_bb.h7
-rw-r--r--gr-dtv/lib/catv/catv_frame_sync_enc_bb_impl.cc3
-rw-r--r--gr-fft/lib/window.cc11
19 files changed, 64 insertions, 85 deletions
diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h
index 533591930b..d23358cccb 100644
--- a/gnuradio-runtime/include/gnuradio/block.h
+++ b/gnuradio-runtime/include/gnuradio/block.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2007,2009,2010,2013 Free Software Foundation, Inc.
+ * Copyright 2004,2007,2009,2010,2013,2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -67,10 +67,14 @@ namespace gr {
WORK_DONE = -1
};
+ /*!
+ * \brief enum to represent different tag propagation policies.
+ */
enum tag_propagation_policy_t {
- TPP_DONT = 0,
- TPP_ALL_TO_ALL = 1,
- TPP_ONE_TO_ONE = 2
+ TPP_DONT = 0, /*!< Scheduler doesn't propagate tags from in- to output. The block itself is free to insert tags as it wants. */
+ TPP_ALL_TO_ALL = 1, /*!< Propagate tags from all in- to all outputs. The scheduler takes care of that. */
+ TPP_ONE_TO_ONE = 2, /*!< Propagate tags from n. input to n. output. Requires same number of in- and outputs */
+ TPP_CUSTOM = 3 /*!< Like TPP_DONT, but signals the block it should implement application-specific forwarding behaviour. */
};
virtual ~block();
diff --git a/gnuradio-runtime/include/gnuradio/block_gateway.h b/gnuradio-runtime/include/gnuradio/block_gateway.h
index bc04c0c915..060e525358 100644
--- a/gnuradio-runtime/include/gnuradio/block_gateway.h
+++ b/gnuradio-runtime/include/gnuradio/block_gateway.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011-2013 Free Software Foundation, Inc.
+ * Copyright 2011-2013,2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -44,7 +44,8 @@ namespace gr {
enum tag_propagation_policy_t {
TPP_DONT = 0,
TPP_ALL_TO_ALL = 1,
- TPP_ONE_TO_ONE = 2
+ TPP_ONE_TO_ONE = 2,
+ TPP_CUSTOM = 3
};
/*!
diff --git a/gnuradio-runtime/include/gnuradio/rpccallbackregister_base.h b/gnuradio-runtime/include/gnuradio/rpccallbackregister_base.h
index 14e8772449..c136791994 100644
--- a/gnuradio-runtime/include/gnuradio/rpccallbackregister_base.h
+++ b/gnuradio-runtime/include/gnuradio/rpccallbackregister_base.h
@@ -104,11 +104,11 @@ struct callbackregister_base
callbackregister_base() {;}
virtual ~callbackregister_base() {;}
- virtual void registerConfigureCallback(const std::string &id, const configureCallback_t callback) = 0;
+ virtual void registerConfigureCallback(const std::string &id, const configureCallback_t &callback) = 0;
virtual void unregisterConfigureCallback(const std::string &id) = 0;
- virtual void registerQueryCallback(const std::string &id, const queryCallback_t callback) = 0;
+ virtual void registerQueryCallback(const std::string &id, const queryCallback_t &callback) = 0;
virtual void unregisterQueryCallback(const std::string &id) = 0;
- virtual void registerHandlerCallback(const std::string &id, const handlerCallback_t callback) = 0;
+ virtual void registerHandlerCallback(const std::string &id, const handlerCallback_t &callback) = 0;
virtual void unregisterHandlerCallback(const std::string &id) = 0;
};
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_aggregator.h b/gnuradio-runtime/include/gnuradio/rpcserver_aggregator.h
index 08426bb00c..c9c5356309 100644
--- a/gnuradio-runtime/include/gnuradio/rpcserver_aggregator.h
+++ b/gnuradio-runtime/include/gnuradio/rpcserver_aggregator.h
@@ -34,13 +34,13 @@ public:
rpcserver_aggregator();
virtual ~rpcserver_aggregator();
- void registerConfigureCallback(const std::string &id, const configureCallback_t callback);
+ void registerConfigureCallback(const std::string &id, const configureCallback_t &callback);
void unregisterConfigureCallback(const std::string &id);
- void registerQueryCallback(const std::string &id, const queryCallback_t callback);
+ void registerQueryCallback(const std::string &id, const queryCallback_t &callback);
void unregisterQueryCallback(const std::string &id);
- void registerHandlerCallback(const std::string &id, const handlerCallback_t callback);
+ void registerHandlerCallback(const std::string &id, const handlerCallback_t &callback);
void unregisterHandlerCallback(const std::string &id);
void registerServer(rpcmanager_base::rpcserver_booter_base_sptr server);
@@ -53,7 +53,7 @@ private:
template<class T, typename Tcallback>
struct registerConfigureCallback_f: public std::unary_function<T,void>
{
- registerConfigureCallback_f(const std::string &_id, const Tcallback _callback)
+ registerConfigureCallback_f(const std::string &_id, const Tcallback &_callback)
: id(_id), callback(_callback)
{;}
@@ -75,7 +75,7 @@ private:
template<class T, typename Tcallback>
struct registerQueryCallback_f: public std::unary_function<T,void>
{
- registerQueryCallback_f(const std::string &_id, const Tcallback _callback)
+ registerQueryCallback_f(const std::string &_id, const Tcallback &_callback)
: id(_id), callback(_callback)
{;}
@@ -99,7 +99,7 @@ private:
template<class T, typename Tcallback>
struct registerHandlerCallback_f: public std::unary_function<T,void>
{
- registerHandlerCallback_f(const std::string &_id, const Tcallback _callback)
+ registerHandlerCallback_f(const std::string &_id, const Tcallback &_callback)
: id(_id), callback(_callback)
{;}
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_base.h b/gnuradio-runtime/include/gnuradio/rpcserver_base.h
index 276dec5d1e..c85165bcad 100644
--- a/gnuradio-runtime/include/gnuradio/rpcserver_base.h
+++ b/gnuradio-runtime/include/gnuradio/rpcserver_base.h
@@ -31,13 +31,13 @@ public:
rpcserver_base() : cur_priv(RPC_PRIVLVL_ALL) {;}
virtual ~rpcserver_base() {;}
- virtual void registerConfigureCallback(const std::string &id, const configureCallback_t callback) = 0;
+ virtual void registerConfigureCallback(const std::string &id, const configureCallback_t &callback) = 0;
virtual void unregisterConfigureCallback(const std::string &id) = 0;
- virtual void registerQueryCallback(const std::string &id, const queryCallback_t callback) = 0;
+ virtual void registerQueryCallback(const std::string &id, const queryCallback_t &callback) = 0;
virtual void unregisterQueryCallback(const std::string &id) = 0;
- virtual void registerHandlerCallback(const std::string &id, const handlerCallback_t callback) = 0;
+ virtual void registerHandlerCallback(const std::string &id, const handlerCallback_t &callback) = 0;
virtual void unregisterHandlerCallback(const std::string &id) = 0;
virtual void setCurPrivLevel(const priv_lvl_t priv) { cur_priv = priv; }
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc
index 585e65fc6e..5c23df39a5 100644
--- a/gnuradio-runtime/lib/block_executor.cc
+++ b/gnuradio-runtime/lib/block_executor.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2008-2010,2013 Free Software Foundation, Inc.
+ * Copyright 2004,2008-2010,2013,2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -103,8 +103,8 @@ namespace gr {
switch(policy) {
case block::TPP_DONT:
+ case block::TPP_CUSTOM:
return true;
- break;
case block::TPP_ALL_TO_ALL:
// every tag on every input propogates to everyone downstream
for(int i = 0; i < d->ninputs(); i++) {
diff --git a/gnuradio-runtime/lib/controlport/rpcserver_aggregator.cc b/gnuradio-runtime/lib/controlport/rpcserver_aggregator.cc
index e81a899626..f546c2daab 100644
--- a/gnuradio-runtime/lib/controlport/rpcserver_aggregator.cc
+++ b/gnuradio-runtime/lib/controlport/rpcserver_aggregator.cc
@@ -47,7 +47,7 @@ rpcserver_aggregator::registeredServers()
void
rpcserver_aggregator::registerConfigureCallback(const std::string &id,
- const configureCallback_t callback)
+ const configureCallback_t &callback)
{
std::for_each(d_serverlist.begin(), d_serverlist.end(),
registerConfigureCallback_f<rpcmanager_base::rpcserver_booter_base_sptr, configureCallback_t>(id, callback));
@@ -61,7 +61,7 @@ rpcserver_aggregator::unregisterConfigureCallback(const std::string &id)
}
void
-rpcserver_aggregator::registerQueryCallback(const std::string &id, const queryCallback_t callback)
+rpcserver_aggregator::registerQueryCallback(const std::string &id, const queryCallback_t &callback)
{
std::for_each(d_serverlist.begin(), d_serverlist.end(),
registerQueryCallback_f<rpcmanager_base::rpcserver_booter_base_sptr, queryCallback_t>(id, callback));
@@ -78,7 +78,7 @@ rpcserver_aggregator::unregisterQueryCallback(const std::string &id)
void
rpcserver_aggregator::registerHandlerCallback(const std::string &id,
- const handlerCallback_t callback)
+ const handlerCallback_t &callback)
{
std::for_each(d_serverlist.begin(), d_serverlist.end(),
registerHandlerCallback_f<rpcmanager_base::rpcserver_booter_base_sptr, handlerCallback_t>(id, callback));
diff --git a/gr-blocks/grc/blocks_multiply_matrix_xx.xml b/gr-blocks/grc/blocks_multiply_matrix_xx.xml
index 070221446e..bb1d77c0ba 100644
--- a/gr-blocks/grc/blocks_multiply_matrix_xx.xml
+++ b/gr-blocks/grc/blocks_multiply_matrix_xx.xml
@@ -44,7 +44,7 @@
</option>
<option>
<name>Matrix-Defined</name>
- <key>999</key>
+ <key>gr.TPP_CUSTOM</key>
</option>
</param>
<check>len($A) > 0</check>
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t b/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
index 20931f1cc7..710f7d343a 100644
--- a/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
+++ b/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014, 2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -32,7 +32,7 @@ namespace gr {
namespace blocks {
/*!
- * \brief Matrix multiplexer/multiplier: y(k) = A * x(k)
+ * \brief Matrix multiplexer/multiplier: y(k) = A x(k)
* \ingroup blocks
*
* This block is similar to gr::blocks::multiply_const_ff, the difference
@@ -50,8 +50,8 @@ namespace gr {
* - Summing up streams with variable coefficients
*
* This block features a special tag propagation mode: When setting the tag propagation policy
- * to gr::blocks::@NAME@::TPP_SELECT_BY_MATRIX, a tag is propagated from input k
- * to output l if \f$(A)_{l,k} \neq 0\f$.
+ * to gr::block::TPP_CUSTOM, a tag is propagated from input \f$k\f$
+ * to output \f$l\f$, if \f$(A)_{l,k} \neq 0\f$.
*
* \section blocks_matrixmult_msgports_@NAME@ Message Ports
*
@@ -72,7 +72,11 @@ namespace gr {
/*!
* \param A The matrix
* \param tag_propagation_policy The tag propagation policy.
- * Note this can be any gr::block::tag_propagation_policy_t value, or TPP_SELECT_BY_MATRIX.
+ * Note this can be any
+ * gr::block::tag_propagation_policy_t
+ * value. In case of TPP_CUSTOM, tags are
+ * only transferred from input \f$k\f$ to
+ * output \f$l \iff (A)_{l,k} \neq 0\f$.
*/
static sptr make(
std::vector<std::vector<@O_TYPE@> > A,
@@ -84,14 +88,6 @@ namespace gr {
//! Sets the matrix to a new value \p new_A. Returns true if the new matrix was valid and could be changed.
virtual bool set_A(const std::vector<std::vector<@O_TYPE@> > &new_A) = 0;
- /*!
- * \brief Set the policy by the scheduler to determine how tags are moved downstream.
- *
- * This will also accept the value TPP_SELECT_BY_MATRIX.
- */
- virtual void set_tag_propagation_policy(gr::block::tag_propagation_policy_t p) = 0;
-
- static const int TPP_SELECT_BY_MATRIX;
static const std::string MSG_PORT_NAME_SET_A;
};
diff --git a/gr-blocks/lib/multiply_matrix_cc_impl.cc b/gr-blocks/lib/multiply_matrix_cc_impl.cc
index 7ecf3e95ce..15fc0fc814 100644
--- a/gr-blocks/lib/multiply_matrix_cc_impl.cc
+++ b/gr-blocks/lib/multiply_matrix_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014,2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -31,7 +31,6 @@
namespace gr {
namespace blocks {
- const int multiply_matrix_cc::TPP_SELECT_BY_MATRIX = 999;
const std::string multiply_matrix_cc::MSG_PORT_NAME_SET_A = "set_A";
multiply_matrix_cc::sptr
@@ -85,7 +84,7 @@ namespace gr {
}
}
}
- if (d_tag_prop_select) {
+ if (tag_propagation_policy() == TPP_CUSTOM) {
propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
}
return noutput_items;
@@ -178,17 +177,6 @@ namespace gr {
}
}
- void
- multiply_matrix_cc_impl::set_tag_propagation_policy(gr::block::tag_propagation_policy_t tpp)
- {
- if (tpp == TPP_SELECT_BY_MATRIX) {
- set_tag_propagation_policy(TPP_DONT);
- d_tag_prop_select = true;
- } else {
- gr::block::set_tag_propagation_policy(tpp);
- d_tag_prop_select = false;
- }
- }
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_matrix_cc_impl.h b/gr-blocks/lib/multiply_matrix_cc_impl.h
index b357dde2cb..f342817e26 100644
--- a/gr-blocks/lib/multiply_matrix_cc_impl.h
+++ b/gr-blocks/lib/multiply_matrix_cc_impl.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014, 2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -32,7 +32,6 @@ namespace gr {
{
private:
std::vector<std::vector<gr_complex> > d_A;
- bool d_tag_prop_select; //!< If true, handle the tag propagation ourselves
void propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports);
@@ -45,8 +44,6 @@ namespace gr {
const std::vector<std::vector<gr_complex> >& get_A() const { return d_A; };
bool set_A(const std::vector<std::vector<gr_complex> > &new_A);
- void set_tag_propagation_policy(gr::block::tag_propagation_policy_t p);
-
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
diff --git a/gr-blocks/lib/multiply_matrix_ff_impl.cc b/gr-blocks/lib/multiply_matrix_ff_impl.cc
index c0b3abfe98..a5eae4261e 100644
--- a/gr-blocks/lib/multiply_matrix_ff_impl.cc
+++ b/gr-blocks/lib/multiply_matrix_ff_impl.cc
@@ -31,7 +31,6 @@
namespace gr {
namespace blocks {
- const int multiply_matrix_ff::TPP_SELECT_BY_MATRIX = 999;
const std::string multiply_matrix_ff::MSG_PORT_NAME_SET_A = "set_A";
multiply_matrix_ff::sptr
@@ -85,7 +84,7 @@ namespace gr {
}
}
}
- if (d_tag_prop_select) {
+ if (tag_propagation_policy() == TPP_CUSTOM) {
propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
}
return noutput_items;
@@ -178,17 +177,6 @@ namespace gr {
}
}
- void
- multiply_matrix_ff_impl::set_tag_propagation_policy(gr::block::tag_propagation_policy_t tpp)
- {
- if (((int) tpp) == TPP_SELECT_BY_MATRIX) {
- set_tag_propagation_policy(TPP_DONT);
- d_tag_prop_select = true;
- } else {
- gr::block::set_tag_propagation_policy(tpp);
- d_tag_prop_select = false;
- }
- }
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_matrix_ff_impl.h b/gr-blocks/lib/multiply_matrix_ff_impl.h
index c9476bc8d1..93b2bebadd 100644
--- a/gr-blocks/lib/multiply_matrix_ff_impl.h
+++ b/gr-blocks/lib/multiply_matrix_ff_impl.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014, 2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -32,7 +32,6 @@ namespace gr {
{
private:
std::vector<std::vector<float> > d_A;
- bool d_tag_prop_select; //!< If true, handle the tag propagation ourselves
void propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports);
@@ -45,8 +44,6 @@ namespace gr {
const std::vector<std::vector<float> >& get_A() const { return d_A; };
bool set_A(const std::vector<std::vector<float> > &new_A);
- void set_tag_propagation_policy(gr::block::tag_propagation_policy_t p);
-
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc
index f887ea1eb3..be9e2bf591 100644
--- a/gr-digital/lib/header_payload_demux_impl.cc
+++ b/gr-digital/lib/header_payload_demux_impl.cc
@@ -134,9 +134,6 @@ namespace gr {
if (d_header_len < 1) {
throw std::invalid_argument("Header length must be at least 1 symbol.");
}
- if (header_padding < 0) {
- throw std::invalid_argument("Header padding must be non-negative.");
- }
if (d_items_per_symbol < 1 || d_gi < 0 || d_itemsize < 1) {
throw std::invalid_argument("Items and symbol sizes must be at least 1.");
}
diff --git a/gr-dtv/include/gnuradio/dtv/catv_frame_sync_enc_bb.h b/gr-dtv/include/gnuradio/dtv/catv_frame_sync_enc_bb.h
index 99ea428aed..5f75af8c00 100644
--- a/gr-dtv/include/gnuradio/dtv/catv_frame_sync_enc_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/catv_frame_sync_enc_bb.h
@@ -29,11 +29,11 @@ namespace gr {
namespace dtv {
/*!
- * \brief Frame Sync Encoder. Adds a 42-bit frame sync pattern with control word.
+ * \brief Frame Sync Encoder. Adds a 42-bit (64QAM) or 40-bit (256QAM) frame sync pattern with control word.
* \ingroup dtv
*
- * Input: Scrambled FEC Frame packets of 60 * 128 7-bit symbols.\n
- * Output: Scrambled FEC Frame packets of 60 * 128 7-bit symbols with 42-bit FSYNC word.
+ * Input: Scrambled FEC Frame packets of 60 * 128 (64QAM) or 88 * 128 (256QAM) 7-bit symbols.\n
+ * Output: Scrambled FEC Frame packets of 60 * 128 (64QAM) or 88 * 128 (256QAM) 7-bit symbols with 42-bit (64QAM) or 40-bit (256QAM) FSYNC word.
*/
class DTV_API catv_frame_sync_enc_bb : virtual public gr::block
{
@@ -43,6 +43,7 @@ namespace gr {
/*!
* \brief Create an ITU-T J.83B Frame Sync Encoder.
*
+ * \param constellation 64QAM or 256QAM constellation. \n
* \param ctrlword convolutional interleaver control word.
*/
static sptr make(catv_constellation_t constellation, int ctrlword);
diff --git a/gr-dtv/include/gnuradio/dtv/catv_randomizer_bb.h b/gr-dtv/include/gnuradio/dtv/catv_randomizer_bb.h
index cf9ad39c6d..a088153510 100644
--- a/gr-dtv/include/gnuradio/dtv/catv_randomizer_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/catv_randomizer_bb.h
@@ -33,7 +33,7 @@ namespace gr {
* \ingroup dtv
*
* Input: Interleaved MPEG-2 + RS parity bitstream packets of 128 7-bit symbols.\n
- * Output: Scrambled FEC Frame packets of 60 * 128 7-bit symbols.
+ * Output: Scrambled FEC Frame packets of 60 * 128 (64QAM) or 88 * 128 (256QAM) 7-bit symbols.
*/
class DTV_API catv_randomizer_bb : virtual public gr::sync_block
{
@@ -43,6 +43,7 @@ namespace gr {
/*!
* \brief Create an ITU-T J.83B randomizer.
*
+ * \param constellation 64QAM or 256QAM constellation.
*/
static sptr make(catv_constellation_t constellation);
};
diff --git a/gr-dtv/include/gnuradio/dtv/catv_trellis_enc_bb.h b/gr-dtv/include/gnuradio/dtv/catv_trellis_enc_bb.h
index e048af80ee..3f9d0fc927 100644
--- a/gr-dtv/include/gnuradio/dtv/catv_trellis_enc_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/catv_trellis_enc_bb.h
@@ -29,11 +29,11 @@ namespace gr {
namespace dtv {
/*!
- * \brief Trellis Encoder. 14/15 code rate.
+ * \brief Trellis Encoder. 14/15 (64QAM) or 19/20 (256QAM) code rate.
* \ingroup dtv
*
- * Input: Scrambled FEC Frame packets of 60 * 128 7-bit symbols with 42-bit FSYNC word.\n
- * Output: Four 7-bit symbols (28 bits) Trellis encoded to 30 bits (14/15 code rate).
+ * Input: Scrambled FEC Frame packets of 60 * 128 (64QAM) or 88 * 128 (256QAM) 7-bit symbols with 42-bit (64QAM) or 40-bit (256QAM) FSYNC word.\n
+ * Output: Four 7-bit symbols (28 bits) Trellis encoded to 30 bits (64QAM, 14/15 code rate) or 38 data bits Trellis encoded to 40 bits (256QAM, 19/20 code rate).
*/
class DTV_API catv_trellis_enc_bb : virtual public gr::block
{
@@ -43,6 +43,7 @@ namespace gr {
/*!
* \brief Create an ITU-T J.83B Trellis Encoder.
*
+ * \param constellation 64QAM or 256QAM constellation.
*/
static sptr make(catv_constellation_t constellation);
};
diff --git a/gr-dtv/lib/catv/catv_frame_sync_enc_bb_impl.cc b/gr-dtv/lib/catv/catv_frame_sync_enc_bb_impl.cc
index 3dd4881a77..f3b16be580 100644
--- a/gr-dtv/lib/catv/catv_frame_sync_enc_bb_impl.cc
+++ b/gr-dtv/lib/catv/catv_frame_sync_enc_bb_impl.cc
@@ -112,9 +112,8 @@ namespace gr {
for (int n = 6; n >= 0; n--) {
out[i++] = b & (1 << n) ? 1 : 0;
}
- b = 0x00;
for (int n = 6; n >= 0; n--) {
- out[i++] = b & (1 << n) ? 1 : 0;
+ out[i++] = 0;
}
}
else {
diff --git a/gr-fft/lib/window.cc b/gr-fft/lib/window.cc
index 126b28978d..cfbdb93dbd 100644
--- a/gr-fft/lib/window.cc
+++ b/gr-fft/lib/window.cc
@@ -261,10 +261,19 @@ namespace gr {
double inm1 = 1.0/((double)(ntaps-1));
double temp;
- for(int i = 0; i < ntaps; i++) {
+ /* extracting first and last element out of the loop, since
+ sqrt(1.0-temp*temp) might trigger unexpected floating point behaviour
+ if |temp| = 1.0+epsilon, which can happen for i==0 and
+ 1/i==1/(ntaps-1)==inm1 ; compare
+ https://github.com/gnuradio/gnuradio/issues/1348 .
+ In any case, the 0. Bessel function of first kind is 1 at point 0.
+ */
+ taps[0] = IBeta;
+ for(int i = 1; i < ntaps-1; i++) {
temp = 2*i*inm1 - 1;
taps[i] = Izero(beta*sqrt(1.0-temp*temp)) * IBeta;
}
+ taps[ntaps-1] = IBeta;
return taps;
}