[Ffmpeg-devel] upsampling of subsampled video data

Rich Felker dalias
Mon Sep 11 05:40:47 CEST 2006


On Sun, Sep 10, 2006 at 10:33:00PM +0200, Attila Kinali wrote:
> > Most hardware does bicubic interpolation. Lanczos/sinc would be more
> > theoretically correct but gauss is the most artifact-immune and also
> > IMO the most theoretically correct since it's the only filter that's
> > radially decreasing in both spatial and frequency domains. But
> > probably anything more than bicubic is too expensive to do in
> > hardware.
> 
> Actauly Bicubic is horribly expensive too. It's easy
> to apply a convolution filter in horizontal direction
> as you can just read out the data and pass it trough
> a FIR or IIR filter. The problem comes from the second
> dimension. The data has to be somehow stored and read
> out again in a way that does not allow a fast burst read
> but each pixel has to be adressed seperately which is a
> hughe bandwidth los. Not to talk about the complexity
> of the hardware.

That's why old cheap cards didn't resample chroma vertically, and why
they looked like shit. Still, IMO it isn't an extra cost. You must
already keep multiple lines accessible for resampling because you're
_scaling_ the YUV, not just converting the colorspace. You're already
doing resampling so it's irrelevant that the luma and chroma
resampling ratios are different.

Rich





More information about the ffmpeg-devel mailing list