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 23rd November 2013, 08:30   #241  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Quote:
Originally Posted by StainlessS View Post
Has 'static' build in library routines rather than external runtime dll.
Is that a functional problem (other than size)?
Forensic is offline   Reply With Quote
Old 23rd November 2013, 14:43   #242  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,907
Quote:
Originally Posted by Forensic View Post
Is that a functional problem (other than size)?
No, he's just explaining why it is larger.

For your released filters you will want to build in release mode, not debug mode. That will affect size, as you speculated, but also performance. So select /MT for your release configuration, rather than /MTd.

You don't actually have to get a lot of C++ and object orientation mastered. Just get source for a filter similar to what you want to make and start modifying it. Then you get more into a C style of coding, e.g., just modifying GetFrame(), etc. It's not really that difficult.

Last edited by Guest; 24th November 2013 at 02:40.
Guest is offline   Reply With Quote
Old 26th November 2013, 05:36   #243  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
StainlessS. I compiled and am using your CPP file. Is your code based on Gavino's version (he was correct)?
Forensic is offline   Reply With Quote
Old 26th November 2013, 10:06   #244  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,569
Quote:
Originally Posted by Forensic View Post
StainlessS. I compiled and am using your CPP file. Is your code based on Gavino's version (he was correct)?
Yep, with a couple of minor shortcuts. See accompanying avs script, dll version script function.
I incorporated the end column into the Y loop, immediately after the X loop exit, where x var is W-3, + 1, ie W-2 (and y from the Y loop) , instead of doing it in a loop of it's own. Did same sort of thing after the Y loop for the last row using y loop counter value eg H-3 + 1, ie H-2.

EDIT: The Count check version script function is is pretty much the intended Gavino full script (G only gave bare bones slice =false section),
but with the counts done separately with each iteration. dll check script version implements pretty much exactly same as dll. Different
versions just to make sure all versions produce identical results. The speed difference of the 'shortcuts' would not be of any significance
in script but would be a little quicker in the dll cpp func.
__________________
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; 27th November 2013 at 05:24.
StainlessS is offline   Reply With Quote
Old 26th November 2013, 22:19   #245  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Thank you. I will pass this along to my peers.
Forensic is offline   Reply With Quote
Old 1st December 2013, 18:52   #246  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 407
Forensic,
I am interested to know which development environment you chose - I assume Visual Studio 2012 or 2013 - and if you were able to rebuild other plugins 1:1
martin53 is offline   Reply With Quote
Old 2nd December 2013, 14:50   #247  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,569
@Forensic,
Do you think that AvgLumaDif(slices=false) / AvgLumaDif(slices=true) [or similar] could be used as some kind of
measure of 'blockiness' ?

EDIT: Also, further to M53 question: Think Avisynth+ decided upon VS2010 as standard compiler for both Avisynth+
and plugins. Think 2012 only compilable on W7+ (maybe vista but who cares bout dat). Also think VS2010 compilable
on XP.

EDIT: In your other thread, I said that converting avs script to C took little more than liberally scattering
semicolons into source, I was mostly referring to the script samples in RT_Stats AVS/Converted2Plugins/ folder,
if compared, you should see that there was not much else that was needed.

EDIT: Reading/writing frames directly rather than using some other function to do it would be somewhat different
to the script versions. The Converted2Plugins funcs call other RT_Stats funcs rather than accessing frames
directly.
__________________
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; 3rd December 2013 at 15:50.
StainlessS is offline   Reply With Quote
Old 3rd December 2013, 09:17   #248  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
@martin53: I use "Microsoft Visual Studio 2012 Express" and also installed "Microsoft Visual C++ Toolkit 2003" and "Microsoft Platform SDK for Windows Server 2003 R2". Just be sure to set your Windows path to include the Express BIN folder. When you want to build a DLL, press ALT-F7 in Express and the 'Runtime Library' to "MTd" (located under Configuration Properties - C/C++ - Code Generation). It works like a charm. NOTE: I tried MT but the builds fail, so I use MTd which makes them slightly larger as they include the header.

@StainlessS: If you compare the false to true usage, significant value differences does IMPLY blockiness, but you can't set a standard threshold due to all the video variances (at least in the security surveillance field). Your concept may work for hi-res movies/video, but I have no quantitative values on that.

Last edited by Forensic; 3rd December 2013 at 09:57.
Forensic is offline   Reply With Quote
Old 3rd December 2013, 11:00   #249  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Forensic View Post
I use "Microsoft Visual Studio 2012 Express" and also installed "Microsoft Visual C++ Toolkit 2003" and "Microsoft Platform SDK for Windows Server 2003 R2". Just be sure to set your Windows path to include the Express BIN folder. When you want to build a DLL, press ALT-F7 in Express and the 'Runtime Library' to "MTd" (located under Configuration Properties - C/C++ - Code Generation). It works like a charm. NOTE: I tried MT but the builds fail, so I use MTd which makes them slightly larger as they include the header.
Are you using the VC2012 with the 2K3R2 SDK? Why did you install VC7.1 when you use VC2012?
It also would be helpful if you told us why the release builds fail.

Only being able to build debug versions is not what I'd call "working like a charm".
Groucho2004 is offline   Reply With Quote
Old 3rd December 2013, 12:28   #250  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,569
Quote:
Originally Posted by Forensic View Post
Just be sure to set your Windows path to include the Express BIN folder
IDE uses 1st compiler that it comes across in the list of paths to BIN, compiler uses 1st header that it comes across in list of INCLUDE directories that have the particular header file, same for LIB libraries when linking. So, order is important, set the SDK paths 1st in lists, then the path to the desired compiler eg VS2012 or TKit 2003 (EDIT: also for include and libs when switching compiler) .
If you cannot create a non debug version, it may be a mismatch in paths order for Bin/Include/Libs.

EDIT: TKit 2003, does not have debug libraries.
__________________
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; 3rd December 2013 at 13:38.
StainlessS is offline   Reply With Quote
Old 3rd December 2013, 19:56   #251  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
To me "Worked like a charm" referred to the fact I could finally build working AviSynth DLLs, even if they were significantly larger. Obviously, I prefer to make my builds fully compliant and appreciate any guidance. My environmental paths start with:
C:\Program Files\Microsoft SDKs\Windows\v7.1A\Include;C:\Program Files\Microsoft Visual Studio 11.0\VC\bin;
When I try to use MT (versus MTd) I get two errors {I used StainlessS's RGBamplifier source code for the test since I understand its behavior and can easily test the results}
Quote:
Error 1 error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: class AVSValue const & __thiscall AVSValue:: operator[](int)const " (??AAVSValue@@QBEABV0@H@Z) c:\...\RgbAmplifier.obj RGBamplifier
Error 2 error LNK1120: 1 unresolved externals c:\...\Debug\RGBamplifier.dll 1 1 RGBamplifier
NOTE: The (...) are just to not annoy you with the full directory paths

Last edited by Forensic; 3rd December 2013 at 20:23.
Forensic is offline   Reply With Quote
Old 3rd December 2013, 22:10   #252  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Forensic View Post
To me "Worked like a charm" referred to the fact I could finally build working AviSynth DLLs, even if they were significantly larger. Obviously, I prefer to make my builds fully compliant and appreciate any guidance.
For full compliance you would have to use VC6 unless you're using Avisynth+.
Looking at your error message it seems that you configured your project file to output a Unicode binary which is not supported by Avisynth.
Groucho2004 is offline   Reply With Quote
Old 3rd December 2013, 22:20   #253  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Quote:
Originally Posted by Groucho2004 View Post
For full compliance you would have to use VC6 unless you're using Avisynth+.
Looking at your error message it seems that you configured your project file to output a Unicode binary which is not supported by Avisynth.
I recognize that the MT build does not work or even build (you identified the cause as Unicode), but the MTd version does both. I would happily use VC6, but can not find a copy. Do you know of an active download link? If I cannot get access to VC6, then I have no choice but to use what I have.
Forensic is offline   Reply With Quote
Old 3rd December 2013, 22:33   #254  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Forensic View Post
I recognize that the MT build does not work or even build (you identified the cause as Unicode), but the MTd version does both. I would happily use VC6, but can not find a copy. Do you know of an active download link? If I cannot get access to VC6, then I have no choice but to use what I have.
The compatibility issues are mostly about different exception handling introduced in newer compilers. For example, it might just crash instead of throwing a nice error message before gracefully terminating.
There's a good chance that you'll never have any problems using VC11 for your plugin.
Please have a look at this page, it should give you enough info to build your DLL. The instructions for VS2008 should be more or less valid for VS2010/2012.
Groucho2004 is offline   Reply With Quote
Old 3rd December 2013, 22:34   #255  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by Forensic View Post
I would happily use VC6, but can not find a copy.
Don't. Just don't. Visual studio 2012 is a nice and correct way of building avisynth plugins as long as you handle all exceptions yourself and don't do dumb stuff no one is doing anyway. Don't even think about using VC6 in almost 2014.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 4th December 2013, 00:36   #256  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,569
we luddites would suggest using least modern that you can get away with
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 4th December 2013, 01:40   #257  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Build->Configuration Manager, select "Release" in the left drop-down
Configuration Properties, General, Character Set "Multi-Byte Character Set"
Configuration Properties, General, Configuration Type "Dynamic Library (.dll)"

Now my builds are MT, work, and are very very small. Thank you.
Forensic is offline   Reply With Quote
Old 11th December 2013, 15:12   #258  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
ok I can't get planetcrop to work
http://www.sendspace.com/file/h3x698

It just says planet can't be found, but it's very distinct, about 20 pixels across, luma from 30 to 160, and the background is under 20.

Show the detect clip it's very clear, the first frame is from x=380 to x=401

edit: I think the problem is that a few frames have no planet. Can you make it so that those frames are ignored?

There was another problem, a few frames were very large and made the whole sequence large, I'd like those ignored also. So ideally, find the most consistent size and use that.

Last edited by jmac698; 11th December 2013 at 15:55.
jmac698 is offline   Reply With Quote
Old 11th December 2013, 19:11   #259  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,569
Well I dont know what I was supposed to do with that bunch of pics.
The 3rd one does not look like it was taken on same night nor location in the sky, and has not just 1 but at least 3
luminous bodies (non of them being the body in the other pics) spanning almost entire frame width.
The forth pic looks like it could be the same planet as in 1st two pics, but definitely not in time lapse sequence.
You pic these pics out at random ?
If you delete/remove the 3rd pic (from another time/place) and just process the remaining 3 it works quite fine.
For the first few frames that have no planet (just black sky, not included in zip), suggest you delete them

EDIT: Actually, I'm quite amazed at how well it works when you remove the unrelated frame.

Curious, what was it (planet) ?

EDIT:
Jmac, I dont actually expect you to [rule 4], but you never did acknowledge receipt of previous requested
mods to PlanetCrop, nor to eg ShowChannels where I spent about a month or more banging my head against a wall
and despite pointing out the existence of mods got zero response. In that situation, all I can think is I wasted
my time (and a lot of it, not to mention the bruises). All you have to do to placate me is say yes, I saw the post
then I am at least aware that you have seen it (whether you thought it well accepted, or not).
I am quite frankly not in the mood to spend time especially when I end up not knowing whether it was completely
wasted or not ("I saw it, but it was shite." would be not ideal but appreciated).

P.S., if you did wanna [rule 4]
__________________
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 Guest; 13th December 2013 at 18:03. Reason: rule 4
StainlessS is offline   Reply With Quote
Old 12th December 2013, 02:59   #260  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
Yep you're right, if I manually remove bad frames it works quite awesome, and I must say good job because in an animation, it looks virtually steady. They are all in the same sequence, but here's what happens: I bump the tripod, making it appear in a different location, or it moves out of frame after a few minutes. As I try to re-center it, I might catch a bit of something else like street lights.
I think most of these can be easily removed if I look through the beginning and end, so it's not a big problem after all.

I managed to process 85 frames to a noise-free image, unfortunately it was just a smooth blob. It's supposed to be Jupiter, but I'm thinking I pointed at a bright star by mistake, as there's no detail.

I'll try it on a quarter moon and see if it can center that.

It's quite amazing really and thanks for making it
jmac698 is offline   Reply With Quote
Reply

Tags
averageluma, correlation, lumadifference, runtime

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 20:28.


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