On Sat, Sep 14, 2002 at 12:04:19AM -0700, Keith Packard wrote:
| 
| > My understanding is that resampling really means "reconstruct (a continuous
| > representation of the signal), filter, then sample."
| 
| In the DSP world, resampling is done by upsampling to the LCM, filtering, 
| downsampling to the target sample rate and then filtering again.  I think 
| this is essentially the same thing.  ...

I think so, too, though there are so many subtleties that (as I
mentioned before) I think it's useful to maintain the distinctions from
the continuous-signal world.

For example, how do you determine the values of the samples you create
during the upsampling process?  Common choices might be sample-and-hold,
linear interpolation, or cubic interpolation.  Each has a different
effect on the spectrum of the signal going into the filtering stage.  I
guess it's a personal preference, but I like to think of this as a
"reconstruction" step with its own peculiar characteristics.  Then
filtering and sampling downstream are straightforward.

By the way, in case anyone is wondering about the source, this is the
formalism George Wolberg uses.  I'm sure there are plenty of others, but
I'm not a signal-processing guy, so I don't know the tradeoffs. :-)

|                                 ...  Of course, implementations generally 
| have just a single FIR that walks over the input and generates the output, 
| but the filter coefficients contain the composite of both filters and the 
| resampling stages.

Yep.

|           ... The one case I've eliminated is replacing missing pixels with
| a solid color.  The reason for this is that there isn't a representation 
| for transparent in every color space, so I'd have to use color values, but 
| that leads to interesting questions if dithers get introduced in the 
| future.

Don't know that I can offer any useful advice on the dithering problem.
OpenGL avoids it by punting responsibility to the app.

| As our source operands are writable objects, it seems like it will be 
| somewhat difficult to provide good semantics for mipmaps...
|                         ... I'm guessing most mipmaps are generated by 
| shrinking the larger image with a more accurate filter.

True.  OpenGL treats each mipmap level as a completely independent
image, so if the app wants to modify the base level, it needs to update
the others by a method of its own choosing.  Often this is done by
downsampling the base image.  (Of course some apps use unrelated images
in the various levels, for special effects.)

Allen
_______________________________________________
Render mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/render

Reply via email to