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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th September 2008, 05:41   #241  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
How would you guys go about this one?
Yadif(Mode=1,Order=0)#sample was BFF
MRestore(FRate=24)
#MRestore(Numr=2400,Denm=5000)#if using an older version, as I do

That works reasonably well.
manono is offline   Reply With Quote
Old 21st September 2008, 14:45   #242  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Update:
Instead of mrestore, Cdeblend, FixBlendIVTC and DupHq there is only one function now: srestore.
The detection has been improved, the memory usage has been decreased and the usage should be a bit easier.
Just test this function.

Important:
- mrestore 2.31 has a big bug and has been removed from the R_pack
- AviSynth 2.5.8 change the calculation of changefps (round to floor). I will adapt srestore when the new AviSynth version gets final.

So, if you have problems with mrestore 2.31 or AviSynth 2.5.8 then test srestore with 2.5.7

@thetoof
Not sure what you really want. I could add a parameter for an alternative clip that is allways used if a blend is detected.
or do it this way:
line 123:
output.trim(0,1) ++ output.trim(2+current,0)
to something like this:
current==0 ? output : output.loop(3,0,0).trim(2+current,0).YourFilter(YourSettings)

Would be the same for srestore. If I wasnīt clear enough just ask.

Edit:
@Amrit
I used srestore with default settings on your source and donīt get any dups that aren`t in the source.

@vwpassion
Same here: Use your favourit bobber and srestore with default settings.

@all
If your problem is still not solved, please post it again. I donīt know anymore what problems are left.

Last edited by MOmonster; 21st September 2008 at 19:54.
MOmonster is offline   Reply With Quote
Old 21st September 2008, 20:23   #243  |  Link
Vesi
Guest
 
Posts: n/a
  Reply With Quote
Old 22nd September 2008, 00:29   #244  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,714
Yes!! Thanks for your hard work MOmonster!!! Your script is really pretty amazing, and I use it too often. (grrr, bad sources = pure evil). This new single script will sure streamline alot of things, and I am sure it will make thetoof's life easier as well (as I use his script a bit as well).
Adub is offline   Reply With Quote
Old 22nd September 2008, 21:34   #245  |  Link
Amrit
Registered User
 
Join Date: Jan 2008
Posts: 55
Thank you boss!!
Amrit is offline   Reply With Quote
Old 22nd September 2008, 21:35   #246  |  Link
SweetDream
Registered User
 
Join Date: Aug 2008
Posts: 4
Thank you MOmonster
SweetDream is offline   Reply With Quote
Old 22nd September 2008, 21:46   #247  |  Link
elguaxo
Registered User
 
elguaxo's Avatar
 
Join Date: Jun 2006
Posts: 260
Thanks!
elguaxo is offline   Reply With Quote
Old 24th September 2008, 04:05   #248  |  Link
Piper
Registered User
 
Piper's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 196
@MOmonster: Thank you very much for this script! I've only just started using it but already getting very impressive results out of it. Well done! I think you've finally put ol' RePal out to pasture with this one.
Piper is offline   Reply With Quote
Old 24th September 2008, 08:52   #249  |  Link
Deinorius
Najarenthur
 
Deinorius's Avatar
 
Join Date: Jan 2006
Location: Austria (Vienna)
Posts: 202
Great, thanks. Will be interesting to test it soon.
Deinorius is offline   Reply With Quote
Old 1st October 2008, 04:20   #250  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Wow, great job!

Actually, after doing some thinking, my request has changed a bit: could you add an argument that'd make srestore output a bool instead of a clip?
Something like bool "boolout" that would return true on blends and false on other frames (I'll use scriptclip). With this, I think I'll be able to get closer to what I'm trying to achieve.
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)

Last edited by thetoof; 2nd October 2008 at 16:16. Reason: typo
thetoof is offline   Reply With Quote
Old 2nd October 2008, 10:17   #251  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@thetoof
I will see what I can do for you, but it has to wait over the weekend. Update with Avisynth 2.58 compatibility and so on will be next week.
MOmonster is offline   Reply With Quote
Old 2nd October 2008, 16:22   #252  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Thanks!
Another way of doing it that'd be convenient: a separate boolean function isblended() in srestore.avs
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 6th October 2008, 15:40   #253  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
Update
I uploaded srestore v2.65. These are some of the changes:

- AviSynth 2.58 kompatibility
- light speed up
- reduced code
- new parameters: speed, thresh, pthresh, pclip
- better dup functionality

@thetoof
I don`t like the idea of calling a function that use the frame evaluation inside scriptclip. You can use this function as base. Rename it and add your own code:
Code:
function bcalc(clip source, float "speed", float "blocks", float "thresh", bool "chroma", int "cache", clip "dclip")
{
###### parameters & other necessary vars ######
	rad     = isfloat(speed) && speed>=1 ? sqrt(speed)*16 : 48
    cache   = default(cache,-1)
    bsize   = isfloat(blocks) && blocks>=1 ? sqrt(blocks)*4 : 16

global  thrx     = abs(default(thresh,22))*0.1
global  bfacx    = sqrt(bsize*0.25)*0.54


###### lut & more ######
detx	= default(dclip,source).killaudio().converttoyv12()
detx	= detx.pointresize(int(width(detx)/rad+1)*16, int(height(detx)/rad+1)*16)
detx	= default(chroma,false) ? stackvertical(stackhorizontal(detx.utoy(),detx.vtoy()),detx) : detx

    code	= "x 128 == y 128 == | x y + 256 == | 0 x 128 - abs y 128 - abs < x 128 - abs x y + 256 - abs < & x 128 - abs 1 - " +
            \ "y 128 - abs x y + 256 - abs < y 128 - abs 1 - x y + 256 - abs 1 - ? ? 2.4 ^ x 128 - y 128 - * 0 > -0.6 0.6 ? * ? 128 +"
	diff 	= mt_makediff(detx,detx.trim(1,0),y=3,u=1,v=1)
global  bclpx    = mt_lutxy(diff,diff.trim(1,0),expr=code,y=3,u=1,v=1).bilinearresize(round(width(detx)/bsize+4)*4,round(height(detx)/bsize+4)*4)


###### output preparation ######
global  outb    = blankclip(source)                                 #do your filtering here, it will be faster and more stable
global  outc    = source                                            #if you do it outside the conditional enviroment


###### initialise variables ######
global  lfrx     = -100


###### evaluation call & output calculation ######
scriptclip( source, """

 ### preparation ###
        cfrx = current_frame
        jmpx = lfrx+1==cfrx
    lfrx     = cfrx
        
        bx_v = 128-yplanemin(bclpx)
        bx_v = bx_v<0 ? 0 : bx_v * bfacx
        cx_v = yplanemax(bclpx)-128
        cx_v = cx_v<0 ? 0 : cx_v * bfacx
        
  ## blend value shifting ##
    bxp = jmpx ? bxc : bx_v
    bxc = jmpx ? bxn : bx_v
    bxn = bx_v
	
  ## clear value shifting ##
    cxp = jmpx ? cxc : cx_v
    cxc = jmpx ? cxn : cx_v
    cxn = cx_v

        isblend     = bxc+cxp>bxp+cxc+thrx && bxc+cxn>bxn+cxc+thrx                          #detects nearly every blend but also frames with very low motion
        isblendsave = isblend && bxc+cxp>bxp+(1+.2*thrx)*cxc && bxc+cxn>bxn+(1+.2*thrx)*cxc && bxc>(1+.2*thrx)*cxc     #saver blenddetection

 ### output clip ###
    isblend ? outb : outc                   #call your filtered sources here
    #outc.subtitle(string(isblend)).subtitle(string(isblendsave),y=16)      #to compare isblend and isblendsave

""")


###### final decimation & caching ######
cache<0 ? last : last.RequestLinear(8, cache, 5, false, false)

return last
}
MOmonster is offline   Reply With Quote
Old 8th October 2008, 23:11   #254  |  Link
SweetDream
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks for the new version
SweetDream is offline   Reply With Quote
Old 9th October 2008, 02:43   #255  |  Link
Piper
Registered User
 
Piper's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 196
Yes, thank you for the new version. I'm getting some really nice results on some analogue captures with:

Code:
mvdegrain3i(2,0,1)
TDeint(order=1,field=1,mode=1,type=2,tryweave=true) 
crop(8,56,-8,-56)
NNEDI(field=1,dh=true,threads=2)
srestore()
Using TGMC would probably improve it further, but I'm not quite there with tweaking its denoising parameters... Still this is proving very nice. Speed is reasonable too. Thanks again.
Piper is offline   Reply With Quote
Old 9th October 2008, 03:10   #256  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Thanks a bunch, this'll be very, very useful.
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 9th October 2008, 06:07   #257  |  Link
EuropeanMan
Registered User
 
Join Date: Nov 2006
Posts: 660
Am running my first srestore tonite...will report back as soon as it finishes; thanks MoM for all the hard work you've put in...very much appreciated.

Getting great speeds.
EuropeanMan is offline   Reply With Quote
Old 9th October 2008, 21:40   #258  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@all
Thanks for your kind words. Good to hear that the function is so useful.
I'm allready working on a new blenddetection to speed up srestore, but I don't when the next version will be released.
MOmonster is offline   Reply With Quote
Old 10th October 2008, 21:56   #259  |  Link
ankurs
N00B !
 
Join Date: Jun 2006
Posts: 223
thanks a lot !
ankurs is offline   Reply With Quote
Old 13th October 2008, 20:31   #260  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
thnxs a lot ... tried srestore works gr8.

though I was running into problems last nite using MT around srestore with 2.5.7 rev of Avisynth. Is MT recommend to use around SRestore for 2.5.7?

It was giving me error messages in the clip and can post SS for the same when I get back to my place.
superuser is offline   Reply With Quote
Reply

Tags
mrestore, srestore

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:50.


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