[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/05: gr-dtv: Add code review updates.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/05: gr-dtv: Add code review updates. |
Date: |
Wed, 4 Mar 2015 18:13:11 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 1c75d25b1e6fb3aaa265303a723ec0cffd92ce8c
Author: Ron Economos <address@hidden>
Date: Fri Feb 20 16:31:55 2015 -0800
gr-dtv: Add code review updates.
---
gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h | 18 ++++++-
gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h | 11 ++++-
gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h | 11 ++++-
gr-dtv/include/gnuradio/dtv/dvb_config.h | 34 -------------
gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h | 11 ++++-
gr-dtv/lib/CMakeLists.txt | 8 ++--
gr-dtv/lib/{common => dvb}/dvb_bbheader_bb_impl.cc | 0
gr-dtv/lib/{common => dvb}/dvb_bbheader_bb_impl.h | 1 +
.../lib/{common => dvb}/dvb_bbscrambler_bb_impl.cc | 0
.../lib/{common => dvb}/dvb_bbscrambler_bb_impl.h | 1 +
gr-dtv/lib/{common => dvb}/dvb_bch_bb_impl.cc | 0
gr-dtv/lib/{common => dvb}/dvb_bch_bb_impl.h | 1 +
.../dtv/dvb_bch_bb.h => lib/dvb/dvb_defines.h} | 55 ++++++++++++----------
gr-dtv/lib/{common => dvb}/dvb_ldpc_bb_impl.cc | 0
gr-dtv/lib/{common => dvb}/dvb_ldpc_bb_impl.h | 1 +
15 files changed, 82 insertions(+), 70 deletions(-)
diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h
b/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h
index ca1f27e..48b6b4c 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/dvb_bbheader_bb.h
@@ -31,9 +31,14 @@ namespace gr {
namespace dtv {
/*!
- * \brief <+description of block+>
+ * \brief Formats MPEG-2 Transport Stream packets into FEC baseband frames
+ * and adds a 10-byte header.
* \ingroup dtv
*
+ * \details
+ * Input: 188-byte MPEG-2 Transport Stream packets.
+ * Output: Variable length FEC baseband frames (BBFRAME). The output frame
+ * length is based on the FEC rate.
*/
class DTV_API dvb_bbheader_bb : virtual public gr::block
{
@@ -41,7 +46,16 @@ namespace gr {
typedef boost::shared_ptr<dvb_bbheader_bb> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of dtv::dvb_bbheader_bb.
+ * \brief Create a baseband header formatter.
+ *
+ * \param standard DVB standard (DVB-S2 or DVB-T2).
+ * \param framesize FEC frame size (normal or short).
+ * \param rate FEC code rate.
+ * \param rolloff DVB-S2 root-raised-cosine filter roll-off.
+ * \param mode DVB-T2 input processing mode.
+ * \param inband DVB-T2 Type B in-band signalling.
+ * \param fecblocks DVB-T2 number of FEC block for in-band signalling.
+ * \param tsrate DVB-T2 Transport Stream rate for in-band signalling.
*/
static sptr make(dvb_standard_t standard, dvb_framesize_t framesize,
dvb_code_rate_t rate, dvbs2_rolloff_factor_t rolloff, dvbt2_inputmode_t mode,
dvbt2_inband_t inband, int fecblocks, int tsrate);
};
diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h
b/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h
index 39fadab..dc14f55 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/dvb_bbscrambler_bb.h
@@ -29,9 +29,12 @@ namespace gr {
namespace dtv {
/*!
- * \brief <+description of block+>
+ * \brief Scrambles FEC baseband frames with a PRBS encoder.
* \ingroup dtv
*
+ * \details
+ * Input: Variable length FEC baseband frames (BBFRAME).
+ * Output: Scrambled variable length FEC baseband frames (BBFRAME).
*/
class DTV_API dvb_bbscrambler_bb : virtual public gr::sync_block
{
@@ -39,7 +42,11 @@ namespace gr {
typedef boost::shared_ptr<dvb_bbscrambler_bb> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of
dtv::dvb_bbscrambler_bb.
+ * \brief Create a baseband frame scrambler.
+ *
+ * \param standard DVB standard (DVB-S2 or DVB-T2).
+ * \param framesize FEC frame size (normal 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 9cb7735..31dff47 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h
@@ -30,9 +30,12 @@ namespace gr {
namespace dtv {
/*!
- * \brief <+description of block+>
+ * \brief Encodes a BCH ((Bose, Chaudhuri, Hocquenghem) FEC.
* \ingroup dtv
*
+ * \details
+ * Input: Variable length FEC baseband frames (BBFRAME).
+ * Output: Variable length FEC baseband frames with appended BCH (BCHFEC).
*/
class DTV_API dvb_bch_bb : virtual public gr::block
{
@@ -40,7 +43,11 @@ namespace gr {
typedef boost::shared_ptr<dvb_bch_bb> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of dtv::dvb_bch_bb.
+ * \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 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 40907d1..d08c9c8 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_config.h
+++ b/gr-dtv/include/gnuradio/dtv/dvb_config.h
@@ -21,40 +21,6 @@
#ifndef INCLUDED_DTV_DVB_CONFIG_H
#define INCLUDED_DTV_DVB_CONFIG_H
-#define TRUE 1
-#define FALSE 0
-
-#define BB_HEADER_LENGTH_BITS 72
-
-// BB HEADER fields
-#define TS_GS_TRANSPORT 3
-#define TS_GS_GENERIC_PACKETIZED 0
-#define TS_GS_GENERIC_CONTINUOUS 1
-#define TS_GS_RESERVED 2
-
-#define SIS_MIS_SINGLE 1
-#define SIS_MIS_MULTIPLE 0
-
-#define CCM 1
-#define ACM 0
-
-#define ISSYI_ACTIVE 1
-#define ISSYI_NOT_ACTIVE 0
-
-#define NPD_ACTIVE 1
-#define NPD_NOT_ACTIVE 0
-
-#define FRAME_SIZE_NORMAL 64800
-#define FRAME_SIZE_SHORT 16200
-
-// BCH Code
-#define BCH_CODE_N8 0
-#define BCH_CODE_N10 1
-#define BCH_CODE_N12 2
-#define BCH_CODE_S12 3
-
-#define LDPC_ENCODE_TABLE_LENGTH (FRAME_SIZE_NORMAL * 10)
-
namespace gr {
namespace dtv {
enum dvb_standard_t {
diff --git a/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h
b/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h
index b8a059c..76923a8 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h
+++ b/gr-dtv/include/gnuradio/dtv/dvb_ldpc_bb.h
@@ -29,9 +29,11 @@ namespace gr {
namespace dtv {
/*!
- * \brief <+description of block+>
+ * \brief Encodes a LDPC (Low-Density Parity-Check) FEC.
* \ingroup dtv
*
+ * Input: Variable length FEC baseband frames with appended BCH (BCHFEC).
+ * Output: Normal or short FEC baseband frames with appended LPDC
(LDPCFEC).
*/
class DTV_API dvb_ldpc_bb : virtual public gr::block
{
@@ -39,7 +41,12 @@ namespace gr {
typedef boost::shared_ptr<dvb_ldpc_bb> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of dtv::dvb_ldpc_bb.
+ * \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 rate FEC code rate.
+ * \param constellation DVB-S2 constellation.
*/
static sptr make(dvb_standard_t standard, dvb_framesize_t framesize,
dvb_code_rate_t rate, dvb_constellation_t constellation);
};
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt
index ed158a7..a17a0fb 100644
--- a/gr-dtv/lib/CMakeLists.txt
+++ b/gr-dtv/lib/CMakeLists.txt
@@ -77,10 +77,10 @@ list(APPEND dtv_sources
atsc/atsc_basic_trellis_encoder.cc
atsc/atsc_trellis_encoder_impl.cc
atsc/atsc_field_sync_mux_impl.cc
- common/dvb_bbheader_bb_impl.cc
- common/dvb_bbscrambler_bb_impl.cc
- common/dvb_bch_bb_impl.cc
- common/dvb_ldpc_bb_impl.cc
+ dvb/dvb_bbheader_bb_impl.cc
+ dvb/dvb_bbscrambler_bb_impl.cc
+ dvb/dvb_bch_bb_impl.cc
+ dvb/dvb_ldpc_bb_impl.cc
)
if(ENABLE_GR_CTRLPORT)
diff --git a/gr-dtv/lib/common/dvb_bbheader_bb_impl.cc
b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc
similarity index 100%
rename from gr-dtv/lib/common/dvb_bbheader_bb_impl.cc
rename to gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc
diff --git a/gr-dtv/lib/common/dvb_bbheader_bb_impl.h
b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h
similarity index 98%
rename from gr-dtv/lib/common/dvb_bbheader_bb_impl.h
rename to gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h
index 89bd37b..97e0751 100644
--- a/gr-dtv/lib/common/dvb_bbheader_bb_impl.h
+++ b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.h
@@ -22,6 +22,7 @@
#define INCLUDED_DTV_DVB_BBHEADER_BB_IMPL_H
#include <gnuradio/dtv/dvb_bbheader_bb.h>
+#include "dvb_defines.h"
typedef struct{
int ts_gs;
diff --git a/gr-dtv/lib/common/dvb_bbscrambler_bb_impl.cc
b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc
similarity index 100%
rename from gr-dtv/lib/common/dvb_bbscrambler_bb_impl.cc
rename to gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc
diff --git a/gr-dtv/lib/common/dvb_bbscrambler_bb_impl.h
b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.h
similarity index 98%
rename from gr-dtv/lib/common/dvb_bbscrambler_bb_impl.h
rename to gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.h
index b31fbf1..d717731 100644
--- a/gr-dtv/lib/common/dvb_bbscrambler_bb_impl.h
+++ b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.h
@@ -22,6 +22,7 @@
#define INCLUDED_DTV_DVB_BBSCRAMBLER_BB_IMPL_H
#include <gnuradio/dtv/dvb_bbscrambler_bb.h>
+#include "dvb_defines.h"
namespace gr {
namespace dtv {
diff --git a/gr-dtv/lib/common/dvb_bch_bb_impl.cc
b/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc
similarity index 100%
rename from gr-dtv/lib/common/dvb_bch_bb_impl.cc
rename to gr-dtv/lib/dvb/dvb_bch_bb_impl.cc
diff --git a/gr-dtv/lib/common/dvb_bch_bb_impl.h
b/gr-dtv/lib/dvb/dvb_bch_bb_impl.h
similarity index 98%
rename from gr-dtv/lib/common/dvb_bch_bb_impl.h
rename to gr-dtv/lib/dvb/dvb_bch_bb_impl.h
index ef06b4f..5cba0a1 100644
--- a/gr-dtv/lib/common/dvb_bch_bb_impl.h
+++ b/gr-dtv/lib/dvb/dvb_bch_bb_impl.h
@@ -22,6 +22,7 @@
#define INCLUDED_DTV_DVB_BCH_BB_IMPL_H
#include <gnuradio/dtv/dvb_bch_bb.h>
+#include "dvb_defines.h"
namespace gr {
namespace dtv {
diff --git a/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h
b/gr-dtv/lib/dvb/dvb_defines.h
similarity index 52%
copy from gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h
copy to gr-dtv/lib/dvb/dvb_defines.h
index 9cb7735..2c2603a 100644
--- a/gr-dtv/include/gnuradio/dtv/dvb_bch_bb.h
+++ b/gr-dtv/lib/dvb/dvb_defines.h
@@ -18,35 +18,42 @@
* Boston, MA 02110-1301, USA.
*/
+#ifndef INCLUDED_DTV_DVB_DEFINES_H
+#define INCLUDED_DTV_DVB_DEFINES_H
-#ifndef INCLUDED_DTV_DVB_BCH_BB_H
-#define INCLUDED_DTV_DVB_BCH_BB_H
+#define TRUE 1
+#define FALSE 0
-#include <gnuradio/dtv/api.h>
-#include <gnuradio/dtv/dvb_config.h>
-#include <gnuradio/block.h>
+#define BB_HEADER_LENGTH_BITS 72
-namespace gr {
- namespace dtv {
+// BB HEADER fields
+#define TS_GS_TRANSPORT 3
+#define TS_GS_GENERIC_PACKETIZED 0
+#define TS_GS_GENERIC_CONTINUOUS 1
+#define TS_GS_RESERVED 2
- /*!
- * \brief <+description of block+>
- * \ingroup dtv
- *
- */
- class DTV_API dvb_bch_bb : virtual public gr::block
- {
- public:
- typedef boost::shared_ptr<dvb_bch_bb> sptr;
+#define SIS_MIS_SINGLE 1
+#define SIS_MIS_MULTIPLE 0
- /*!
- * \brief Return a shared_ptr to a new instance of dtv::dvb_bch_bb.
- */
- static sptr make(dvb_standard_t standard, dvb_framesize_t framesize,
dvb_code_rate_t rate);
- };
+#define CCM 1
+#define ACM 0
- } // namespace dtv
-} // namespace gr
+#define ISSYI_ACTIVE 1
+#define ISSYI_NOT_ACTIVE 0
-#endif /* INCLUDED_DTV_DVB_BCH_BB_H */
+#define NPD_ACTIVE 1
+#define NPD_NOT_ACTIVE 0
+
+#define FRAME_SIZE_NORMAL 64800
+#define FRAME_SIZE_SHORT 16200
+
+// BCH Code
+#define BCH_CODE_N8 0
+#define BCH_CODE_N10 1
+#define BCH_CODE_N12 2
+#define BCH_CODE_S12 3
+
+#define LDPC_ENCODE_TABLE_LENGTH (FRAME_SIZE_NORMAL * 10)
+
+#endif /* INCLUDED_DTV_DVB_DEFINES_H */
diff --git a/gr-dtv/lib/common/dvb_ldpc_bb_impl.cc
b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc
similarity index 100%
rename from gr-dtv/lib/common/dvb_ldpc_bb_impl.cc
rename to gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc
diff --git a/gr-dtv/lib/common/dvb_ldpc_bb_impl.h
b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h
similarity index 99%
rename from gr-dtv/lib/common/dvb_ldpc_bb_impl.h
rename to gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h
index 510fb2d..3510ddf 100644
--- a/gr-dtv/lib/common/dvb_ldpc_bb_impl.h
+++ b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.h
@@ -22,6 +22,7 @@
#define INCLUDED_DTV_DVB_LDPC_BB_IMPL_H
#include <gnuradio/dtv/dvb_ldpc_bb.h>
+#include "dvb_defines.h"
typedef struct{
int table_length;