Fir filter device for flexible up-and downsampling
A FIR filter includes an input pipeline IP with a sequence of input delay cells DI; each for storing an input sample, and a plurality of N input tap points TP. An output pipeline includes a sequence of output delay cells DO; each for storing a sample, a plurality of N summating elements Si for adding at least two samples, and an output switching network OSN for accumulating output values from the summating elements. A sequence of N taps T; are used for coupling the input pipeline to the output pipeline. Each tap includes a respective multiplier Mi for multiplying a sample from an input tap point by a coefficient. At least N−1 of the taps include a switching element for directing a sample from an input tap point through the multiplier to a summating element. The switching elements are arranged to enable supply of a sample from any tap point TPP to a summating element Si, where j<--i.
The invention relates to a Finite Impulse Response (FIR) filter device for sample rate converting a sequence of discrete representations and to an image display device including such a filter device.
WO 98/19396 discloses a direct form, transposed form and combined FIR filter.
To be able to deal with different scaling requirements, WO 98/19396 also shows a filter that is a combination of the described direct and transposed filters. In the combined filter, the multipliers are shared. Selectors are used to set the filter in an up-scaling mode or downscaling mode. During upscaling the filter operates like the direct form filter and only the delay elements of the input pipeline are used. During downscaling, the filter operates like a transposed form filter and only the delay elements of the output pipeline are used.
With the introduction of 16:9 television sets, with most material having a 4:3 aspect ratio, high quality display of this material became more important. Up-scaling a 4:3 format to the 16:9 format (using a fixed ratio) resulted in wide faces which was unacceptable. It was desired to use variable scaling, referred to as panorama mode. In this mode, the parts of the image that are displayed on the sides of the screen are up-scaled. The part of the image displayed in the center of the screen was not up-scaled. The known filter is capable of performing such scaling. It was found that even better results were achieved if the center of the screen was downscaled (for compensation). A possible scaling curve is a parabola (a polynomial of second degree) allowing both upscale and downscale ratios within one video line. Using the known combined filter structures results in a delay when a change-over between the filters occurs, due to the fact that the pipeline that was not used before the change-over needs to be re-filled with the desired samples. Such a delay is undesired for stream processing of, for example, video or audio.
It is an object of the invention to provide a filter structure that is capable of high-quality filtering, capable of scaling streamed data, with a smooth change-over between scaling modes.
To meet the object of the invention, the filter device includes:
-
- an input pipeline IP for receiving the sequence of discrete representations and including a sequence of input delay cells DIi, each for storing a discrete representation; and a plurality of N input tap points TPi, where an input tap point is provided at least between each sequential pair of input delay cells;
- an output pipeline for supplying a sequence of discrete representations and including a sequence of output delay cells DOi, each for storing a discrete representation; a plurality of N summating elements Si for adding at least two discrete representations, a summating element being provided at least between each sequential pair of output delay cells; and an output switching network OSN for accumulating output values from the summating elements; and
- a sequence of N taps Ti for coupling the input pipeline to the output pipeline; each tap including a respective multiplier Mi for multiplying a discrete representation from an input tap point by a coefficient; at least N−1 of the taps including a switching element for directing a discrete representation from an input tap point through the multiplier to a summating element; the switching elements being arranged to enable supply a discrete representation from any tap point TPj to a summating element Si, where j<=i.
The arrangement of the taps enable the filter to access multiple elements from both the input pipeline and the output pipeline simultaneously. This makes it possible to maintain a high-quality filtering performance also during a change-over from up-scaling to down-scaling or vice versa.
According to the measure of the dependent claim 2, each of the taps Ti are coupled to only one respective summating elements Si; the switching element SWj being provided in between tap points TPi, where j<=i and the multiplier Mi. In principle, the switching element may also be located in between the multipliers and the output pipeline. This merely changes the respective multiplication coefficient out off the matrix Ci.
According to the measure of the dependent claim 3, the FIR filter device has a constant filter width N, N output delay cells DOi, and N or N−1 (depending on if the input stream can be stalled) input delay cells DIi. In this arrangement a filter width of at least N can be achieved during downscaling, up-scaling, also when the scaling factor or scaling mode is changed.
According to the measure of the dependent claim 4, the input pipeline includes an input switching network for accumulating input values in the input delay cells DIi, enabling upscaling in situations where the input stream can not be temporarily halted while output samples are generated at a higher frequency.
According to the measure of the dependent claim 5, each multiplier Mi is associated with a respective coefficient matrix Ci to enable poly-phase filtering.
According to the measure of the dependent claim 6, the filter device includes a controller operative to control the filter device based on a state machine. In principle, many settings of the filter can be changed. Using a state machine is an effective way to control the scaler settings.
According to the measure of the dependent claim 7, the state machine determines at least one of the following:
-
- a setting of the switching elements SWi,
- a setting of the output switching network,
- clocking of the input pipeline and/or output pipeline.
Depending on the functionality of the filter, the state machine also determines a selection of a coefficient from the coefficient matrix Ci and/or a setting of the input switching network.
According to the measure of the dependent claim 10, the filter device includes a further delay element and a subtracting element for subtracting an input discrete element from an immediately preceding input discrete element and supplying an outcome of the subtraction into the input pipeline; and including a further summating element for adding the immediately preceding input discrete element to an output discrete element to be supplied by the output pipeline. In this way the filter operates on ‘AC’ values (i.e. on a difference with respect to the previous input sample instead of the absolute value). This avoids the so-called DC-ripple. Such a ripple occurs where the input is more or less constant (‘DC’) and the coefficients applied to the filter do not exactly add up to a multiplication factor of 1, causing a small disturbance being added. Where small sequences of constant values are interchanged with a different sample value this may result in a visible or in any other way noticeable ‘ripple’ in the output signal for the filter. By operating on an offset instead of an absolute value, the filter is fed with zero-value samples for sequences of constant sample values. Such a sequence will result in a zero output of the multipliers, irrespective of small faults in the multiplication factors. The actual input sample is added at the output of the filter.
To meet an object of the invention, a signal processing apparatus includes a FIR filter device as claimed in claim 1 for sample rate converting an input signal, where the discrete representation is a sampled input signal, for subsequent rendering by a rendering device.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
In the drawings:
To prevent long pipelines of either input samples or output samples optimal structures are developed for filtering in hardware. For upscaling, this is the prior art direct form filter of
For downscaling, the transposed filter of
If either type of filter is applied in the other situation more multipliers than required for the filter width would be needed if quality was to be maintained.
In the embodiments shown in
In a preferred embodiment, the FIR filter device according to the invention includes a controller for controlling the filter device based on a state machine. The state machine may control any (preferably all) of the following aspects:
clocking of the input pipeline and/or output pipeline (via an input enable and output enable signal, respectively),
selection of a coefficient from the coefficient matrices Ci, and/or
a setting of the switching elements SWi (via a respective xseli signal),
a setting of the output switching network OSN,
a setting of the input switching network ISN.
Since the cases are fixed for any predetermined FW it is most feasible to implement this in a finite state machine (FSM). Each state is followed either by itself or by another state so rules can be set up on state transitions. As will be described in more detail below, the transitions depend on the on forehand computed mlow and mhigh of the output samples.
a: 2−>2
b: 2−>5, and
c: 2−>3.
Using this notation no arcs need to be shown, although in
The state machine's output controls the scaling engine topology (which input samples contribute with which entry of the filter table to which output sample including the request of new input samples and shifting out ready computed output samples.
Each output sample receives a contribution from several input samples multiplicated with a filter coefficient. The first sample to contribute is indicated with mlow, the last with mhigh. All samples in between also contribute thus mlow and mhigh bounds the set of input samples for a specific output sample. As discussed before the distance between mlow and mhigh needs not to be constant e.g., flexible (downscale) scaling ratio. The scaling ratio thus reflects itself on the distance of mlow and mhigh with a given FW.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. Use of the verb “comprise” and “include” and its conjugations do not exclude the presence of elements or steps other than those stated in a claim. The article “a” or “an” preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. A computer program product may be stored/distributed on a suitable medium, such as optical storage, but may also be distributed in other forms, such as being distributed via the Internet or wired or wireless telecommunication systems. In a system/device/apparatus claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Claims
1. A Finite Impulse Response (FIR) filter device for sample rate converting a sequence of discrete representations; the filter device including:
- an input pipeline IP for receiving the sequence of discrete representations and including:
- a sequence of input delay cells DIi, each for storing a discrete representation; and
- a plurality of N input tap points TPi, where an input tap point is provided at least between each sequential pair of input delay cells;
- an output pipeline for supplying a sequence of discrete representations and including:
- a sequence of output delay cells DOi, each for storing a discrete representation;
- a plurality of N summating elements Si for adding at least two discrete representations, a summating element being provided at least between each sequential pair of output delay cells; and
- an output switching network OSN for accumulating output values from the summating elements; and
- a sequence of N taps Ti for coupling the input pipeline to the output pipeline; each tap including a respective multiplier Mi for multiplying a discrete representation from an input tap point by a coefficient; at least N−1 of the taps including a switching element for directing a discrete representation from an input tap point through the multiplier to a summating element; the switching elements being arranged to enable supply of a discrete representation from any tap point TPj to a summating element Si, where j<=i.
2. A FIR filter device as claimed in claim 1, wherein each of the taps Ti are coupled to only one respective summating elements Si; the switching element SWi being provided in between tap points TPj, where j<=i and the multiplier Mi.
3. A FIR filter device as claimed in claim 1, having a constant filter width N, N output delay cells DOi, and N or N−1 input delay cells DIi.
4. A FIR filter device as claimed in claim 1, wherein the input pipeline includes a input switching network ISN for accumulating input values in the input delay cells DIi.
5. A FIR filter device as claimed in claim 1, wherein each multiplier Mi is associated with a respective coefficient matrix Ci to enable poly-phase filtering.
6. A FIR filter device as claimed in claim 1, including a controller operative to control the filter device based on a state machine.
7. A FIR filter device as claimed in claim 1, wherein the state machine determines at least one of the following:
- a setting of the switching elements SWi,
- a setting of the output switching network,
- clocking of the input pipeline and/or output pipeline.
8. A FIR filter device as claimed in claim 5, wherein the state machine determines selection of a coefficient from the coefficient matrix Ci.
9. A FIR filter device as claimed in claim 4, wherein the state machine determines a setting of the input switching network.
10. A FIR filter device as claimed in claim 1, including a further delay element and a subtracting element for determining a difference between an input discrete element and an immediately preceding input discrete element and supplying the difference into the input pipeline; and including a further summating element for adding input discrete element or the immediately preceding input discrete element to an output discrete element to be supplied by the output pipeline.
11. A signal processing apparatus including a FIR filter device as claimed in claim 1 for sample rate converting an input signal, where the discrete representation is a sampled input signal, for subsequent rendering by a rendering device.
12. A signal processing apparatus as claimed in claim 11, wherein the signal processing apparatus includes the rendering device.
Type: Application
Filed: Mar 26, 2004
Publication Date: Aug 17, 2006
Inventors: Guido Theodorus Volleberg (Eindhoven), Age Van Dalfsen (Eindhoven)
Application Number: 10/550,878
International Classification: G06F 17/10 (20060101);