Data filtering apparatus comprising: an input for receiving a stream of data,
each data item taking a range of at least two values ranging between a low value
to a high value, a segmentation device for dividing the stream into segments, a
segment midpoint definer for defining a midpoint of each segment, a segment orderer
for ordering the segment in a first direction from low to high on a first side
of the midpoint and in a second direction from low to high on a second side of
the midpoint, an extremity filter unit for comparing the ordered data on either
side of the midpoint to create a temporary output per segment, for each segment,
each data item on either side of the midpoint being given an extremity filter value,
the filter unit being operable to utilize the ordering to find the extremity value
via a minimal number of comparisons, the extremity filter for initially comparing
a single end of each segment, and being operable to alternate between ends per
segment, the extremity filter being further operable to compute remaining ends
via comparisons of the middles of presently un-compared ends to the middle of the
compared ends, and to conditionally copy a half of the compared end onto the un-compared end.