commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/16: digital: HPD consume-behaviour adapt


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/16: digital: HPD consume-behaviour adapted to allow for trigger jitter
Date: Sun, 16 Feb 2014 21:11:20 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 3e47151377cf7ee05a574ea2da044078f2a26ff7
Author: Martin Braun <address@hidden>
Date:   Mon Jan 27 15:52:18 2014 +0100

    digital: HPD consume-behaviour adapted to allow for trigger jitter
---
 gr-digital/include/gnuradio/digital/header_payload_demux.h | 3 +++
 gr-digital/lib/header_payload_demux_impl.cc                | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gr-digital/include/gnuradio/digital/header_payload_demux.h 
b/gr-digital/include/gnuradio/digital/header_payload_demux.h
index 4fd3f8c..d68c4ab 100644
--- a/gr-digital/include/gnuradio/digital/header_payload_demux.h
+++ b/gr-digital/include/gnuradio/digital/header_payload_demux.h
@@ -58,6 +58,9 @@ namespace gr {
      * should go on the payload.
      * A special case are tags on items that make up the guard interval. These 
are copied
      * to the first item of the following symbol.
+     * If a tag is situated very close to the end of the payload, it might be 
unclear if
+     * it belongs to this packet or the following. In this case, the tag might 
be propagated
+     * twice.
      *
      * Tags outside of packets are generally discarded. If this information is 
important,
      * there are two additional mechanisms to preserve the tags:
diff --git a/gr-digital/lib/header_payload_demux_impl.cc 
b/gr-digital/lib/header_payload_demux_impl.cc
index 406d59e..15308c0 100644
--- a/gr-digital/lib/header_payload_demux_impl.cc
+++ b/gr-digital/lib/header_payload_demux_impl.cc
@@ -266,10 +266,11 @@ namespace gr {
 
        case STATE_PAYLOAD:
          if (check_items_available(d_curr_payload_len, ninput_items, 
noutput_items, nread)) {
-           update_special_tags(0, d_curr_payload_len * (d_items_per_symbol + 
d_gi));
+           // The -1 because we won't consume the last item, it might hold the 
next trigger.
+           update_special_tags(0, (d_curr_payload_len - 1) * 
(d_items_per_symbol + d_gi));
            copy_n_symbols(in, out_payload, PORT_PAYLOAD, d_curr_payload_len);
            produce(PORT_PAYLOAD, d_curr_payload_len * (d_output_symbols ? 1 : 
d_items_per_symbol));
-           consume_each (d_curr_payload_len * (d_items_per_symbol + d_gi));
+           consume_each ((d_curr_payload_len - 1) * (d_items_per_symbol + 
d_gi)); // Same here
            set_min_noutput_items(d_output_symbols ? 1 : (d_items_per_symbol + 
d_gi));
            d_state = STATE_FIND_TRIGGER;
          }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]