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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th September 2010, 18:03   #101  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Quote:
Originally Posted by Revgen View Post
Any chance you can add VCMohan's Seamer Resizer? http://forum.doom9.org/showthread.php?t=135735
I already have implemented this plugin in the past. But then I decide to delete it (make no sense for me, to use it).

However, it's easy to implement:

1. Copy the plugin to "Fritz Photo\plugins\Seamer" directory.
2. Copy the following scripts to "Fritz Photo\Templates\Seamer" directory (extension should be "avs").

TRSeamer.avs:
Code:
# ==============================================================================
# http://forum.doom9.org/showthread.php?t=135735
# ==============================================================================
x    = 800
y    = 600
peak = False
alt  = False
# ==============================================================================
# x    = True, False, Beginner, Desired width of output frame | int
# y    = True, False, Beginner, Desired height of output frame | int
# peak = True, False, Beginner, Whether to use highs or lows as seam carving | bool, {False, True}
# alt  = True, False, Beginner, Whether seams are to be affected alternately along width and height | bool, {False, True}
# ==============================================================================

LoadPlugin("plugins\Seamer\Seamer.dll")

Import("lib\FritzPhoto\FritzPhoto.avs")

isYV12() ? YV12toRGB32() : NOP()
TRSeamer(x=x, y=y, peak=peak, alt=alt)
WSSeamer.avs:
Code:
# ==============================================================================
# http://forum.doom9.org/showthread.php?t=135735
# ==============================================================================
x    = 800
y    = 600
peak = False
alt  = False
# ==============================================================================
# x    = True, False, Beginner, Desired width of output frame | int
# y    = True, False, Beginner, Desired height of output frame | int
# peak = True, False, Beginner, Whether to use highs or lows as seam carving | bool, {False, True}
# alt  = True, False, Beginner, Whether seams are to be affected alternately along width and height | bool, {False, True}
# ==============================================================================

LoadPlugin("plugins\Seamer\Seamer.dll")

Import("lib\FritzPhoto\FritzPhoto.avs")

isYV12() ? YV12toRGB32() : NOP()
WSSeamer(x=x, y=y, peak=peak, alt=alt)
Will be part of the next update.

Last edited by Archimedes; 30th September 2010 at 18:05.
Archimedes is offline   Reply With Quote
Old 5th November 2010, 11:19   #102  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Updated the plugins "SmoothAdjust" and "FFmpegSource2". Added the plugin "Seamer".
Archimedes is offline   Reply With Quote
Old 8th November 2010, 13:18   #103  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Archimedes,
what about the mvtools
plz
Terka is offline   Reply With Quote
Old 21st January 2011, 00:25   #104  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Changed to version 2.6.0 of AviSynth. Fixed the chroma shift problem, when doing color conversions (from RGB32 to double sized YV12 and vice versa).

Added language support for the template directories and the parameters in script inspector (while the german translation for the template folders are ready, i need some time to finish the translation for the parameter descriptions).

Added "NLMeansCL" to the denoise section.
Archimedes is offline   Reply With Quote
Old 6th February 2011, 02:28   #105  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Eedi3 latest version doesnt seem to like avisynth 2.6? I keep getting an error about eedi3 failing to load. My dirty fix was replacing eedi3.dll w/ unknown older version.
markanini is offline   Reply With Quote
Old 7th February 2011, 14:21   #106  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Works fine here with the latest alpha release.
Archimedes is offline   Reply With Quote
Old 7th February 2011, 23:22   #107  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
I'm using SET's lasest 2.6 MT build actually.
markanini is offline   Reply With Quote
Old 8th February 2011, 18:48   #108  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
I guess I'll have to keep my old EEDI3 version as I'd hate to choose between MT functionality and FritzPhoto.

A question about the resize templates; is there any way to input decimal values instead of absolute values?

PS: Please consider adding a template for automttap3. In my testing scaling a megapixel original to web-size I found it resolved fine texture in a flattering way that spline and lanczos couldn't do.

PS 2: Same problem with warpsharp.dll, again replaced it with unknown different version from the attic of my harddrives to be functional...

Last edited by markanini; 9th February 2011 at 19:42.
markanini is offline   Reply With Quote
Old 10th February 2011, 00:20   #109  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Quote:
Originally Posted by markanini View Post
A question about the resize templates; is there any way to input decimal values instead of absolute values?

PS: Please consider adding a template for automttap3. In my testing scaling a megapixel original to web-size I found it resolved fine texture in a flattering way that spline and lanczos couldn't do.
Will be part of the next update.

Quote:
Originally Posted by markanini View Post
Same problem with warpsharp.dll, again replaced it with unknown different version from the attic of my harddrives to be functional...
Strange. Works also fine here. What error message do you get?
Archimedes is offline   Reply With Quote
Old 10th February 2011, 00:30   #110  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Quote:
Originally Posted by Archimedes View Post
Will be part of the next update.


Strange. Works also fine here. What error message do you get?



It's a generic "failed to load xyz.dll".
markanini is offline   Reply With Quote
Old 10th February 2011, 02:14   #111  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
When you load the plugins outside of Fritz Photo (e. g. with VirtualDub), do you receive the same error messages?
Archimedes is offline   Reply With Quote
Old 10th February 2011, 03:02   #112  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Tried load both plugins in Avidemux AVS proxy and they failed to load in both cases. I'll uninstall SETs 2.6 build and install the vanilla 2.6 build and see what happens.
markanini is offline   Reply With Quote
Old 10th February 2011, 15:58   #113  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Here is the template (Fritz Photo script) for the automttap3 function.

1. Save the automttap3 function to lib\automttap3\automttap3.avs in the program directory.

2. Save the following script to Templates\Resize\automttap3.avs in the program directory.

Code:
# ==============================================================================
# http://forum.doom9.org/showthread.php?p=1211873#post1211873
# ==============================================================================
Width           = 800
Height          = 600
mtaps3          = 1
thresh          = 256
ss_x            = 1.0
ss_y            = 1.0
KeepAspectRatio = True
Oversize        = False
ForceResize     = False
# ==============================================================================
# Width           = True, False, Beginner, Width | int
# Height          = True, False, Beginner, Height | int
# mtaps3          = True, False, Beginner, Amount of taps | int
# thresh          = True, False, Beginner, Threshold | int, [0, 256]
# ss_x            = True, False, Intermediate, Horizontal supersampling factor | float
# ss_y            = True, False, Intermediate, Vertical supersampling factor | float
# KeepAspectRatio = True, False, Beginner, Keep aspect ratio | bool, {False, True}
# Oversize        = True, False, Intermediate, Ensures that the resized image is even or greater than width x height | bool, {False, True}
# ForceResize     = True, False, Beginner, Force resize (enlargement mode) | bool, {False, True}
# ==============================================================================

LoadPlugin("plugins\GScript\GScript.dll")
LoadPlugin("plugins\MaskTools 2\mt_masktools-26.dll")

Import("lib\automttap3\automttap3.avs")
Import("lib\FritzPhoto\FritzPhoto.avs")

isYV12() ? GEval("""
  if (ForceResize) {
    fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize)
  }
  else {
    Oversize == false ? Width < (last.Width / 2) || Height < (last.Height / 2) ? fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize) : NOP() : Width < (last.Width / 2) && Height < (last.Height / 2) ? fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize) : NOP()
  }
""") : GEval("""
  if (%%KeepAlphaChannel%%) {
    fp_alpha = Crop(0, 0, -(last.Width % 2), -(last.Height % 2))
  }
  else {
    NOP()
  }
  if (ForceResize) {
    RGB32toYV12().fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize)
  }
  else {
    Oversize == false ? Width < last.Width || Height < last.Height ? RGB32toYV12().fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize) : NOP() : Width < last.Width && Height < last.Height ? RGB32toYV12().fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize) : NOP()
  }
  if (%%KeepAlphaChannel%% && isYV12()) {
    fp_clip1 = YV12toRGB32()
    fp_alpha.ShowAlpha("YV12").PointResize(fp_alpha.Width * 2, fp_alpha.Height * 2)
    fp_automttap3(Width=Width, Height=Height, mtaps3=mtaps3, thresh=thresh, ss_x=ss_x, ss_y=ss_y, KeepAspectRatio=KeepAspectRatio, Oversize=Oversize)
    MergeARGB(last.PointResize(last.Width / 2, last.Height / 2), fp_clip1, fp_clip1, fp_clip1)
  }
  else {
    NOP()
  }
""")

function fp_automttap3(clip input, int "Width", int "Height", int "mtaps3", int "thresh", float "ss_x", float "ss_y", bool "KeepAspectRatio", bool "Oversize") {
  KeepAspectRatio == True ? GEval("""
    Width = (Oversize == true) ? Width + (Width % 2) : Width
    Height = (Oversize == true) ? Height + (Height % 2) : Height
    Width = (Oversize == false) ? (Round(Float(Width) * input.Height / input.Width) <= Height) ? Width : Round(Float(Height) * input.Width / input.Height) : (Round(Float(Width) * input.Height / input.Width) < Height) ? Round(Float(Height) * input.Width / input.Height) : Width
    Height = Round(Float(Width) * input.Height / input.Width)
  """) : GEval("""
    NOP()
  """)
  Width  = (ss_x > 1.0) ? Round(Float(Width) * ss_x / 2) * 2 : Width
  Height = (ss_y > 1.0) ? Round(Float(Height) * ss_y / 2) * 2 : Height
  Width = Width - (Width % 2)
  Height = Height - (Height % 2)
  input.PointResize(input.Width / 2, input.Height / 2)
  automttap3(dx=Width, dy=Height, mtaps3=mtaps3, thresh=thresh)
  PointResize(last.Width * 2, last.Height * 2)
  MergeChroma(input.YV12ToRGB32().Spline36Resize(Width, Height).RGB32ToYV12(), 1)
}
3648 x 2736 --> 640 x 480, Spline36Resize >>
3648 x 2736 --> 640 x 480, automttap3 >>

Last edited by Archimedes; 17th February 2011 at 20:57.
Archimedes is offline   Reply With Quote
Old 10th February 2011, 17:02   #114  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Thanks Archimedes!
So I've been spending the last hour seeing if I can sort out my issues. Going back and forth between sf.net, XhmikosR and SEt 2.6 build and avisynth plugin directory renamed to avoid issue with incomatible plugins and autoloading scripts. I made the following findings:
Warpsharp works fine, just my plugins folder causing trouble I guess.
EEDI3 failes to load with all builds.
markanini is offline   Reply With Quote
Old 2nd March 2011, 21:43   #115  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Added drag-and-drop functionality to the AviSynth Scripts page (moving scripts from the templates to the job list and vice versa). Ordering the job list with drag-and-drop operations is also possible now.

Added "Refresh image before filtering with the selected script" and "Refresh image after filtering with the selected script" to the context menus in the preview windows. Should be self-explanatory.

Last edited by Archimedes; 2nd March 2011 at 21:45.
Archimedes is offline   Reply With Quote
Old 17th March 2011, 17:20   #116  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Simplified the resize templates and added the possibility to enter scaling factors (in percent). With the new parameter "Unit" you can define, whether the parameters "Width" and "Height" are treated as pixel or percent values.

I've also added the new "ResampleHQ" plugin.

Last edited by Archimedes; 17th March 2011 at 17:24.
Archimedes is offline   Reply With Quote
Old 28th March 2011, 14:15   #117  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Added more encoding options for the JPEG format:

- Color Space (RGB, Grey Scale, YCbCr, CMYK, YCbCrK)
- Chroma Subsampling (4:1:1, 4:2:2, 4:4:4)
- DCT Method
- Optimal Huffman Table (more compression)

Last edited by Archimedes; 28th March 2011 at 14:19.
Archimedes is offline   Reply With Quote
Old 28th March 2011, 18:08   #118  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Nice to have more options to set. Thanks!
markanini is offline   Reply With Quote
Old 1st April 2011, 10:02   #119  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
Quote:
Originally Posted by Soulhunter View Post
Some things I'd like to see in future...

- Steady preview, so you can see filter setting changes in realtime etc.
Viewing changes in real-time is a little bit problematic because a lot of AviSynth filters are very slow. TNLMeans, for example, need a few minutes to calculate. No way for viewing changes in real-time. That's why I prefere the solution with the refresh button.

Quote:
Originally Posted by Soulhunter View Post
Some things I'd like to see in future...

- Changing the zoom of the before/after compare shouldn't process the image again but rescale/crop a buffered filtered image (much faster)
I've changed that. Now it is possible to zoom in and out without processing the image again. Will be part of the next update.
Archimedes is offline   Reply With Quote
Old 8th April 2011, 13:15   #120  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
- Changed zoom function in the preview windows. Now you can zoom in and out without processing the image again.
- Fixed a memory leak when processing AviSynth scripts.
- Added an additional crop page, where you can rotate and crop images in front of any filtering.
- Updated ResampleHQ plugin and script.
Archimedes is offline   Reply With Quote
Reply

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:24.


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