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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 28th April 2008, 21:45   #161  |  Link
Vesi
Guest
 
Posts: n/a


I'm getting color problems with latest Script
mc_spuds(frames=2,strength=1)

Edit: And I found that, the problem exist in beta V with .9 everything is ok

Last edited by Vesi; 28th April 2008 at 22:04.
  Reply With Quote
Old 28th April 2008, 22:00   #162  |  Link
Spuds
dumber every day
 
Spuds's Avatar
 
Join Date: Dec 2006
Location: Planet Earth
Posts: 154
@vesi

Was this the version on the wiki or the version from the link in post number 2 (the beta).
If the beta what is the date in the script header? There was a version that had the color processing wrong, although with the call you made you should not have seen that.
If its the version from the wiki make sure you did not get repairsse# installed, only use repair.
If none of the above then you know the drill, the script and short clip with the error please.

Thanks!
Spuds is offline   Reply With Quote
Old 28th April 2008, 22:13   #163  |  Link
Vesi
Guest
 
Posts: n/a
version from the post number 2. And I use repair.
Date 26.04.08 14:34

Edit: I will send you the sample along with script and test result soon by pm.

Last edited by Vesi; 28th April 2008 at 22:30.
  Reply With Quote
Old 30th April 2008, 02:54   #164  |  Link
Spuds
dumber every day
 
Spuds's Avatar
 
Join Date: Dec 2006
Location: Planet Earth
Posts: 154
@Vesi

I updated the file in post number 2, this should take care of the color issue you were seeing. The defect was interesting, it was basically a few color blocks from forward looking frames coming through into the current frame, occurring 1-2 frames ahead of a scene change.

Frankly I was cheating things a bit and using luma motion vectors on all the planes for mvdenoise (speed but not really proper) and this tripped up the scene change detection. I could eliminate your example by lowering thscd2 to 90 but in the end decided to change the processing to be chroma proper.

Give the new script a try and let me know what you think.
Spuds is offline   Reply With Quote
Old 1st May 2008, 20:50   #165  |  Link
Vesi
Guest
 
Posts: n/a
Everything is fine now Spuds. And thanks for updating the script.
  Reply With Quote
Old 28th May 2008, 14:19   #166  |  Link
Avenger007
Bruce Wayne
 
Join Date: Dec 2007
Posts: 283
First, let me say thanks a lot for an impressive noise removal script.

Second, an observation about debug view...
In function pre_filter, bt and ov are:
Code:
bt = (premax && frames > 1) ? 3 : (premax) ? 3 : (strength < 5) ? select(frames , 1 , 1 , 1  , 2  , 2) : select(frames , 1 ,1 , 2  , 2  , 3) 
ov = (premax) ? 8 : select(strength , 2 , 4 , 4 , 4 , 8 , 8 , 8)
But in function debug_view, bt and ov are redefined:
Code:
bt = (premax && frames > 1) ? 5 : (premax) ? 3 : (strength < 4) ? select(frames , 0 , 1 , 2  , 3  , 3) : select(frames , 0 ,2 , 3  , 4  , 5) 
ov = (premax) ? 8 : select(strength , 2 , 4 , 4 , 4 , 8 , 8 , 8)
So when I experimented with bt and ov (like bt=3, ov=8) in pre_filter, the debug view list remained the same. It's no big deal really, I just thought I would point it out.

Third, is dering_clp still being tested?
Is there an updated version for it or for the MC_Spuds script in general?

again for a great script.
Avenger007 is offline   Reply With Quote
Old 29th May 2008, 00:50   #167  |  Link
Spuds
dumber every day
 
Spuds's Avatar
 
Join Date: Dec 2006
Location: Planet Earth
Posts: 154
Quote:
Second, an observation about debug view...
In function pre_filter, bt and ov are:
Good catch! ... The way I'm doing that in debug_view was just lazy on my part, bt and ov should be passed in the functions or made global but not defined twice ... but when it came to the debug view function I was kind of lazy

Quote:
is dering_clp still being tested
Yes and no ... overall I'm satisfied with the processing in the last beta (post #2 and I think its the same as the last official on the wiki but would have to double check) and I'm satisfied with the edge mask creation. In the script you some of the ways I've worked on the edges, but like everything its a speed, effectiveness, detail retention tradeoff.

All of those deringing noise functions are applied via an edge mask which is just as important as the denoising function itself. You will get more deringing by changing the edm_lo and edm_hi values (use debug views to see how those add or removed edges to the mask).

All that said I'm always looking for and trying new things.
Spuds is offline   Reply With Quote
Old 29th May 2008, 17:46   #168  |  Link
Dreassica
Registered User
 
Join Date: May 2002
Posts: 384
Using starfield = true in 0.9d results in an: The named argument "threshhold' to mt_binarize had the wrong type, line 104 and line 524 in mcspuds avs.
Dreassica is offline   Reply With Quote
Old 30th May 2008, 00:12   #169  |  Link
Spuds
dumber every day
 
Spuds's Avatar
 
Join Date: Dec 2006
Location: Planet Earth
Posts: 154
Dreassica .. thanks for the bug report in 0.9d, looks like you had starfield and anime set to true. I placed a new beta version at the link in post#2, its still 0.9d but now has todays date in the header.

When using starfield remember to do some tunning of the thstar and lumathres values.

lumathres will allow more spots to be considered in the mask, lower includes more spots (don't go below 130). Its basically the luma value of the stars in question, if they are all very bright increase the value to avoid false hits.

thstar will look at the mask that is created with the lumathres value and decide if there are enough spots that what we have is indeed a starfield and not just a few spots or dots that are really noise.

use debug=9 to see the starmask to help in tunning. I have used starmask to retain stars, bubbles, plankton, and lots of other swarming fields in video that would have normally been removed or diminished by tunning the values.
Spuds is offline   Reply With Quote
Old 12th June 2008, 03:19   #170  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
Missing Plugins, Scripts in Docs

You should add something like this to your doc:

# requires: addgrain v1.4
# awarpsharp
# despot v3.4.1
# dfttest v1.1
# fft3dfilter v2.1.1
# hqdn3d v0.11
# mt_masktools v2.0.32
# mvtools v1.9.2
# removedirt v0.9
# removegrain v1.0
# removegrainT v1.0
# Repair v1.0.dll
# undot v0.0.1.1
# unfilter v0.0.1.5
# warpsharp 03Nov03.dll

# Scripts:
#
# deblock_qed.avs
# LimitedSharpenFaster.avs



Xsharpen is in the old warpsharp as dated above.
Clense is in the latest RemoveGrainT from Kassandro

<a href="http://home.arcor.de/kassandro/prerelease/RemoveGrainT-1.0.rar
">RemovegrainT</a>

<a href="http://avisynth.org/warpenterprises/files/warpsharppackage_25_dll_20031103.zip">Old Warpsharp</a>
hartford is offline   Reply With Quote
Old 31st July 2008, 22:24   #171  |  Link
McCauley
Registered User
 
Join Date: Nov 2006
Posts: 83
Hi Spuds,

sorry, i forgot to give an update to my last post. The saturation thingy was caused by another function i really didn't take
into account (and i still don't understand why it does it...).

May i make a few suggestions again?

How about implementing MVDegrain4/5/6?

While you're at it you could implement , as far as i understand it, the speed impact should be almost zero with everything already
computed. MoComp'ed ContraSharpening

Since this script should be used most of the time to denoise/degrain older movies, why not integrate a real scratch removal function? It already does a
decent job on scratch removal, but i want it to be better.

How about offering support for fft3dGPU like in UDegrain?

Another cosmetic change i want to suggest would be to change prefilter,prefast and premax to a single prefilter call with integer values:
0 off
1 prefast
2 strength based
3 premax
That would make the usage a bit prettier IMHO.


Looking forward to further development of your outstanding script.

Regards
McCauley
McCauley is offline   Reply With Quote
Old 31st July 2008, 23:55   #172  |  Link
45tripp
Dolphin Blue
 
45tripp's Avatar
 
Join Date: Mar 2007
Posts: 336
Quote:
Originally Posted by McCauley View Post
While you're at it you could implement , as far as i understand it, the speed impact should be almost zero with everything already
computed. MoComp'ed ContraSharpening
+1

Quote:
Originally Posted by McCauley View Post
How about offering support for fft3dGPU like in UDegrain?
+1


ty
tripp
__________________
injected with feelings; with no final fading
45tripp is offline   Reply With Quote
Old 3rd August 2008, 18:06   #173  |  Link
Spuds
dumber every day
 
Spuds's Avatar
 
Join Date: Dec 2006
Location: Planet Earth
Posts: 154
Had a bit of free time so decided to play around a bit and add some of the features based on the latest suggestions. The latest 1.0 Beta is available in the link in post number 2. Consider it a test version to check things out and let me know if there are any problems.

The changes are:
1. Added mvdegrain4 capability for frames=4. Could have added more but since there are also with temporal and aggressive processing options the script has enough noise removal power.

2. Added gpu=true which will utilize fft3dgpu in place of fft3dfilter throughout the script.

3. Added prefilter = 0-4, 0-none, 1-fast, 2-strength based, 3-max. The old premax, prefast, etc also are still available.

4. Added third sharpening option, contra with MC determined limits. Use via sharpp=3 (0=none, 1=contra, 2=limitedsharpenfaster, 3=MC contra). Have not had enough time to fully test this so give it a try and let me know how you like the results.

5. Fixed / added some debug information in the debug=1 screen
Spuds is offline   Reply With Quote
Old 3rd August 2008, 18:21   #174  |  Link
elguaxo
Registered User
 
elguaxo's Avatar
 
Join Date: Jun 2006
Posts: 260
thanks!
elguaxo is offline   Reply With Quote
Old 3rd August 2008, 18:46   #175  |  Link
McCauley
Registered User
 
Join Date: Nov 2006
Posts: 83
Awesome!
Thank you very much!

Regards
McCauley
McCauley is offline   Reply With Quote
Old 4th August 2008, 19:35   #176  |  Link
Lux Delux
Registered User
 
Lux Delux's Avatar
 
Join Date: Aug 2006
Posts: 52
Wooo your effort is greatly appreciated! This scripty does wonders on Chuck Norris
Lux Delux is offline   Reply With Quote
Old 4th August 2008, 20:01   #177  |  Link
Lux Delux
Registered User
 
Lux Delux's Avatar
 
Join Date: Aug 2006
Posts: 52
Hmmm I just noticed sharpp=3 introduces 2px white borders around my image. Any ideas?

EDIT: actually it seems it appears with removeblocks=true. Even with sharpp=1 I got the lines but then they were sort of grayish. Removing removeblocks made it dissapear with sharpp=1 but the problem is still there it seems with 3.

Last edited by Lux Delux; 4th August 2008 at 20:12.
Lux Delux is offline   Reply With Quote
Old 4th August 2008, 21:58   #178  |  Link
g-force
Guest
 
Posts: n/a
Spuds,

your MCcontra routine is totally hosed. You're applying the clamp to the difference signal, it should be applied to the un-differenced end result.

something like:

Code:
pshrp = last
pmax  = source.MT_Logic(bw1,"max").MT_Logic(fw1,"max")
pmin  = source.MT_Logic(bw1,"min").MT_Logic(fw1,"min")
rg11d = MT_MakeDiff(pshrp,pshrp.RemoveGrain(12,-1))
MT_MakeDiff(pshrp,pshrp.RemoveGrain(4,-1))
MT_LUTxy(rg11d,last,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
MT_MakeDiff(pshrp,last)
MT_MakeDiff(last,last.RemoveGrain(12,-1))
MT_LUTxy(pshrp,last,"y 128 - 1.5 * x +",chroma="copy first")
MT_Clamp(last,pmax,pmin,1,1,chroma="copy first") #or better yet, have a variable overshoot amount
-G

Last edited by g-force; 4th August 2008 at 22:27.
  Reply With Quote
Old 4th August 2008, 23:48   #179  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,407
Yeah, the "MCsharpening()" routine is a bit off. Clamping the diff instead of the result, as g-force already found ... one or two mt_LutXY not making much sense ... oh, and a closing parenthesis at the wrong place, which in effect reduces the sharpening strength for strength >=4, where it should increase. Indeed, just a little bit broken.

Corrected version:

Code:
FUNCTION MCSharpening(clip denoised, clip original, int frames, int strength, bool flow, int thsad)
{
  # apply sharpening to the denoised clip
  # sharp = yv12lutxy( denoised, denoised.minblur(1,1).removegrain(11,-1), "x y = x x x y - abs 16.25 / 0.25 ^ 16.25 * 1.5 * x y - 2 ^ x y - 2 ^ 4.5 + / * x y - x y - abs / * 1 x y - abs 20 / 4 ^ + / + ?",U=2,V=2)
  s = denoised.minblur(1,1) # Damp down remaining spots of the denoised clip.
    
  # The difference of a simple kernel blur. Use a larger radius for stronger strength values 
  ssD  = (strength < 4) ? mt_makediff(s,s.removegrain(11,-1)) \
                        : mt_makediff(s,s.removegrain(11,-1).removegrain(20,-1)) 
                                                            
  # determine our clamping limits based of our original clip and a simple MVcompensate 
  global idx_pointer = (flow) ? idx_pointer : idx_pointer + 1                                    
  comp_bw1 = (flow) ? sv_cb1 : original.MVCompensate(sv_b1,thsad=thsad,idx=idx_pointer) 
  comp_fw1 = (flow) ? sv_cf1 : original.MVCompensate(sv_f1,thsad=thsad,idx=idx_pointer)
  pmax = original.mt_logic(comp_bw1,"max").mt_logic(comp_fw1,"max")
  pmin = original.mt_logic(comp_bw1,"min").mt_logic(comp_fw1,"min")

  denoised.mt_adddiff(ssD,U=2,V=2)     # Apply the blur difference. (Sharpening is just inverse blurring.)    
  last.mt_clamp(pmax,pmin,0,0,U=2,V=2) # limit the sharpened clip to not exceed the original temporal neighborhood
  
RETURN (last)
}
__________________
- 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!)
Didée is offline   Reply With Quote
Old 5th August 2008, 00:14   #180  |  Link
Lux Delux
Registered User
 
Lux Delux's Avatar
 
Join Date: Aug 2006
Posts: 52
Great, no more problems with sharpp=3 now

And I like it btw, I'm starting to use mcspuds as a all in one denoiser/sharpener/deblocker
Lux Delux is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.