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. |
|
|
Thread Tools | Search this Thread | Display Modes |
24th September 2012, 14:18 | #1 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
quad - quadrilateral transform (split from New Utils thread due to bug report)
2019-01-14: quad is now superseded by warp
Download: quad.zip Last update: 2012-09-30 - ~10% speed increase, bicubic interpolation Last update: 2012-10-02 - another ~10% speed increase Last update: 2012-10-05 - 100% speed increase! Last update: 2012-11-01 - output levels bugfix quad is a quadrilateral transformation filter similar to vcmohan's reform, although (so far) quad doesn't crash and does a true quadrilateral transformation. It uses bicubic interpolation (can be switched off for speed purposes) and is multi-threaded. Minimum parameter requirements are 4 x,y pairs defining the corners of the target quadrilateral. The source quadrilateral can also be specified, if required. No source, sorry - it makes use of too many half-written libraries scattered around my hard drive. Code:
quad ==== An Avisynth plugin to perform quadrilateral transformations. Usage ===== quad(clip, tx0,ty0, tx1,tx1, tx2,ty2, tx3,ty3, [sx0,sy0, sx1,sy1, tx2,ty2, tx3,ty3, bool invert, bool normal, bool draft]) Parameters: ----------- tx0,ty0-tx3,ty3: the four corners of the target quadrilateral. sx0,sy0-sx3,sy3: the four corners of the source quadrilateral (default: clip's corners, clockwise from top left) invert: invert the transformation (transpose t and s) normal: specify that the coordinates are normalised to the range 0-1. draft: don't use spline16 interpolation Last edited by wonkey_monkey; 14th January 2019 at 20:43. Reason: updated version |
25th September 2012, 17:59 | #2 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
Yes, of course. See _quad000022.jpg, made with the script
ColorBars() quad(0,0, 1,0, 1,1, 0,1, normal=true) ...Uh., funny. There was the black area inside AvsPmod's preview, but the jpg is stored with a correct picture. I'll try on to catch the picture. EDIT I made screenshots now. Looks like 'the thread responsible for the upmost quarter of the image is not finished when the frame is forwarded'. Maybe the thread continues to write afterwards, and then issues the illegal access? Last edited by martin53; 25th September 2012 at 18:11. |
25th September 2012, 19:03 | #3 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Strange that the thread for the top strip - which is the first thread to be created - is so far behind, although you were right that the code was failing to wait for that thread (it waited for all the others). Also strange that the edge is slanted like that.
I've updated the DLL (download link as at top of thread) which also includes some very slight speed improvements, though I don't know whether that will fix your scriptclip problem. David |
25th September 2012, 22:59 | #4 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
David,
I think you solved it! Looks very promising: 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) """) Please add the short description file to the new dll for the future downloaders. If you don't mind, you might add the types (float...) of the parameters, and maybe a bit more precise, which ones are optional. |
9th October 2012, 13:20 | #7 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
David, a version number or date on your zips might be good, the one in New Plugins is still the old one (with the same name).
EDIT: Suggest remove zip from New Plugins and point link here.
__________________
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; 9th October 2012 at 13:24. |
11th October 2012, 12:16 | #8 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
I am testing using the script given in a post above. While the earlier version of Quad was running at least through some frames prior to crashing, the latest version (oct 5) virtualdub does not start and gives a message
"An instruction not supported by the CPU was executed in module 'quad'." My cpu is AMD two core 5000+ x2 and running windows xp. Is there a problem? |
11th October 2012, 12:33 | #9 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Quote:
David |
|
11th October 2012, 17:40 | #10 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Could you give this DLL a try?
quad(amd).zip I inadvertently used an SSSE3 instruction, which isn't supported by the X2. This alternative DLL replaces it with pure <=SSE3 instructions, with only a minor performance hit. David |
11th October 2012, 22:26 | #11 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
The polite thing to do is code
Code:
if (!(env->GetCPUFlags() & CPUF_SSSE3)) env->ThrowError("Help, I need the SSSE3 instruction set"); |
12th October 2012, 13:10 | #12 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
I tried and with Martin53 script above it was executing witout any crash. Thank you.
I however noted that the color strips at the edges were narrower than those inside. There is enough space on the screen to display them fully or at least lot wider. This must be true for the regular version also. It appears the edges are truncated. |
12th October 2012, 13:59 | #13 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Quote:
David |
|
24th November 2012, 17:27 | #16 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
I was trying to use FSubstitute, but i'm running into trouble with this plugin. It simply won't load it (error: unable to load ...quad.dll, error=0x7e ...). I have an old athlon where sse(2), SSSE3 is not supported (only mmx and isse). Perhaps this is the problem read the posts above. Could you support mmx for me too (and release the sources)?
Many thanks ... |
24th November 2012, 19:30 | #17 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
VS6 Dependency Walker shows quad.dll as needing "Msvcr100.dll" from
Microsoft Visual C++ 2010 Redistributable Package 32 bit http://www.microsoft.com/download/en...s.aspx?id=5555 64 bit http://www.microsoft.com/download/en....aspx?id=14632 EDIT: Error 0x7e, missing module. Probably not even getting to the point where CPU could be an issue.
__________________
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; 24th November 2012 at 19:42. |
24th November 2012, 20:56 | #18 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Evaluate: System exception - Illegal Instruction |
|
24th November 2012, 23:10 | #19 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Hi Wilbert,
Sorry you've had trouble. I've tried to use Ian's suggestion: Code:
if (!(env->GetCPUFlags() & CPUF_SSSE3)) env->ThrowError("Help, I need the SSSE3 instruction set"); This may work for you: http://horman.net/quad-no-sse.zip It's about half the speed of the SSE version, but since that doesn't work for you at all it shouldn't be a problem Quote:
David |
|
25th November 2012, 00:07 | #20 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|