Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
15th June 2003, 09:09 | #1 | Link |
Registered User
Join Date: Sep 2002
Location: Seattle
Posts: 551
|
Denoising/Increasing compressibility with BilinearResize()
Let's say I want to gain some compressibility. BilinearResize is a bit blurrier than other resizers given its anti-aliasing nature, and enhances compressibility. Wouldn't it be better to use BilinearResize than C3D or another denoiser/smoother, if speed is valuable, for the purpose of smoothing/gaining compressibility?
|
15th June 2003, 10:22 | #2 | Link |
Registered User
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
|
That's what MipSmooth is all about:
http://forum.doom9.org/showthread.php?s=&threadid=53548 without killing too much detail as Bilinear alone could have made. Bilu |
16th June 2003, 18:09 | #4 | Link |
Registered User
Join Date: Jul 2002
Location: Canada
Posts: 196
|
As have I. Recently however I've been using BiCublinResize in place of Lanczos, but not for increased compressibility (although it may be minor side effect) but because I like how it looks when downsizing after TomsMoComp when compared to the other common resize filters.
I would be interested in a general compressibility comparison with BiCublin and others however. |
17th June 2003, 15:09 | #5 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Don't forget undot() and Deen(), used with Lanzos or bicubic if it is appropriate for your source. I get an average reduction of 3 points of Q in CCE without any major side effects video quality wise with only a small speed decrease.
|
17th June 2003, 16:42 | #6 | Link |
·
Join Date: Jan 2002
Posts: 1,729
|
"Oops I did it again"
I made another AVISynth function that utilizes masks. This one tries to do what JohnMK describes, and is as usual horribly slow at it . It resizes detail areas with LanczosResize, and nondetail areas with BilinearResize, with configurable sharpness. It's a completely untested concept, I just whacked it together in no-time. So if anyone's interested just test it, I won't. Here it is, HybridResize! http://mf.onthanet.com/avisynth/HybridResize-0.1.avs Usage example: Import("HybridResize-0.1.avs") HybridResize(320, 240) Parameters: sharpness - controls the resize sharpness. 0-255, default 255. Dependencies: MaskTools. Have fun testing! |
17th June 2003, 17:27 | #8 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
|
|
17th June 2003, 17:34 | #9 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
@Piper/mf: mf is right about bicublin. It does however use a simpler algorithm for scaling, which doesn't provide the same level of filtering as AviSynth - thus greater speed - sometimes at the cost of subjective quality.
It is much more similar to mSmooth. I don't expect this to give much different compression results - as the soft areas are quite smooth - even with lanczos. You should try using msmooth to generate a mask for you, instead of using the resizer.
__________________
Regards, sh0dan // VoxPod |
17th June 2003, 17:44 | #10 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
|
|
17th June 2003, 20:19 | #11 | Link |
·
Join Date: Jan 2002
Posts: 1,729
|
Ok, hikke has done some testing for me. Mind you, it's on upsizing, we don't know anything yet about downsizing.
20:09 <@hikke> Lancozresize: 9.16 MB (9,609,216 bytes), Hybridresize: 8.28 MB (8,687,616 bytes) (that's constant quant 2) 20:11 <@hikke> lancoz has more details (divx3.11 errors), hybrid is nicer to eye, because those errors at stable surfaces aren't so visible 20:36 <@hikke> done that. hybridvlbe - hybridxvid = Total Average PSNR: 40.81 20:37 <@hikke> lanczosvlbe - lanczosxvid = Total Average PSNR: 40.69 20:37 < DeathWolf> so hybrid is better in the end, seems like it's worth it 20:37 < DeathWolf> better comp, better visual qual 20:37 < DeathWolf> all good Seems nice, so far. Especially since my idea spawned in 10 seconds and it took me 10 minutes to write the script function. Hikke said to test downsizing tomorrow. |
17th June 2003, 23:36 | #12 | Link |
Registered User
Join Date: Sep 2002
Location: Seattle
Posts: 551
|
A 'HybridResize.dll' would be really cool.
Just testing it now, it appears to look really good on a downsize. I don't really have an eye for these things, but at the very least -- it looks good to me. Speed is a little slow, but I hope if this filter becomes popular, maybe some attention would happen here after the filter is stable enough. Further testing has shown HybridResize gives me almost as much compressibility as BilinearResize. Very impressive. Hopefully that's the desired effect. Compressibility results (higher number == higher compressibility) for the new James Bond "Die Another Day": Bilinear: 59% Hybrid: 57% Bicubic: 52% Lanczos: 49% Yet further testing: the downsized image is blurry where it counts, unfortunately. Almost indiscernable from bilinear. Last edited by JohnMK; 18th June 2003 at 07:01. |
18th June 2003, 11:04 | #13 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
reverse - soft resize on edges - true/false - default false You can get it here: http://mf.onthanet.com/avisynth/HybridResize-0.2.avs (after hours of pain and agony I finally managed to upload a 958 byte textfile to my ftp server via commandline ftp -_-) |
|
18th June 2003, 11:50 | #14 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
This I wanted to suggest - but when I refreshed this page, you already had it done... "Inverse sharpening" is something that I've had on my mind for quite some time now. After denoising, usually some of the fine details disappear, and the remaining fine details get softened out. Trying to compensate for that by normal sharpening is not a good idea, because the hard edges will get oversharpened then. But I never got a final script done, because I was always aware of a flaw in the concept, when it is done with layering: The "mixing" of a sharp and a soft version is not correct. Try to layer some blur(1.3).blur(1.3) with some sharpen(1.0) by 50%, and you see what I mean. To get the "inverse sharpening" more correct, it would be necessary to perform the strength of the sharpening according to the "edge value" of every pixel in the edge mask. But to do that with AviSynth scripting would be very complex, and extremly sluggish. We'd need a plugin for that ... However, when working within small ranges of sharpening/blurring, the difference might be hard to notice at all. - Didée
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
18th June 2003, 12:23 | #15 | Link |
Registered User
Join Date: Sep 2002
Location: France
Posts: 432
|
With the available and most commonly used tools, layer("add") in RGB32 already does such job if you properly scale the edgemask and perform a strong sharpening. If I remember well, mode "add" does:
Code:
(clip2_alpha * strength) ------------------------ * (clip2 - clip1) 256 output =-------------------------------------------- + clip1 256 (256-(clip2_alpha * strength)/256)*clip2 - (clip2_alpha * strength/256)*clip1 = ------------------------------------------------------------------------- 256 Last edited by Kurosu; 18th June 2003 at 12:44. |
18th June 2003, 13:43 | #18 | Link | |
Registered User
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
|
Quote:
- Tom
__________________
My video filters (still) at www.trbarry.com. |
|
28th June 2003, 05:07 | #20 | Link | |
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
I just installed 2.52 and attempted to follow your suggestion, but it seems that these filters are only for YV12... Is there a way to use them with 2.52 and CCE? Thanks in advance.
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
|
|
|