[MPlayer-users] Chroma interpolation

D Richard Felker III dalias at aerifal.cx
Fri Feb 27 07:20:09 CET 2004


On Thu, Feb 26, 2004 at 10:58:48PM +0200, Ville Saari wrote:
> I have an annoying problem with mplayer: when video is scaled to
> full screen, the chroma channels are not interpolated, but suffer
> a nearest neighbour scaling instead. The result is a terrible
> stairstepping artifact wherever there is high chroma contrast.
> Luma is ok.
> 
> The problem exists whenever hardware scaling is involved
> (-vo xv or -vo sdl). I have Matrox G400. If I use -vo x11 -zoom,
> then the chroma gets interpolated beautifully but I don't have
> enough horsepower for using it as a solution.
> 
> Is this a deficiency of the G400 hardware or is it something
> that can be fixed?

It's a hardware limitation, but there are some ways you can improve
the situation. Except for changing video mode, the all involve
prescaling the chroma somewhat in software. Try one of the following:

1) Set the video mode so no vertical scaling is required.

2) Use -vf scale,format=yuy2. This will give very good quality but
   it's somewhat slow. I recommend using -sws 6 with it, btw. (IMO
   bilinear scaling is higher quality than bicubic for chroma due to
   the low sampling rate...)

3) Use -vf ilpack. This is quite fast and the quality is just about as
   good. As an added bonus, it works on interlaced video.

4) Use -vf yuy2. Actually I don't think this helps because it uses
   nearest-neighbor just like the hardware, but I might be wrong. If
   it does work, though, it should be the fastest.

Note that G200/G400 does horizontal scaling just fine. But the
vertical scaler sucks. It does nearest-neighbor sampling for chroma,
and also for luma when in downscaling mode (but it interpolates
correctly for upsampling, of course!).

Rich




More information about the MPlayer-users mailing list