22 #ifndef _ATSC_SLIDING_CORRELATOR_H_
23 #define _ATSC_SLIDING_CORRELATOR_H_
45 int input_bit (
int bit);
52 return input_bit (sample < 0 ? 0 : 1);
60 return input_bit (sample < 0 ? 0 : 1);
63 void reset () { input.reset (); }
67 typedef unsigned long srblock;
68 static const int bits_per_char = 8;
69 static const int srblock_bitsize =
sizeof (srblock) * bits_per_char;
70 static const int NSRBLOCKS = (511 + srblock_bitsize - 1) / srblock_bitsize;
74 shift_reg () { reset (); }
75 void reset () { memset (d, 0,
sizeof (d)); }
76 void shift_in (
int bit);