D Richard Felker III | 1 Feb 2004 01:14

Re: lanczos or bicubic spline or..?

On Sat, Jan 31, 2004 at 12:06:59PM -0800, * wrote:
> --- * <afe0108 <at> yahoo.com> wrote:
> > Hello, I scoured the list but couldn't find any opinion about
> > which -sws option is generally considered the best.  Taking into
> > account the quality of the implementation in mencoder if that's
> > an issue.
> > 
> > From what I've read -sws 9 (lanczos) might be the best for sharp
> > details?  Here's a page comparing them:
> > 
> > http://aroundcny.com/technofile/texts/tec042901.html
> > 
> > But I can't personally tell any difference between -sws 2 or 9
> > or 10.  Can anyone else?  Thanks.
> > 
> 
> Hello, no one has an opinion which is better?  If I want to test it
> myself could I assume that (everything else being equal) higher PSNR
> values mean it's better?  Thanks.

No. The PSNR the encoder reports is relative to the input image it
gets, so higher PSNR values just mean the scaler produced data that
compresses better. In general I would recommend -sws 1 or 6 for
encoding. Gauss (7) could also be useful if you're trying to make very
low-res/quality encodes and avoid artefacts, while Lanczos (9) could
be useful if you're using constant-quantizer encoding and want maximum
quality. But IMO, at a fixed bitrate, the scaler that blurs the most
will look best.

Rich
(Continue reading)

* | 2 Feb 2004 08:11
Picon
Favicon

Re: lanczos or bicubic spline or..?

--- D Richard Felker III <dalias <at> aerifal.cx> wrote:
> On Sat, Jan 31, 2004 at 12:06:59PM -0800, * wrote:
> > --- * <afe0108 <at> yahoo.com> wrote:
> > > Hello, I scoured the list but couldn't find any opinion about
> > > which -sws option is generally considered the best.  Taking into
> > > account the quality of the implementation in mencoder if that's
> > > an issue.
> > > 
> > > From what I've read -sws 9 (lanczos) might be the best for sharp
> > > details?  Here's a page comparing them:
> > > 
> > > http://aroundcny.com/technofile/texts/tec042901.html
> > > 
> > > But I can't personally tell any difference between -sws 2 or 9
> > > or 10.  Can anyone else?  Thanks.
> > > 
> > 
> > Hello, no one has an opinion which is better?  If I want to test it
> > myself could I assume that (everything else being equal) higher PSNR
> > values mean it's better?  Thanks.
> 
> No. The PSNR the encoder reports is relative to the input image it
> gets, so higher PSNR values just mean the scaler produced data that
> compresses better. In general I would recommend -sws 1 or 6 for
> encoding. Gauss (7) could also be useful if you're trying to make very
> low-res/quality encodes and avoid artefacts, while Lanczos (9) could
> be useful if you're using constant-quantizer encoding and want maximum
> quality. But IMO, at a fixed bitrate, the scaler that blurs the most
> will look best.
> 
(Continue reading)

D Richard Felker III | 2 Feb 2004 22:02

Re: lanczos or bicubic spline or..?

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.

> http://box.dnsalias.net/rose/orig.jpg
> http://box.dnsalias.net/rose/0.jpg
> http://box.dnsalias.net/rose/1.jpg
> http://box.dnsalias.net/rose/2.jpg
> http://box.dnsalias.net/rose/3.jpg
> http://box.dnsalias.net/rose/4.jpg
> http://box.dnsalias.net/rose/5.jpg
> http://box.dnsalias.net/rose/6.jpg
> http://box.dnsalias.net/rose/7.jpg
> http://box.dnsalias.net/rose/8.jpg
> http://box.dnsalias.net/rose/9.jpg
> http://box.dnsalias.net/rose/10.jpg
(Continue reading)

* | 4 Feb 2004 07:56
Picon
Favicon

Re: lanczos or bicubic spline or..?

--- 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
(Continue reading)

D Richard Felker III | 4 Feb 2004 16:40

Re: lanczos or bicubic spline or..?

On Tue, Feb 03, 2004 at 10:56:52PM -0800, * wrote:
> --- 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 #

Why on earth are you upscaling your movie to encode it?? This will
only hurt the quality. Either leave the size alone and encode aspect
(but broken players won't support this), or scale it down to a
(Continue reading)

* | 4 Feb 2004 22:21
Picon
Favicon

Re: lanczos or bicubic spline or..?

--- D Richard Felker III <dalias <at> aerifal.cx> wrote:
> On Tue, Feb 03, 2004 at 10:56:52PM -0800, * wrote:
> > --- 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 #
>
> Why on earth are you upscaling your movie to encode it?? This will
> only hurt the quality. Either leave the size alone and encode aspect
(Continue reading)

D Richard Felker III | 5 Feb 2004 07:10

Re: lanczos or bicubic spline or..?

On Wed, Feb 04, 2004 at 01:21:21PM -0800, * wrote:
> --- D Richard Felker III <dalias <at> aerifal.cx> wrote:
> > On Tue, Feb 03, 2004 at 10:56:52PM -0800, * wrote:
> > > --- 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 #
> >
> > Why on earth are you upscaling your movie to encode it?? This will
(Continue reading)


Gmane