3 * Copyright 2002 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
23 #include <atsci_equalizer_nop.h>
24 #include <atsci_sync_tag.h>
27 atsci_equalizer_nop::atsci_equalizer_nop ()
31 atsci_equalizer_nop::~atsci_equalizer_nop ()
36 atsci_equalizer_nop::reset ()
38 atsci_equalizer::reset (); // invoke superclass
42 atsci_equalizer_nop::ntaps () const
48 atsci_equalizer_nop::npretaps () const
54 * Input range is known NOT TO CONTAIN data segment syncs
55 * or field syncs. This should be the fast path. In the
56 * non decicion directed case, this just runs the input
57 * through the filter without adapting it.
59 * \p input_samples has (nsamples + ntaps() - 1) valid entries.
60 * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be
61 * referenced to compute the output values.
64 atsci_equalizer_nop::filter_normal (const float *input_samples,
65 float *output_samples,
68 for (int i = 0; i < nsamples; i++){
69 output_samples[i] = scale (input_samples[i]);
75 * Input range is known to consist of only a data segment sync or a
76 * portion of a data segment sync. \p nsamples will be in [1,4].
77 * \p offset will be in [0,3]. \p offset is the offset of the input
78 * from the beginning of the data segment sync pattern.
80 * \p input_samples has (nsamples + ntaps() - 1) valid entries.
81 * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be
82 * referenced to compute the output values.
85 atsci_equalizer_nop::filter_data_seg_sync (const float *input_samples,
86 float *output_samples,
90 for (int i = 0; i < nsamples; i++){
91 output_samples[i] = scale_and_train (input_samples[i]);
97 * Input range is known to consist of only a field sync segment or a
98 * portion of a field sync segment. \p nsamples will be in [1,832].
99 * \p offset will be in [0,831]. \p offset is the offset of the input
100 * from the beginning of the data segment sync pattern. We consider the
101 * 4 symbols of the immediately preceding data segment sync to be the
102 * first symbols of the field sync segment. \p which_field is in [0,1]
103 * and specifies which field (duh).
105 * \p input_samples has (nsamples + ntaps() - 1) valid entries.
106 * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be
107 * referenced to compute the output values.
110 atsci_equalizer_nop::filter_field_sync (const float *input_samples,
111 float *output_samples,
118 if (offset == 0 && nsamples > 0){
119 output_samples[0] = scale_and_train (input_samples[0]);
123 for (; i < nsamples; i++){
124 output_samples[i] = scale_and_train (input_samples[i]);
130 atsci_equalizer_nop::scale_and_train (float input)