View Full Version : Resizing
Asrial
21st October 2003, 20:19
I have a clip I'm resizing from 720x480 to 576x432. However, I want it to be good quality even if someone plays it full-screen.
Which resize filter would be the best for this or does it not matter because the resize filter ONLY affects the initial resizing and not later resizing?
sh0dan
21st October 2003, 23:04
LanczosResize is IMO the best resizer. It do however affect the compression ratio, so if you're going to compress your material a bicubic resize may give better results.
Asrial
21st October 2003, 23:07
..but just to make sure here..
BICUBIC > BILINEAR with regards to using full-screen playback on the final product?
r6d2
21st October 2003, 23:40
Originally posted by Asrial
I have a clip I'm resizing from 720x480 to 576x432. However, I want it to be good quality even if someone plays it full-screen.
Full-screen playing quality has more to do with frame size than with the resizer chosen.
I don't know what tools or sources are you using, but if you use DVD2SVCD, the FACAR (http://forum.doom9.org/showthread.php?s=&threadid=61423) resizing tool can show you side by side the effect of different resizers.
Personally I cannot spot a difference at all, except the size of the encoded file, Lanczos being the largest. I really envy sh0dan and other people's eyes :)
Which resize filter would be the best for this or does it not matter because the resize filter ONLY affects the initial resizing and not later resizing?
I don't know what you mean by this. Usually you have only one resizer in the process.
Asrial
22nd October 2003, 04:39
Originally posted by r6d2
I don't know what you mean by this. Usually you have only one resizer in the process.What I mean is you have the filter resizer during encoding and then later during playback (WMP8 for example) you set it to fullscreen mode so that it stretches everything out to the max viewing size (edges of the screen).
I'm not sure if the filter used during encoding would have an effect on the quality of the encode during fullscreen playback.
r6d2
22nd October 2003, 12:09
Originally posted by Asrial
What I mean is you have the filter resizer during encoding and then later during playback (WMP8 for example) you set it to fullscreen mode so that it stretches everything out to the max viewing size (edges of the screen).
Again, frame size matters a lot more. Try it yourself.
drebel
22nd October 2003, 12:55
Basic resizers, in best compressibility rate (more or less),are the following :
- BilinearResize(width ,height)
- FastBilinearResize(width ,height)
- SimpleResize(width ,height)
- BicublinResize(width ,height, 0.333,0.333)
- BicublinResize(width ,height, 0,0.5)
- BicublinResize(width ,height, 0,0.75)
- FastBicubicResize(width ,height, 0.333,0.333)
- BicubicResize(width ,height,0.333,0.333) - also known as Soft Bicubic
- FastBicubicResize(width ,height, 0,0.5)
- BicubicResize(width ,height,0,0.5) - also known as Neutral Bicubic
- FastBicubicResize(width ,height, 0,0.75)
- BicubicResize(width ,height,0,0.75) - also known as Sharp Bicubic
- LanczosResize(width ,height)
When downsizing (like we usually do on a DVD resolution) , image quality goes the opposite way with Lanczos being the clearest resizer , like shodan mentioned.When upsizing (to HDTV resolutions) ,I think a bilinear or a Simpleresize is more appropriate.
r6d2
22nd October 2003, 14:38
Originally posted by drebel
When downsizing (like we usually do on a DVD resolution) , image quality goes the opposite way with Lanczos being the clearest resizer , like shodan mentioned.
@drebel, what concept of quality are you applying here? (Sh0dan was cautious enough to say "IMO"). If we agree on quality meaning something measurable, like the "similarity to the source" (i.e. low quantization), your statement is not correct. Lanczos quantizes much more than Bilinear.
If you can provide a more useful definition for quality, I'd be glad to learn about that, to put it on the Idiot's Guide.
When upsizing (to HDTV resolutions) ,I think a bilinear or a Simpleresize is more appropriate.
Well, this is a highly subjective matter. You can see these links:
http://www.engineering.uiowa.edu/~gec/248_s00_students/blake_carlson/hw2/adiphw2.html
"My conclusion is that the bilinear method is preferable for small deviations in image size while the bicubic method is better for large deviations in image size."
Or this other one:
http://www.avisynth.org/index.php?page=Resize
"If you are magnifying your video, you will get much better-looking results with BicubicResize than with BilinearResize. However, if you are shrinking it, you are probably just as well off, or even better off, with BilinearResize."
"If you plan to encode your video at a low bitrate, I wouldn't be at all surprised if BilinearResize yields better quality."
The meaning of "low bitrate" or "small deviations" are not defined by these authors. You'll find almost as many opinions as users on this matter ;). My advice is to compare and judge by yourself.
Mug Funky
22nd October 2003, 15:10
i find the most natural upsize comes from bicubic(w,h,1,0)
this is pretty blurry, but it's a cubic blur (duh), rather than you'd get from bilinear. i find perceptually it looks nicest, as you can't see any resize artifacts except in very high-contrast images with an enlargement factor of more than 200%. this almost never really comes up.
manono
22nd October 2003, 19:55
Hi-
However, if you are shrinking it, you are probably just as well off, or even better off, with BilinearResize."
My guess is that was written at a time when only Bilinear and Bicubic were available (but even at that, I'm not buying it). But I think sh0dan's just covering himself against disagreement, and that there's no question that Lanczos is the best resizer if you have the bitrate to spare. From that same page:
If however you have enough bitrate then using Lanczos will give you a better picture...
Here are the results of some tests I did:
Resizer Added
Compressibility
LanczosResize 0%
SharpBicubic 0.8%
NeutralBicubic(0.6) 3.2%
NeutralBicubic(0.5) 4.6%
SimpleResize 7.6%
SoftBicubic 13.2%
Bilinear 16.0%
r6d2
22nd October 2003, 20:28
Originally posted by manono
I think [...] that there's no question that Lanczos is the best resizer if you have the bitrate to spare. From that same page:
If however you have enough bitrate then using Lanczos will give you a better picture...
Yes, that's precisely my point. What's the meaning of "enough"? Or let me rephrase: if you have enough bitrate, would you go for Lanczos at 480x480, or rather for Bilinear at 720x480?
I've done the same tests (see them here (http://forum.doom9.org/showthread.php?s=&postid=375453&highlight=bilinear#post375453)), and came to similar results in terms of compression)!
(However, I envy your eyes too, since I cannot tell a difference.)
Certainly Lanczos keeps the most entropy (which perhaps might be called "detail"?). The question is that if doing so implies more "quality" or not, at the expense of disk space.
Anyway, you know that "best settings" are a forbidden topic, just because it may lead to an endless and likely diverging discussion. ;)
I wonder if on a blind test, it would be even possible to spot which resizer was used on different images (without looking at the sizes, of course, that would be cheating :))
Sort of "51% of people prefered Pepsi over Coke when not aware of which one was which" :D
I sort of implemented that comparison in FACAR, even resizing the same frame with 4 differently resized stripes, just to convince myself that God did not gifted me with a vision able to take advantage of Lanczos.
He just gifted me to "try to get the highest frame size you can with the lowest quantization" :D:D:D
manono
22nd October 2003, 21:45
Hi-
Yes, that's precisely my point. What's the meaning of "enough"? Or let me rephrase: if you have enough bitrate, would you go for Lanczos at 480x480, or rather for Bilinear at 720x480?
Although I've made plenty of SVCDs, but no DVDs, I come at this from the .avi side. Running a compress test before encoding, or checking out the first pass size tells me whether I have enough bitrate to use Lanczos, given my quality/resolution/filesize standards. However, rather than give up on Lanczos, if I have a difficult to compress movie, I'm more likely to use a softer matrix in XviD. But the result is probably the same as if I had used a softer resizer with the same matrix.
I agree that when watching an SVCD on a standard interlaced CRT TV set, that it probably doesn't make much difference if you use Bilinear, as you can't tell the difference anyway, and the added compressibility of Bilinear may help prevent artifacts that may be more noticeable. But when viewing an .avi on a monitor or a high quality HDTV, I most definitely can tell the difference between Bilinear and Lanczos (and my eyes aren't what they used to be).
Certainly Lanczos keeps the most entropy (which perhaps might be called "detail"?). The question is that if doing so implies more "quality" or not, at the expense of disk space.
To me it does mean more quality. If using the less compressible Lanczos means putting up with some extra mosquito noise around edges because of the slightly higher average quant, then that's a price I'm prepared to pay. But of course, it's up to each person to decide which looks better to him, and it just boils down to personal preference.
r6d2
22nd October 2003, 22:54
My personal definition of "enough" is the same one that Barbra Streissand and Donna Summer gave in the 80's: Enough is Enough, meaning that it cannot be defined but in terms of itself. :)
Originally posted by manono
Although I've made plenty of SVCDs, but no DVDs, I come at this from the .avi side.
Well, since @Asrial was not using a standard SVCD framesize, I assumed he was targeting to AVI (he is using square pixels). Also, his question about full-screen display (he's using WMP8) reinforced my impression that he will output to a monitor and not to a TV.
Mi suggestion of 720x480 was surely a bad example, since it perhaps lead you to think of DVD output, but I chose it because it's the source frame size. He needs a resizer anyway because of the different aspect ratios.
But all my statements were thinking on a monitor, and even there I cannot spot the different resizers.
Since he is more interested in quality than size, I think it would be better for him to use the biggest framesize possible (hopefully equal to the source). That way his full-screen would have more info to spread and hence less distortion.
In this scenario, whatever resizer he uses will surely have neglillible effect in additional quality. Do you agree?
if I have a difficult to compress movie, I'm more likely to use a softer matrix in XviD. But the result is probably the same as if I had used a softer resizer with the same matrix.
Totally agree. Of course using Deen, C3D another clever denoiser or even Kwag's black magic would help too :).
But if we adhere to "caeteris paribus", wouldn't it be interesting to have a "Pepsi challenge" anyway?
I'll work on one, just for the fun of it. (T3 line: I'll be back :))
Asrial
22nd October 2003, 23:04
Originally posted by r6d2
Since he is more interested in quality than size, I think it would be better for him to use the biggest framesize possible (hopefully equal to the source).
Just to make sure I understand here fully.. by framesize do you mean pixel size (1024x768) or bytes per frame?
Meaning.. the bigger the pixel size the less information needs to be spread or the bigger the file size (thinking of one frame as a file) the more information you have to spread around.
manono
22nd October 2003, 23:36
Hi-
My suggestion of 720x480 was surely a bad example, since it perhaps lead you to think of DVD output, but I chose it because it's the source frame size. He needs a resizer anyway because of the different aspect ratios.
Yes, I was thinking of DVD. However, when making an .avi, we have a whole range of resolutions from which to choose. If it doesn't compress well at 704x400, I can go down to 672x384 or 640x368, to give one example for a movie on my hard drive at the moment. Although there are plenty of good people that do think this way, I'm not one of those that thinks the horizontal resolution has to be the same as the source. I'm perfectly happy with 640*xxx. I let the movie's compressibility tell me which is best.
In this scenario, whatever resizer he uses will surely have neglillible effect in additional quality. Do you agree?
Either I disagree or I don't fully understand the question. That's the whole reason behind using Lanczos. A sharper, more detailed picture results, without the ringing or other artifacts associated with Sharp Bicubic, or the slight blurriness associated with Bilinear. With a good "reference quality" anamorphic source, every hair on a woman's head is seen clearly. Every bump, blemish, wrinkle, scar, beard hair on a man's face is seen clearly. That's why I use it. Maybe the differences between the 2 resizers lessens as you get closer to the source horizontal resolution. You seem to almost be advocating not resizing at all, and then using the player to output with correct AR, which is fine, but I don't do that. Most of my movies are resized to 640*xxx and put on 2 CDs, frequently with the AC3 audio.
Asrial, yes, r6d2 was referring to the resolution.
drebel
23rd October 2003, 00:08
@drebel, what concept of quality are you applying here? (Sh0dan was cautious enough to say "IMO"). If we agree on quality meaning something measurable, like the "similarity to the source" (i.e. low quantization), your statement is not correct. Lanczos quantizes much more than Bilinear.
...if only you let it .
I mean ,If I can "cheat" some extra space by using advanced options in XviD,for example , I would like to "waste" some to gain the clear image that Lanczos provides .And , yes , my eyes prefer an encode with b-frames (low quants of course)and Lanczos than another one using only i-p and bilinear.And if I'm seing mosquito ,I still prefer a little deringing during encoding or another custom matrix than MPEG.
I just took a look at your guide and I'm imressed.Very nice approach on the subject.You 'll hear no arguments from me there.I only suggested the clearest (to my eyes) resizer (I should add "at the same quant" to be exact)
r6d2
23rd October 2003, 01:53
Originally posted by Asrial
Just to make sure I understand here fully.. by framesize do you mean pixel size (1024x768) or bytes per frame?
Well, both definitions you use are related :). 1024x768 pixel size, as you call it, implies certain amount of bytes per frame, provided lossless encoding and fixed bits per pixel (the inverse is not true in the general case).
Frame size is, for instance, 720x480. The term "resolution" is also sometimes misused to refer to frame size, because in the monitor technology they are sort of the same.
But on analog TV technology, resolution (understood as the discernible information) is quite smaller than the frame size, both horizontally and vertically. Read this (http://www.hometheaterhifi.com/volume_6_3/essay-video-resolution-july-99.html) for info if you want to learn more. It's quite an interesting subject. (Even though that article does not even mention the Kell factor, which makes things even worse.)
Meaning.. the bigger the pixel size the less information needs to be spread
While letting the software player do the full-screen projection for the monitor at a higher resolution than the one of the source (this time the encoded source), a resizing will be needed.
As manono suggests, it's better to do the "good resizing" once at encoding time than letting the player do it. This way you have full control on the output image (you don't know how well the player resizes).
Besides, if you set your monitor/projector resolution to 640x480, no resize will be needed by the player, and it will play full screen.
Originally posted by manono
You seem to almost be advocating not resizing at all
Sorry for the confussion. I'm not advocating in favor of not resizing (I did say you need it to keep the AR).
All I'm trying to point out, with quite little success it seems :), is that the more information you retain from the source, the better the quality (meaning less quantization and loss of detail).
So, my point is, if you care more about quality than file size, the rule of thumb is "try to keep it all" (including the aspect ratio). For a 720x480 DVD source, keeping it all means resize to 640x480 for a non-ITU compliant source and 672x480 for an uncropped ITU compliant source (very likely). (You can tell this by loading the D2V source in FitCD.)
I don't know how manono gets its numbers, even on an anamorphic source FitCD comes up with 704x392 (sides cropped) and not 704x400. (But I already spotted a bug in FitCD which I reported to shh. There may be another one ;))
But anyway, the effect of "keeping it all" is (IMHO) more important than the marginal sharpness of Lanczos. Of course you can use Lanczos too, but that's of a lesser order of magnitude "subjective quality" increase than frame size.
Originally posted by [Typo Edit:]drebel
did I mention anywhere the word "quality"
Yes, you did, unless you are editing your post as of now :). But I surely misunderstood what you meant.
I'd really love to see a true metric on human perception of quality. Just trusting an encoder's quant is all we have today, but if that changes, it would be a major contribution.
manono
23rd October 2003, 03:35
Hi-
...even on an anamorphic source FitCD comes up with 704x392...
I use GKnot (I'm a GKnot Mod, after all :)). I'm following the ITU-R BT.601 Standard. I resize to Mod 16, and not Mod 8, for compressibility reasons (as should everyone). The movie is The Lion King SE. It's anamorphic. It has heavy black bars on the sides. Cropping and Resizing thusly:
Crop(16,2,688,476).LanczosResize(704,400)
gives me an Aspect Error of -0.2%. Please don't take me on over cropping and resizing.
quote:
________________________________________________________________________________
Originally posted by manono
did I mention anywhere the word "quality"
________________________________________________________________________________
I'm not sure who you're quoting, but it is not I.
And I was also impressed by your Idiot's Guide, when I read it about a week ago. Good Work.
drebel
23rd October 2003, 10:30
That was for me , I'm afraid :o
Man you're fast :D
A small question : what's your opinion about the internal resizers of the most "famous" players ? Do you have a favourite ? Seems like a lot of people in avsforum is resizing all encodes to resolutions of 1440 (or something) with ffdshow decoder.Does this have an effect on HDTVs only (through ATI dongle cable) or it's nice to do it even on CRTs ?
I 've seen both situations on a Sony 32'' wide (CRT analog 100HZ) and ,except for an extra artificial "sharpness" I didn't notice anything that justifies the above
r6d2
23rd October 2003, 19:32
Originally posted by drebel
what's your opinion about the internal resizers of the most "famous" players ? Do you have a favourite ?
drebel, my friend, as I've said before, I'm resizer blind. If it were a disease it would be called whicheverresizerism :)
I mostly encode for my TV, so I don't play much stuff on my monitor except for testing purposes (and to improve FACAR).
Seems like a lot of people in avsforum is resizing all encodes to resolutions of 1440 [...], except for an extra artificial "sharpness" I didn't notice anything that justifies the above
IMHO, overresizing beyond the original source frame size is to create information where you have not any, whatever clever method of extrapolation is used.
It may or may not look more pleasing to the eye, but to me it's just a form of modern art and does not have anything to do with keeping the quality of the source.
@manono, the wrong quote was a typo (usual when replying multiple persons on the same post :). Sorry about that.)
Thank you both for your comments on the Idiot's Guide. I'm planing to incorporate more topics some time soon so any ideas or contributions are welcome.
trbarry
23rd October 2003, 21:43
I don't have any real hard and fast rules but there are a number of factors that influence me on choosing a resize method.
I rarely choose a soft one for compressibility, but that would be a valid objective.
If I'm upsizing, at least by more than maybe 20% then I like Lanczos because it looks prettier to me. Simple/Bilinear don't upsize well IMHO, at least not by much.
If I'm downsizing (much) then it depends upon how crisp my source is. Downsizing can cause aliasing artifacts if you don't filter. OTOH, much of my HDTV material seems to be already filtered enough that I don't need more filtering. In that case I use SimpleResize because it is both faster and more detailed than most of the others since it is just an unfiltered Bilinear. You can substitute the regular bilinear or a soft bicubic if filtering is needed downsizing very detailed source, but I usually don't.
And when in doubt I just use LanczosResize regardless. I think it is mathematically the most correct in some fashion.
- Tom
DDogg
23rd October 2003, 22:08
Somewhat OT, but I've often wondered if Bicubic and Lanczos might induce a direct or indirect contrast shift. This popped into mind again the other day when I was using Asharp(1,4) and bilinear together. I thought it had the same "look" as Lanczos. Nearly everybody agrees Lanczos looks the best, but then it seems everybody struggles to put in words quite why it looks better. Perhaps some of it is just better contrast?
jorel
23rd October 2003, 23:16
Originally posted by DDogg
Somewhat OT, but I've often wondered if Bicubic and Lanczos might induce a direct or indirect contrast shift. This popped into mind again the other day when I was using Asharp(1,4) and bilinear together. I thought it had the same "look" as Lanczos. Nearly everybody agrees Lanczos looks the best, but then it seems everybody struggles to put in words quite why it looks better. Perhaps some of it is just better contrast?
believe me DDogg,
yesterday after read this thread i did some tests!
using asharp(1,4)with bicubicresize(precise)
and comparing with (only)lanczos,i got the exact
impression of the results that you posted.
you got (all) my words to explain it!
the final size is seamless,but with
asharp and bicubic, have a little more contrast
and (few)less "artefacts" that lanczos!
asharp(1,4) with bicubic seems really better
comparing the mpegs and the "screenshots"
that i did from the same scenes!
:)
Wilbert
24th October 2003, 10:33
Is there someone who thinks that the relevant docs. should be changed/expanded at www.avisynth.org? I'm open for proposals :)
drebel
24th October 2003, 11:35
asharp and bicubic, have a little more contrast
and (few)less "artefacts" that lanczos!
This was my alternative to spatiotemporal filtering of film grain while preserving edges.But the use of lumafilter() seems to increase the contrast to the desirable level for the spatiotemporals to deal with.Does (asharp+bicubic) help the famous "problem with blocks in dark scenes"?
What exactly do you mean by less artifacts?Mosquito?Blocks?Noise?
r6d2
24th October 2003, 12:35
Hi, guys,
You're not going to believe this, but a similar discussion was done
here (http://forum.doom9.org/showthread.php?s=&postid=390163#post390163) on the equivalent topic for TV ouput. The conclusion was to keep the source size :)
@Wilbert, regarding the docs in AviSynth, do you mean the resizers? If so, I don't know if it'd be beyond the scope of the documentation, but I'd definitely have terms like "enough", "heavily" and such defined by other means, and possibly some pictures on the different alternatives.
(I volunteer if help is needed in some of these matters.)
Wilbert
24th October 2003, 12:49
@Wilbert, regarding the docs in AviSynth, do you mean the resizers?
Yes, that's what I meant.
I don't know if it'd be beyond the scope of the documentation, but I'd definitely have terms like "enough", "heavily" and such defined by other means, and possibly some pictures on the different alternatives.
Sorry, no pics. Just a couple of general statements about the different (and difference of the) resizers. But if you think that the information in the docs is correct and sufficient, then there's no need to add anything :)
r6d2
24th October 2003, 12:59
Originally posted by Wilbert
But if you think that the information in the docs is correct and sufficient, then there's no need to add anything :)
I'd like to know the meaning of "correct" and "sufficient" :D:D:D
Really, even as a newbie as I was I found the AviSynth docs very interesting, but those vague terms like "enough" were always (and remain indeed) a mistery to me. I guess others may have felt the same.
r6d2
24th October 2003, 23:00
Originally posted by trbarry
And when in doubt I just use LanczosResize regardless. I think it is mathematically the most correct in some fashion.
Thanks for a very detailed resizing guide, Tom. I'm glad you paid us a visit. (I agree with the higher math-correctness of Lanczos too.)
As promised, I prepared a resizer comparison going down from DVD to CVD (half the frame size).
Would any of you be able to tell which resizer was used on these images? And if so, how do you do it?
Note: The AR was not respected on purpose.
(It's an attachment so I guess we have to wait until the mod authorizes it.)
Wilbert
25th October 2003, 17:29
Picture one is (with distance) softer than the other three. I think you used BilinearResize here.
Sharper than pic one are pics two and four. I can't see any difference between them, except that they are different frames :) I guess you use BicubicResize here (with different b and c values).
Pic 3 is the sharpest. I guess you used LanczosResize here.
Someone else wants to take a guess ?
DDogg
25th October 2003, 17:43
Wilbert, I purposely did not look at your reply before seeing the pic. What I see is exactly what you reported.
r6d2
25th October 2003, 19:11
I'm impressed! Really, really good guys.
The resizers used are, in this order:
Bilinear()
Bicubic(0, 0.6)
Lanczos()
Simple()
jorel
26th October 2003, 00:26
Originally posted by drebel
This was my alternative to spatiotemporal filtering of film grain while preserving edges.But the use of lumafilter() seems to increase the contrast to the desirable level for the spatiotemporals to deal with.Does (asharp+bicubic) help the famous "problem with blocks in dark scenes"?
What exactly do you mean by less artifacts?Mosquito?Blocks?Noise?
"strange artefacts" are (for me in this case):
"mosquitos" and sometimes "moving ants" on the edges!
example:
if the camera turn from right to left(moviments in general),
everything seems "simbilant" with little waves!
sorry my english,i can't find better words!
:o
Manao
28th October 2003, 12:49
I made a comparison between :
- Lanczos()
- Bicubis(0.5,0)
- Bicubic(0.5,0) + Asharp(1,4)
- Bilinear() + Asharp(1,4)
I encoded a full movie ( The last of the Mohicans ), 1h45 long, AR 2.35, PAL. I was aiming for 1CD, 2 soundtrack, so the final video size was 576454 Kb.
I used the following script :MPEG2Source("E:\Ripp\mohicans.d2v")
crop(10,72,-10,-76)
convolution3d(preset="movielq")
temporalsoften(3,5,3,6,2)
The resizer, to a resolution of 704x304I encoded using XviD ( hvs-good quant, VHQ 4, CM, b-frames 2,150,75,0 and finally chroma optimizer )
First thing interesting : the file size for the first pass :Lanczos : 1135 MB
Bicubic : 920 MB
Bicubic + Asharp : 1062 MB
Bilinear + Asharp : 1136 MBI don't understand the high filesize obtained with Bilinear + Asharp. The other figures are more logical.
I compared the results using my own eyes, and SSIM ( lumimask on ). First, with SSIM, I decided to compare the result with the clip after filtering, because I used a heavy filtering ( and I want to compare the resizing method ). I compared with two resizing methods ( lanczos, and bicubic, I planned also bilinear but I thought it was useless with the results I got ). So here are the SSIM values : Encoded with lanczos, compared to lanczos : 75.83
Encoded with lanczos, compared to bicubic : 78.75
Encoded with bicubic, compared to lanczos : 72.58
Encoded with bicubic, compared to bicubic : 81.31
Encoded with bicubic + asharp, compared to lanczos : 75.10
Encoded with bicubic + asharp, compared to bicubic : 79.55
Encoded with bilinear+ asharp, compared to lanczos : 75.29
Encoded with bilinear+ asharp, compared to bicubic : 77.96
From that, we can say that the resizing method ( to resize the original clip for the comparison ) has a lot of influence, too much in this case. However, the use of asharp makes the SSIM values closer to those of lanczos.
Now visually. The lanczos clip is clearly the most detailed one. It is slightly more blocky. Then come the bicubic and bilinear with asharp, almost indistinguishable. And finally, the bicubic one, too blurred for my taste. I decided to keep the lanczos clip.
jorel
28th October 2003, 14:47
hy Manao!
why you don't test(little samples)using
- Bicubic(0,0.6)
and
- Bicubic(0,0.6) + Asharp(1,4)
?
...this will be better than
- Bilinear() + Asharp(1,4)
and maybe better(or seamless,question of taste)
that using
- Lanczos()
!
Manao
28th October 2003, 15:01
I didn't test these settings because I couldn't distinguish bilinear + asharp from bicubic(0.5,0) + asharp, and...
Oooopps, I swapped the settings of the bicubic resizer. So the tests with bicubic are false ( well, not the ones I wanted ), and I can't make them again ( for this movie ), but I will do them with the next one. However, I would bet that bicubic(0,0.5) + asharp make the movie a lot less compressible than bilinear + asharp, and so than lanczos.
I'll keep you informed.
acrespo
28th October 2003, 20:35
The SimpleResize wrote here was made by tbarry?
If yes, this filter only accept YUY2 colorspace?
Is not better use a Bilinear or Bicubic instead Simple because the colorspace conversion?
Boulder
28th October 2003, 21:50
SimpleResize does support YV12, make sure you have the latest version. You can find it from Tom's website for example.
r6d2
29th October 2003, 01:28
Originally posted by manono
You seem to almost be advocating not resizing at all, and then using the player to output with correct AR, which is fine, but I don't do that.
@manono,
Even though I as told before I had not thought of this, I gave it some thought and I think it may turn out to be quite useful. I'd like to know your opinion (or anyone's who know AVIs, which I'm just getting into).
I encoded an anamorphic movie with Doctor DivX, cropped the top and botton black bars, and changed aspect ratio to 1:1. I got an output of 720x368 (no film pixel loss).
I used Quality based encoding, Quant 4.
Then I used DVD2SVCD (AVI2SVCD, actually), with 16:9 (borders added) output AR.
Then I loaded the AVI and used AutoFitCD to get the propper AR. I selected DVD type source in FitCD (since the original AR was kept on the first encode), checked Anamorphic and ITU flags, and output SVCD, not anamorphic.
The AR is right, I got the exact same script from the DVD before (except for the black bar cropping part, which obviously from the DVD was different). But is has the same film-pixel, same resize, same output black bars and alignment.
The MPEG-2 obtained from the AVI had an average quantization of 4.6 (I must confess I expected quite more from second-hand encode!)
However, I have not been able to configure the DivX player to play correctly the AVI gotten this way (in the first step).
Does anyone know of a player capable of doing this? I'd certainly like to encode AVIs this way to keep "the most original detail".
manono
29th October 2003, 04:29
Hi-
There are plenty of good people around here that encode anamorphically. It's just that I'm not one of them. I'm sure one of them can help more than I.
If you use ffdshow to decode your video, you can resize it anyway you like, and still use the DivX Player. The Zoom Player and BS Player are 2 players that can resize video to your own custom Aspect Ratios. I'm sure there are other players also (MPC maybe?).
To acrespo- you can also get the YV12 SimpleResize here (http://www.avisynth.org/~warpenterprises/).
acrespo
29th October 2003, 21:16
Tanks for place to download SimpleResize YV12 version.
But... I found a problem with SimpleResize. My capture with my analog card in 320x480 of resolution. Then I use avisynth to edit the video. See a example below:
AviSource("capture.avi")
Trim(45,2015)++Trim(2314,10054)++Trim(10453,37536)
Crop(2,16,-2,-18)
Telecide(order=1,guide=1,vthresh=20)
Decimate(5)
SimpleResize(320,240)
MipSmooth(preset="AnimeHQ")
awarpsharp
I opened this AVS in VirtualDubMod and compressed with DivX 5.1.1 beta.
When I play the final video, many horizontal dark bars are showed. These dark bars are placed at the same distance between them. I did some tests with the vertical resoltions and my conclusion is:
SimpleResize(320,360) -> I can't see any dark bars.
SimpleResize(320,320) -> I see very fine lines.
SimpleResize(320,280) -> The fine lines are show more strong.
SimpleResize(320,240) -> The fine line are transformed in large (three/four times large) than SimpleResize(320,280) but with less intensity, like a interference.
I think the problem is in vertical resize. When I use SimpleResize(640,480) the problem is not occuring.
The same problem is occuring with BicublinResize, FastBilinearResize and FastBicubicResize filter (MarcFD filter).
Manao
29th October 2003, 23:01
OK, this time, I did the proper tests.
The movie is Sleepy Hollow ( 1h41, PAL, 1.85, dark, but a lot of fog ), I used the following script : MPEG2Source("E:\Ripp\sleepy.d2v")
crop(10,12,-10,-16)
convolution3d(preset="moviehq")
temporalsoften(2,3,3,6,2)Followed either by LanczosResize(704,386)or byBicubicResize(704,386,0.333,0.333)
Asharp(1,4)Visually, before encoding, it was really hard to spot the difference between the scripts. Looking closer, the contrast was slightly sharper for the second script, but the visual aspect was not better ( nor worst )
I tried with a normal bicubic ( 0, 0.5 ) and asharp (1,4), but it looked too sharp, so I didn't encode. Bicubic(0,0.5) alone was almost identical to lanczos, I didn't test it, but the results would have been the same than lanczos
The XviD's setting were the same ( hvs-good quant, vhq 4, cm, co, b-frame 2,150,75,0 ). The size of the first pass were 1188 MB and 1287 MB. So XviD is very sensitive to the sharpening. I wanted a final size for the video of 581812 KB ( two soundtracks ).
I made a visual inspection of the results, and I used also SSIM, but this time, I didn't filtered the source before calculating the SSIM value, and I resize both clips to 1024x560 ( with lanczos, and with bilinear ). The SSIM values are :Lanczos clip, lanczos resize : 74.34
Bilinear clip, lanczos resize : 73.89
Lanczos clip, bilinear resize : 77.85
Bilinear clip, bilinear resize : 77.61So, with this distance, the lanczos resizer seems better.
Now, visually : The sharpened clip is slightly more blocky, but not more detailed nor sharper. It doesn't look worst either, since the differences are not visible when I don't compare frame by frame. I'd bet that on a blind test, with only playbacking at normal speed, I'd not be able to tell which one has been sharpened. However, I'll keep the lanczos clip, since frame by frame, it has less artifacts.
I didn't check for the dark block issue.
So, from these tests, I would not remplace lanczos by a softer resizer followed by asharp.
Edit : I made an error using 386 as vertical resolution :( However, it shouldn't influence the results
r6d2
29th October 2003, 23:27
Originally posted by manono
If you use ffdshow to decode your video, you can resize it anyway you like, and still use the DivX Player.
Excuse mi ignorance, but how do I tell the DivX Player to use ffdshow?
The Zoom Player and BS Player are 2 players that can resize video to your own custom Aspect Ratios.
I tried them both. AVI is 704x368 (I encoded 1:1 do it kept NTSC AR). So correct DAR is obtained when 772x368 (704*79/72).
Success in Zoom player, but it has to be adjusted manually for every movie. It has no memory.
Success in BSPlayer too, but adjunting fddshow, which again has to be done for every movie and has no memory either.
The good thing is that when/if DVD players support MPEG-4, NTSC display would be transparent and lossless.
manono
30th October 2003, 00:22
Hi-
I don't use the DivX Player, but for me, I can go Start-Programs-ffdshow-Configuration-Codecs, and check the DivX5 box or any other codec you want it to decode. Then you can go to Resize and Aspect and set your aspect ratio. It looks like it will use that AR until you change it again. But like I said, I don't fool around with that stuff.
I'm more familiar with the BS Player, and you can save the custom ARs easily. Right click the console and go Options-Preferences-General. Set your aspect ratio (like 79:72) and hit "Add". Then close BS Player. The next time you open it and start a movie, right click the video, go to Aspect Ratio, and click on the previously saved one. If you want to resize to 4:3 or 16:9, you can assign keys in the Key Definitions Tab.
I'm not entirely sure I've answered the questions, but maybe you can play with it some more and figure it out.
r6d2
30th October 2003, 00:59
Originally posted by manono
I don't use the DivX Player, but for me, I can go Start-Programs-ffdshow-Configuration-Codecs, and check the DivX5 box or any other codec you want it to decode.
The DivX codec setup is a combo box. It defaults to libavcodec, other options are "disabled" and "XviD". I guess it's set, but fddshow tray icon does not appear when playing, like in BSplayer. :confused:
I'm more familiar with the BS Player, and you can save the custom ARs easily. Right click the console and go Options-Preferences-General. Set your aspect ratio (like 79:72) and hit "Add".
Did that (actually, it was on the video tab). It works, but it uses it as DAR, not as PAR, so it doesn't turn out as expected. :(
I've reading that Matroska saves the AR on the file, so you just have to set it once.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.