[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] FIR filters and set_history()
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] FIR filters and set_history() |
Date: |
Wed, 6 Feb 2008 10:07:36 -0800 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Wed, Feb 06, 2008 at 11:46:18AM -0500, Brian Padalino wrote:
> On Feb 6, 2008 10:42 AM, Eric Blossom <address@hidden> wrote:
> > The history mechanism does work as it was designed to do. For a
> > history setting of N, it effectively preloads the first buffer with
> > N-1 zeros.
>
> So just to be clear, if we have 2 calls to work() where we set the
> history to 5 taps for a FIR filter. The first input:
>
> [ 0 0 0 0 1 2 3 4 5 ]
>
> Will have 5 input items and produce 5 output items. If we then call
> work() again with 5 more input items, are we looking at:
>
> [ 2 3 4 5 6 7 8 9 10 ] <-- This
> - or -
>
> [ 0 0 0 0 6 7 8 9 10 ]
>
> In essence, who's job is it to maintain state in the filter?
>
> Brian
The way we've implemented the FIR, the state is all implicit in the
input. When using history == ntaps, the standard housekeeping handles
it for you. forecast ensures that you've got enough valid input for
the given number of output samples. Outside of a bit of magic that
preloads the zeros before the first time call, the rest of it is
handled in forecast.
Eric