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. |
|
2nd November 2005, 15:43 | #1 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
The present haloing knocked me off the chair!
... But when hitting the ground, I had a raw idea worth to try: Code:
rad = 3.0 # radius for halo removal ss = 1.5 # radius for supersampling / ss=1.0 -> no supersampling o = last ox = o.width() oy = o.height() x = o.bicubicresize(m4(ox/rad),m4(oy/rad)).bicubicresize(ox,oy,1,0) y = yv12lutxy(o,x,"x 8 + y < x 8 + x 24 - y > x 24 - y ? ? x y - abs * x 32 x y - abs - * + 32 /",U=2,V=2) z1 = repair(o,y,1) maxbig = y.expand().bicubicresize(m4(ox*ss),m4(oy*ss)) minbig = y.inpand().bicubicresize(m4(ox*ss),m4(oy*ss)) z2 = o.lanczosresize(m4(ox*ss),m4(oy*ss)) z2 = z2.logic(maxbig,"min",U=2,V=2).logic(minbig,"max",U=2,V=2).lanczosresize(ox,oy) (ss == 1.0) ? z1 : z2 return last #---------- function m4(float x) {return( x<16?16:int(round(x/4.0)*4)) }
__________________
- 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!) Last edited by Didée; 2nd November 2005 at 17:24. Reason: z1, not z ... and ss instead of 1.5 ... |
2nd November 2005, 16:39 | #2 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I don't see that much haloing in the source frame (probably because it's so messy, I can provide cleaner frames with halos if you want) but I'm going to try it, thanks .
[edit]Could you arrange it into a function? I don't know how to include it on the script.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
2nd November 2005, 16:43 | #3 | Link |
n00b ever
Join Date: May 2002
Posts: 627
|
vouw ... nother impressive script from didée
what i can't get : - what is z1 ? ( i guess, it's the 'repaired' clip ) - why is 1.5 is hardcoded in the supersampling part ( i guess, that'd be ss instead ) ... or am i on a wrong way ? thx y |
2nd November 2005, 16:54 | #4 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
Hey, it's just a sudden glance, quickly scribbled, and seems to do [at least] something right. I almost assure you there'll be some overflow-errors in the LUT ... can't evaluate that now. For Chainmax: Code:
function abcxyz(clip clp, int "rad", int "ss") { rad = default(rad, 3.0) # radius for halo removal ss = default(ss, 1.5) # radius for supersampling / ss=1.0 -> no supersampling ox = clp.width() oy = clp.height() x = clp.bicubicresize(m4(ox/rad),m4(oy/rad)).bicubicresize(ox,oy,1,0) y = yv12lutxy(clp,x,"x 8 + y < x 8 + x 24 - y > x 24 - y ? ? x y - abs * x 32 x y - abs - * + 32 /",U=2,V=2) z1 = repair(clp,y,1) maxbig = y.expand().bicubicresize(m4(ox*ss),m4(oy*ss)) minbig = y.inpand().bicubicresize(m4(ox*ss),m4(oy*ss)) z2 = clp.lanczosresize(m4(ox*ss),m4(oy*ss)) z2 = z2.logic(maxbig,"min",U=2,V=2).logic(minbig,"max",U=2,V=2).lanczosresize(ox,oy) return( (ss==1.0) ? z1 : z2 ) } function m4(float x) {return( x<16?16:int(round(x/4.0)*4)) }
__________________
- 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!) Last edited by Didée; 2nd November 2005 at 17:23. Reason: z1, not z ... and ss instead of 1.5 ... |
|
2nd November 2005, 17:19 | #5 | Link |
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
|
Just for snicks and grins, look at the first post in this thread and see if enlarging, then noise filtering (maybe even a little heavier), then shrinking, then LimitedSharpen will help. http://forum.doom9.org/showthread.php?s=&threadid=68494 The sample images are gone but the results was wonderful. Maybe, just maybe, this would make the aberrations more aberrant...
FWIW, some folks combat that horrible blockiness in very similar areas by playback with ffdshow and adding a little noise. It can help break up the outlines just enough to fool our eyes during playback. edit: Hah! I knew all this seemed too familiar: http://forum.doom9.org/showthread.php?s=&threadid=64432
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers Last edited by FredThompson; 2nd November 2005 at 17:38. |
2nd November 2005, 21:12 | #6 | Link | ||
Registered User
Join Date: Nov 2004
Location: Spain
Posts: 408
|
@Chainmax
Quote:
avisource("your.avi") fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=1) fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=2) In my case the rainbows are middle-sized so I use heavy denoising en sigma3. Real colour are more afected by sigma4, then I use a moderate value for it. Sigma and sigma2 copes whit subtle rainbows. You can raise this values but in the first example I think it isn't necessary. Anyway, bifrost and smartssiq are very effective filters. In fact you can combine it: From bifrost's manual. Quote:
|
||
3rd November 2005, 01:59 | #7 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Didée, you are THE MAN!!! By replacing the FFT3DFilter line with a default call to abcxyz, the halos are completely gone and the result is almost identical to the last screen I posted!! . I'll post the three screens with this filterchain soon.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
3rd November 2005, 02:56 | #8 | Link |
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
|
Didée does make some really good cleaning stuff. There are those, however, who think he's a shill for CPU manufacturers :P
Methinks I'll try this on some DV moire (camcorder shots of moving roller conveyor) and see how it does. Maybe it will also help with laserdisc moire.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers Last edited by FredThompson; 3rd November 2005 at 04:05. |
3rd November 2005, 22:38 | #9 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Here are the three screens with the last filterchain:
[link removed, screenshot appears now on page 3] The first one looks pretty much the same as the last attempt, but the second and third one look worse. They are, however, rare special cases that will probably be attenuated(sp?) by x264's deblocking (0,0 has proven too weak so I'll go for 2,2) anyway. I will encode a sample in a taxing sequence and upload it for you guys to examine. Again, thanks for all the input .
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 15th November 2005 at 22:17. |
3rd November 2005, 22:51 | #10 | Link |
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
|
You could play with MDeblock http://www.mdeblock.de.tf/
I like the results of LimitedSharpen but it's dog slow. The basic idea, modifying the extremes of the sharpening, could be put into dll sharpeners and they'd probalby run a lot faster. My Athlon XP 2200s run HC best profile at 5 fps with LimitedSharpen, ~30 fps without it. Something to keep in mind because it dramatically impacts encoding time.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
3rd November 2005, 23:30 | #11 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Since these are 25min episodes, I can just compress to ffdshow's YV12 huffyuv and then feed that into MeGUI. I'll try MDeblock soon and report back, although it kinda bugs me that it never was developed over v0.3 and that it went pretty much unnoticed here.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
4th November 2005, 08:56 | #12 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
@ Fred
Get this and this, try Soothe(LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=4),last,24) [or 16], and compare again fps and result.
__________________
- 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!) |
4th November 2005, 10:46 | #13 | Link |
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
|
I'm now seeing 10 fps instead of 5 and the oversharp whities are reduced without losing the sharpness of the black lines. Thanks. DVD-RB Pro is now an overnight task, not a "sometime tomorrow" task. Thanks!!
What is the last parameter? I used your first suggestion, not the second. This is some sort of influence limiter? The thread for Soothe mentioned the possibility of support files for LimitedSharpen. I wonder if anyone other than hanc messes with Fortran. Seems like a natural way to get some speed in the math routines. Tried UnSharpMask instead of LimitedSharpen but the results just weren't that great. LimitedSharpen seems to do a very nice job of sharpening hard edges and leaving relatively smooth areas less modified. Quite helpful for animation, especially with the relatively low amount of oversharp artifacts.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers Last edited by FredThompson; 4th November 2005 at 10:57. |
5th November 2005, 12:52 | #14 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I made a test encode of an expecially taxing sequence. You can download it from [link deleted].
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 7th November 2005 at 00:39. |
10th November 2005, 05:41 | #15 | Link |
Guest
Posts: n/a
|
I'd just like to throw in that the dehaloing script you wrote Didée is pretty nice. Gets rid of the halos as good as BlindDeHalo but doesn't make the video blurry and doesn't thin out black lines.
Source: Using abcxyz(): Using BlindDeHalo2(2.5,2.5,160): And thanks for pointing out BiFrost Chainmax as it is a nice rainbow filter. With BiFrost and abcxyz(): Last edited by Anonymouses; 10th November 2005 at 07:27. |
10th November 2005, 07:23 | #16 | Link |
Guest
Posts: n/a
|
I don't want to get too off topic here, but I can't get over how nice that dehalo script is. Here's another couple of samples comparing it against BlindDeHalo2 which I used to use. I changed the rad so that it takes float values.
Source: default abcxyz(): abcxyz(rad=1.75), turned down the radius to preserve the small bright areas, and HQDering(255) to catch the bit of ringing that the lowered radius doesn't get: BlindDeHalo2(2.5,2.5,160): Last edited by Anonymouses; 10th November 2005 at 07:34. |
10th November 2005, 11:50 | #17 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Very nice indeed. I'm going to test abcxyz (I renamed it to DDeHalo, i.é: Didée's DeHalo ) on my test source that has lost of small details and see how it compares to HQDering, FixVHSOverSharp and BlindDeHalo3.
Anonymouses, I recently made a separate thread wher I ask for feedback on my Trigun encoding attempts. I'm mulling over two alternatives and would appreciate your feedback.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
13th November 2005, 14:37 | #18 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Guys. It's a trick function, aiming at removing brighties and preserving darkies. Reducing radius to preserve the brighties will also weaken the removal effekt - note that in your r=2.25 examples the halos are only damped, but not removed. While in the last shot, the letters still are noticeably darkened.
There were good reasons why initially I only posted a linear script, not a function ... and later named the function begged for as silly as "abcxyz": While it might have some potential, still it's only a trick function that *must* fail in places. BTW, there was quite some mentioning of BlindDeHalo2 in this thread. Did anyone notice that BlindDeHalo has reached its 3rd incarnation since quite some time, and has gotten lots of tweaks to play with? - "sharpness" parameter (and "tweak" counterpart) - "lodamp" (and "hidamp" (!) ) parameter - the "PP" modes, which act somewhat similar to HQdering ... -- ... where "PP" < 0 runs *only* these routines, without the main dehaloing one (a quickly fiddled before / after example, posted on the German forum some months ago.) Know your tools.
__________________
- 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!) |
14th November 2005, 02:08 | #19 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
It might be a trick function, but it works wonderfully, and following rad=1.75 with HQDering is still a great option. Just because some people diss your awesome work that doesn't mean you must do it yourself. I really do believe that DDeHalo deserves its own thread and more testing by various persons.
About BDH3, I didn't mention it because I figured Anonymouses preferred 2 to 3. Besides, I just don't like the BDH line, I feel they oversmooth the whole frame and kill tiny details.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
14th November 2005, 03:03 | #20 | Link |
Guest
Posts: n/a
|
Yeah but BlindDeHalo, even the 3rd incarnation, has a real problem with destroying black lines while this preserves them which is one things I like about it. Maybe something could be added to help preserve the black lines without needing to redarken them after using BDH? And true, while using a radius under 3.00 doesn't completely eliminate the halos it does dampen them enough that something like HQDering can be used to eliminate the last bit without hurting more of the bright areas and preserving the integrity of the black lines.
Last edited by Anonymouses; 14th November 2005 at 03:09. |
|
|