Filter comparisons

Avi to DVD and other video conversions, such as wmv to DVD, mts to DVD, mkv to DVD and more. 2 pass encoding, multi-core support, and always more files supported.

Moderators: Maggie, JJ, ckhouston, Phil, Forum admin

Post Reply
User avatar
edmantay
Posts: 243
Joined: Thu Mar 13, 2008 4:02 am

Filter comparisons

Post by edmantay » Tue Nov 17, 2009 5:28 am

For no reason other than "nobody else has yet," I did some tests of how fast CX2D will encode changing only the resize filter.

I put together a small project with three files for an equal mix of upsizing and downsizing:

File #1: H.264, 1280x720, DTS5.1, 5 mins
File #2: XVID, 640x352, DD5.1, 10 mins
File #3: XVID, 1280x544, DD5.1, 5 mins

Using 2 cores, 1 pass, and Short Project.

In order of fastest conversion to slowest:
Fast-Linear (2.23x)
Linear (2.19x)
Box (2.16x)
Cosine (2.16x)
Mitchell (2.12x)
Fast-Box (2.10x)
Spline (2.08x)

Hermite (1.94x)
Cubic (1.91x)
Gaussian (1.91x)
Blackman (1.88x)
SinSH (1.80x)

Hamming (1.78x)
Lanczos (1.77x)
Hann (1.76x)


The most interesting thing I noted was the resulting VOB file sizes. The filter used made pretty radical changes to the output size.

From largest to smallest:
Fast-Box (1139.5Mb)
Lanczos (1131.5Mb)
Hann (1129.0Mb)
Hamming (1114.5Mb)
Blackman (1109.5Mb)
Gaussian (1108.0Mb)

SinSH (1099.5Mb)
Hermite (1091.0Mb)
Box (1079.0Mb)
Fast-Linear (1045.0Mb)

Cosine (988.0Mb)
Linear (961.5Mb)
Mitchell (868.0Mb)
Spline (868.0Mb)


I know the remaining big question is the quality one, but I didn't have the time to do frame-captures. Perhaps somebody wants to follow-up with that test ;)

I don't know that there's any really earth-shaking discoveries to it all, but people keep asking and wondering, so here's me opening the actual field-testing :)

User avatar
Claire
VSO Team Member
Posts: 5913
Joined: Mon Apr 02, 2007 1:39 pm
Location: France
Contact:

Post by Claire » Tue Nov 17, 2009 8:07 am

nice! thanks 8)

ckhouston
VSO Fanatic
Posts: 4590
Joined: Wed Aug 08, 2007 4:12 am

Post by ckhouston » Tue Nov 17, 2009 2:56 pm

Good info edmantay!

I'm surprised about the differences in converted size. That may be significant and needs more investigating to understand why and what it means.

Generally, it means that the encoder found different amounts of detail in scenery, due to filter, to describe. So the question is, is the difference in detail beneficial or artificial?

deadlyshadow
VSO Fanatic
Posts: 606
Joined: Wed Mar 04, 2009 11:28 pm

Post by deadlyshadow » Tue Nov 17, 2009 5:16 pm

ckhouston wrote:Good info edmantay!

I'm surprised about the differences in converted size. That may be significant and needs more investigating to understand why and what it means.

Generally, it means that the encoder found different amounts of detail in scenery, due to filter, to describe. So the question is, is the difference in detail beneficial or artificial?
you are right.
Fast-Box's quality for upscaling is so poor.Lanczos has both Beneficial and artificial details.

JoeB
VSO Fanatic
Posts: 4348
Joined: Mon Jul 02, 2007 7:52 pm
Location: Canada

Post by JoeB » Tue Nov 17, 2009 5:23 pm

ckhouston wrote:Good info edmantay!

I'm surprised about the differences in converted size. That may be significant and needs more investigating to understand why and what it means.

Generally, it means that the encoder found different amounts of detail in scenery, due to filter, to describe. So the question is, is the difference in detail beneficial or artificial?
I don't know if there is any corelation between what happens with graphic images and video images so somebody with much more knowledge will have to answer this. But with a graphic image you will always get larger file sizes the more sharpening you do to the image. So is it possible that it's a just a matter of some filters sharpening more detail than other filters or even oversharpening?

Regards,

JoeB

ckhouston
VSO Fanatic
Posts: 4590
Joined: Wed Aug 08, 2007 4:12 am

Post by ckhouston » Tue Nov 17, 2009 6:35 pm

I assume the filters treat each frame image the same as they would ordinary graphic images. So sharpening probably adds beneficial detail. But as deadlyshadow pointed out, some filters can introduce artificial noise which is seen as detail to be described by the encoder. That is detrimental rather then beneficial because it uses bitrate unnecessarily even if we can't see the noise.

One way to detect fine scale noise is to convert at both Short and Medium Projects and examine the bitrate. The bitrate will be about the same for complex scenes if there is no noise. But Medium will show lower peaks for the complex scenes if there is fine scale noise because it filters out very fine detail. Converting at Long filters even larger scale detail so provides additional info.

WitchKing
Posts: 31
Joined: Fri Oct 09, 2009 9:15 am

Post by WitchKing » Tue Nov 17, 2009 8:52 pm

So which filter is the "optimal" one?

knopper
Posts: 27
Joined: Thu Mar 13, 2008 1:10 am

Post by knopper » Tue Nov 17, 2009 9:16 pm

WitchKing wrote:So which filter is the "optimal" one?
try Lanczos! Its defacto industry standard.
You will be surprised ^^

deadlyshadow
VSO Fanatic
Posts: 606
Joined: Wed Mar 04, 2009 11:28 pm

Post by deadlyshadow » Tue Nov 17, 2009 10:46 pm

I provide screen shots of down scaled movie for comparison.
all settings exept filters are equal.


download link:
http://rapidshare.com/files/308504888/S ... s.zip.html

Michell and Spline are not good for down scaling.

User avatar
edmantay
Posts: 243
Joined: Thu Mar 13, 2008 4:02 am

Post by edmantay » Wed Nov 18, 2009 1:01 am

There's no doubt that which filter you might want to use depends greatly on whether you're upsizing or downsizing. Some very general statements from the graphics-world-in-general (that may or may not correlate to what VSO has done with their custom filters) would be:

1) For upsizing, Mitchell is probably about the best filter you can use. It minimizes ringing, blocking, aliasing, moiré, and manages blurring well. Although Lanczos is precise/detailed, when upsizing, it exhibits some of the worst ringing effects. Mitchell also excels for cartoon-type images. For downsizing, Mitchell has problems with moiré and blur.

2) For downsizing, Lanczos, minimizes all of the artifact-groups best while preserving the most detail, except perhaps...

3) Spline has a lot of variables and variants, but generally, it can give similar upsizing results to Lanczos and it should give superior downsizing.

I hope that as version 4 progresses, VSO will add the feature to select an "upsizing filter" as well as a "downsizing filter" in the settings since which you're doing definitely impacts what filter you should choose to do it.

Of course, we'll need some comparative frame captures to see how it all looks in the real world with VSO's filter implementations.

GEORGIEBOY26
Posts: 131
Joined: Sat Nov 22, 2008 1:52 pm

Post by GEORGIEBOY26 » Thu Nov 19, 2009 1:25 am

what is meant by ringing effects?? as mentioned using lanczos

User avatar
edmantay
Posts: 243
Joined: Thu Mar 13, 2008 4:02 am

Post by edmantay » Thu Nov 19, 2009 4:44 am

GEORGIEBOY26 wrote:what is meant by ringing effects?? as mentioned using lanczos
Visually, ringing occurs most noticeably between two areas of significantly-differing brightness. The edge between them "echoes," creating a ring around the edge. If you over-compress a JPEG, ringing usually becomes a very easy to see artifact. So instead of a darker area with a sharp transition to a lighter area, you'd see the darker area transitioning to the lighter with a couple of different-colour bands close to actual boundary. Lanczos works so hard to maintain a very high level of detail that it will overcompensate along hard boundaries when enlarging since it has to guess where to add high-detail data. When shrinking, it only subtracts data so ringing ceases to be an issue.

A good image with heavy ringing:
Image
Last edited by edmantay on Fri Jul 02, 2010 6:03 am, edited 1 time in total.

JoeB
VSO Fanatic
Posts: 4348
Joined: Mon Jul 02, 2007 7:52 pm
Location: Canada

Post by JoeB » Thu Nov 19, 2009 6:36 am

edmantay wrote:There's no doubt that which filter you might want to use depends greatly on whether you're upsizing or downsizing. Some very general statements from the graphics-world-in-general (that may or may not correlate to what VSO has done with their custom filters) would be:

1) For upsizing, Mitchell is probably about the best filter you can use. It minimizes ringing, blocking, aliasing, moiré, and manages blurring well. Although Lanczos is precise/detailed, when upsizing, it exhibits some of the worst ringing effects. Mitchell also excels for cartoon-type images. For downsizing, Mitchell has problems with moiré and blur.

2) For downsizing, Lanczos, minimizes all of the artifact-groups best while preserving the most detail, except perhaps...

3) Spline has a lot of variables and variants, but generally, it can give similar upsizing results to Lanczos and it should give superior downsizing.

I hope that as version 4 progresses, VSO will add the feature to select an "upsizing filter" as well as a "downsizing filter" in the settings since which you're doing definitely impacts what filter you should choose to do it.

Of course, we'll need some comparative frame captures to see how it all looks in the real world with VSO's filter implementations.
While I haven't tested the info you've provided (and time presently doesn't permit), it's interesting information that I'll certainly pay attention to.

Given that, if a person is using an input file that is reasonably close to DVD resolution, will Lanczos do a good job (i.e., without noticeable ringing effect)? That is, for an NTSC situation (720x480), would Lanczos be the best (in most circumstances) for an input file somewhere around the 700px wide area, given whatever height fits the proper aspect ratio of the video?

I can see why the filter choice would be very important if, for example, downsizing from 1280 wide HD video, or upsizing from perhaps a 532 wide video. I'm just curious if Lanczos would be perhaps the best average choice if converting to a standard DVD format when the input is close to - but not exactly at - that resolution?

Regards,

JoeB

User avatar
edmantay
Posts: 243
Joined: Thu Mar 13, 2008 4:02 am

Post by edmantay » Thu Nov 19, 2009 7:17 am

JoeB wrote:Given that, if a person is using an input file that is reasonably close to DVD resolution, will Lanczos do a good job (i.e., without noticeable ringing effect)?
The less resizing that must be done, the less risk of any type of artifact. If you're upsizing a 680x400 video then the filter only has to add about 27% to the video stream - any filter can probably be very accurate. If you're upsizing a 320x240 video, then the filter must guess at how to represent an awful lot more data (a 350% data-increase to the video stream) and artifacts will become a more serious issue.

My guess would be that people generally use pretty high-quality downloads so detecting big problems with any of the filters will be tough. Lanczos is unquestionably an excellent option for general use. But then, all the filters are good choices... we're talking about trying to figure out the best which may be a question that has two answers.

GEORGIEBOY26
Posts: 131
Joined: Sat Nov 22, 2008 1:52 pm

Post by GEORGIEBOY26 » Thu Nov 19, 2009 1:34 pm

thanx for the info

sparky
Posts: 40
Joined: Sun Jun 10, 2007 11:26 am

Post by sparky » Thu Nov 19, 2009 5:07 pm

Used CX2D4 for the first time useing the Lanczos filter on Medium encode setting and 1pass, with a movie play time of 153mins, downloaded source was exellent quality and the ringing on the screenshot is very acceptable even when you zoom right in my humble opinion, took just over an hour to convert on an old 3ghz Pentium4. I was well pleased with the finished conversion quality.
Attachments
Inglourious Basterds Screenshot
Inglourious Basterds Screenshot
Inglourious Basterds 001.jpg (266.85 KiB) Viewed 46121 times
Inglourious Basterds Log File.txt
Inglourious Basterds Text File
(7.54 KiB) Downloaded 586 times
Golden Membership Proud Owner

JoeB
VSO Fanatic
Posts: 4348
Joined: Mon Jul 02, 2007 7:52 pm
Location: Canada

Post by JoeB » Thu Nov 19, 2009 5:09 pm

edmantay wrote:The less resizing that must be done, the less risk of any type of artifact. If you're upsizing a 680x400 video then the filter only has to add about 27% to the video stream - any filter can probably be very accurate. If you're upsizing a 320x240 video, then the filter must guess at how to represent an awful lot more data (a 350% data-increase to the video stream) and artifacts will become a more serious issue.

My guess would be that people generally use pretty high-quality downloads so detecting big problems with any of the filters will be tough. Lanczos is unquestionably an excellent option for general use. But then, all the filters are good choices... we're talking about trying to figure out the best which may be a question that has two answers.
That's the kind of info that is useful, and likely especially so for the typical consumer user. In still graphic editing (which is more my area) using up/downsizing and then applying sharpening, most filters allow you to select the amount of sharpening, you can apply selectively and decide how much to apply while watching for halos, etc. With something like CXD, you don't have that flexibiliy. So most people will likely be happy to know that, if they use decent quality input (and just about all input can be had at 640 or better) selecting one filter like Lanczos will likely do the job in most cases.

Regards,

JoeB

JoeB
VSO Fanatic
Posts: 4348
Joined: Mon Jul 02, 2007 7:52 pm
Location: Canada

Post by JoeB » Thu Nov 19, 2009 5:19 pm

sparky wrote:Used CX2D4 for the first time useing the Lanczos filter on Medium encode setting and 1pass, with a movie play time of 153mins, downloaded source was exellent quality and the ringing on the screenshot is very acceptable even when you zoom right in my humble opinion, took just over an hour to convert on an old 3ghz Pentium4. I was well pleased with the finished conversion quality.
And that's upsizing from a 640x272, which is fairly standard for many vids, so it does seem to indicate that Lanczos can handle that quite well.

Regards,

JoeB

User avatar
edmantay
Posts: 243
Joined: Thu Mar 13, 2008 4:02 am

Post by edmantay » Fri Nov 20, 2009 1:03 am

sparky wrote:...the ringing on the screenshot is very acceptable even when you zoom right in my humble opinion...
I like that screenshots are starting, I'd just caution that saving them as JPEGs makes it tough to say what problems might be from the video encode and what might be from the JPEG compression. True colour PNG would be a preferable option. Any resizing done to the screenshot introduces the same problem.

JoeB
VSO Fanatic
Posts: 4348
Joined: Mon Jul 02, 2007 7:52 pm
Location: Canada

Post by JoeB » Fri Nov 20, 2009 2:07 am

edmantay wrote:I like that screenshots are starting, I'd just caution that saving them as JPEGs makes it tough to say what problems might be from the video encode and what might be from the JPEG compression. True colour PNG would be a preferable option. Any resizing done to the screenshot introduces the same problem.
I will certainly concur. Screens are great, but jpg causes compression by definition, so you don't know if the artifacts that might be created by the compression are because of the jpg save or the filter. PNG is lossless so likely the best option. And yes, the screenshot should be taken and then saved as PNG without any resizing, just cropping to the relevant video image (i.e., to remove extraneous stuff like the video player window, etc.).

Regards,

JoeB

Post Reply