<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=RestoreSuper8Frames</id>
		<title>RestoreSuper8Frames - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=RestoreSuper8Frames"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;action=history"/>
		<updated>2026-06-10T09:51:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=6077&amp;oldid=prev</id>
		<title>Reel.Deal: link</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=6077&amp;oldid=prev"/>
				<updated>2015-09-15T17:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;link&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:46, 15 September 2015&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;copy &lt;/del&gt;the code below into a file 'RestoreSuper8Frames.avsi' in your AviSynth plugins directory or directly into your script:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Discussion thread: http://forum.doom9.org/showthread.php?t=155245&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Copy &lt;/ins&gt;the code below into a file '&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;RestoreSuper8Frames.avsi&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;' in your AviSynth plugins directory or directly into your script:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # RestoreSuper8Frames()&amp;#160;  ( 9 Mar 2007 )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; # RestoreSuper8Frames()&amp;#160;  ( 9 Mar 2007 )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Reel.Deal</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=968&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=968&amp;oldid=prev"/>
				<updated>2013-05-09T21:34:45Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:34, 9 May 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=967&amp;oldid=prev</id>
		<title>Laur: Shared functions/RestoreSuper8Frames moved to RestoreSuper8Frames: Remove obsolete shared functions category. See Talk:External filters.</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=RestoreSuper8Frames&amp;diff=967&amp;oldid=prev"/>
				<updated>2009-08-18T14:57:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Shared_functions/RestoreSuper8Frames&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Shared functions/RestoreSuper8Frames (page does not exist)&quot;&gt;Shared functions/RestoreSuper8Frames&lt;/a&gt; moved to &lt;a href=&quot;/index.php/RestoreSuper8Frames&quot; title=&quot;RestoreSuper8Frames&quot;&gt;RestoreSuper8Frames&lt;/a&gt;: Remove obsolete shared functions category. See Talk:External filters.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;copy the code below into a file 'RestoreSuper8Frames.avsi' in your AviSynth plugins directory or directly into your script:&lt;br /&gt;
&lt;br /&gt;
  # RestoreSuper8Frames()   ( 9 Mar 2007 )&lt;br /&gt;
  #&lt;br /&gt;
  # A combed-frames eliminator for transcript of old movies to video by Martin Wagener&lt;br /&gt;
  #&lt;br /&gt;
  # RestoreSuper8Frames() is designed to select the video frames that were best exposed with single images of the movie&lt;br /&gt;
  # and transform all the other frames to plain black.&lt;br /&gt;
  #&lt;br /&gt;
  # RestoreSuper8Frames() expects a data stream with at least 3 and no more than 4 time the field(!) rate of the movie.&lt;br /&gt;
  # i.e. the video frame rate must be between 1.5 and 2 of the movie image rate.&lt;br /&gt;
  #&lt;br /&gt;
  # The algorithm is simple: with the help of FieldDeinterlace(), the combing of the previous, current and&lt;br /&gt;
  # next frame are compared and a black frame is returned if the current frame is not the minimum.&lt;br /&gt;
  #&lt;br /&gt;
  # The filter returns irregular sequences of single best-choice frames and one to three black frames.&lt;br /&gt;
  # These sequences can be turned into alternating black-good-black-good sequences with MultiDecimate()&lt;br /&gt;
  # and then into the perfect sequence with SelectEven().&lt;br /&gt;
  #&lt;br /&gt;
  # In favor to guarantee that it is always SelectEven() and not SelectOdd() for the good frames,&lt;br /&gt;
  # this filter always turns the first frame black.&lt;br /&gt;
  #&lt;br /&gt;
  # To supply RestoreSuper8Frames() with the neccessary frames, use DoubleWeave().&lt;br /&gt;
  # DoubleWeave() will recombine all fields of the raw video in a way that always outputs one uncombed frame in the sequence.&lt;br /&gt;
  #&lt;br /&gt;
  # Movie:        |   A  |~|   B   |~|   C  |~|   D   ( A...D are the movie images - Projector slow at B, ~ is shutter)&lt;br /&gt;
  # source vid.:  |a* a*|b  b*|c* c*|d  d*|e* e |     (a..e are the video frames, * shows the uncombed)&lt;br /&gt;
  #               |1  2 |1  2 |1  2 |1  2 |1  2 |     (1 and 2 are the the fields of the frames)&lt;br /&gt;
  #               |  a  |  b  |  c  |  d  |  e  |     (this shows the complete frames before DoubleWeave()&lt;br /&gt;
  # DoubleWeave:  |aa|ab|bb|bc|cc|cd|dd|de|ee|&lt;br /&gt;
  #               |12|21|12|21|12|21|12|21|12|&lt;br /&gt;
  #               |a |a'|b |b'|c |c'|d |d'|e |        (the frames after DoubleWeave())&lt;br /&gt;
  #                A  -  -  B  -  -  -  C  -          (A-C=good frames after RestoreSuper8Frames(), -=black frames)&lt;br /&gt;
  #&lt;br /&gt;
  # The exact(!) image sequence of the celluloid movie will be reconstructed if the camera takes not less than&lt;br /&gt;
  # three and not more than four fields per image.&lt;br /&gt;
  #&lt;br /&gt;
  ## --------&lt;br /&gt;
  &lt;br /&gt;
  function RestoreSuper8Frames(clip &amp;quot;clip&amp;quot;, bool &amp;quot;map&amp;quot;, bool &amp;quot;show&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
      map= default(map, false)&lt;br /&gt;
      SC= &amp;quot;clip=(ip&amp;lt;=ic)?blank:last&amp;quot;+chr(13)+&amp;quot;clip=(in&amp;lt;ic)?blank:clip&amp;quot;+chr(13)+&amp;quot;return((RS8Fshow)?clip.Subtitle(string(ic)):clip)&amp;quot;&lt;br /&gt;
      FE= &amp;quot;ip=AverageLuma(cp)&amp;quot;+chr(13)+&amp;quot;ic=AverageLuma(cc)&amp;quot;+chr(13)+&amp;quot;in=AverageLuma(cn)&amp;quot;&lt;br /&gt;
      global RS8Fshow= default(show,false)&lt;br /&gt;
      global ip=0&lt;br /&gt;
      global ic=0&lt;br /&gt;
      global in=0&lt;br /&gt;
      dt=8&lt;br /&gt;
      global cf=clip.GreyScale().HorizontalReduceBy2().Blur(1.58,0)&lt;br /&gt;
      global blank=BlankClip(clip,length=clip.FrameCount(),color=0)&lt;br /&gt;
      global cp=cf.DuplicateFrame(0).FieldDeinterlace(threshold=255,dthreshold=dt,map=true).Levels(140,1,255,0,255,coring=false)&lt;br /&gt;
      global cc=cf.FieldDeinterlace(threshold=255,dthreshold=dt,map=true).Levels(140,1,255,0,255,coring=false)&lt;br /&gt;
      global cn=cf.DeleteFrame(0).DuplicateFrame(clip.Framecount()-1).FieldDeinterlace(threshold=255,dthreshold=dt,map=true).Levels(140,1,255,0,255,coring=false)&lt;br /&gt;
      f1= clip.ScriptClip(SC)&lt;br /&gt;
      f0= f1.FrameEvaluate(FE)&lt;br /&gt;
      return((map) ? Overlay(f0,clip,opacity=0.5).Overlay(BilinearResize(cc,clip.Width(),clip.Height()),opacity=0.5,mode=&amp;quot;add&amp;quot;) : f0)&lt;br /&gt;
  #   return((show) ? BilinearResize(cc,clip.Width(),clip.Height()) : f0)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Back to [[Shared functions]].&lt;br /&gt;
[[Category:Shared_functions]]&lt;/div&gt;</summary>
		<author><name>Laur</name></author>	</entry>

	</feed>