[Ffmpeg-devel] upsampling of subsampled video data
Rich Felker
dalias
Tue Sep 12 21:10:37 CEST 2006
On Tue, Sep 12, 2006 at 08:54:05PM +0200, Michael Niedermayer wrote:
> Hi
>
> On Sun, Sep 10, 2006 at 10:25:25PM +0200, Attila Kinali wrote:
> > On Sun, 10 Sep 2006 12:17:41 +0200
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> > > well, lets see, first heres a list of the common formats with ideal sample
> > > positions shown below too
> > > progressive 4:2:0 (mpeg1)
> > > Y Y Y Y
> > > C C
> > > Y Y Y Y
> > >
> > > Y Y Y Y
> > > C C
> > > Y Y Y Y
> >
> > Does this mean, that the C samples are inbetween the Y
> > samples and thus have to be interpolated in vertical
> > direction too before converting to RGB?
> > (apart from the missing sample every second line)
>
> as rich already said yes though i suspect that a 1/2 pixel position error
> will be less noticeable then not interpolating at all, and of course the
> position is just what the spec says, if that really matches the true sample
> locations may or may not be the case, depending on the source ...
i've seen some dvds incorrectly mastered with chroma off-by-one-half
like this and it looks bad. so yes it's true that the spec is not
always followed but failing to follow it will just make correct
content look bad.
btw it's trivial to support both 'versions' if you want.
> also even though ive no clue about hw design, somehow i think that a
> optional prefilter which shifts the chroma samples by 1/4 pixel could be
> helpfull for the complexity of the interpolating stuff
imo not helpful. it will just degrade quality. the scaler needs to be
resampling anyway so it doesn't make any difference to put it all
together into one operation.
rich
More information about the ffmpeg-devel
mailing list