diff options
Diffstat (limited to 'gr-atsc/src/lib/atsci_equalizer_lms.cc')
-rw-r--r-- | gr-atsc/src/lib/atsci_equalizer_lms.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gr-atsc/src/lib/atsci_equalizer_lms.cc b/gr-atsc/src/lib/atsci_equalizer_lms.cc index 6358b5334..bab962e32 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms.cc +++ b/gr-atsc/src/lib/atsci_equalizer_lms.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -86,7 +86,7 @@ atsci_equalizer_lms::npretaps () const * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_normal (const float *input_samples, float *output_samples, int nsamples) @@ -106,7 +106,7 @@ atsci_equalizer_lms::filter_normal (const float *input_samples, * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_data_seg_sync (const float *input_samples, float *output_samples, int nsamples, @@ -119,24 +119,24 @@ atsci_equalizer_lms::filter_data_seg_sync (const float *input_samples, // cerr << "Seg Sync: offset " << offset << "\tnsamples\t" << nsamples << "\t pre, 5 -5 -5 5\t" << // output_samples[0] << "\t" << output_samples[1] << "\t" << output_samples[2] << "\t" << output_samples[3] << endl; - + } - + /*! * Input range is known to consist of only a field sync segment or a * portion of a field sync segment. \p nsamples will be in [1,832]. * \p offset will be in [0,831]. \p offset is the offset of the input * from the beginning of the data segment sync pattern. We consider the * 4 symbols of the immediately preceding data segment sync to be the - * first symbols of the field sync segment. \p which_field is in [0,1] + * first symbols of the field sync segment. \p which_field is in [0,1] * and specifies which field (duh). * * \p input_samples has (nsamples + ntaps() - 1) valid entries. * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_field_sync (const float *input_samples, float *output_samples, int nsamples, @@ -144,11 +144,11 @@ atsci_equalizer_lms::filter_field_sync (const float *input_samples, int which_field) { // Only the first 4 + 511 + 3 * 63 symbols are completely defined. - // Those after that the symbols are bilevel, so we could use decision feedback and use + // Those after that the symbols are bilevel, so we could use decision feedback and use // that to train, but for now, don't train on them. int n = min (nsamples, get_field_sync_training_sequence_length (offset)); - + // handle known training sequence adaptN (input_samples, get_field_sync_training_sequence (which_field, offset), output_samples, n); @@ -205,7 +205,7 @@ float atsci_equalizer_lms::adapt1 (const float input[], float ideal_output) { static const double BETA = 0.00005; // FIXME figure out what this ought to be - // FIXME add gear-shifting + // FIXME add gear-shifting double y = filter1 (input); double e = y - ideal_output; @@ -228,7 +228,7 @@ atsci_equalizer_lms::filterN (const float *input_samples, } -void +void atsci_equalizer_lms::adaptN (const float *input_samples, const float *training_pattern, float *output_samples, @@ -248,7 +248,7 @@ bin_map (int bit) static void init_field_sync_common (float *p, int mask) - + { int i = 0; @@ -265,7 +265,7 @@ init_field_sync_common (float *p, int mask) for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map (atsc_pn63[j] ^ mask); - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map (atsc_pn63[j]); @@ -281,7 +281,7 @@ get_data_seg_sync_training_sequence (int offset) } #endif -static int +static int get_field_sync_training_sequence_length (int offset) { return max (0, KNOWN_FIELD_SYNC_LENGTH - offset); |