[Ffmpeg-devel] upsampling of subsampled video data
Tue Sep 12 21:04:03 CEST 2006
On Sun, Sep 10, 2006 at 12:26:12PM -0400, Rich Felker wrote:
> On Sun, Sep 10, 2006 at 10:34:54AM +0200, Attila Kinali wrote:
> > Moin,
> > On the OGP mailinglist there is currently a discussion going on
> > on how and when to perform upsampling of subsampled YUV data.
> > My biggest question is whether the U and V data is just
> > coppied to all the pixels or is it interpolated between
> > the sample points?
> > If it's interpolated, how much image quality los would it
> > be to just copy it?
> Absolutely horrid. This is what the old matrox cards do with chroma
> for vertical scaling and it looks disgusting. You're a smart guy;
> throw in what you know about sampling theory and the fact that you're
> not dealing with "pixels" but samples and I'm sure you can realize for
> yourself how offensively wrong nearest-neighbor resampling is.
> 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
i think a theoretically optimal scaler would first classify each output
sample depending on its surrounding input somehow in one of several
categories (based on edge direction and or variance for example) and then
apply depending on that a (possibly precomputed) optimal linear filter
> Anything that's not powers of 2 is
> irrelevant IMO
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel