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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th August 2017, 09:10   #1  |  Link
Tohno_Neil
Registered User
 
Join Date: Apr 2017
Posts: 3
[Help] How to use the plugin (AviSynth Shader)

About this plugin,https://forum.doom9.org/showthread.php?t=172698

1. I don't kown how to write a script use the plugin (AviSynth Shader) like SeparateResize v1.6,

is there anyone who can help me write it,

https://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=179

Down it :
http://www.nmm-hd.org/upload/get~GhD...Resize_v1.6.7z

If you can't access the forum,please see below:
Code:
###########################################################################################################
### Fast SeparateResize as madVR                                                                        ###
### Requires Repair if nr=true: http://home.arcor.de/kassandro/prerelease/RemoveGrain-1.0.rar           ###
### madSpline requires SplineResize if taps=1 or taps>4: http://forum.doom9.org/showthread.php?t=147117 ###
### Scripted by 06_taro (astrataro@gmail.com)                                                           ###
###########################################################################################################

Function madSpline(clip input, int "target_width", int "target_height", float "src_left", float "src_top", float "src_width", float "src_height", int "taps", int "soft", bool "nr"){

  target_width  = Default( target_width,   width(input) )
  target_height = Default( target_height, height(input) )
  src_left      = Default( src_left,                  0 )
  src_top       = Default( src_top,                   0 )
  src_width     = Default( src_width,                 0 )
  src_height    = Default( src_height,                0 )
  taps          = Default( taps,                      4 )
  soft          = Default( soft,                    100 )
  nr            = Default( nr,                     true )

  Assert( taps>=1 && taps<=100, """madSpline: "taps" ranges from 2 to 4!"""                      )
  Assert( input.IsYV12,         "madSpline: cannot handle non-YV12, use SeparateResize instead!" )

  b             = soft / 100.0
  c             = 1.0 - b

  taps >=2 && taps <=4 ? Eval( "input.Spline"+String( taps*taps*4 )+"Resize("
  \                            +String(target_width)+", "+String(target_height)
  \                            +", src_left="+String(src_left)+", src_top="+String(src_top)
  \                            +", src_width="+String(src_width)+", src_height="+String(src_height)+")" )
  \                    : input.SplineResize( target_width, target_height,
  \                                          src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height, taps=taps )

  nr ? Repair( input.GaussResize( target_width, target_height, src_left, src_top, src_width, src_height, p=100 ), 1) : nop()

  return MergeChroma( input.BicubicResize( target_width, target_height,
  \                                        src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height,
  \                                        b=b, c=c ) )

}

Function madLanczos(clip input, int "target_width", int "target_height", float "src_left", float "src_top", float "src_width", float "src_height", int "taps", int "soft", bool "nr"){

  target_width  = Default( target_width,   width(input) )
  target_height = Default( target_height, height(input) )
  src_left      = Default( src_left,                  0 )
  src_top       = Default( src_top,                   0 )
  src_width     = Default( src_width,                 0 )
  src_height    = Default( src_height,                0 )
  taps          = Default( taps,                      4 )
  soft          = Default( soft,                    100 )
  nr            = Default( nr,                     true )

  b             = soft / 100.0
  c             = 1.0 - b

  Assert( taps>=1 && taps<=100, """madLanczos: "taps" ranges from 2 to 4!"""                      )
  Assert( input.IsYV12,         "madLanczos: cannot handle non-YV12, use SeparateResize instead!" )

  return nr ? MergeChroma( input.LanczosResize( target_width, target_height,
  \                                             src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height, taps=taps )
  \                             .Repair( input.GaussResize( target_width, target_height, src_left, src_top, src_width, src_height, p=100 ), 1),
  \                        input.BicubicResize( target_width, target_height,
  \                                             src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height, b=b, c=c ) )
  \         : MergeChroma( input.LanczosResize( target_width, target_height,
  \                                             src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height, taps=taps ),
  \                        input.BicubicResize( target_width, target_height,
  \                                             src_left=src_left, src_top=src_top, src_width=src_width, src_height=src_height, b=b, c=c ) )

}
2. I don't kown the plugin (AviSynth Shader) requisite or not a graphics Cards with OpenCL driver support.


Last edited by Tohno_Neil; 18th August 2017 at 09:31.
Tohno_Neil is offline   Reply With Quote
Old 20th August 2017, 16:43   #2  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,176
It's an older script, these days you use RGTools. Using GPU processing requires copying data to and from the GPU, to make it worthwhile ideally it would have to do something really cool, or do multiple things GPU side. That script would require multiple memory copies, or complete programming of the script including repair etc in HLSL, it's not an easy task.
burfadel is offline   Reply With Quote
Old 22nd August 2017, 13:02   #3  |  Link
Tohno_Neil
Registered User
 
Join Date: Apr 2017
Posts: 3
Quote:
Originally Posted by burfadel View Post
it's not an easy task.
Thanks.

Question 3. I need help about this:

Code:
DSS2("F:\-X Cache-\Videos-in\test.ts",fps=29.970) #YV12 color
QTGMC(Preset="Very Fast",fpsdivisor=2)

Dither_convert_8_to_16()
ResizeShader(1280, 720, Kernel="SSim", B=0.8, C=1, lsb_in=true, lsb_out=true)
DitherPost()
I get this:
ConverToShader:Source format is not supported.

Last edited by Tohno_Neil; 22nd August 2017 at 13:08.
Tohno_Neil is offline   Reply With Quote
Old 22nd August 2017, 19:14   #4  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,003
Are you using AVS 2.6 or AVS+? Someone else reported compatibility issues with AVS 2.6 that need to be fixed
MysteryX is offline   Reply With Quote
Old 23rd August 2017, 05:24   #5  |  Link
Tohno_Neil
Registered User
 
Join Date: Apr 2017
Posts: 3
Quote:
Originally Posted by MysteryX View Post
Are you using AVS 2.6 or AVS+? Someone else reported compatibility issues with AVS 2.6 that need to be fixed
Thanks,I ues AVS+ and I found nothing wrong.
Tohno_Neil is offline   Reply With Quote
Reply

Tags
avisynth, avisynth shader, gpu, plugin

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 20:44.


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