[MPlayer-users] lanczos or bicubic spline or..?

* afe0108 at yahoo.com
Wed Feb 4 07:56:52 CET 2004


--- D Richard Felker III <dalias at aerifal.cx> wrote:
> On Sun, Feb 01, 2004 at 11:11:05PM -0800, * wrote:
> > Thanks (again) Rich!  I think I'm a little less confused now.  I don't
> > know if this is complete nonsense or not, but I ran a test upscaling 10
> > times in a row to compare:
> >
> > mplayer movie.vob -nosound -vo png -vf crop=716:452:0:12,
> > scale=720:384,scale=736:400,scale=768:416,scale=800:432,scale=832:448,
> > scale=864:464,scale=896:480,scale=912:496,scale=944:512,scale=976:528
> > -sws #
>
> IMO this is not a legitimate test. When encoding a movie you don't
> scale 8 times, and you especially should never upscale. Try it with
> just _one_ scale filter, to the size you'll actually be encoding, and
> compare the results.
>
> Also, compare the results _after_ encoding to mpeg4, since that's what
> will ultimately matter.
>
Okay, thanks for walking me through this.  With one scale filter there
are the following PSNR:

mencoder movie.vob -nosound -ovc lavc -lavcopts psnr:mbd=2:mv0:trell:
cbp:precmp=2:cmp=2:subcmp=2:vmax_b_frames=1:predia=2:dia=2:preme=2:
vme=4:v4mv:vbitrate=875 -vf scale=976:528 -ss 360 -frames 360 -sws #

0 PSNR: Y:41.37, Cb:44.15, Cr:44.26, All:42.13
1 PSNR: Y:41.37, Cb:44.11, Cr:44.25, All:42.12
2 PSNR: Y:40.27, Cb:43.15, Cr:43.30, All:41.05
3 PSNR: Y:40.69, Cb:43.67, Cr:43.80, All:41.49
4 PSNR: Y:38.18, Cb:41.84, Cr:41.95, All:39.10
5 PSNR: Y:41.37, Cb:44.11, Cr:44.25, All:42.12
6 PSNR: Y:40.31, Cb:43.66, Cr:43.79, All:41.18
7 PSNR: Y:41.96, Cb:44.56, Cr:44.70, All:42.68
8 PSNR: Y:39.76, Cb:42.68, Cr:42.84, All:40.55
9 PSNR: Y:39.98, Cb:42.85, Cr:42.99, All:40.75
10 PSNR: Y:40.12, Cb:43.01, Cr:43.16, All:40.90

And extracting 1 frame:

mplayer test.avi -nosound -vo png -frames 1

http://box.dnsalias.net/mexico/0.png
http://box.dnsalias.net/mexico/1.png
http://box.dnsalias.net/mexico/2.png
http://box.dnsalias.net/mexico/3.png
http://box.dnsalias.net/mexico/4.png
http://box.dnsalias.net/mexico/5.png
http://box.dnsalias.net/mexico/6.png
http://box.dnsalias.net/mexico/7.png
http://box.dnsalias.net/mexico/8.png
http://box.dnsalias.net/mexico/9.png
http://box.dnsalias.net/mexico/10.png

This seems to be pretty consistent.  Gaussian (7) gets highest PSNR and
nearest-neighbor (4) lowest.

It is impossible for me to tell the difference between (2) and (6).  But
I have to say that (9) looks a tiny bit sharper.  Don't you think?  Like
there is more texture in the skin.

> Huh? Why do we have jpegs here? And how did you measure PSNR?
>
Sorry that was convoluted.  I converted to jpeg because the pngs are
going to overwhelm my puny internet connection.

> The PSNR I'm talking about is not from the scale filters, but from the
> mpeg4-encoder after the scaling takes place. What I said is that if
> you give the mpeg4 encoder a sharper image, your resulting movie file
> will have worse (lower) PSNR relative to the input it gets, than if
> you give the mpeg4 encoder a more blurred image.
>
Okay.  So basically PSNR is completely useless for telling which of the
-sws settings have a higher quality?  I don't want either (7) or (4).

> > Which is not
> > what I want (well, at least not 10 times in a row).  To me, the only
> > images that look acceptably sharp are 2, 6, 9 and 10.  And 10 has some
> > horizontal banding.  9 (lanczos) seems just as sharp as the original,
> > except maybe the contrast is higher, or it is grainy.
>
> 0, 3, 4, 5, and 8 definitely suck. They're basically useless, except 8
> (sinc) has the nice property that if you upscale then downscale, you
> should get back the original image almost perfectly.
>
> 1 and 7 will blur somewhat, but that's sometimes good.
>
> IMO you should pick between 2 and 6. 6 probably makes more sense for
> 4:2:0-sampled sources.
>
I am ashamed to say I do not know what is 4:2:0-sampled source?  You
mean with hqdn3d?

> > I should also mention that I've been using the hqdn3d filter based on
> > your recommendation- it works amazingly well, thanks!  But in my quest
> > for fine details I've turned off the luma and chroma blurring
> > (hqdn3d=0:0:6).  I hope there is nothing wrong with this.  Thanks.
>
> Well it won't help as much that way. I'd set them to something low but
> nonzero....
>
> Rich
>
But it will still help right?  It seems to take out the noise in the
background, at least when things are not moving?

When I use the default hqdn3d=4:3:6 it makes skin look more "porcelain",
especially if there is not much texture there to begin with.

Thanks.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/




More information about the MPlayer-users mailing list