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 |
|
|
#21 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
|
OK, you win, implemented 64 bit accumulator.
__________________
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 ??? |
|
|
|
|
|
#22 | Link |
|
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Avisynth supplies you with the user_data pointer for a reason, stick the clip generated by the env->Invoke() call there. Of course, then you run into problems if your function is called multiple times in the same script but with different clips... Solving those problems is left as an exercise to the reader.
|
|
|
|
|
|
#23 | Link | ||
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
|
Quote:
Quote:
I have not seen any explanation of how the user_data thing works (other than in the font thing using a malloc string, no idea how it would fare with Avisynth objects and/or whether they would need destroyed). Also, thanks but I dont need any exercises, quite happy living in ignorance and if you knew how to solve the "problem", you would no doubt have said so.
__________________
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; 20th July 2012 at 01:51. |
||
|
|
|
|
|
#24 | Link | |
|
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Why do you even want to support RGB input to a function that is only meaningful for YUV images?
Quote:
In other words: create some kind of object or struct that stores any state you want to save. Do this in AvisynthPluginInit2, and pass a pointer to the object in question as the last argument to env->AddFunction. This pointer will be passed to the function you just registered, as the user_data argument. Do whatever you want with the object there. If you're worried about memory leaks, register an env->AtExit() hook that deletes the object. The PClip class acts as a reference counted smart pointer; it behaves much like its relatives in the C++ standard library does and has the same semantics. If you're not familiar with how smart pointers work in C++, I really think you should take the time to read up on it. I didn't explain it because it's a tedious problem to solve, not a hard one. You just need to make your code handle an arbitrary number of clips, not just one, and find some way of identifying which clip you're currently working with. |
|
|
|
|
|
|
#25 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
|
Fallback.
__________________
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; 6th August 2012 at 17:46. |
|
|
|
![]() |
| Tags |
| runtime, runtime error, runtime functions |
| Thread Tools | |
| Display Modes | |
|
|