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 19th November 2006, 00:00   #1  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
mg262's plugins with source

A while ago i receives the sources of most of mg262's plugins (they are GPL). I defined them as v1.0:

http://wilbertdijkhof.com/mg262/Alternate_v10.zip
Average: http://wilbertdijkhof.com/mg262/Average_v11.zip
http://wilbertdijkhof.com/mg262/BlendWeight_v10.zip
http://wilbertdijkhof.com/mg262/Colourlike_v10.zip
http://wilbertdijkhof.com/mg262/ColourMask_v10.zip
http://wilbertdijkhof.com/mg262/LimitedSupport_v10.zip
http://wilbertdijkhof.com/mg262/LineUpScenes_v10.zip
http://wilbertdijkhof.com/mg262/Motion_v10.zip
http://wilbertdijkhof.com/mg262/Prewitt_v10.zip
http://wilbertdijkhof.com/mg262/Restorefps_v10.zip
http://wilbertdijkhof.com/mg262/ReverseBlend_v10.zip

I can't guarantee that they are compilable (ReverseBlend surely isn't compilable, so i hope someone can look at this). In case you are wondering i got the included dlls from this forum. Proper documentation will be added later (for now a text file is included with the relevant information).

Some plugins which are missing are:
* Cel foreground

Drop me a pm if other plugins are missing.

Last edited by Wilbert; 3rd February 2011 at 19:55.
Wilbert is offline   Reply With Quote
Old 19th November 2006, 11:34   #2  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Thanks.
A more while ago I privately got previous version of Motion source from Mg262 with small comments.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 3rd February 2011, 18:23   #3  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Sorry to revive this thread, but I'm not sure if my PM got to Wilbert or not, and I don't want to nag the hell out of him directly in case it did.

All of the links in this thread redirect to Wilbert's main page, but that page just links back to this thread.

Is the source code for Colourlike still available anywhere? I'm hoping Wilbert still has it, because I have a use for a modified version, but I don't know enough about histogram-matching to make it from scratch. (I could modify HistogramAdjust instead, but Colourlike seems to give results more like what I'm looking for).

Last edited by Mini-Me; 3rd February 2011 at 18:42.
Mini-Me is offline   Reply With Quote
Old 3rd February 2011, 19:57   #4  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
Sorry for not replying sooner. I was busy with exams, and forgot about it when the forum was down. I replaced the links above.
Wilbert is offline   Reply With Quote
Old 3rd February 2011, 20:45   #5  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by Wilbert View Post
Sorry for not replying sooner. I was busy with exams, and forgot about it when the forum was down. I replaced the links above.
No sweat, and thank you so much!
Mini-Me is offline   Reply With Quote
Old 24th October 2011, 13:43   #6  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,374
Quote:
Originally Posted by Wilbert View Post
A while ago i receives the sources of most of mg262's plugins (they are GPL). I defined them as v1.0:
...
http://wilbertdijkhof.com/mg262/Colourlike_v10.zip
...
In case you are wondering i got the included dlls from this forum.
The dll included here is the first version of ColourLike (ColourLike_230505.dll), but the source code corresponds to the latest one (ColourLike_25Aug05.dll). Do you have a link to this latest one?
The link given in this post from the original thread seems to be dead.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 24th October 2011, 14:22   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,924
I built it and put it here:

http://neuron2.net/misc/ColourLike.dll

Tell us if it works.
Guest is offline   Reply With Quote
Old 24th October 2011, 15:21   #8  |  Link
cobo
Registered User
 
Join Date: Mar 2004
Posts: 118
^The file size is bigger than this one, which I think I got from the link in the original thread.
http://www.sendspace.com/file/bhcke2

Or maybe I got it here: http://avisynth.org/warpenterprises/

The Russian page has version 31Jul05: http://avisynth.org.ru/warpenterprises-rus.html

Last edited by cobo; 24th October 2011 at 15:43.
cobo is offline   Reply With Quote
Old 24th October 2011, 20:09   #9  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,374
Thanks to you both.

cobo, your version seems to be the same as found on warpenterprises.
I don't know why I didn't think to look there first.

neuron2, your version seems to work, though I haven't tested it extensively.
Perhaps the size difference is due to different compilation options.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 27th May 2012, 16:58   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 4,982
ColourLike_230505.dll (139,264 bytes) contained in OLD v1.0 ColourLike source is bugged (and incomplete), dont use it.
Current v1.0 ColourLike_25Aug05.dll in first post source is updated with good and latest source dll.

I've build from the source using original Avisynth.h v2 and TK3 and above reversioned v1.0 source,
built to 208,896 bytes, same as original I got from WarpEnterprises.
So, as N2's build (270,336 bytes) was from above source, it should be identical to one on Warpenterprises with
difference being in build options/compiler. (perhaps debug?)
Current build v1.0 without source on WarpEnterprises here:
http://avisynth.org/warpenterprises/
Or ALSO with source, in 1st post above.

Mea culpa, did not use VS6 for 208,896 bytes build, was TK3 (oops), VS6 builds with 8 int i redefinition errors.

EDITED
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

Last edited by StainlessS; 28th May 2012 at 02:08.
StainlessS is offline   Reply With Quote
Old 27th May 2012, 18:09   #11  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
Quote:
Current build v1.0 without source on WarpEnterprises here:
http://avisynth.org/warpenterprises/
I included this one in the zip file in the first post. Sorry for the inconvenience. Let me know if i can include your more detailed documentation which i saw in another thread somewhere.

Last edited by Wilbert; 27th May 2012 at 18:12.
Wilbert is offline   Reply With Quote
Old 27th May 2012, 18:25   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 4,982
Missing dll's:

run_25_dll_20050616 dll WarpEnterprises (Runs a system command. Simple source in text file, very succinct)
celforeground_25_dll_20050909 dll WarpEnterprises (No source)
celbackground_20050923 dll WarpEnterprises (No source)
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

Last edited by StainlessS; 28th May 2012 at 02:04.
StainlessS is offline   Reply With Quote
Old 27th May 2012, 18:30   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 4,982
Quote:
Originally Posted by Wilbert View Post
I included this one in the zip file in the first post. Sorry for the inconvenience. Let me know if i can include your more detailed documentation which i saw in another thread somewhere.
Whoops sorry, I had the previous v1.0 with old dll,
downloaded again and it is updated, Thankyou.

Shall modify my other posts.

EDIT: Shall post here update doc when I've done with it.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

Last edited by StainlessS; 28th May 2012 at 02:05.
StainlessS is offline   Reply With Quote
Old 29th May 2012, 18:03   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 4,982
Hi Wilbert,

Find below edited ColourLike doc, proof read please and amend if you feel necessary.
You might also like to place a copy on the original thread (link at top of doc)
and then perhaps delete this post, not really necessary here. Thankyou.

Code:
ColourLike:  http://forum.doom9.org/showthread.php?t=96308

by mg262,

Search keywords: colour, color, ColorLike, curve, gamma, levels, channel.


Brief description: Makes a clip look like a 'reference' clip by adjusting each colour channel.

Full description:

  YV12 and it now has RGB32 support.

  It also has a polar-YUV mode, which as its 3 channels has
      1) Y,
      2) Length of the UV-vector (saturation)
      3) Angle of the UV-vector. (hue)
    Currently the angle is not changed by the filter (ie does not change hue).

  Be careful to feed the filter with the right kind of histogram... YUV, RGB and Polar-YUV are three different kinds. 


  Functions:

  
    WriteHistogram(clip,string outputfile, int  "every"=1)
      YV12, RGB32
      Computes histograms for each channel of the clip and stores the results in outputFile.
      If e.g.  every=3 is specified, only every 3rd frame of clip is sampled.
      # Returns original clip (No Constructor)


    #CopyHistogram(string InputFilename, string OutputFilename) 
    #  Copy a histogram ie make duplicate file.
    #  Not Implemented (Implememted in source but commented out) 
    
    
    WritePolarHistogram(clip,string outputfile, int  "every"=1)
      YV12 Only, Emits a "Requires RGB32" message if NOT YV12 ???
      Computes polar histograms for each channel of the clip and stores the results in outputFile.
      If e.g.  every=3 is specified, only every 3rd frame of clip is sampled.
      # Returns original clip (No Constructor)
    
        
    CopyPolarHistogram(string InputFilename, string OutputFilename)
      Copy a Polar histogram ie make duplicate file.
      # Returns 0
    
    
    WriteColourLikeCurve(string OutputFilename, string sourceHistogramFile, string referenceHistogramFile)
      Writes YUV Equalising curves
      # Returns 0
    
    
    ColourLike(clip source,string sourceHistogramFile,string referenceHistogramFile, \
              bool "affectfirst"=true, bool "affectsecond"=true,bool "affectthird"=true)
      YV12, RGB32 
      Takes a clip source and histogram files for this clip and a reference clip, and applies curves to each channel
      chosen, to make source look as much like the reference as possible.
    
      
    PolarColourLike(clip source, string sourceHistogramFile,string referenceHistogramFile, \
           bool "affectfirst"=true, bool "affectsecond"=true,bool "affectthird")
      YV12 Only # RGB32, Not implemented for RGB32 depite error msg saying YV12 & RGB32 only
      Takes a clip source and histogram files for this clip and a reference clip, and applies curves to the clip,
      to make source look as much like the reference as possible.
      affectfirst, affects Y channel
      affectsecond, affects length of the UV-vector (ie SATURATION)
      affectthird, if supplied is IGNORED, (angle of the UV-vector) (ie Does not change HUE)   
      The first true tells the filter to affect luma, and the second true tells it to affect saturation.

  
    ApplyAMP(clip, string CurveFilename)
      YV12, RGB32
      Affects Y channel only for YV12


    SaturationGamma(clip, float gamma, float "fixed"=127.0)
      YV12
      Affects U & V channels Only (applies gamma to length of the UV-vector [SAT])
      Y channel untouched
        I've also added a saturation gamma function. The idea is this. A normal gamma operation can brighten or darken
        midtones while (approximately) leaving highlights and shadows alone. The saturation Gamma can increase or decrease
        the saturation of areas with medium saturation, while leaving greys and very saturated areas alone. 
        The fixed parameter gives a "very saturated" saturation level [measured as a distance from (128,128)] that will
        be left alone by the function... but it will work fine if you leave this number at default.
        The results are (in my view) quite interesting, so do give it a go!
        

----------------

Examples:

  Here are some examples from a case where the same clip is present in (unrelated) DVD and VHS sources.

  First generate the histograms:

  dvd.WriteHistogram("dvd hist 100.txt", 100)
  vhs.WriteHistogram("vhs hist 100.txt", 100)

  Then, say, adjust the VHS to look as much like the DVD as possible:
    vhs.colourlike("vhs hist.txt", "dvd hist.txt")
  or 
    vhs.colourlike("vhs hist.txt", "dvd hist.txt", true, false, false)
      which means: just process Y (respectively R) but ignore U and V (respectively G and B).

  Or adjust the DVD to look as much like the VHS as possible
  dvd.colourlike("dvd hist.txt", "vhs hist.txt")

  Polar:
    dvd
    WritePolarHistogram("dvd polar hist 1.txt", 1)
    vhs
    WritePolarHistogram("vhs polar hist 1.txt", 1)
    
    dvd.polarcolourlike("dvd polar hist 1.txt", "vhs polar hist 1.txt", true, true, true) #last 'true' is ignored

      The first true tells the filter to affect luma, and the second true tells it to affect saturation.
      This should in theory change the brightness, contrast, saturation, etc but not affect hue.
      I haven't found this to be very useful in practice.
      I think a variant which changed hue would be more useful, but this is ill-defined... or more precisely, 
      because hue is represented by a circle rather than a line, there is a whole family of 'hue-equalising' filters...

------------------------------------------------------------------------------------------------
Notes:
  Generating histograms runs at about 75fps on DVD source on my PC (and I think most of that time is MPEG decoding), but
  this still seems slow because the entire file needs to be scanned. As in the example, you can specify quite a large
  value of 'every' without affecting the results too much.

  You only need to generate the histograms once, so you probably want the WriteHistogram calls in a separate AVS to
  ColourLike.

  This filter can be used on completely unrelated clips (which I haven't tried yet); I don't actually think that is a
  particularly meaningful thing to do, so I'm pretty pessimistic about the results -- but if you do happen to try it,
  see what the results look like when you just use it on the Y channel, and also when you just use it on the U&V channels.
  (Use MergeLuma or MergeChroma with source and the output of this filter.)

  For the record, I'm not terribly happy with the results of the filter overall -- as I noted in that other thread, I
  think there is 'crosstalk' between the colour channels that this process does not account for. So I think a proper colour
  matching function will have to use something more sophisticated than channel-curves.

The 'other thread' mentioned is here:
http://forum.doom9.org/showthread.php?t=95574

------------------------------------------------------------------------------------------------------------------------
Above text, mostly words of author mg262, but edited from various posts on doom9 and had some text inserted to either
clarify or denote usage.

Edited by StainlessS, on doom9
PS, dont know if you noticed the 'Run' dll two posts above has source in the text file.

EDIT: Some years later, lines in text preceded by hash '#' are not quite true, ie may have been written by mg262, but not implemented in source as documented (eg CopyHistogram is I think not implemented at all [edit: think may be implemented but totally commented out, again not sure, not checked], could be wrong. Many of the functions claim to return 0, if I remember correctly, a lot of them return nothing at all, ie void).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

Last edited by StainlessS; 21st September 2016 at 05:43. Reason: doc update
StainlessS 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 16:51.


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