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 |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#21 | Link | |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
From here:http://forum.doom9.org/showthread.ph...30#post1298430
Quote:
EDIT: FYI, Info() gives a little CPU info. EDIT: Just installed vs2010. If you set "Project Properties/Code Generation/Runtime Library" to "Multi-threaded (/MT )" avoids the requirement for "Msvcr100.dll". Did timing test on my 3GHz 2 dual core on this source filter GetFrame(): http://forum.doom9.org/showthread.ph...70#post1602470 Got about 40FPS on both VS6 and TK3, and only 26FPS on vc2010 (about same on vs2008). Dont have VS2005 installed at present but might expect about 45FPS from that).
__________________
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; 25th November 2012 at 21:52. |
|
|
|
|
|
|
#22 | Link | |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Quote:
I've updated it, hopefully this time with no SSE instructions (although this time I left the DLL name as quad.dll) David |
|
|
|
|
|
|
#23 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
David, latest v3 should have this at top of file, after GPL
Code:
#ifndef __AVISYNTH_H__
#define __AVISYNTH_H__
enum { AVISYNTH_INTERFACE_VERSION = 3 };
__________________
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 ??? |
|
|
|
|
|
#25 | Link | |
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
|
Quote:
|
|
|
|
|
|
|
#26 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Here the example given already by martin53
Code:
ColorBars()
Subtitle("Flying Colorbars()",text_color=$d0c000,align=5,size=40)
ScriptClip("""
c=last
t=0.061*current_frame
t2=0.127*current_frame
a=0.501+0.5*sin(t/pi)
t1x=-0.2*cos(t2)
t1y=0.5-0.5*cos(t2)
t2x=1.0+0.2*cos(t2)
t2y=0.5-0.5*cos(t2)
t3x=1.0+0.2*cos(t2)
t3y=0.5+0.5*cos(t2)
t4x=-0.2*cos(t2)
t4y=0.5+0.5*cos(t2)
c1x=0.5+a*cos(t)
c1y=0.5+a*sin(t)
c2x=0.5-a*sin(t)
c2y=0.5+a*cos(t)
c3x=0.5-a*cos(t)
c3y=0.5-a*sin(t)
c4x=0.5+a*sin(t)
c4y=0.5-a*cos(t)
c.quad(t1x,t1y, t2x,t2y, t3x,t3y, t4x,t4y, normal=true)
quad(c1x,c1y, c2x,c2y, c3x,c3y, c4x,c4y, normal=true)
""")
Trim(0,562).KillAudio().ConvertToYV12()
Really quite nice EDIT: 1.42 MB, 18 seconds mp4I guess that you've done that already yourself, but perhaps for others that want to know what it can do. Well done to both David and martin53. I used the non SSE version just to check it out. EDIT: Now all we need is a Flying Tardis disappearing down an xyremap vortex
__________________
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; 26th November 2012 at 21:09. |
|
|
|
|
|
#27 | Link |
|
Registered User
Join Date: Mar 2007
Posts: 408
|
Since that little script found such an echo, and david made a nice suggestion to me about how to profit from the alpha layer too, I updated the script a bit.
Note the background gradient, the starfield and how the color bars partially obscure it. Btw did you ever wonder if frames have a front and a back side? ![]() Code:
function stars(clip c, int r) {
c.Overlay(x=rand(c.width),y=rand(c.height),BlankClip(c,width=1,height=1,color=$030301*rand(85)))
(r==0)? last : stars(r-1)
Trim(0,-1).Loop(c.Framecount, 0, 0)
}
width=1080
height=720
length=100000
Tcolor=$000040
Bcolor=$000018
StackVertical(BlankClip(length=length,width=2,height=1,color=TColor,pixel_type="RGB32"),BlankClip(length=length,width=2,height=1,color=BColor)).BilinearResize(width,2*height,src_top=0,src_height=2).Crop(0,height/2,0,-height/2).Stars(width*height/3072)
#BlankClip(length=length,FPS=25,width=640,height=480,color=$000018,pixel_type="RGB32")
ScriptClip("""
c=last
t=0.061*current_frame
t3=0.127*current_frame
t2=-0.9
a=exp(-3.0+3.0*cos(t/pi))
t1x=0.4*cos(t3)
t1dx=1.0+0.2*sin(t2)
t1y=0.4*cos(t2)
t1dy=1.0+0.2*sin(t3)
c1x=0.5+a*cos(t)
c1y=0.5+a*sin(t)
cb=Colorbars(width=width,height=height,pixel_type="rgb32")
cos(t2)*cos(t3)>=0? cb.Subtitle(string(current_frame)+"\nFlying Colorbars",text_color=$d0c000,lsp=0,align=5,size=60) : cb
ResetMask
quad(0.5+t1x*t1dx,0.5+t1y*t1dy, 0.5-t1x*t1dx,0.5+t1y/t1dy, 0.5-t1x/t1dx,0.5-t1y/t1dy, 0.5+t1x/t1dx,0.5-t1y*t1dy, normal=true)
quad(c1x,c1y, 1.0-c1y,c1x, 1.0-c1x,1.0-c1y, c1y,1.0-c1x, normal=true)
Overlay(c,last,mask=last.ShowAlpha)
""")
|
|
|
|
|
|
#29 | Link |
|
Registered User
Join Date: Aug 2008
Posts: 233
|
Hi, I am not sure if this is by design or not but I have noticed a behavior that is counter-intuitive to me.
Code:
BlankClip(width=75,height=75, color=$ffffff) AddBorders(25,25,25,25, color=$000000) quad(0.5, 0, 1.0, 0.0, 1.0,1.0, 0,1.0, normal=true) I would have assumed that only the top-left corner would have been affected by the transform. Am I missing something? Last edited by vampiredom; 18th February 2013 at 08:57. |
|
|
|
|
|
#30 | Link | |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Quote:
![]() It emulates a 3D transform. If you draw a box and connect the diagonals, then push the top left corner of the box in, the point where the diagonals cross will shift up and right. David |
|
|
|
|
|
|
#34 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Code:
function corners(clip in, float x0,float y0, float x1,float y1, float x2,float y2, float x3,float y3) {
return in.xyremap(x="x "+string(x0)+" 1 b - 1 a - * * - "+string(x1)+" 1 b - a * * + "+string(x2)+" b a * * + "+string(x3)+" b 1 a - * * -",\
y="y "+string(y0)+" 1 b - 1 a - * * - "+string(y1)+" 1 b - a * * - "+string(y2)+" b a * * + "+string(y3)+" b 1 a - * * +")
}
Caveat: due to xyremap's backwards mapping you will get curvature of the image sides, but it may go unnoticed for small shifts. I may recompile xyremap later as I think I can squeeze some more accuracy out of the interpolator. David Last edited by wonkey_monkey; 20th February 2013 at 13:53. |
|
|
|
|
|
#37 | Link |
|
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
#davidhorman
Your Quad (11/01/2012 version) is undergoing peer review by the scientific community. The QUAD call is with the coordinates plus "invert=true, normal=true". Can you help me explain the reduction of only the Vertical clarity with the skew test detailed at (http://VideoCleaner.com/SquareTest.pdf)? NOTE: All Quad coordinates are 1/100th, and thus between 0.0 and 1.0, of the slider values listed in that PDF. Thank you in advance. |
|
|
|
|
|
#38 | Link | ||
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Quote:
Quote:
I assume it's the broken-ness of the vertical edges. I just did a skew and an inverse skew in Photoshop and I got the same imperfect remapping of vertical lines. It's not possible to perfectly retrieve the original image if you're doing resampling. Paint's skew feature doesn't do any resampling, so its result is much coarser than quad's. But it has the "advantage" that you can undo it perfectly. Last edited by wonkey_monkey; 12th May 2016 at 23:02. |
||
|
|
|
|
|
#39 | Link |
|
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
Actually, there can be a certificate or award from the forensic/scientific community. Would you be willing to release the source code?
In your testing, without the grids, do you also find that the vertical perspective blurs more than the horizontal? |
|
|
|
|
|
#40 | Link | ||
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,820
|
Quote:
But quad is hardly worthy of an accolade. It was cobbled together out of some matlab code I found on some website and some pixel interpolation code. There's really nothing innovative to it. Quote:
|
||
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|