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 26th March 2018, 18:07   #701  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Can a mod approve the attachment, please?
Sharc is offline   Reply With Quote
Old 10th June 2018, 20:53   #702  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
srestore v2.793

pastebin and attachment

fix bug in 12bit thanks to StainlessS, maybe it will be the last edit by me since StainlessS work on update for srestore
Attached Files
File Type: zip Srestore 2.793.zip (5.6 KB, 93 views)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 10th June 2018, 23:34   #703  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
maybe it will be the last edit by me since ...
Absolutely not, no, you dont get out of it that easily.
I am only reformatting and moving stuff around, I've never used high bit depth stuff at all and dont even know what functions / filters are available.
Martin53 did a convert to an early form of the Multi-instance style developed by himself and Gavino, I am also converting to a later style of same.
[EDIT: also making possible to run under either Avs Std with GScript, or Avs+ without GScript, the real reason for my mods]

I look forward to many years of updates by the master himself, Real.Finder,

All Hail Real.Finder
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 11th June 2018 at 00:19.
StainlessS is offline   Reply With Quote
Old 11th June 2018, 16:57   #704  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Further to above, Adding GScript functionality can make it possible speed stuff up a bit, consider,

current script
Code:
    ### frame output calculation - resync - dup ###
    dbb = select(pos+2, Srestore_d43%%%, Srestore_d32%%%, Srestore_d21%%%, Srestore_d10%%%, Srestore_d01%%%)
    dbc = select(pos+2, Srestore_d32%%%, Srestore_d21%%%, Srestore_d10%%%, Srestore_d01%%%, Srestore_d12%%%)
    dcn = select(pos+2, Srestore_d21%%%, Srestore_d10%%%, Srestore_d01%%%, Srestore_d12%%%, Srestore_d23%%%)
    dnn = select(pos+2, Srestore_d10%%%, Srestore_d01%%%, Srestore_d12%%%, Srestore_d23%%%, Srestore_d34%%%)
The above Selects, are implemented (I think) as functions within Avisynth (rather than in the script parser), each of the possible
selections are evaluated before calling the Select() function to pick out the required one.
Each of the above Srestore_xxx%%% style names are Global variables, and so each of them is slower than local variable access,
and each select call accesses five such slow Globals.
(The '%%%' bit is replaced by some unique name for Function Multiple Instancing, we also replace these in our mod to '@@@' as there
is potential for problems with current '%%%').

With GSCript can use instead eg
Code:
	### frame output calculation - resync - dup ###
    if     (pos+2==0) { dbb = Srestore_d43@@@   dbc = Srestore_d32@@@   dcn = Srestore_d21@@@   dnn = Srestore_d10@@@ }
    else if(pos+2==1) { dbb = Srestore_d32@@@   dbc = Srestore_d21@@@   dcn = Srestore_d10@@@   dnn = Srestore_d01@@@ }
    else if(pos+2==2) { dbb = Srestore_d21@@@   dbc = Srestore_d10@@@   dcn = Srestore_d01@@@   dnn = Srestore_d12@@@ }
    else if(pos+2==3) { dbb = Srestore_d10@@@   dbc = Srestore_d01@@@   dcn = Srestore_d12@@@   dnn = Srestore_d23@@@ }
    else              { dbb = Srestore_d01@@@   dbc = Srestore_d12@@@   dcn = Srestore_d23@@@   dnn = Srestore_d34@@@ }
Only 1 of the above lines is processed, and so with each local var setting only a single Global access is required.

NOTE for Real.Finder only, for eg 'Srestore_d43%%%', the 'Srestore_' is purely ornamental, d43%%% would uniquely identify
the var even with multiple instances, so 'Srestore_' part is totally superfluous.

Reading the values of Global variables is slower than local variable access (locals are scanned first before Globals list).
AVS+, uses a hash table to access Local and Global variables, but Avs Std does not, and so for Avs Std the impact may be
somewhat higher than avs+.

See here thread on slow access to Global Variables Names, in particular those defined early in Avisynth system, eg False and True.
Informational: Compare with Bool literal is SLOW!:- https://forum.doom9.org/showthread.p...52#post1650952
[EDIT: Above link really no more than an interesting read, not really related to the slower Global access in this case]

I have not done any speed tests so far, comparing original prev version SRestore with my mod, but it should at least be a little
faster I think, I'll post when more complete. There will likely be no mod to the algorithm used, only shuffling stuff about.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th June 2018 at 00:25.
StainlessS is offline   Reply With Quote
Old 12th June 2018, 00:45   #705  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Sorry, Real.Finder, I added a second suspect bug via EDIT to my post in your other thread, seems you did not see the EDIT before posting the fix.

Here, https://forum.doom9.org/showthread.p...87#post1844187

Quote:
EDIT: Not sure but think maybe this line also screwed up (was not sure what it was supposed to be).
Code:
   sscalva = sdoscal ? shbdbpc == 10 ? 4 : shbdbpc == 12 ? 8 : shbdbpc == 14 ? 64 : 256 : 1
Looks like it might be supposed to be 12 : 16, where something like for 12 bit, 128 * 8 = 1024,
and should (maybe be) 128 * 16 = 2048.
I'm not sure that above is a bug, only suspect that it may be.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th June 2018 at 00:54.
StainlessS is offline   Reply With Quote
Old 12th June 2018, 02:55   #706  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
yes, it's bug, it has relation with the previous one

srestore v2.794

pastebin and attachment

fix another bug in 12bit thanks to StainlessS
Attached Files
File Type: zip Srestore 2.794.zip (5.6 KB, 63 views)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 12th June 2018, 06:09   #707  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Just a quick question about using the latest version 2.794 on an ancient computer (WinXP, CPU without SSE2 capability).

Right now I still use srestore 2.7e because at the time when I installed it this was the last version which worked on my machine. Probably because I have to use masktools-v2.0a48, all later versions do not run on my computer.

Now I just gave v. 2.794 a quick whirl (using the same old masktools version under AVS 2.6), and to my surprise it worked. I just used the frate param though. As you might guess I do not care for high bitdepth or high colors. So my question is if it is safe to switch to the current version of srestore, or am I playing with fire? Does the new version have any advantages over the old 2.7e on my ancient system?


Cheers
manolito
manolito is offline   Reply With Quote
Old 12th June 2018, 06:51   #708  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by manolito View Post
Just a quick question about using the latest version 2.794 on an ancient computer (WinXP, CPU without SSE2 capability).

Right now I still use srestore 2.7e because at the time when I installed it this was the last version which worked on my machine. Probably because I have to use masktools-v2.0a48, all later versions do not run on my computer.

Now I just gave v. 2.794 a quick whirl (using the same old masktools version under AVS 2.6), and to my surprise it worked. I just used the frate param though. As you might guess I do not care for high bitdepth or high colors. So my question is if it is safe to switch to the current version of srestore, or am I playing with fire? Does the new version have any advantages over the old 2.7e on my ancient system?


Cheers
manolito
it's not safe since there are scale functions in almost every lut line, which make it give wrong output in old masktools2, you can go back to some older mods from v2.7i and down
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 12th June 2018, 06:59   #709  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
for the quick reply...
manolito is offline   Reply With Quote
Old 12th July 2018, 02:17   #710  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
srestore v2.795 pastebin and attachment

srestore v2.796 (need SMDegrain.avsi (v3.1.2.101s or up)) pastebin and attachment
Attached Files
File Type: zip Srestore 2.795.zip (5.7 KB, 358 views)
File Type: zip Srestore 2.796.zip (5.7 KB, 543 views)
__________________
See My Avisynth Stuff

Last edited by real.finder; 13th August 2019 at 04:56.
real.finder is offline   Reply With Quote
Old 30th August 2018, 01:51   #711  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
Should this be applied before bob-deinterlacing? After? Does it replace a bob-deinterlacer? Where in my workflow should I put this filter?
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 30th August 2018, 03:36   #712  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by Katie Boundary View Post
Should this be applied before bob-deinterlacing? After? Does it replace a bob-deinterlacer? Where in my workflow should I put this filter?
It depends on your source. You might want to read this part of the Wiki:

http://avisynth.nl/index.php/Srestore#Examples

It shows one example where SRestore is placed after the bob deinterlacing. I don't think I've ever used it that way. My advice is to try it out and experiment a bit.
johnmeyer is offline   Reply With Quote
Old 30th August 2018, 04:09   #713  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I'd say that if working with non-animation type of material, at least 95% of the time, SRestore is applied after bob-deinterlacing the source.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 30th August 2018, 04:14   #714  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
Quote:
Originally Posted by Boulder View Post
I'd say that if working with non-animation ...
What if I'm working with animation? Specifically Transformers Armada and The Real Ghostbusters
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 30th August 2018, 04:16   #715  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I don't have any experience with that, but I think that there are better alternatives for processing those than SRestore. SRestore works wonders for standard screwed up PAL->NTSC/NTSC->PAL conversions but animation is a very different beast.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 30th August 2018, 09:26   #716  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Katie Boundary View Post
Should this be applied before bob-deinterlacing? After? Does it replace a bob-deinterlacer? Where in my workflow should I put this filter?
Do you understand what its purpose is?

As Boulder mentioned, it's designed to fix field-blended videos resulting from bad standards conversions - PAL to NTSC or NTSC to PAL. If that's what you intend to do, you first bob the video followed by the use of SRestore. As usual, an untouched sample should be provided if you'd like more informed help.
manono is offline   Reply With Quote
Old 30th August 2018, 11:22   #717  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by real.finder View Post
srestore v2.795

pastebin and attachment
With v2.795 I am getting the error
Code:
mt_lutxy does not have a named argument "use_expr"
(SRestore_avsi, line 105)
There was no problem with v2.794

I am on Avisynth 2.60
Sharc is offline   Reply With Quote
Old 30th August 2018, 11:47   #718  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Update your masktools plugin
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 30th August 2018, 12:03   #719  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by ChaosKing View Post
Update your masktools plugin
Yep, that helped. Thanks.
Sharc is offline   Reply With Quote
Old 30th August 2018, 20:47   #720  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
Quote:
Originally Posted by Boulder View Post
I don't have any experience with that, but I think that there are better alternatives for processing those than SRestore. SRestore works wonders for standard screwed up PAL->NTSC/NTSC->PAL conversions
Quote:
Originally Posted by manono View Post
it's designed to fix field-blended videos resulting from bad standards conversions - PAL to NTSC or NTSC to PAL.
So what's best to use for a botched NTSC -> NTSC conversion?
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary 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 00:49.


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