23 #ifndef _ATSC_SLIDING_CORRELATOR_H_
24 #define _ATSC_SLIDING_CORRELATOR_H_
46 int input_bit (
int bit);
53 return input_bit (sample < 0 ? 0 : 1);
61 return input_bit (sample < 0 ? 0 : 1);
64 void reset () { input.reset (); }
68 typedef unsigned long srblock;
69 static const int bits_per_char = 8;
70 static const int srblock_bitsize =
sizeof (srblock) * bits_per_char;
71 static const int NSRBLOCKS = (511 + srblock_bitsize - 1) / srblock_bitsize;
75 shift_reg () { reset (); }
76 void reset () { memset (d, 0,
sizeof (d)); }
77 void shift_in (
int bit);