discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] hdtv hacking


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] hdtv hacking
Date: Fri, 7 Apr 2006 14:38:36 -0700
User-agent: Mutt/1.5.9i

On Fri, Apr 07, 2006 at 03:28:17PM -0400, Charles Swiger wrote:
> Well, (this is a boy trying a grown-ups job ;) I managed to get
> two new modules to compile in gr-atsc,   atsc_interleaver and
> atsc_deinterleaver, just by copying atsc_rs_encoder and atsc_rd_decoder
> (and accounting for atsci_reed_solomon having one class
> and two methods(?) encode and decode, whereas atsci_data_interleaver
> has two classes with one method each - IIUC).
> 
> So, basically all I did was change the names and put
> in for atsc_interleaver.cc:
> 
>   for (int i = 0; i < noutput_items; i++){
>     d_interleaver.interleave (out[i], in[i]);
> 
> and in atsc_deinterleaver.cc
> 
>   for (int i = 0; i < noutput_items; i++){
>     d_deinterleaver.deinterleave (out[i], in[i]);


Looks good.

> Anyway, after putting in another python test_loopback_002(self):
> with the two stages interleaver/deinterleaver it will fail
> make check , printing out a bunch of numbers.

OK.  The most likely reason it doesn't pass, is that there is a 52
segment delay between what you write into the interleaver, and what you
get out of the deinterleaver.  To work around the behavior, drop the
first 52 segments of the output and then compare the remainder with
the input. 

That is:

   Drop first 52 segments of output
   Ignore last 52 segments of input
   The resulting pieces should be the same length and value.

   Raw input and output:

     Input:  A----------------------------------------ZXXXXXX
     Output: 000000A----------------------------------------Z

   Where XXXXXX and 0000000 represent 52 segments of data.

   After adjustment:

     Input:  A----------------------------------------Z
     Output: A----------------------------------------Z


> --Chuck
> learning a lot

I did too!
Eric




reply via email to

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