View Full Version : 3.0 progress
Bidoche
1st May 2004, 12:49
Today I finally managed to get the 3.0 branch into a compilable state.
But don't you start imagining things, it is still without a parser, so the result has to be hardcoded.
As soon as I got a BlankClip wired, I will post a version for testing (testing it don't crash)
Kurtnoise
1st May 2004, 14:40
:) Good news...
Bidoche
1st May 2004, 17:57
I finally got it working (a 1sec 640x480 pink clip), but I have a little problem :
Is that me being stupid or I can't attach files directly here ?
Is that me being stupid or I can't attach files directly here ?
I think only moderators can attach files directly,
and of course file attached or posted by non moderator need the approval of a moderator to be displayed in the message.
The moderator control panel is showing no pending attachments.
AFAIK, only a mod can post an attachment. Even then, only the specific mods of the specific sub-forum can approve it. In other words, if I attached to a post in this sub-forum I could not approve my own attachment, whereas I can in the D2S sub-forums.
I guess the rule was restricted.
Now only moderators can post attachment apparently.
And it stills need validation, as said DDogg.
"You may not post attachments"
Since most users uses temporary/permanent website to post 'attachment',
it's not really a problem, but I can remember there was a time we could post attachment.
I guess the changes was motived by security measure, to avoid allow the posting of possible harmfull code (for the board or for the people clicking on it) or something like that.
But we should go back to the main subject avs 3.0 progress :)
esby
Zarxrax
2nd May 2004, 19:17
@Bidoche: This sounds like great news. What are or will be the main new features of version 3.0?
Bidoche
2nd May 2004, 20:53
I guess I will post to upload somewhere else and post an url then.
I am supposed to have some space from my ISP somewhere, or maybe sourceforge ...
Changes/Features that have ben made in current code (excluding those I intend for the parser and co)
- VideoInfo is now a polymorphic interface (hiding implementation details) centralizing all parameters checking.
That is to say, you no longer have to check params by yourself, you try committing to VideoInfo, who will throw the appropriate exception if necessary.
- VideoFrame becomes an interface too (easier further extension), the 4 get methods (ptr, pitch, row_size, height) are replaced by a single one who returns a struct containing all the data and some helper methods for its handling (increase code clarity)
- It is now possible to attach custom properties to frames, of two differents types :
- Flow properties will, once set, be passed (if everything is coded correctly) to all frames derived from the source
- Static properties gives additional info about the frame state.
Unlike flow ones, they are immediately discarded if the frame is accessed on write.
NB: That was what Donald Graft requested for Decomb.
- Two support classes are provided for memory allocation, Block and OwnedBlock (same as Block but reporting memory consumption to the owning environment)
They allocate aligned memory (16 byte) from a common pool (to all scripts running).
You can explicitely request recycling behavior (or not) whether you expect to allocate the same size often.
Unlike 2.X, the pool is completely synchronised against concurrent accesses. (2.X is very unlikely to crash on that, but still possible)
- Since frames are built using OwnedBlock, that guarantees the frame data is always 16 byte aligned.
Even more : since pitchs are chosen mod 16 (even YV12 chroma), that guarantees that all scanlines are 16 byte aligned.
- Filter graphs are now able of dynamic refactorisation, thus simplifying the chain in some simple (or not so simple) cases.
Bidoche
2nd May 2004, 21:21
Another big change is that 3.0 is built using VC7.1, using STLPort as standard library and highly dependant from boost libraries (www.boost.org)
vion11
2nd May 2004, 21:31
Looks like AviSynth gets a second turbo and
becomes more robust. Good news!
@Bidoche
Email me the file and I'll be happy to attach and verify it for you. If you do, put the word MAGIC in the subject line. Don't ask why. :rolleyes:
BTW, "Developer" has only one 'p'.
neuron2@comcast.net
Bidoche
3rd May 2004, 16:46
@neuron2
Thanks for your offer, I just sent it to you.
Along with the avisynth dll, there are two others who are dynamically linked, one for STLPort debug mode (this is a debug build) and the other for boost.Thread who at the time being cannot be built as a static lib (hopefully it won't stay that way).
For now, there is not much to see, I just want to make sure it works on every OS.
BTW, "Developer" has only one 'p'.Oups... Let's check whether there are two in french so I can hide behind that fact.
Yes, saved. ;p
zettai
3rd May 2004, 17:46
Will 3.0 break 2.5x filters in any way?
Originally posted by zettai
Will 3.0 break 2.5x filters in any way?
Well, since it's a rewrite and redesign I'd guess it breaks 2.5x filters in each and every way imaginable... :) (Not that that's a bad thing IMHO...)
np: Lali Puna - Scary World Theory (Scary World Theory)
Bidoche
3rd May 2004, 18:33
3.0 breaks internal 2.5 filters, so there is no way it won't break plugins ones too.
It is not even built with VC6 anymore so there was no hope anyway.
(VC7.1 IS necessary, I am using boost libraries for which VC6 is too broken to work)
As for wrapping possibilities... I don't know, maybe it would be possible.
Zarxrax
3rd May 2004, 18:50
The list of new features seems to be some very technical stuff. What practical applications would all of this have for people doing normal DVD-ripping and such? Breaking compatability with 2.5 seems like a major problem, seeing as there are many great plugins which may never be rewritten for the new version, or may not even have the source available. After all, if the current AVS works just fine for most people, why would they want to switch to this new one and possibly lose functionality? Or am I misunderstanding?
I know I don't belong here being only a very very satisfied AviSynth 2.54 user, and not a developer in any way shape or form, but just have to ask these questions.
1. Since you are breaking compatibility with 2.5 I hope you are doing it in a real big way, so that AviSynth could become cross platform something like Audacity, a wonderful sound editor?
2. Secondly I noticed that Avery Lee is now testing or perhaps just toying around with a native 64 bit version of VirtualDub, is AviSynth a native 64 bit program or if not could this code be written for a native 64 bit OS? Wouldn't that make it much faster, and ensure it a much longer lifespan than even 2.xx?
I don't understand computers enough to use anything but good Ol' Windows, but if I spent as many late nights/early mornings coding as you guys seem to, I'd want to make sure it would see the widest distribution and the greatest longivity.
Bidoche
3rd May 2004, 20:47
@Zarxrax
Yes, since for now there is only the core who is done, changes are not of the sort easily visible to the user.
The one thing that would have been visible now (ie if you could actually render a script) is that 3.0 is less greedy on memory than 2.5.
People who only do normal DVD-ripping and cie probably who need to change before a long time, that is when 2.5 support is droppped...
But it won't happen that fast, 3.0 is still far from completion.
@t_2
1. There are no limitation to avisynth being ported on linux.
In the 3.0 core there is only one 2 line Windows dependancy in a small .cpp, nothing an #ifdef couldn't handle.
But in the other hand the avisource and export code are big fishs... and I am not the one doing them.
But if somebody else if willing, he can make himself known.
2. avisynth is C++, not native 64 bit code...
After that, maybe it can be compiled to 64bit code, but it would be special versions.
The zip from Bidoche is here:
http://neuron2.net/misc/avisynth.zip
It was too big to attach.
vion11
4th May 2004, 09:37
I'd give feedback for w2ksp4,
but where is msvcp71d.dll available?
Kurosu
4th May 2004, 09:47
Originally posted by Bidoche
@Zarxrax
1. There are no limitation to avisynth being ported on linux.
In the 3.0 core there is only one 2 line Windows dependancy in a small .cpp, nothing an #ifdef couldn't handle.
I gave it a try some weeks/months ago, but the code was probably in an unstable state to get any result. Anyway, here is my experience (of a failure):
- I saw many functions to which one had to lookup the POSIX equivalent; most of them were fortunately of the form _function() for the POSIX equivalent function(). Although there were many (especially with strings in parser), I guess this isn't overwhelming
- thread stuff (I mean, mutex, and locking access to the dll process as far I understood it) were a no go, as it is also platform-dependant.
- inline assembly. How my. I hate it when code use AT&T or Intel syntax for assembly. Sure it helps the compiler to schedule instructions better, and to make a better use of registers, but that's 0 freedom for choosing the compiler. The best alternative (people may complain it isn't available on all platform) is using nasm. I had to comment it all out, but I fear many functions were turned into no-op (I probably missed the C equivalent - which is more platform-independant than x86 asm code)
But someone used to porting code / with better knowledge of the linux platform can shed light on such matters.
But in the other hand the avisource and export code are big fishs... and I am not the one doing them.
I do agree. Even audio is a tricky part. Maybe even some libs used are too windows-centric to compile fine. I had the initial project to integrate it to ffmpeg or mplayer. The first one was maybe a better choice, given it offers input (not as wide as MPlayer) and output facilities. But in the long run, that wouldn't be very portable. Maybe making a plugin for GStreamer would be a wiser choice.
But if somebody else if willing, he can make himself known.
I guess only one programmer for the avisynth 3.0 architecture is insufficient. Bringing code (in the state I found it months ago) to a portable state is also a non-trivial task: if more than one is willing, the others can also make themselves known. :D
I remember a post of Kevin Atkinson (sorry for the spelling), the author of avisynth C API, on MPlayer dev mailing-list about doing a minimal port, ie from what I understood, bypassing as much stuff as possible like it is done for the loading of Windows codecs. It had no reply.
2. avisynth is C++, not native 64 bit code...
After that, maybe it can be compiled to 64bit code, but it would be special versions.
Same problem occurs as in any port of the sort. You have to check/adapt all ASM code, as registers are no longer the same, and plain MMX functions are not available in 64bits mode. AFAIK, only SSE2 instructions can be used, which integer part is identical to MMX, but brings alignment/new padding/limit issues.
Bidoche
4th May 2004, 19:27
@vion11
It seems to be a VC7.1 debug dll, I failed to notice it was required too :'(
@Kurosu
I saw many functions to which one had to lookup the POSIX equivalent; most of them were fortunately of the form _function() for the POSIX equivalent function(). Although there were many (especially with strings in parser)3.0 don't use char * functions but std::string ones (which is standard)
thread stuff (I mean, mutex, and locking access to the dll process as far I understood it) were a no go, as it is also platform-dependant.The boost.Thread library wraps around these platform dependances for us, so not a problem.
inline assemblyThat, I guess, IS a problem... :p
But in first times, C++ path could do.
Kurosu
4th May 2004, 20:26
@Bidoche
Originally posted by Bidoche
3.0 don't use char * functions but std::string ones (which is standard)
That's what I guessed it would turn into, so I didn't bother at the stage I found the code.
The boost.Thread library wraps around these platform dependances for us, so not a problem.
Again, that was my guess, but I simply forgot to mention it there :D
But in first times, C++ path could do.
I don't know what others would suggest, but I'd prefer to see all the ASM functions brought to nasm. I know that's a really tough thing, as you have to ensure that each converted function is properly working, and it's not completely trivial (in particular, the use of many arguments available at the level of the inlined asm).
What version of boost (never used it before) should one use to build AVS3.0? I guess that to use it, you have the typical steps:
- build the libs
- put the headers in the include path
- link the final DLL with the above mentionned libs
Maybe making a new thread would be more suited. Thread split from a moderator is welcome.
I got to the point where I could load the project and install the STLport/boost libs. However, MSVC choked on the build commandline for the .asm object. I suggest changing it to:
ml.exe /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
Other problem, I can't find either refcounted.h nor videoinfo.h in the 3.0 CVS (cvs co -r avisynth_3_0 avisynth) or in the libs' headers.
It appears they were removed. Check for instance the attic for refcounted.h (http://cvs.sourceforge.net/viewcvs.py/avisynth2/avisynth/Attic/refcounted.h
now)
Was this meant to be so !? Either way, it still can't be built.
Bidoche
5th May 2004, 09:31
I don't know what others would suggest, but I'd prefer to see all the ASM functions brought to nasm. I know that's a really tough thing, as you have to ensure that each converted function is properly working, and it's not completely trivial (in particular, the use of many arguments available at the level of the inlined asm).I would rather have asm functions NOT converted to nasm, as it defeats the purpose of having inline asm in the first place...
I'd rather have #ifdef guards to switch between versions, the 3.0 source is very well exploded so it won't make .cpp files grow unreasonably big.
What version of boost (never used it before) should one use to build AVS3.0?[QUOTE] Well, the last one, of course.
And yes you have to build it, include it and link it. Same for stlport.
[quote]Other problem, I can't find either refcounted.h nor videoinfo.h in the 3.0 CVS (cvs co -r avisynth_3_0 avisynth) or in the libs' headers.
It appears they were removed. Check for instance the attic for refcounted.h
Was this meant to be so !? Either way, it still can't be built.That would be me not updating the vc project, so the files it reports are completely obsolete :p (done now)
All the relevant files are in the src folder like 2.5 now, those in root are waiting to be worked on and moved there.
videoinfo.h is in /src/core/videoinfo.h
refcounted.h has been removed, I gave up this smart ptr attempt for boost::shared_ptr
Kurosu
5th May 2004, 10:28
Originally posted by Bidoche
I would rather have asm functions NOT converted to nasm, as it defeats the purpose of having inline asm in the first place...
I'd rather have #ifdef guards to switch between versions, the 3.0 source is very well exploded so it won't make .cpp files grow unreasonably big.I have to disagree on the later point, and that is a big concern IMHO. First, it would require to maintain the same piece of asm code in 2 different syntaxes (Intel, and another one). Then, one could think that if MSVC/... can have it, then why wouldn't gcc/...? The problem isn't to find someone who would be willing to port inline Intel-style asm, but the clutering of the source code. You could find 2 inlined versions of the same ASM code, plus possibly other #ifdef'ed references to an external function or yet another syntax. The equivalent of function pointers (specific classes which are holding the actual optimized code, like I did with Vaguedenoiser?) could help in that regard.
Although the ones who will port the asm parts to AVS3 should be the ones to decide, my opinion is that an unified way to store the asm code is needed. I don't know what is the impact of a function call through a function pointer (C-ish style), but I'd find it cleaner to have that simple function call instead of a ton of inlined ASM code for different architectures.
Another point to consider is probably what Sh0dan has done to some parts of the code, ie the compile-at-load-time of some ASM portions to better fit the architecture on which they are run. This involves another way to include asm, and does go against turning ASM functions into extern C's by porting code to nasm syntax.
That would be me not updating the vc project, so the files it reports are completely obsolete :p (done now)Anyway, I think I've only started my long journey into the land of the AVS3 compilation :)
All the relevant files are in the src folder like 2.5 now, those in root are waiting to be worked on and moved there.
OK
videoinfo.h is in /src/core/videoinfo.hWhich means it was already there, or it should be now available there ?
refcounted.h has been removed, I gave up this smart ptr attempt for boost::shared_ptrWell, then, I guess that if it wasn't needed, the errors I saw weren't completely due to its lack.
Thanks for the info. More attempts tonight (GMT+1).
As long as you hit the BTB an indirect function call is almost as fast as the direct function call ... of course for a lot of applications of inline assembly even function call overhead itself is too large.
Personally I like the Linux way of programs being optimized for architectures at compile time better than loadtime determined function pointers. It totally defeats the point of inlining, and you end up with needing to put far more functionality in assembly to get the same speedup.
Wilbert
6th May 2004, 10:18
Some questions from someone who can't follow much of this discussion:
1) Bidoche, could you write a one page document about the new features of 3.0 (*), differences with 2.5, and how new plugins (deinterlacers, denoisers) can make use of those new features. Then I will add it to avisynth.org.
(*) I saw your item list on the first page of this thread, maybe you can expand it a bit (so that more people can understand it).
2) I gave it a try some weeks/months ago, but the code was probably in an unstable state to get any result. Anyway, here is my experience (of a failure): (...)
Maybe the three of you (Bidoche, Kurosu and Kevin) could work together and try to port it to Linux? Kevin will probably help if you ask him. If you want Sh0dan can add you to the avs project.
3) I guess mpeg2dec3 is the first obvious plugin to be compiled for avs 3.0. I will ask Neuron when he's "ready" working on dvd2avi/mpeg2dec3, but that can take a while. Btw, are the resizers already working in 3.0?
Bidoche
6th May 2004, 16:56
The whole idea about inline assembly, is that since it's inline, it can take values directly from the stack frame.
When .asm or function calls can't do that.
To avoid source cluttering, we can limit the use of #ifdef to small and simple asm code.
And make a avisynth_3_0_linux branch for the others.
After all, we ARE NOT under the obligation to have exactly the same source files on both platforms.
That way, we keep inline assembly (which is easier to understand and maintain than .asm) and have the CVS keep track of gcc versions to make.
Another point to consider is probably what Sh0dan has done to some parts of the code, ie the compile-at-load-time of some ASM portions to better fit the architecture on which they are run.Of course, using SoftWire is a solution, but it's a lot of work to make code like it.
@Wilbert
3.0 is not intended to users yet, but to developers.
So we can't really talk of features yet, but of a developement framework...
But I agree I could give more explanations about my classes.
I guess mpeg2dec3 is the first obvious plugin to be compiled for avs 3.0. I will ask Neuron when he's "ready" working on dvd2avi/mpeg2dec3, but that can take a while. Btw, are the resizers already working in 3.0?Just signaling that for now, there are no plugin loading code, nor function table to fill in 3.0.
It's a bit early to really do plugins. But the code conversion matter can still be looked up.
The resizers are partly done, I made the support classes (Pattern, pattern::Maker, pattern::packer, and the filters) the pattern interpretation is yet to be converted.
I will go back on that when the Antialiaser code is complete (so I can have clip messages to show rather than blank frames :p)
Since I am talking about the Antialiaser, I think the way it actually uses to calculate haloAlpha is flawed....
( there are some cenmask |= (BYTE)(((long)-src[srcpitch*i ])>>31); which happens to be a noop (src is unsigned char *).... )
You could also put ifdef'd static inline versions of the functions (with appropriate inline asm) in a header file. Clutters up the main program less, and the compiler would remove the function call overhead.
Kurosu
6th May 2004, 17:18
Originally posted by Bidoche
The whole idea about inline assembly, is that since it's inline, it can take values directly from the stack frame.
When .asm or function calls can't do that.
That's indeed an avantage, that helps avoiding a bunch of headaches.
To avoid source cluttering, we can limit the use of #ifdef to small and simple asm code.
That is another idea, although I prefer MfA's idea.
And make a avisynth_3_0_linux branch for the others.
After all, we ARE NOT under the obligation to have exactly the same source files on both platforms.
I disagree here. I wouldn't like to maintain or keep porting code from a syntax to the other. It's indeed feasible, but I don't think the Avisynth project has (yet) the resources (the developpers) to spend on that task.
That way, we keep inline assembly (which is easier to understand and maintain than .asm) and have the CVS keep track of gcc versions to make.
Well, I hate AT&T syntax, even though it is better at register allocation. So in my case, it wouldn't be easy to maintain this inline code. And so, someone would have to do it. There I feel huge problems (unsynchronized code, porting error, ...). And nasm's syntax isn't that more difficult than Intel's. Sure you loose the direct use of values as you stated. But that's IMHO the only drawback besides function call overhead and x86 (not even sure of that one) limitations.
Anyway, just ask some people coding in assembly around here. They would probably give better evidence in a way (several asm code pathes for each platform and architecture) or the other (extern "C" function) than my single opinion.
Of course, using SoftWire is a solution, but it's a lot of work to make code like it.
Agreed.
Bidoche
6th May 2004, 18:18
Whaouh, that was fast, both of you.
Were you lurking here, waiting for a post ? ;p
I disagree here. I wouldn't like to maintain or keep porting code from a syntax to the other. It's indeed feasible, but I don't think the Avisynth project has (yet) the resources (the developpers) to spend on that task.Because you think conversion to nasm form is not as much as formidable a task !?
This solution has the advantage of not crippling the win32 branch from its lag.
On the contrary I think since we have few ressources, it's better this way.
Besides maybe we only have to announce that a linux port is under way to have ppl to do the conversion for us...
Personally I do not intend to do it myself, I already have my hands full with the C++ code to convert from 2.5 (I don't want to touch to AT&T asm either :p )
How about just having a pure-C backup of asm code whenever possible? (Possibly with intrinsics, they are readable and portable ... and in a lot of cases fast enough.) It's good practice IMO, and allows ports to be done more gradually.
Bidoche
6th May 2004, 19:02
Good idea.
It's always good to have the C version of the asm anyway, especially when comments are sparse.
Otherwise I got the Antialiaser compiling, so I will post a new build (with msvcp71d.dll) showing a message instead of a blank frame as soon as ready.
Bidoche
6th May 2004, 19:56
@Wilbert
Here is an example of the differences between 3.0 code and 2.5 :
A (partial) conversion of the SimpleSample 1.3 code.
//GetFrame now returns CPVideoFrame (smart VideoFrame const *)
CPVideoFrame SimpleSample::GetFrame(int n) const
{
//implicit conversion to smart VideoFrame *
PVideoFrame frame = GetChildFrame(n); //method for lazy coders :p
WindowPtr dst = frame->WriteTo(NOT_PLANAR); //fetch ptr, pitch, height, width at once in the WindowPtr struct
dst.to( dst.width / 2 - SquareSize * 3 / 2, dst.height / 2 - SquareSize / 2); //move to top left of square we want to draw
for( int y = SquareSize; y-- > 0; dst.pad() ) //goes from end of current line to start of next, ie add pitch - width
for( int x = SquareSize; x-- > 0; dst.to(3, 0) ) //move to next pixel
{
dst[0] = 255;
dst[1] = 255; //or in coordinates form dst(1, 0)
dst[2] = 255;
}
return frame; //implicit conversion to CPVideoFrame
}
Kurosu
6th May 2004, 22:24
Originally posted by Bidoche
Because you think conversion to nasm form is not as much as formidable a task !?
Either way, there's one conversion needed for a linux port: Intel syntax to AT&T syntax or nasm .asm files. Now look back: you either have inline asm in AT&T syntax or .asm files in nasm syntax. VC++ doesn't support AT&T syntax, gcc doesn't support Intel syntax. My conclusion: only if you have nasm code, you can use it in both environment. Now, imagine that you add new ASM code: you either add it as Intel, AT&T or nasm. The first 2 require that you also convert code from one syntax to the other. You don't with nasm.
On the contrary I think since we have few ressources, it's better this way.
Well, either way, code needs to be ported. But once it's ported, I have described what happens.
Besides maybe we only have to announce that a linux port is under way to have ppl to do the conversion for us...
http://zebra.fh-weingarten.de/~maxi/html/mplayer-dev-eng/2003-09/msg00244.html
Seeing the absence of reply, I guess it needs to be really well marketed to have people join. Or maybe it was just Avisynth being in C++? (I'm not being sarcastic - I know C++ is a no-go for some developers [I dare say linux developers])
btw, I contacted some time ago Kevin about this matter. His intent really was to emulate (like it's done with the DCOM Api for loading DMO codecs and the like) the parts that were too windows-centric from what I understood.
Personally I do not intend to do it myself, I already have my hands full with the C++ code to convert from 2.5 (I don't want to touch to AT&T asm either :p )
And it would be a waste of your time to do the conversion by yourself, compared to what is left on the C++ side, and what you can achieve there.
Another message:
It's always good to have the C version of the asm anyway, especially when comments are sparse.
Indeed, I always try to do that in my case. But anyway, I think MfA was referring to the possibility to use specific intrinsics to write C-like asm code. For instance (very reduced example):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vcrefmmxtechnologysetintrinsics.asp
Originally posted by Kurosu
Either way, there's one conversion needed for a linux port: Intel syntax to AT&T syntax or nasm .asm files.
ICC under linux groks msvc inline asm too I believe.
The port to GCC would require the conversion, but only to create an optimized version ... a slower C version could be immediately available if you make sure C versions are always available (again possibly with intrinsics, since they are the same between compilers AFAIK ... in which case it wouldnt be all that slow).
Kurosu
6th May 2004, 22:47
Originally posted by MfA
ICC under linux groks msvc inline asm too I believe.
Yes it does. But very few people have access to it, and making it a requirement would almost defeat the purpose of a linux port.
a slower C version could be immediately available if you make sure C versions are always available
Well, we are dealing with asm code porting here. It is a temporary solution however, as in any project, to fall back on such code when no optimized exists.
(again possibly with intrinsics, since they are the same between compilers AFAIK ... in which case it wouldnt be all that slow).
I would place intrinsics in an even lower ease of use than AT&T syntax. But that's just me not being used to it. I don't know if there are any multi-platform intrinsics available.
@Bidoche
Could you tell what version of boost you used? I used 1.31 from http://www.boost.org/
Except other errors I want to deal after this problem is solved, it fails on including <boost/circular_buffer.hpp>
It doesn't seem to be present in boost and AVS3.0 include dirs.
TIA,
Kurosu
Apparently MSVC's code generation using intrinsics sucks, at least according to Phaeron, so you might be right.
Bidoche
7th May 2004, 08:41
@Kurosu
Didn't you see the comments about circular_buffer in the source ?
This library is not part of boost yet, and has to be downloaded separately...
Hmm, checked, my comments about that are gone :/
Here is the url where it can be found
http://groups.yahoo.com/group/boost/files/circular_buffer_v3.6.zip
Kurosu
7th May 2004, 10:34
Originally posted by Bidoche
Didn't you see the comments about circular_buffer in the source ?
Even if they were there, I don't think I'd have searched that. I've just copied the header's name and searched for it in the appropriate folders.
This library is not part of boost yet, and has to be downloaded separately...
OK, excuse my great ignorance of boost, that even 1 minute of doc-reading may have solved (thanks for not replying with that ;)
Here is the url where it can be foundThanks
Bidoche
7th May 2004, 15:58
OK, excuse my great ignorance of boost, that even 1 minute of doc-reading may have solved (thanks for not replying with thatWell, you probably could have found easily that it was missing from boost...
In fact you actually did :p
But finding the source files takes some time.
With that, maybe you will only be left with the annoying task of understand how to build boost :p
Bidoche
7th May 2004, 17:02
Finally fixed RGB output.
Now it can make pink clip in YUY2 and YV12 and gray ones in RGB
Kurosu
7th May 2004, 18:52
Originally posted by Bidoche
http://groups.yahoo.com/group/boost/files/circular_buffer_v3.6.zip No luck, it requires a registered account, which I'm not likely to get. I know it's much asking but could you make it available differently?
Otherwise, boost/STLport were the first things I compiled, and it seems it went fine. I don't recall having much difficulty in that.
Bidoche
7th May 2004, 19:40
No luck, it requires a registered account, which I'm not likely to get. I know it's much asking but could you make it available differently?Registering is free... It should not be a problem.
Anyway if you want I can mail it to you (supposing you give me your mail).
Otherwise, boost/STLport were the first things I compiled, and it seems it went fine. I don't recall having much difficulty in that.You are more courageaous that I was. :)
It took me quite a while to get myself over bjam.
But that's true I did not need it (since not attempting to build)
Kurosu
7th May 2004, 19:58
Originally posted by Bidoche
Registering is free... It should not be a problem.
Registering to a commercial entity which use of my email address is unknown is a problem for me. Not that I'm paranoïd, but I think CNIL is a good idea. :)
Anyway if you want I can mail it to you (supposing you give me your mail).Yes, please. Check PM (being paranoïd by not giving my email on public forums? erm... :D)
You are more courageaous that I was. :)
It took me quite a while to get myself over bjam.
Now, I'm not: jam is now available as a binary on the project's sourceforge download page. :)
Anyway, linux and shell scripting of some autobuild systems got me used to doing such stuff. But maybe I haven't done all that was needed (though I don't regret the Python stuff). boost failed on building some targets (I've got 74 libs for 92MB), but I'll wait for problems before bothering with those.
Bidoche
7th May 2004, 20:32
Registering to a commercial entity which use of my email address is unknown is a problem for me.Isn't that what hotmail is made for ? :p
Anyway, I managed to get the Antialiaser compiling (not working as expected yet).
I get nice antialiased text, but the halo is all blocky :/
As soon as I fix that, I will post a build making a msg from the source text
Sigmatador
8th May 2004, 11:32
good to see that unix is considered as well this time.
Avisynth is THE reason why i'm not on linux all the time.
vispgraedde
8th May 2004, 13:40
Is there any real project page for 3.0 anywhere?
Some page that list information about what you want to achieve with 3.0, and what features will be added/removed, etc. together with timeframes for when things are expected to happen.
How many developers are working on 3.0?
Anyone from the 2.5x branch?
Is 3.0 a rewrite from scratch or is it yet another patchwork based on the existing stuff?
Bidoche
8th May 2004, 16:46
Is there any real project page for 3.0 anywhere?I guess that's what Wilbert wanted to setup on avisynth.org, but I haven't produced anything yet.
Let's give it a try :
Avisynth 3.0 :
Motivation :
The old architecture has proven its limits at the 2.5 update when YV12 support had been hacked into it.
The code base, besides being old code from 1998, not using advanced C++, has never be really meant for future extension.
3.0 is rewrite from scratch who aims (among other things) at far better extensibility.
Adding a colorspace, since that was my example, is a simple matter.
And you won't have to update each filter on it for them to report "Unsupported ColorSpace"...
Expected Features:
- Improved memory management, ie not use more memory than necessary and do the best of the available when it's short.
- Multi instance awareness : 3.0 will behave correctly when multiple scripts are loaded at once, they will share memory, and some filters (multiple avisource on same file) may even resolve themselves into a fusioned clip.
- Improved parser : the parser will include the widely requested flow control structs (if then else, for, while).
It will add two new types : frame and function.
If it can be made, it will also include terminal recusivity optimisations to avoid stack overflow on recursive functions.
- It will include GUI hooks so they can retrieve info about filters directly from avisynth and its plugins
- Filters can support a dynamic refactorisation feature who aims at simplify the filter graph (kill dead branchs, limit depth)
- Maybe: exposes itself as COM interfaces and accept COM plugin.
That would solve the plugin recompile issues.
- Maybe: if ppl are willing to work on it, a linux port
Avancement :
3.0 has reached alpha stage, ie it builds and does things, but it's not of interest for users (no parser yet)
Developers, however, can start looking into it. I took a great time making helper classes to simplify filter development.
3.0 Crew :
Me, alone (for now (I hope))
TimeFrame :
If I manage to tame spirit (parser library) the parser may be done in a couple of months.
Will that do ?
3.0 Crew :
Me, alone (for now (I hope))
We have high hopes in human cloning, and will be able soon to chain produces Bidoche clones to work on the code ^^
Well more seriously, if you need any help and think it can be provided,
feel free to ask... :)
esby
vispgraedde
8th May 2004, 17:04
Thanks.
I just needed to know if any of the feature requests I think about maybe already was in the list.
One of those things was to make it easier to have a GUI frontend where you can see realtime results of filters that can be tweaked in realtime with GUI controls.
The GUI things I have seen so far for avisynth have simply been an editor that pulls up video when you save changes which is not what I need.
Another thing that I don't know if anyone is interested in at all (other than myself) is distributed processing and networked frameserving.
I only consider this as a nice feature to have, but it's not important. Maybe just keep in mind when working on 3.0, so that any future development on this path don't become too troublesome a task.
I'm thinking about other ideas as well, but let's leave it at this for now. I'd like to see what other people think about distributed processing and networked frameserving though.
Kurosu
8th May 2004, 17:10
More reports on the build process.
1) It seems the project includes folders Levels, Transform, Resize and Resize\Pattern. But no source files are actually present physically. The CVS is in a strange state, as one has to cvs checkout then cvs update before getting some of the src\ filters. Yet the above mentionned aren't present. Could you fix that, please?
2) CreateMessageClip isn't a member of StaticImage. But I guess you are working on that ;)
Apparently everything went fine once I changed $(VCINSTALDIR)stlport to $(VCINSTALDIR)include\stlport to fix my own error (don't laugh, it took me 20 minutes to figure out). As it hasn't yet reached the linking stage (I don't want to play around with the project file untill you fixed that), I can't comment on this.
TIA,
Kurosu
Bidoche
8th May 2004, 17:12
Features I forgot :
- provides 3 additional color spaces : YV24, a 444 YUV planar colorspace and RGB45 and YV45 which are 15 bits depth versions of RGB24 and YV24 (NB: even though RGB45 is 8 byte aligned, the extra is not alpha, just garbage)
Well more seriously, if you need any help and think it can be provided,
feel free to ask... Well, I could use some feedback about my core classes...
And I need default implementations for the (turn left and right, and flip horizontal) functors in src/core/bufferwindow.
Bidoche
8th May 2004, 17:22
@Kurosu
added and committed files into those folders
2) CreateMessageClip isn't a member of StaticImage. But I guess you are working on thatYes I am on that, I won't commit each time I change it.
I will once, when it works.
About empty folders, do you know how to remove them ?
I got some to get rid of, but WinCVS doesn't give me the option to remove them :/
Mug Funky
8th May 2004, 17:38
wow. 15 bit channels will be very cool indeed.
i'm pretty sure this has been discussed, but why 15 not 16? seems like an awkward number for a computer (i'm so used to seeing powers of 2).
obviously it wont affect dynamics much, considering the fun we all have with just 8 bits :)
Bidoche
8th May 2004, 17:40
@vispgraedde
[b]One of those things was to make it easier to have a GUI frontend where you can see realtime results of filters that can be tweaked in realtime with GUI controls.[b]That kind of things is quite complex as it needs to be done on a per filter basis...
Or at least some kind of introspection, which C++ does not provide.
Another complication is that some params change may modify the actually created clip implementation, so often you can't have params changing methods without an extra level of indirection... :/
Besides why is VirtualDubMod script editor + F5 not good enough ?
vispgraedde
8th May 2004, 18:57
Originally posted by Bidoche
Besides why is VirtualDubMod script editor + F5 not good enough ?
Editing script and press F5 simply takes too long for some stuff.
Like if you have a level filter, you don't want to sit and manually try values and press F5 until you find a good setting.
Realtime results from moving a slider would be much easier to work with.
And I don't see why a filter framework would have difficulties to export variables and their range and type to a GUI control. This is only to allow realtime preview and tweaking.
Anyway, I'm just saying what I'd wish to see in 3.0 to make it more useful for me. I use avisynth sparingly today because of the lack of the things I have mentioned, and thought I'd mention these things since it looks like 3.0 is still young enough that it wouldn't be too hard to at least implement provisions for these things.
Bidoche
8th May 2004, 20:00
I guess I could have a Clip method return an adapted editor, or throw...
But this can wait till the parser is done.
Kurosu
8th May 2004, 22:51
Originally posted by Bidoche
@Kurosu
added and committed files into those folders
Almost there. src\filters\resize\pattern\maker.h makes references to ..\subrange. which I can't find anywhere, even in the Attics of the CVS repository. It is necessary to compile the resize filter, so I can't go any further.
Yes I am on that, I won't commit each time I change it.
I will once, when it works.
No problem. What I meant is that I'll have to comment it to get it to compile.
About empty folders, do you know how to remove them ?
I got some to get rid of, but WinCVS doesn't give me the option to remove them :/ [/B]
I'm not quite familiar with CVS (it works for thousands of developpers but it sometimes is really a braindead system), but I see 2 options:
- I'm almost sure WinCVS has an option to prune empty folders; it might not work, or you may have errors. I've been told to always use cvs update -P to fix that.
- the only other solution is a direct delete in the cvs repository; you'd have to ask sourceforge to do that. I hope they will give you help on what you have to do on your end of CVS. What I know is that once it's done, you'll have to delete the whole parent folder so that the CVS entries get properly rewritten (as the empty folder may still have entries in your CVS sub-folder). Again use cvs update -P to be sure nothing gets wrong.
-P tells not to create empty folders when updating.
Here is the latest build from Bidoche, including the missing DLL:
http://neuron2.net/misc/avisynth1.zip
Kurosu
9th May 2004, 19:52
Originally posted by Kurosu
Almost there. src\filters\resize\pattern\maker.h makes references to ..\subrange. which I can't find anywhere, even in the Attics of the CVS repository. It is necessary to compile the resize filter, so I can't go any further.OK, this is now fixed.
The big stuff, now: try to use gcc to build that...
Bidoche
9th May 2004, 22:15
You could have removed the resize filter, he is not necessary to compile avs.
Nothing in the filters namespace is so far, since I haven't done the function table.
Edit: good luck with gcc.
vion11
10th May 2004, 22:46
Originally posted by Bidoche
- Maybe: exposes itself as COM interfaces and accept COM plugin.
I like this line...:)
Using CreateObject("") with AviSynth,
switching off autoload features (avsi),
using plugins per instance,
having all functions as a collection or dictionary,
asking functions about proper calls,
loading scripts with string or filename,
having events fired when script is ready to send frames,
and can ask for errors.....
Isn't it a must for seamless integration into GUIs?
(Sorry I'm not capable to write in C, but can
provide a reference design for testing COM-interface)
Upcoming GUIs driven with 5Ghz machines
will enable realtime result of filters,
ok - not with HDTV.
I have little progess with testing zip, msvcR71d.dll
is now missing, but don't want to have Bidoches complete
\system32 folder local.
Are these debug files really needed for testing?
Which ressources are needed to speedup building the parser?
Bidoche
11th May 2004, 09:25
Using CreateObject("") with AviSynth,
switching off autoload features (avsi),
using plugins per instance,
having all functions as a collection or dictionary,
asking functions about proper calls,
loading scripts with string or filename,
having events fired when script is ready to send frames,
and can ask for errors.....Well, apparently, you seem to know more about COM that I do.
Isn't it a must for seamless integration into GUIs?
(Sorry I'm not capable to write in C, but can
provide a reference design for testing COM-interface)If you could make COM interface proposal for what you would want to have available to a GUI, that would probably make the difference between a long lived maybe and a soon.
I have little progess with testing zip, msvcR71d.dll
is now missing, but don't want to have Bidoches complete
\system32 folder local.
Are these debug files really needed for testing?All those debug dlls are getting annoying :/, I will post a release build next time.
Which ressources are needed to speedup building the parser?Better spirit understanding, I would guess.
The thing is quite complex (and powerful).
Take a look at http://www.boost.org/libs/spirit/index.html to give yourself an idea
vion11
11th May 2004, 13:27
COM proposal is in work....
Find out this project matches best to AviSynth: http://www.devel.lyx.org/~leeming/yac/
It uses Spirit to parse input and constructs a virtual machine which outputs the results.
The used grammar lacks things like explicit last and pseudo oop style AviSynth provides.
Both should be adaptable from existing code/grammar.
Assuming there is no need to change current grammar, hmmm, what about macros?,
I detect from scratch 5 dividable subprojects with this workflow:
(read this '-' as this ' ')
script - grammar
---- | - | -----
---- parser ----
------ | -------
----- vm -------
------ | -------
-- execution ---
where 'script' is a growing collection of defined test scripts.
Every release should be capable to run these scripts to avoid
future version dependant issues. This a quite good technic from
extremeprogramming(.org)
'grammar' the language, defining statements, expressions and functions.
I would prefer an ascii file readed by parser at runtime and/or
compilable into code for releases.
Both test scripts and grammar can maintained without knowledge
of c++, which is a plus regarding the current team size :)
When scripts and grammar matches parser says parse = true.
If parser parser accepts at least one script and one grammar,
the next step is to build up the nodes representing filters,
readable by the vm. For error checking it is advantageous
to have an alternative human readable nodelist here (xml?)
The execution part bundles stuff like AviFile handler, COM,
providing frames, error messages, and so on, nothing new here.
All subprojects can be developed and checked independantly.
First things will be writing a grammar, a test suite of scripts,
and thinking about an text format for nodelists.
I know this is a very simple approach to what have to be done.
A lot of topics aren't mentioned and will give headache.
I only want to give ignition to start, AviSynth 3.0
should not die before birth.
vion11
11th May 2004, 13:34
Read some further information about spirit and
I'm prepared to write the grammar.
Anybody out there to put hands on the test suite?
Bidoche
11th May 2004, 19:24
COM proposal is in work....cool :)
Find out this project matches best to AviSynth: http://www.devel.lyx.org/~leeming/yac/
It uses Spirit to parse input and constructs a virtual machine which outputs the results.This is indeed really close to what we need with avisynth, I will look into it
The used grammar lacks things like explicit last and pseudo oop style AviSynth provides.
Both should be adaptable from existing code/grammar.
I don't think these will really be a problem.
An harder part would be to correctly handle avs function overload resolution, which is quite complex with its optional arguments.
But I think it can be done using spirit closures.
Assuming there is no need to change current grammar, hmmm, what about macros?You want macros in avs ?
Let's make it work without first, after we will see.
'grammar' the language, defining statements, expressions and functions.
I would prefer an ascii file readed by parser at runtime and/or
compilable into code for releases.You don't really expect the parser to be built at runtime from a def file... or do you ?
Even spirit dynamic parsers can't do that.
But a reference definition of the grammar, yes.
the next step is to build up the nodes representing filtersBad idea to directly make nodes for the filters.
It ties our hands if we want to change the parser later.
We do a Function class and a Function to Node adapter.
I only want to give ignition to start, AviSynth 3.0
should not die before birth.It won't :)
vion11
11th May 2004, 22:15
An harder part would be to correctly handle avs function overload resolution, which is quite complex with its optional arguments.Overloading yields to different parameter sets and prevents generic function description, which is essential for automatic script generation. I vote completely against overloading and vote for macros and wrapper functions instead.
You don't really expect the parser to be built at runtime from a def file... or do you ? I do or does the parser lacks a parser for EBNF notation?
Bad idea to directly make nodes for the filters.
It ties our hands if we want to change the parser later.
We do a Function class and a Function to Node adapter. Could you explain that, sounds good, want to understand, please.
And what are your next steps? :)
Bidoche
11th May 2004, 23:10
Overloading yields to different parameter sets and prevents generic function description, which is essential for automatic script generation. I don't see why it should be a problem, it's just two differents functions (even though generally related) who happen to have the same name.
I vote completely against overloading and vote for macros and wrapper functions instead. Well, then explain me how to retroactively remove overload support from avisynth ?
This has always been supported...
I do or does the parser lacks a parser for EBNF notation?The point is not whether or not I can parse EBNF notation but if I can build an avs parser from it, who will do the right thing !!!
It may be possible (very hard) to parse EBNF notation and make of parser who will recognize the given grammar... but just recognize the grammar, not produce a filter graph.
Besides, spirit syntax is really close to EBNF, so changes should not be that hard to forward into the code.
And I don't expect the need to changes the grammar very frequent, no ?
Could you explain that, sounds good, want to understand, please.There are dozens of filters in avs.
We do not want to make a node for each one, instead we make a FunctionNode who takes a Function as argument.
Where Function is the class who gets one made for each filter, with arguments description et al.
I already made this one (incomplete) with a Plugin class, see files in src/linker/
And what are your next steps?I have started working on the virtual machine implementation, taking inspiration from YAC.
But with some modifications...
Kurosu
11th May 2004, 23:16
@Bidoche
I've decided to make the first tests under MinGW. I've managed to make and install the various libs needed. stlport worries me though, as I had to use the unix install (make install wouldn't install), and copied as a complement all the needed libs/dlls/headers to accessible pathes.
I've thrown a makefile to build the project (rewritten from scratch, but following the MSVC project file) but ended up with those errors:
g++ -O -g -I/usr/local/include/boost-1_31 -D_STLP_DEBUG -I/usr/local/include/stlport -DAVISYNTH_EXPORTS \
-c -o src/text/antialiaser/bitrenderer.o src/text/antialiaser/bitrenderer.cpp
src/core/Exception.h:52: error: looser throw specifier for `virtual const char* avs::Exception::what() const'
/include/c++/3.3.3/exception:59: error: overriding `virtual const char* std::exception::what() const throw ()'
src/core/Exception.h:35: error: looser throw specifier for `virtual avs::Exception::~Exception()'
/include/c++/3.3.3/exception:56: error: overriding `virtual std::exception::~exception() throw ()'
src/core/Exception.h:35: error: looser throw specifier for `virtual avs::Exception::~Exception()'
/include/c++/3.3.3/exception:56: error: overriding `virtual std::exception::~exception() throw ()'
src/core/Exception.h:35: error: looser throw specifier for `virtual avs::Exception::~Exception()'
/include/c++/3.3.3/exception:56: error: overriding `virtual std::exception::~exception() throw ()'
src/core/Exception.h:52: error: looser throw specifier for `virtual const char* avs::Exception::what() const'
/include/c++/3.3.3/exception:59: error: overriding `virtual const char* std::exception::what() const throw ()'
I've edited pathes to have a better display
From that link (http://www.agapow.net/programming/looser_throw_specifier.html), I decided to add the missing "throw()" needed on each occasion. gcc then stopped complaining. Now I have this error:
g++ -O -g -I/usr/local/include/boost-1_31 -I/usr/local/include/stlport -D_STLP_DEBUG \
-DAVISYNTH_EXPORTS -c -o src/text/antialiaser.o src/text/antialiaser.cpp
In file included from src/core/ownedblock.h:28,
from src/core/bufferwindow.h:30,
from src/text/antialiaser.h:28,
from src/text/antialiaser.cpp:25:
src/core/block/base.h:52: error: declaration of `typedef struct
avs::block::Recycler avs::block::base<Deleter>::Recycler'
src/core/block/base.h:38: error: changes meaning of `Recycler' from `struct
avs::block::Recycler'
In file included from src/core/bufferwindow.h:30,
from src/text/antialiaser.h:28,
from src/text/antialiaser.cpp:25:
src/core/ownedblock.h: In member function `void avs::OwnedBlock::reset(int,
bool)':
src/core/ownedblock.h:71: error: syntax error before `;' token
make: *** [src/text/antialiaser.o] Error 1
It seems that for whatever reason, gcc simply discards an argument... I don't really understand this. Anyway, this makes me think that we should more and more:
1) split this topic. All my reports may belong to the programmation forum in a way, but there are many subjects treated there (porting, DCOM interface, ...)
2) setup a devel list. I don't think forums are well suited for this.
Not sure if it matters in the actual problem, but I'm very suspicious about the place where the error was raised. It seems gcc still uses its own implementation of the STL :/
Btw, some minor 'esthetical' remarks so far:
1) in the project file, bufferwindows.cpp/.h don't belong to Core, but to Core\BufferWindow
2) not so minor as it spams the stdout of the compiler: many of your headers and some source files where a comment (behind a '}' or a #endif) ends the file make gcc complain about a missing newline. Indeed.
Missing errors, output edited
I temporally fixed this by:
1) Changing object's name "Recycler" to "Recycle"
2) Casting GetEnvironment as (const avs::PEnvironment&)
vion11
12th May 2004, 00:16
two differents functions (even though generally related) who happen to have the same nameThis forces GUI developer to present the user two different
functions say Foo1 and Foo2, but the point is, this abstraction
cannot be made with code, pure hand written files are needed to
describe the functions for the generator.
Don't misunderstand me, I do not want to drop the power
of functions of Avisynth. But it is very hard and sometimes impossible
to find out which parameter is optional or not
when nobody knows want is ment: Foo1 or Foo2.
When there is a solution with overloaded functions - no problem.
And I don't expect the need to changes the grammar very frequent, no ?My intention is to split the process into different parts.
Describing and testing grammar is faster whithout compiling it.
I've just seen the developer of spirit have stopped their
dynamic library which was capable of reading grammar on the fly,
so this is not an option anymore with spirit.
We do not want to make a node for each one, instead we make a FunctionNode who takes a Function as argument. Will this enable the optimizing you'll plan
with recursive functions calls or am I totally wrong?
Bidoche
12th May 2004, 19:12
this abstraction cannot be made with code,
pure hand written files are needed to describe the functions for the generator.And why can't it be described by code !?
I see no opposition at having two of my Functions objects reporting the same name.
But it is very hard and sometimes impossible
to find out which parameter is optional or notThat info will be made available by the Function class
Will this enable the optimizing you'll plan
with recursive functions calls or am I totally wrong?No connection at all.
It's just that I already have to make a Function object per filter (for description to GUIs and parser), I don't want to make a Node type too.
The terminal recursivity optimisation avoids to setup a new context for each recursive call, thus avoiding stack overflow.
example: function f(int a, int b, int c)
{
//do something with a, b, c, eventually return
return f(a + 1, b - 1, c / 2);
}f ends with a single call to itself, it is terminal recursive.
Instead of setuping up a new context for this new call, we can reuse current one (which is now longer relevant at that point) by simply updating the values of a, b, c.
And restart execution at the //do something with a, b, c point...
That is what terminal recursivity optimisation do.
At this point I have absolutely no clue of if and how it can be done.
vion11
12th May 2004, 23:53
AssumeFPS(clip, float fps, bool "sync_audio")
AssumeFPS(clip, int numerator [, int denominator], bool "sync_audio")
As a programmer I understand the meaning of the two lines above.
A GUI is useful for non programmer. For using this function
I have to give user a max of 3 input fields. (clip parameter are filled other way)
User is lazy or experimental or both and GUI passes this line to avisynth:
BlankClip(100,320, 320, fps=20).AssumeFps(10.0,0)
later on GUI passes this line:
BlankClip(100,320, 320, fps=20).AssumeFps(10,0)
How can GUI explain the user difference between ten and ten?
mmm I don't think your example is a good one.
here no matter the form used, the information & parameters are the same (in meaning, for the user).
So the GUI has only to care for one form, and maybe two representation, and allow transcoding between both if needed.
The GUI here don't have to explain the difference,
because it's a GUI, and since 10.0 can be translated into 10
without worry here.
And you are not forced to tell to the user that the parameter are identic.
Even if you suppose him dumb, you can adopt some trick like color coding the text field, to report if it is optionnal or not, and allow him to differenciate.
In your example:
AssumeFps(10.0,0)
<==>
framerate:10.0 , audio: NS.
and
AssumeFps(10,0)
<==>
framerate(calc.):10.00 numerator:10 denominator(optional/default):1 audio: NS.
supposing the color choice here represents:
-what can be changed normally by the user (eg blue)
-what can't be changed but is calculated from other settings (eg:red)
-and what is optional, meaning it will take this value if the user does not change it(eg: green)
Of course, since you are in a gui, you can introduce another level of indirection, and do what you want. Like adding comments that will not be interpreted by the avs interpreter, but might be used by other program reading the avi file in text mode... like nesting xml coding after comments #
It's a gui problem, not an avs one.
esby
PS: something disturb me more in your example:
if false is translated as 0 by the interpreter, that go against the logic,
it should be false / true or "false","true" if you are logic.
Or you won't be able to differenciate function(bool) from function(int).
and if you keep going in this way, of course how the interpreter
will make the difference between function(float) and function(int)
if you allow seamless casting before interpretation.
Meaning function(float) could be read as function(int(float))... or vice versa...
Bidoche
13th May 2004, 14:03
AssumeFPS(clip, float fps, bool "sync_audio")
AssumeFPS(clip, int numerator [, int denominator], bool "sync_audio")Here clip.AssumeFps(10, false) is a call ... to the 1st version, with imlicit int to float conversion.
In fact, it's not possible to have an ambiguous call with these two...
Edit: you are mixing two optional syntax, maybe you missed the fact that sync_audio is optional too there.
And that once you start skipping optional params, if you want to provide more, you must specify them by name.
vion11
13th May 2004, 20:54
Sorry, nobody has answered my question.
And there is a slight impression,
examples haven't been tried out.
There is no need to explain what syntax and optional parameters are.
We are all programmer, I'm sure.
But to stay constructive I'll provide an overview:
I want to build a version independant GUI. So I can tell users:
"Gui works with every version of AviSynthing starting with 3.0"
On the other hand AviSynth is work in progress, what is good.
So what can be done?
I see 3 solutions so far:
First: Hardcode it!
To code 200+ functions is a lot of work,
and on top every GUI version belongs only to one
version of AviSynth.
Not a prefered one....
Second: Drop ambigous!
Here all function headers are written in a text file
like the 2 lines of AssumeFps() above, dubious are dropped.
Parameter layout is determined on the fly while starting.
If header change or new function/filter arises only update
of text files is needed. And may maintained by users if capable.
That's current solution of AVEditor with Avisynth 2.5.
Third: Be dynamic!
Thats best! Bidoche has already worked in this direction with
Function Objects and proposing COM-Interfaces.
Nothing is hardcoded or saved in outdated files.
It is like talking...
GUI: Hello, User wants to have colorbars. What parameters
are needed?
AVS: Hi, first of all - colorbars exists as function.
There are two parameters, first is called width and second height.
Both are not optional, cannot be named, expect integer only, have
no defaults and good value are between zero and 12000 with including.
GUI: Thanks a lot!
Thats nice and exact communication.
Now same with AssumeFps()...
GUI: User wants to slow down movie. Does AssumeFps exists?
AVS: Yes exists.
GUI: OK - gimme parameter layout.
AVS: I have two representation of AssumeFps, which one do you want?
GUI: Hmm, don't know. Which is best?
AVS: It depends on what you want to do. Ask user please.
GUI: What should I ask?
AVS: Ask for NTSC or PAL.
GUI: User never heard about PAL or NTSC. But wants to make DVD.
AVS: Ok I see, I have no heuristic method for determing that.
I'll give you most flexible representation and we'll see.
GUI: Ok lets try.
AVS: four parameter, optional, default.........
GUI: thanks.
...
GUI: User seems to have problems, enters 29.97 in input box, Thats
not allowed. Gimme other representation, please.
AVS: Which one do you have?
GUI: Hmmm, don't know, is called AssumeFps.
AVS: I have two representation of AssumeFps, which one do you want?
...
Comunication stopped by user and has never been started again, programm was deleted.
What this dialog shows, there IS an ambiguous case when
you have to predict what representation is wanted.
It may be a solution when internal the representation are numbered or indexed
and we have AssumeFps(1,,,) and AssumeFps(2,,). But thats just the same
as having AssumeFps1(,,,) and AssumeFps2(,,).
Which are different functions with different names.
So how will Avisynth 3.0 support GUIs?
Bidoche
13th May 2004, 22:39
What this dialog shows, there IS an ambiguous case when
you have to predict what representation is wanted.
Why predict ?
You could take both and offer the choice, eventually using a contextual help message provided by the Function objects themselves...
or :
GUI: User seems to have problems, enters 29.97 in input box, Thats
not allowed. Gimme AssumeFPS(clip, float, ...
AVS: AssumeFPS(clip, float, ... resolved as AssumeFPS(clip, float, "sync_audio") and returned
or again :
GUI: User wants to slow down movie. Does AssumeFps exists?
AVS: I have two representation of AssumeFps, which one do you want?:
GUI: OK - gimme AssumeFPS#1
...
GUI: User seems to have problems, enters 29.97 in input box, Thats
not allowed. Gimme AssumeFPS#2
What this dialog shows, there IS an ambiguous case when
you have to predict what representation is wanted.
I see no ambiguity...
you have to choose one, if the user wants the other one, you'll change it.
as long the parser is able to determinate that there is no ambiguity beginning with, you'll be able to have the gui react the same.
And to sum (from my point of view) what seems to be a problem for you, even if we have overloaded definitions of function, supposed the parameter, the function+(list of parameters) does constitute an unique identifier here supposing that the parser is able to clear all ambiguities first.
And if you are wondering 'how are we going to have this list of parameters', that could be the job of some functions, redefined in each plugin, more precisely something like that:
int GetNumberOfSyntax();
Syntax GetSyntax(int pos);
And you would have a structure parsing the list of loaded plugin,
handling the whole list of plugin, and able to export it to a gui application...
--Maybe as TextStream in the avi? (just a weird idea)--
[edit: definitely not, I forgot we are in a GUI, and that we need to create the avs script first :D ]
esby
vion11
14th May 2004, 12:21
@Bidoche
You're right. If there is a representation number along
to functions, there is no ambiguity. Important is both GUI and
AVS know about that.
To sum up:
When GUI starts up it asks AVS for all available functions
and their amount of representations. GUI presents different
representations as different filter/functions to the user.
When GUI asks AVS for parameter layout it has to tell
function name AND representation number.
And To complete it - a object hierarchie with properties:
Where '()' means there is more than one possible
and items are organized as list, collection, array, dictionary or
what ever and there is a 'core plugin' with all internal filter.
Also assuming all parameters can be named!
There is also ambiguoutiy with same function name from different
plugins, discussed here:
forum.doom9.org/showthread.php?s=&threadid=72235 (http://forum.doom9.org/showthread.php?s=&threadid=72235)
Plugins()
-PluginName
-PluginFileName
-Functions()
--FunctionName
--InputColorSpaces()
--OutputColorSpace
--AmountOfRepresentations
--Representations()
---IndexOf
---Parameters()
----ParameterName
----DataType
----DefaultValue
----IsOptional
----MinValue
----MaxValue
----ParamList()
When this hierarchie is concluded
I can go on with COM Interface-Proposal.
Bidoche
15th May 2004, 10:44
there is a 'core plugin' with all internal filter.Yes, that's effectively the case.
I wonder if I should make an user plugin for script defined functions too...
Also assuming all parameters can be named!Thought of that too, it's to be a requirement.
There is also ambiguoutiy with same function name from different
plugins, discussed here:
forum.doom9.org/showthread.php?s=&threadid=72235Some syntax will have to be set up for forcing plugin host function.
Even more necessary since I intend to allow function overrides...
About your hierarchy :
master class:
ScriptEnvironment (NB: that's not the same as in 2.X)
LoadPlugin
AddPlugin (passed from another ScriptEnvironment)
NB: does not allow two plugins with the same name
methods to list the plugins known
same thing for functions
look up function by name
either it returns a function pool like you seem to prefer,
or a function count and you have to use another method to get them...
Plugin :
Name, FileName, list functions...
Function :
Name, Host Plugin
Prototype (a string like: clip Trim(clip child, int begin, int end = 0)
About your parameters objects, I wonder if there are really necessary...
I am thinking about a method returning an XML description of the function instead.
Guest
15th May 2004, 14:05
Here's the latest build from Bidoche:
http://neuron2.net/misc/avisynth2.zip
Bidoche
19th May 2004, 17:58
Finally I found why extra dll msvc are required :
It's because since I link vs a dynamic boost.Thread I have to link vs a dll c runtime too :/
So we will have to drag them around until issues on boost.Thread are solved and it is available as a static lib again.
By the way, I have upped a new build (with all dlls required) to yahoogroups :
This one introduce variables support, with the 4 operations + - * / (and ( ) )
It outputs the state of the stack after code parsed is executed
(ie the values of variables in declaration order) as a message clip.
Bidoche
24th May 2004, 20:30
Got functions calls working (clip . function too)
That is to say that as far as there are functions to test with, it works :p
Will start making more functions.
Bidoche
2nd June 2004, 21:10
Added variable scoping and an if statement using it.
I need some syntax to declare you DO want a new variable and not reuse the one from the outer scope.
I would like some suggestions.
I thought about this :clip = ....
clip2 = ...
if ( true )
{
clip = ... //reuse clip above
new clip2 = ... //not the same variable
}
vion11
2nd June 2004, 21:53
What advantages are provided with an additional
scope inside IF statements?
Would assume vars are have same guilty
inside and outside of conditional branching.
Using '()' instead of '{}' will make it clearer.
clip = ....
clip2 = ...
if ( true )
{
clip = ... //reuse clip above
new clip2 = ... //not the same variable
}
that sounds like a local variable overiding the 'more global' variable inside of an if statement.
so far... keywords 'local', 'override' 'local_override' ?
Althought I don't really the interrest of the procedure,
because we could just define a new variable name not used...
Is there another interrest I'm not seeing?
but Some questions...
clip = ...
if (true)
{
local clip2 = clip # (1)
local clip = clip # (2)
}
return clip2 #(1)
return clip #(2)
in (1), if I'm not wrong, this should not be allowed, since clip2 is only defined inside of the if.
in (2), could/would it be possible to initialize the local clip with the clip, content, and to have clip unchanged after the if, no matter what we did inside of it.
esby
PS: my preference would go for 'local' keyword, override & new having programming different usage in programming language... (override being used in oop & new suggesting pointer / memory allocation...)
The keyword 'var' could be used too... with the same problem as 'new' & 'override'...
Bidoche
3rd June 2004, 08:29
What advantages are provided with an additional
scope inside IF statements?It avoids leaving useless variables on the stack, var created in the if context are cleaned when exiting.
Besides, if var were left on the stack, compiling would be simply impossible.if ( expression )
{
clip = ... //create a new var on the stack
}The 2 paths doesn't leave the stack in the same state, how can it continue after that. :'(
Using '()' instead of '{}' will make it clearer.Every language that I know about has chosen { } too.
And ( ) already have many uses, it would compexifiy parsing a lot.
that sounds like a local variable overiding the 'more global' variable inside of an if statement.
so far... keywords 'local', 'override' 'local_override' ?
Althought I don't really the interrest of the procedure,
because we could just define a new variable name not used...
Is there another interest I'm not seeing?Yes, we could do that, but keep creating new names is boresome and you could be trapped by a var defined in an Import...
The feature is here for completeness, I don't think it would be widely used.
But as long as you have scopes, I would expect to have local vars too.
in (1), if I'm not wrong, this should not be allowed, since clip2 is only defined inside of the if.Here parser complains that he doesn't know about clip2 (That is when error handling is implemented)
in (2), could/would it be possible to initialize the local clip with the clip, content, and to have clip unchanged after the if, no matter what we did inside of it.That's exactly how it happens
my preference would go for 'local' keyword, override & new having programming different usage in programming language... Was not too happy with new myself, for the same reason.
So 'local' it is :)
vion11
3rd June 2004, 14:16
It avoids leaving useless variables on the stack, var created in the if context are cleaned when exiting. Vars are cleaned when leaving function scope or script. No problems with compilation.
Every language that I know about has chosen { } too.
And ( ) already have many uses, it would compexifiy parsing a lot.
LISP the "mother" of avisynth scripting language doesn't follow that rule.
'IF' is a function with two parameters: a condition and a expression list.
Why should second parameter have different type of parantheses?
Is it the parser or the user who has to deal with complexity of language?
What about:
c=foo()
if (c=true)(a="OK")
if (c=false)(a="Not OK")
print a
Bidoche
3rd June 2004, 15:29
Vars are cleaned when leaving function scope or script. No problems with compilation.3.0 has stack based vars and not mapped through their names like 2.X.
So if you don't clean at scope exit, the exit state of the stack may be different according to the execution path it will take at runtime.
Which is totally fatal to the parser, it needs to know perfectly the stack's state to be able to able to map vars to their position in the stack.
LISP the "mother" of avisynth scripting language doesn't follow that rule.Really ? I didn't knew that...
'IF' is a function with two parameters: a condition and a expression list.
Why should second parameter have different type of parantheses?Because I don't remember promising to Lisp syntax.
I don't even know lisp syntax.
Is it the parser or the user who has to deal with complexity of language?It is the parser, but as the one writing the parser, I will choose to do as I please.
Besides, do you really think the basic user will be surpised about the { } ?
I think many would write it that way when learning avs has now if statement...
After that, maybe I could later support the ( ) syntax too.
But it can wait.
if (c=true)(a="OK")Affects true to c and "OK" to a.
And don't tell I can contextually deduce that c=true is a test, it's really really hard to do so.
And maybe you DO wanted to affect the value of the test to c...
vion11
3rd June 2004, 17:37
c=foo()
if (c=true)(a="OK")
if (c=false)(a="Not OK")
print a Wouldn't execution fail at 'print a'?
Knowing of LISP is the reason why I "fall in love"
with avisynth. There is no difference between data and code.
You could write a LISP interpreter with a few lines in LISP.
I would say it is most simple and powerful language at all.
Meaning simplicity is power!
There is a strange trend to make languages more idiomatic.
Do you understand PERL? Perhaps it is a question of taste, but I want
to know if Avisynth 3 would execute my existing scripts.
If not - what advantages could I expect over 2.5 in terms of language
not video performance?
I predict you'll run into a inconsistency with this 'IF' scope
when implementing 'eval' or 'apply', but can't prove it from scratch.
Will Avisynth 3.0 support the lambda calculus with these functions?
It seems to me you are going the hard way. There is only a need
for a few functions and macro capability. The rest can be solved
with writing macros. Keeps consistency and doesn't inflate or overcomplex parser code.
This already happens in avisynth. As far as i know 'weave' envokes
other filter only. So it is kind of macro, easy isn't it?
Or more practical: Assuming 'LOOP' is on your list. What is easier to do?
- Writing it into the parser
- Using 'IF' and 'APPLY' and write a macro.
But it is your choice to split work at more shoulders.....
Bidoche
3rd June 2004, 19:13
Wouldn't execution fail at 'print a'?Supposing your parenthesis are supported, yes.
There is a strange trend to make languages more idiomatic.
Do you understand PERL? Perhaps it is a question of taste, but I want
to know if Avisynth 3 would execute my existing scripts.I don't know PERL either :p
I expect there will be some inconsistencies with existing script, as it is more strongly typed than 2.X was.
That is to say that the following code will fail : val = true
val = 1But generally you don't go around changing the types of your variables, you just use a new one, so it should not break to much code.
I am more afraid of difficulties with Eval/Apply.
As you say, it will probably impossible to reproduce them exactly the same, but will need some change to reproduce the functionalities.
Will Avisynth 3.0 support the lambda calculus with these functions?I would not have expected hearing about that one here.
It seems to me you are going the hard way. There is only a need
for a few functions and macro capability. The rest can be solved
with writing macros..Maybe...
Keeps consistency and doesn't inflate or overcomplex parser codeThe parser is not that complex yet :p
This already happens in avisynth. As far as i know 'weave' envokes
other filter only. So it is kind of macro, easy isn't it?I am inclined to think that every function that could be made as an auto include script should be as such (unless performance issues).
That must be the case of Weave, but DuplicateFrame, DeleteFrame... too
Or more practical: Assuming 'LOOP' is on your list. What is easier to do?
- Writing it into the parser
- Using 'IF' and 'APPLY' and write a macro.clip function Loop(clip child, int n)
{
if ( n < 1 )
error( "n must be striclty positive" )
clip result = child
while ( n-- > 1 )
result += child
return result
}
NB: please submit (non trivial) current code so I can look if I can make it work
vion11
3rd June 2004, 20:41
Wouldn't execution fail at 'print a'?Supposing your parenthesis are supported, yes. Yes, but what is wrong? Isn't it legal code?
That is to say that the following code will fail
val = true
val = 1 No problem as long as any datatype can be converted to any other datatype.
I would not have expected hearing about that one here. Feeling like Alice in wonderland ...? :)
The parser is not that complex yet When you start fearing complexity - when to many '()' arise? :p
Your loop function is not so bad, will it work like this:
function StackMore(clip c, int toStack)
(Do
Stack = StackVertical( Stack, c)
toStack = toStack - 1
Loop until tostack < 1
return Stack)
BTW: Does Stack have to be declared outside function to get returned
without parser error? Do you really miss the strange paranthesis?
New versions I usually test with good old TicTacToe.avs (http://www.avisynth.org/vion11/stuff/ttt.avs)
If 3.0 displays frames within one minute and
uses less then 200MB memory to play, chouette!
There is another one to post, I'll free it from sources soon.
Bidoche
3rd June 2004, 21:41
Yes, but what is wrong? Isn't it legal code?Weren't you the one pointing out that there is no print ?
No problem as long as any datatype can be converted to any other datatype.Not all conversions are possible.
How do you convert int to clip ?
When you start fearing complexity - when to many '()' arise? It's not that I can't do it, I was just defending my { }...
function StackMore(clip c, int toStack)
(Do
Stack = StackVertical( Stack, c)
toStack = toStack - 1
Loop until tostack < 1
return Stack)You mean :clip function StackMore(clip child, int n)
{
stack = child
while ( --n > 1 )
stack = StackVertical(stack, child)
}A reverse syntax is possible too. (ie do while like you)
But your code sample use Stack before it is even defined, so can't work as is.
BTW: Does Stack have to be declared outside function to get returned without parser error?Of course not.
Do you really miss the strange paranthesis?you mean the { } ?
I do like them better than plain parenthesis, the code is easier to distinguish.
New versions I usually test with good old TicTacToe.avs
If 3.0 displays frames within one minute and
uses less then 200MB memory to play, chouette!You are the author of that thing ?
vion11
3rd June 2004, 23:05
c=foo()
if (c=true)(a="OK")
if (c=false)(a="Not OK")
SubTitle anyclip, aNow it is right, but what is wrong?
Not all conversions are possible.
How do you convert int to clip ?Was meaning datatypes, which evaluate to themself, obviously.
But your code sample use Stack before it is even defined, so can't work as is. Oh - vars have to be declared, thats new and reason why code above will not run, right?
I do like them better than plain parenthesis, the code is easier to distinguish.It depends, when you come from c - may be, if you have experience
in basic or lisp you'll get typist's neuritis, and if you start
learning programming you'll search the right keys for hours.
In fact you'll prefer them as well if you write more complex scripts
and don't have to fiddle out whats good at the end of a large
expression ')))}))}' or '))})))}'
You are the author of that thing ?Remember this (http://forum.doom9.org/showthread.php?s=&threadid=59197&highlight=tictactoe) and you'll see I'm waiting for answers since months.:p
Bidoche
4th June 2004, 08:15
Now it is right, but what is wrong?It will expect parenthesis around the args of Subtitle.
Oh - vars have to be declared, thats new and reason why code above will not run, right?Nothing to do with that.
Your Stack var is circularly dependent upon itself.
It depends, when you come from c - may be, if you have experience
in basic or lisp you'll get typist's neuritis, and if you start
learning programming you'll search the right keys for hours.
In fact you'll prefer them as well if you write more complex scripts
and don't have to fiddle out whats good at the end of a large
expression ')))}))}' or '))})))}'I would never close so much context at once.
Spaces and NewLines are cheap ;p
Remember this and you'll see I'm waiting for answers since months.I remember about this post, but I forgot you were its author.
Anyway the script should work in 3.0 too (when features get implemented) with some modifications though :
I need Functions to declare their return type, eventually I may be able to deduce it from the code (and make declaration optional), but that won't be an immediate objective.
And there is the case of recursive calls. :/
As for performance issues, I think it should be faster than 2.X.
As using a stack avoids to copy the args into an AVSValue array when passing to function, and we are talking for this script of hundreds of calls.
And for memory, I doubt it can do worse.
vion11
4th June 2004, 15:14
It will expect parenthesis around the args of Subtitle.
You're right and I think you got the point though.
Nothing to do with that.
Your Stack var is circularly dependent upon itself. Got it too, and I like your while statement in the example. It is short and easy to read for humans.
I would never close so much context at once.
Spaces and NewLines are cheap ;pYes, but monitors are expensive so I use indention instead of newline to announce contexts.
Anyway the script should work in 3.0 too (when features get implemented) with some modifications though :
I need Functions to declare their return type, eventually I may be able to deduce it from the code (and make declaration optional), but that won't be an immediate objective.
Good news! No problem with return types for functions and
it would be a pleasure when the current ? : syntax is replaced with
'IF...' - with plain parantheses of course :)
And there is the case of recursive calls. :/ What should I think about this remark..?
Bidoche
4th June 2004, 15:55
And there is the case of recursive calls. :/What should I think about this remark..?The parser statically type analyse everything, so it can bind the proper calls while parsing.
If it defered this analysis at run time, it would fail to detect some illegal constructs (maybe affordable), but it would be damn slower. :/ (not funny at all)
In the case of your script, one would not want to do 500 times the very same overload resolution, including argument reordering and/or defaults generation....
To be able to do that, the parser need to know the return type of every function.
But if I try to deduce return type of a function from its code, and it's recursive.
The recursive call is necessarily before any return statement and at that point I won't know its type... :p
So recursive functions would need return type declaration.
vion11
4th June 2004, 17:15
So recursive functions would need return type declaration If that means a factor 10 speed improvement,
I can't await first version with functions enabled. :)
Bidoche
9th June 2004, 19:13
If that means a factor 10 speed improvement, I wouldn't arrogantly claim such an improvement (but in the other hand, it wouldn't surprise me either :p )
I got basic function support now (ie no default args, no recursivity yet)
I almost have added operator[] too (extract a substring on string, does Trim on clip)
bond
11th June 2004, 09:41
Originally posted by Bidoche
1. There are no limitation to avisynth being ported on linux.
In the 3.0 core there is only one 2 line Windows dependancy in a small .cpp, nothing an #ifdef couldn't handle.hm, so if avisynth 3.0 is not relying anymore on vfw, will it also be able to handle variable framerate content?
Sigmatador
18th June 2004, 00:47
avi is cfr, so an "avi synth" is ^^
mkaluza
14th October 2004, 08:22
Hi. I wanted to ask if I could join the avisynth team. Can you tell me who should I talk to and where to find them? (I've seen a name of IRC channel once but now I can't find it)
I miss avisynth very much since I moved to linux and therefore I'd like to help porting it.
thanks for any hints
Kurosu
14th October 2004, 09:00
Originally posted by bond
hm, so if avisynth 3.0 is not relying anymore on vfw, will it also be able to handle variable framerate content?
There have talks on how it could be handled. The best that could be done was to add a duration to a frame. The resulting script would probably be unseekable though (and building an index prior to exporting through some interface like DirectShow). And it would also require that, for instance, a DirectShow interface is added to AviSynth.
All in all, maybe later.
Kurosu
14th October 2004, 09:07
Originally posted by mkaluza
Hi. I wanted to ask if I could join the avisynth team. Can you tell me who should I talk to and where to find them? (I've seen a name of IRC channel once but now I can't find it)
I'm not speaking for the "avisynth team", but anyone is welcome to contribute. You can meet the developpers on channel #avisynth on IRC network irc.freenode.net (check their webpage if you'd like to find a server close to you). ]Hop[ (aka Bidoche) is the core developper. There are 2 people working on the linux side of things, focusing on build process, freetype support and ffmpeg output/input support.
Some info in the 3.0 branch:
- requires g++ 3.x (tested with 3.3 branch); 2.95.x is known to fail
- use boost and stl libraries (have to be compiled by hand)
- is a lot more C++ than 2.5 branch
There's also a mailing list accessible as a newsgroup through gmame, but nothing new has made it to that list.
Wilbert
14th October 2004, 21:09
@mkaluza,
Just search for 'bidoche' on this forum, and send him a pm. I'm sure you can join!
Bidoche
24th October 2004, 14:30
Of course you can.
At a time, I was almost beggin for help, it's not to refuse it now.
d'Oursse
19th May 2005, 22:07
some news
* news will be posted here (http://avisynth3.unite-video.com/) (thanks to Unite Vidéo (http://unite-video.com/phpbb/portal.php) for hosting it)
* Avisynth 3.0 site (http://www.avisynth.org/AviSynth30) on avisynth.org with a small FAQ
* Installation in french here (http://unite-video.com/phpbb/viewtopic.php?t=6876)
* gstreamer plugin in progress
morsa
23rd May 2005, 06:49
So this means that finally higher than 8 bit per color channel will be possible?
Bidoche
27th May 2005, 22:44
Originally posted by morsa
So this means that finally higher than 8 bit per color channel will be possible? Yes, currently I made 2 such colorspaces builtin, but with plugins able to add colorspaces, I will probably let it for them.
sl1pkn07
1st June 2005, 18:53
[sl1pkn07@Spinflo linux]$ ./configure --with-stl-path=/usr --with-boost-path=/usr --with-ffmpeg-path=/usr --with-freetype-config=/usr/bin/freetype-config
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to use default CXXFLAGS... yes
checking for style of include used by make... GNU
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking whether g++ supports -fvisibility=hidden... checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for whether to use assembly code... yes
checking for architecture type... ia32
checking for build extensions... .so .a .o
checking for platform specific LDFLAGS/CFLAGS... ok
checking for nasm... yes
checking for nasm patch version... 38
checking for nasm object format... elf
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for clock_gettime in -lrt... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
checking for dlclose in -ldl... yes
checking for dlsym in -ldl... yes
checking stl_user_config.h usability... yes
checking stl_user_config.h presence... no
configure: WARNING: stl_user_config.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: stl_user_config.h: proceeding with the compiler's result
checking for stl_user_config.h... yes
checking for main in -lstlport_gcc... yes
checking boost/config.hpp usability... yes
checking boost/config.hpp presence... yes
checking for boost/config.hpp... yes
checking for main in -lboost_thread-gcc-mt-s-1_32... yes
checking ffmpeg/avcodec.h usability... yes
checking ffmpeg/avcodec.h presence... yes
checking for ffmpeg/avcodec.h... yes
checking for main in -lavcodec... yes
[b]checking for main in -lavformat... no[b]
configure: error: FFMPEG library not in /usr/lib
[sl1pkn07@Spinflo linux]$ locate stl_user_config.h
/usr/include/stlport/stl_user_config.h
[sl1pkn07@Spinflo linux]$ rpm -q -l ffmpeg
/usr/bin/ffmpeg
/usr/bin/ffplay
/usr/bin/ffserver
/usr/lib/libavcodec-0.4.9-pre1.so
/usr/lib/libavcodec.so
/usr/lib/libavformat-0.4.9-pre1.so
/usr/lib/libavformat.so
/usr/lib/vhook
/usr/lib/vhook/drawtext.so
/usr/lib/vhook/fish.so
/usr/lib/vhook/imlib2.so
/usr/lib/vhook/null.so
/usr/lib/vhook/ppm.so
/usr/share/doc/ffmpeg-0.4.9
/usr/share/doc/ffmpeg-0.4.9/COPYING
/usr/share/doc/ffmpeg-0.4.9/CREDITS
/usr/share/doc/ffmpeg-0.4.9/Changelog
/usr/share/doc/ffmpeg-0.4.9/README
/usr/share/man/man1/ffmpeg.1.gz
/usr/share/man/man1/ffplay.1.gz
/usr/share/man/man1/ffserver.1.gz
[sl1pkn07@Spinflo linux]$
please help
d'Oursse
1st June 2005, 19:08
The warning of STLPort is not important. autoconf is a piece of crap
for ffmpeg, well, look in /usr/lib if you have the file libavformat.a
if not, then ffmpeg is not installed properly.
sl1pkn07
1st June 2005, 20:22
[sl1pkn07@Spinflo ~]$ rpm -q -l ffmpeg-devel
/usr/include/ffmpeg
/usr/include/ffmpeg/avcodec.h
/usr/include/ffmpeg/avformat.h
/usr/include/ffmpeg/avio.h
/usr/include/ffmpeg/common.h
/usr/include/ffmpeg/rational.h
/usr/include/ffmpeg/rtp.h
/usr/include/ffmpeg/rtsp.h
/usr/include/ffmpeg/rtspcodes.h
/usr/lib/libavcodec.a
/usr/lib/libavformat.a
/usr/share/doc/ffmpeg-devel-0.4.9
/usr/share/doc/ffmpeg-devel-0.4.9/TODO
/usr/share/doc/ffmpeg-devel-0.4.9/faq.html
/usr/share/doc/ffmpeg-devel-0.4.9/faq.texi
/usr/share/doc/ffmpeg-devel-0.4.9/ffmpeg-doc.html
/usr/share/doc/ffmpeg-devel-0.4.9/ffmpeg-doc.texi
/usr/share/doc/ffmpeg-devel-0.4.9/ffmpeg.1
/usr/share/doc/ffmpeg-devel-0.4.9/ffmpeg_powerpc_performance_evaluation_howto.txt
/usr/share/doc/ffmpeg-devel-0.4.9/ffplay-doc.html
/usr/share/doc/ffmpeg-devel-0.4.9/ffplay-doc.texi
/usr/share/doc/ffmpeg-devel-0.4.9/ffplay.1
/usr/share/doc/ffmpeg-devel-0.4.9/ffserver-doc.html
/usr/share/doc/ffmpeg-devel-0.4.9/ffserver-doc.texi
/usr/share/doc/ffmpeg-devel-0.4.9/ffserver.1
/usr/share/doc/ffmpeg-devel-0.4.9/ffserver.conf
/usr/share/doc/ffmpeg-devel-0.4.9/hooks.html
/usr/share/doc/ffmpeg-devel-0.4.9/hooks.texi
/usr/share/doc/ffmpeg-devel-0.4.9/optimization.txt
/usr/share/doc/ffmpeg-devel-0.4.9/texi2pod.pl
[sl1pkn07@Spinflo ~]$
--------
d'Oursse
1st June 2005, 21:43
what should I answer to this ?
sl1pkn07
2nd June 2005, 00:26
(sorry my bad english)
i need help to compile Avisynth3.0 in linux
that problem I have so that me of that error, if I have all the necessary one?
d'Oursse
2nd June 2005, 06:51
well, it should be good. Rerun configure
Mug Funky
2nd June 2005, 09:25
Yes, currently I made 2 such colorspaces builtin, but with plugins able to add colorspaces, I will probably let it for them.
i'll write you into my will if you at least add support for 10-bit 4:2:2. i can give you samples if you want... so far SDI/decklink stuff has been mac only, but it'd be good to be able to do IVTC->25fps conversions from NTSC film masters.
then all we'd need is a huge amount of gig on a linux/win box to handle a feature length uncompressed PAL moofie.
Bidoche
5th June 2005, 14:07
And if I only make it possible for plugins to do so, do I get into your will as well ?
sl1pkn07
5th June 2005, 14:37
I surrender, does not compile. to see if it works with the new versions
d'Oursse
5th June 2005, 15:03
I surrender, does not compile. to see if it works with the new versions
same error on libavformat ? (please, don't paste all the configure output)
sl1pkn07
5th June 2005, 15:13
yes. libaformat is installed, but it Configure does not recognize it
(sorry my bad English)
d'Oursse
5th June 2005, 18:09
update your autoconf and automake
verify that libavformat.a exists in /usr/lib (not with rpm but with ls)
it works for me. But i've installed ffmpeg from the source package.
you have installed ffmpeg from rpm, so i can't help you much.
patxitron
6th June 2005, 20:36
Hello
First sorry about my crapy English.
I'm trying to compile avisynth (one hour ago updated CVS) into my new gentoo 2005.0.
In my system, ffmpeg-0.4.9_p20050226-r5, gstreamer-0.8.10, freetype-2.1.9 and nasm-0.98.39-r1 are already installed.
I installed STLport-4.6.2-r2 and boost-1.32.0-r4 using portage (the native gentoo package manager).
My first trouble was when I tryed to run the configure script (the avisynth one) those are the resulting last lines:
checking for dlsym in -ldl... yes
checking stl_user_config.h usability... yes
checking stl_user_config.h presence... no
configure: WARNING: stl_user_config.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: stl_user_config.h: proceeding with the compiler's result
checking for stl_user_config.h... yes
checking for main in -lstlport_gcc... yes
checking boost/config.hpp usability... yes
checking boost/config.hpp presence... yes
checking for boost/config.hpp... yes
checking for main in -lboost_thread-gcc-mt-s-1_32... no
configure: WARNING: Boost library not in /usr/lib
configure: error: "Boost is needed !"
A simple "ls /usr/lib/libboost*" and I saw that this library is named "libboost_thread-mt.so.1.32.0" in my gentoo. I made a symbolic link to "libboost_thread-gcc-mt-s-1_32.so" and then I re-ran configure without trouble.
Next I typed "make" and this is the result:
patxi@zeus linux $ make
D: bin
C: core/blitter/blitter.cpp
C: core/blitter/memcopy.cpp
C: core/block/block.cpp
C: core/block/recycler.cpp
C: core/bufferwindow/blender.cpp
C: core/bufferwindow/copier.cpp
C: core/bufferwindow/leftturner.cpp
../../src/core/bufferwindow/leftturner.cpp: In member function `avs::BufferWindow avs::bw::LeftTurner<1>::operator()(const avs::BufferWindow&) const':
../../src/core/bufferwindow/leftturner.cpp:34: error: `template' (as a disambiguator) is only allowed within templates
make: *** [core/bufferwindow/leftturner.o] Error 1
I know that I don't followed strictly the instructions but it seems to me that this is not the problem. Maybe it is the gcc version (3.4.3)?
It's so nice that avisynth finally will run on linux! Thanks to all!
d'Oursse
6th June 2005, 20:39
i bet that you use gcc 3.4.*
patxitron
6th June 2005, 20:55
Yes, I'm using gcc-3.4.3
d'Oursse
6th June 2005, 22:12
gcc 3.4.* have problems with its parser, in particular for some special template use. And you know what ? :D
So, use instead gcc 3.3.* or gcc 4.0. I used once gcc 4.0 some months and avs 3 compiled fine with it. But i don't know for recent versions.
edit: and about the problems of boost, i would like to say something: using the packages could lead to such problems, as the package maintainer install the software where *he* wants to, and not where it should be, with the names *he* wants.
Avs3 compiles fine with gcc 3.3, and all the library installed as it's mentioned in the documentation.
If you have problems with the compilation, then it's mostly the package fault. And in that case, I can't help much, as each case could be different
patxitron
6th June 2005, 22:28
Well, I made some googling and I patched some files in order to get compiled by gcc-3.4 (and updated boost's circular-buffer to latest CVS version), now compile fails at functions/audio.cpp:
C: functions/audio.cpp
In file included from ../../src/functions/../parser/adaptor/caller.h:29,
from ../../src/functions/../parser/adapt.h:29,
from ../../src/functions/audio.cpp:26:
../../src/functions/../parser/adaptor/extractor.h: In member function `avs::PColorSpace avs::parser::adaptor::extractor<const avs::PColorSpace&>::operator()(avs::parser::VMState&, int) const':
../../src/functions/../parser/adaptor/extractor.h:129: error: `FromString' is not a member of `avs::ColorSpace'
../../src/functions/../parser/adapt.h:50: confused by earlier errors, bailing out
make: *** [functions/audio.o] Error 1
I made a seach over the whole source tree and 'ColorSpace::FromString' is called in 'filters/source/video/icmframedecompressor.cpp', 'filters/source/ffmpegsource.cpp' and 'parser/adaptor/extractor.h' but not defined anywhere. It is mentioned in a coment in core/colorspace/concrete/map.h:
// map used by the ColorSpace::FromString method to get ColorSpaces from names
best regards
d'Oursse
6th June 2005, 23:17
Well, I made some googling and I patched some files in order to get compiled by gcc-3.4 (and updated boost's circular-buffer to latest CVS version),
i fear that it will not compile with gcc 3.3 nor with 4.0. We know what to do to make compile it with gcc 3.4, but it's not a standard way. What we use is the standard way.
Nevertheless, feel free to mp your patch to Bidoche. Or better, go on IRC (#avisynth on freenode). We are often there and it's better to discus patch there rather than here.
now compile fails at functions/audio.cpp:
C: functions/audio.cpp
In file included from ../../src/functions/../parser/adaptor/caller.h:29,
from ../../src/functions/../parser/adapt.h:29,
from ../../src/functions/audio.cpp:26:
../../src/functions/../parser/adaptor/extractor.h: In member function `avs::PColorSpace avs::parser::adaptor::extractor<const avs::PColorSpace&>::operator()(avs::parser::VMState&, int) const':
../../src/functions/../parser/adaptor/extractor.h:129: error: `FromString' is not a member of `avs::ColorSpace'
../../src/functions/../parser/adapt.h:50: confused by earlier errors, bailing out
make: *** [functions/audio.o] Error 1
I made a seach over the whole source tree and 'ColorSpace::FromString' is called in 'filters/source/video/icmframedecompressor.cpp', 'filters/source/ffmpegsource.cpp' and 'parser/adaptor/extractor.h' but not defined anywhere. It is mentioned in a coment in core/colorspace/concrete/map.h:
// map used by the ColorSpace::FromString method to get ColorSpaces from names
best regards
there have been some modifications in the code. I don't recall exactly. It has been a while since i've updated cvs, as i'm mainly focused on the gstreamer source.
Again, feel free to go on IRC. My nick is caro. Bidoche's one is ]Hop[.
Thank you for your help.
d'Oursse
7th June 2005, 00:28
Ho, and i forget to say: cvs is not currently compiling. We know that, but avs 3 is in development ;)
Please don't report problems of compilation here. Not yet.
patxitron
7th June 2005, 13:48
I never tryed IRC before and my English skill is too bad for this sort of medium. Moreover, I'm not a developer yet (I just begun my first course of computer science engineering) I'm just anxious to try avisynth under linux ;). I'm sorry if I asked some questions in inapropiate time and/or place.
Anyway, I hope that I can test an alpha or pre-alpha version soon ;)
Thank you very much
Wilbert
7th June 2005, 13:53
I never tryed IRC before and my English skill is too bad for this sort of medium.
So, now you have an excuse to try irc. It's not that hard :)
Bidoche
7th June 2005, 20:11
Do not worry about your english, IRC is full of guys with bad english.
Anyway, the fix you need is to change 'FromString' to 'FromName' in extractor.h
@d'Oursse
Weren't you supposed to commit that change ?
patxitron
7th June 2005, 20:56
Thanks to all. You are so nice people...
Now the compilation of audio.cpp triggers a gcc bug (or something that looks like a bug) time to upgrade or downgrade my gcc version. But before this I must analyze the implications for my recently builded (from stage 1) gentoo.
Best regards
d'Oursse
22nd July 2005, 09:14
I have finally a gstreamersource on my hd which is working not too badly. The problem is now gstreamer, which is not as good as I expected. It should work well with avi. But there are problems with ogm and mkv.
The code in cvs does not contains yet the code. It needs tweaking. But, heh, it works a bit :)
Also, one modification: avisynth 3.0 only supports gcc 4.0, no more anterior versions of this compiler. The reason is to use the visibility feature (shared lib less huge and faster load in memory)
d'Oursse
27th July 2005, 17:47
you can see here some shots of a very simple test program that will be included later in cvs to test avs3 on linux
http://unite-video.com/phpbb/viewtopic.php?p=72452#72452
d'Oursse
5th October 2005, 23:28
some news
the current cvs tree will be compilable on linux this weekend. There are just 3 small modifications to do, but i wait for some approval from Bidoche.
If the linux users want to test it, download this file :
http://www.iecn.u-nancy.fr/~torri/files/web_avs3/avisynth3_20051005.tar.bz2
there's the libraries needed for the test application.
Put all the lib* files in /usr/lib or /usr/local/lib or somewhere else (but add that path to LD_LIBRARY_PATH)
put avisynth_test somewhere (preferably in a path contained in PATH)
the test application can load a file, preferably an avi one. Then gstreamersource is used to load the file. Then it displays the frame #100. You can change the # of the frame with Action->Goto
You must have gstreamer and gst-plugins installed. And the best is also having gst-ffmpeg installed.
unfortunately, the parser has some problem, so we can't use avs script right now. I hope that this will be fixed soon
708145
7th October 2005, 16:44
some news
the current cvs tree will be compilable on linux this weekend. There are just 3 small modifications to do, but i wait for some approval from Bidoche.
If the linux users want to test it, download this file :
http://www.iecn.u-nancy.fr/~torri/files/web_avs3/avisynth3_20051005.tar.bz2
there's the libraries needed for the test application.
Put all the lib* files in /usr/lib or /usr/local/lib or somewhere else (but add that path to LD_LIBRARY_PATH)
put avisynth_test somewhere (preferably in a path contained in PATH)
the test application can load a file, preferably an avi one. Then gstreamersource is used to load the file. Then it displays the frame #100. You can change the # of the frame with Action->Goto
You must have gstreamer and gst-plugins installed. And the best is also having gst-ffmpeg installed.
unfortunately, the parser has some problem, so we can't use avs script right now. I hope that this will be fixed soon
Nice to see progress :D
Just found some time to test:
So I set the path to
bergmats@rai35:~/src/avisynth3_20051005$ echo $LD_LIBRARY_PATH
/home/bergmats/src/avisynth3_20051005/
but it still can't find the lib:
bergmats@rai35:~/src/avisynth3_20051005$ ./avisynth_test /tobias/tobias/Madagascar.avi
./avisynth_test: error while loading shared libraries: libavisynth.so.3: cannot open shared object file: No such file or directory
I also installed gstreamer0.8-ffmpeg and libgstreamer-plugins0.8-0. Anything missing there maybe?
bis besser,
Tobias
d'Oursse
7th October 2005, 17:40
well, i don't really know. "It works for me (tm)"
in src/avisynth3_20051005/, try :
export LD_LIBRARY_PATH="."
./avisynth_test
Also, it's useless to give the avi file on the path. You have to choose it with a file selector. Maybe I should also allow to pass the file in the CLI
thank you for testing it :)
sl1pkn07
8th October 2005, 04:05
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /home/sl1pkn07/dvdrip/WolfsRain13.mkv
notify video
set videoinfo
set frame count
terminate called after throwing an instance of 'avs::exception::Generic'
what(): FrameCount must be positive
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$
using:
FedoraCore4
Gstreamer-0.8.11 (and plugins)
tested, Avi, Ogm and MKV files
saludos
d'Oursse
8th October 2005, 07:39
i have tested on a mkv file and it does not abort. But there's a problem with mkv and seek. I have to talk to the gstreamer dev about that.
could you create a sample of this mkv (say, 10s), verify that avisynth_test abort, and put it somewhere ?
no problem with the avi and ogm files ?
thank you
sl1pkn07
8th October 2005, 21:31
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /home/sl1pkn07/Desktop/arkanonVSag_jones.avi (fail)
terminate called after throwing an instance of 'avs::exception::Generic'
what(): no matching sample type
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/hdf1/demux/Ranma/Ep005.ogm (open ok)
notify video
set videoinfo
set frame count
we seek...
on associe le buffer 373248 422400
Timestamp : 5,589s
seek done
1
2
3
4
5
6
accept /mnt/hdb1/[AstRG]Animatrix Dual_completa/[AstRG]Animatrix.DVD-RIP.DUAL.ogm (fail)
terminate called after throwing an instance of 'avs::exception::NoVideo'
what(): Clip has no video
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/sata-a1/Heroina.[Spanish-DVDRip].[XviD-Mp3].by.SDG.avi (fail)
notify video
set videoinfo
terminate called after throwing an instance of 'avs::exception::Generic'
what(): no matching sample type
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/hda1/[AHN]Elfen Lied Dual/[AHN][VE]_Elfen_Lied_01v2.mkv (fail)
notify video
set videoinfo
set frame count
we seek...
on associe le buffer 418176 422400
Timestamp : 134,676s
seek done
(avisynth_test:12101): GStreamer-CRITICAL **: gst_data_ref: assertion `GST_DATA_REFCOUNT_VALUE (data) > 0' failed
Violación de segmento (Segment Fault)
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/hda1/[A-N]StepSister_completa/[A-N] StepSister - 01_Spanish sub.avi (fail)
notify video
set videoinfo
terminate called after throwing an instance of 'avs::exception::Generic'
what(): no matching sample type
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/hdf1/demux/[VE~AT] Ranma Nibun no Ichi Ep_017.ogm (fail)
terminate called after throwing an instance of 'avs::exception::NoVideo'
what(): Clip has no video
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$ ./avisynth_test
accept /mnt/hdf1/demux/Ranma/Ep006.ogm (fail)
terminate called after throwing an instance of 'avs::exception::NoVideo'
what(): Clip has no video
Abortado
[sl1pkn07@SpinFlo avisynth3_20051005]$
OGM,AVI,MKV and MP4 fail (probe 20 videos, works only one :S)
Kurosu
8th October 2005, 23:28
Tested on Debian unstable. Had to remove the gstreamer .so because they conflicted with system settings. Removed boost_thread because system's one was OK. Use of stlport 5 didn't match the system one so I kept your shared objects.
My findings:
no file loaded+info => crash => not idiot-proof
wmv/mkv bail out with the usual message about framecount having to be positive
AVI without audio seems to work (frame accurate seeking)
AVI with audio bails out with 'no matching sample type'
mp4 A/V hangs
mp4 audio 'no matching sample type'
vob opens OK
ac3 reports no video (duh)
ts dies with "/usr/lib/gstreamer-0.8/libgstffmpeg.so: undefined symbol: mpegts_crc32"
Probably a bad mixing of cvs/distrib so versions
All of the above, except mp4, play well in totem, including ts and mkv.
It's taking shape! And already, DVD files can be opened with your tool.
Good job, and good luck.
d'Oursse
9th October 2005, 00:21
ouch, there are a lot of non working files.
I would like to mention that gst-ffmpeg is needed, because divx/xvid files are not handled correctly with only their decoder that are in gst-plugins. Maybe other decoders have also problems without gst-ffmpeg
I would like to have an mkv file that fails with the app. All those I have (2 mkv) work, so it's difficult to know how debugging that problem.
I've not tested with audio streams only.
thank you for your reports
mg262
8th November 2005, 22:41
Bidoche and other developers:
If it is not too early to ask this question, could you give us some advice on what plug-in authors should do in order to make the rewriting for 3.0 as smooth as possible?
Bidoche
9th November 2005, 19:03
I guess it would be better if you understood the STL and template classes
mg262
9th November 2005, 19:37
Thank you for the reply.
I guess it would be better if you understood the STL and template classes
STL is one of the best reasons for using C++ :) Template classes: do you mean understand them in the abstract, or try to understand the template classes in the 3.0 code?
d'Oursse
10th November 2005, 18:21
mg262: i want to write some doc about writing plugins and to write a script that creates a "template" (not c++ template) to make plugins writing easier. But right now, I'm busy with the C interface
d'Oursse
11th November 2005, 17:11
here are some improvements:
1) the current parser is broken, but there is one case where it works (you have to put an expression only in the script). One has to wait for the new Bidoche's parser
2) I have made a C interface. It's not complete yet, but sufficient for the point 3)
3) I have added to x264 an avs3 input. It works :)
708145
12th November 2005, 01:53
here are some improvements:
1) the current parser is broken, but there is one case where it works (you have to put an expression only in the script). One has to wait for the new Bidoche's parser
2) I have made a C interface. It's not complete yet, but sufficient for the point 3)
3) I have added to x264 an avs3 input. It works :)
Many thanks so far :D
Just in time for my port of ELDER4X264 to linux :P
bis besser,
T0B1A5
Kopernikus
12th November 2005, 11:56
Is it necessary to add a avs3 Interface to all Encoders/Players/Tools one want to use with avs3 with non-Windows?
Is avs3 intended for use under Windows? Is an avi Export feature (like in avs2) for Windows possible? I think it is one of the biggest strengths of avs2 to work with many Tools out of the box.
Thank you for your efforts, I think I will like working with Avisynth under Linux :-)
Bidoche
12th November 2005, 17:07
avs3 exposes scripts as VFW objects the same way avs2 does (under Windows).
Programes using it through VFW won't notice the change.
Those like VdubMod who directly use some avs features will need to be adapted.
Under Linux, avs3 links with gstreamer.
As for plugins, thx to Richard Berg's request, I finally came up with something I hope satisfactory (feedback welcome)
class Linker
{
virtual char * GetName() const = 0;
virtual PPlugin Link(LibraryHandle const& handle) const = 0;
};
class Plugin
{
//combination of those two = plugin identity
virtual char * GetName() const = 0;
virtual char * GetVersionLabel() const = 0;
virtual char * GetDescription() const = 0;
virtual char * GetFunctionDef() const = 0;
virtual bool CanUnloadNow() const = 0;
virtual VMFunction GetFunction(std::string const& logicalFunctionName) const = 0;
};
When a plugin is loaded, it will search for an exported "GetAvisynthLinkingMode" symbol (with C linkage)
If it cannot be found, the linking will be passed to the Linker named "legacy' if it is known (ie the definition of the LegacyLinker will be left to a plugin I think).
If it is found, it called to get the name of the linker to use to link the plugin.
Each linker then defines the interface it expects.
For the NativeLinker, provided by the avs3 core and named "native" :
all the methods from Plugin as exports with same prototype
+
void PluginInit(AvisynthServer& server, PPlugin& self)
//this is called after the NativeLinker created the PPlugin object, but before any function calls
//The point of passing PPlugin is allowing to declare Linker and ColorSpace to the server and have them keep the plugin alive
bond
14th November 2005, 14:04
hm, so if avisynth 3.0 is not relying anymore on vfw, will it also be able to handle variable framerate content?any news on this?
sl1pkn07
23rd November 2005, 15:49
C: core/blitter/memcopy.cpp
../../src/core/blitter/memcopy.cpp: In member function ‘virtual void avs::blitter::MemCopy::Blit(const avs::BYTE*&, int, avs::BYTE*&, int, const avs::Dimension&) const’:
../../src/core/blitter/memcopy.cpp:34: error: invalid use of undefined type ‘const struct avs::dimension<long int>’
../../src/core/blitter/../forward.h:61: error: declaration of ‘const struct avs::dimension<long int>’
../../src/core/blitter/memcopy.cpp:36: error: invalid use of undefined type ‘const struct avs::dimension<long int>’
../../src/core/blitter/../forward.h:61: error: declaration of ‘const struct avs::dimension<long int>’
../../src/core/blitter/memcopy.cpp:37: error: invalid use of undefined type ‘const struct avs::dimension<long int>’
../../src/core/blitter/../forward.h:61: error: declaration of ‘const struct avs::dimension<long int>’
../../src/core/blitter/memcopy.cpp:37: error: ‘memcpy’ no se declaró en este ámbito
make: *** [core/blitter/memcopy.o] Error 1
[sl1pkn07@SpinFlo linux]$
Avisynth CVS - 21-11-2005
STLport 5 CVS
GStreamer 0.8.11 (rpm)
Boost 1.33 (rpm)
Circular-buffer 3.7
Freetype 2.1.9 (rpm) not recognized in Configure
[sl1pkn07@SpinFlo linux]$ ./configure --enable-stlport5 --with-stl-path=/usr --with-boost-path=/usr --with-ffmpeg-path=/usr --with-freetype-config=/usr/bin/freetype-config
.....
checking for /usr/bin/freetype-config... no
ERROR:
The freetype-config development script you specified:
/usr/bin/freetype-config
was not found. Please check the path and make sure
the script exists and is executable.
configure: error: Fatal Error: no freetype-config detected.
[sl1pkn07@SpinFlo linux]$ ls /usr/bin/freetype*
/usr/bin/freetype-config
[sl1pkn07@SpinFlo linux]$
more errors:
C: text/freetype/library.cpp
../../src/text/freetype/library.cpp: In constructor ‘avs::text::freetype::Library::Library()’:
../../src/text/freetype/library.cpp:41: aviso: variable ‘error’ sin uso
../../src/text/freetype/library.cpp: In destructor ‘avs::text::freetype::Library::~Library()’:
../../src/text/freetype/library.cpp:49: aviso: variable ‘error’ sin uso
C: text/freetype/outline.cpp
../../src/text/freetype/outline.cpp: In destructor ‘avs::text::freetype::Outline::~Outline()’:
../../src/text/freetype/outline.cpp:52: aviso: variable ‘error’ sin uso
............
C: filters/levels/coloryuv/analyze.cpp
../../src/filters/levels/coloryuv/analyze.cpp: In member function ‘virtual avs::CPVideoFrame avs::filters::coloryuv::Analyze::MakeFrame(const avs::PVideoFrame&) const’:
../../src/filters/levels/coloryuv/analyze.cpp:51: aviso: variable ‘yLooseLimit’ sin uso
../../src/filters/levels/coloryuv/analyze.cpp:52: aviso: variable ‘uLooseLimit’ sin uso
../../src/filters/levels/coloryuv/analyze.cpp:53: aviso: variable ‘vLooseLimit’ sin uso
..............
C: freetype/face.cpp
../../src/freetype/face.cpp: In member function ‘avs::Vecteur avs::freetype::Face::GetKerning(unsigned int, unsigned int) const’:
../../src/freetype/face.cpp:67: aviso: variable ‘error’ sin uso
../../src/freetype/face.cpp: In member function ‘void avs::freetype::Face::SetCharSize(const avs::Dimension&, const avs::Dimension&)’:
../../src/freetype/face.cpp:77: aviso: variable ‘error’ sin uso
C: freetype/glyph.cpp
C: freetype/library.cpp
../../src/freetype/library.cpp: In constructor ‘avs::freetype::Library::Library()’:
../../src/freetype/library.cpp:40: aviso: variable ‘error’ sin uso
../../src/freetype/library.cpp: In destructor ‘avs::freetype::Library::~Library()’:
../../src/freetype/library.cpp:48: aviso: variable ‘error’ sin uso
............
C: avisynth_c/clip_c.cpp
../../src/avisynth_c/clip_c.cpp:60: aviso: se definió ‘stlp_std::string get_script(char*)’ pero no se usa
C: gstreamer/structure.cpp
../../src/gstreamer/structure.cpp: In member function ‘int avs::gstreamer::Structure::GetIntField(const char*) const’:
../../src/gstreamer/structure.cpp:44: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘bool avs::gstreamer::Structure::GetBoolField(const char*) const’:
../../src/gstreamer/structure.cpp:55: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘double avs::gstreamer::Structure::GetDoubleField(const char*) const’:
../../src/gstreamer/structure.cpp:66: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘long unsigned int avs::gstreamer::Structure::GetFourCCField(const char*) const’:
../../src/gstreamer/structure.cpp:77: aviso: variable ‘success’ sin uso
C: gstreamer/signalhandler.cpp
C: gstreamer/structure/audio.cpp
C: gstreamer/structure/video.cpp
../../src/gstreamer/structure/video.cpp:109:9: warning: multi-character character constant
../../src/gstreamer/structure/video.cpp:110:9: warning: multi-character character constant
../../src/gstreamer/structure/video.cpp:111:9: warning: multi-character character constant
..............
C: import/avi/streamheader.cpp
In file included from ../../src/import/avi/streamheader.cpp:25:
../../src/import/avi/streamheader.h:70:44: warning: multi-character character constant
../../src/import/avi/streamheader.h:71:44: warning: multi-character character constant
../../src/import/avi/streamheader.h:72:43: warning: multi-character character constant
C: import/avi/chunkheader.cpp
../../src/import/avi/chunkheader.cpp: In static member function ‘static boost::optional<avs::import::avi::ChunkHeader> avs::import::avi::ChunkHeader::Locate(stlp_std::istream&, long unsigned int, long int&)’:
../../src/import/avi/chunkheader.cpp:66: aviso: comparación entre expresiones enteras signed y unsigned
C: import/avi/listheader.cpp
../../src/import/avi/listheader.cpp: In static member function ‘static boost::optional<avs::import::avi::ListHeader> avs::import::avi::ListHeader::Locate(stlp_std::istream&, long unsigned int, long int&)’:
../../src/import/avi/listheader.cpp:45: aviso: comparación entre expresiones enteras signed y unsigned
............
C: parser/function/scriptfunction.cpp
../../src/parser/function/call.h: In member function ‘void avs::parser::functor::function::Call<returnVoid>::operator()(avs::parser::VMState&) const [with bool returnVoid = false]’:
../../src/parser/function/../vmoperation.h:71: instantiated from ‘void avs::parser::detail::functor_callback<void, Functor>::operator()(avs::parser::VMState&) const [with Functor = avs::parser::functor::function::Call<false>]’
../../src/parser/function/scriptfunction.cpp:66: instantiated from here
../../src/parser/function/call.h:57: aviso: variable ‘type’ sin uso
../../src/parser/function/call.h: In member function ‘void avs::parser::functor::function::Call<returnVoid>::operator()(avs::parser::VMState&) const [with bool returnVoid = true]’:
../../src/parser/function/../vmoperation.h:71: instantiated from ‘void avs::parser::detail::functor_callback<void, Functor>::operator()(avs::parser::VMState&) const [with Functor = avs::parser::functor::function::Call<true>]’
../../src/parser/function/scriptfunction.cpp:66: instantiated from here
../../src/parser/function/call.h:57: aviso: variable ‘type’ sin uso
.............
C: core/colorspace/get.cpp
../../src/core/colorspace/concrete/../../utility/valuecache.h: In member function ‘boost::shared_ptr<T> avs::utility::value_cache<T, Synchronizer, Creator>::Get() const [with T = const avs::ColorSpace, Synchronizer = avs::utility::synchronizer::None, Creator = const avs::ColorSpace* (*)()]’:
../../src/core/colorspace/concrete/map.h:75: instantiated from here
../../src/core/colorspace/concrete/../../utility/valuecache.h:63: aviso: variable ‘synchronizer’ sin uso
C: core/colorspace/concrete/map.cpp
../../src/core/colorspace/concrete/../../utility/valuecache.h: In member function ‘boost::shared_ptr<T> avs::utility::value_cache<T, Synchronizer, Creator>::Get() const [with T = const avs::ColorSpace, Synchronizer = avs::utility::synchronizer::None, Creator = const avs::ColorSpace* (*)()]’:
../../src/core/colorspace/concrete/map.h:75: instantiated from here
../../src/core/colorspace/concrete/../../utility/valuecache.h:63: aviso: variable ‘synchronizer’ sin uso
..........
C: core/colorspace/concrete/yv12.cpp
In file included from ../../src/core/colorspace/concrete/yv12.cpp:28:
../../src/core/colorspace/concrete/../../../export/vfw/exporter/yv12.h:40:41: warning: multi-character character constant
..........
any idea?
dew
d'Oursse
23rd November 2005, 17:37
[sl1pkn07@SpinFlo linux]$ ./configure --enable-stlport5 --with-stl-path=/usr --with-boost-path=/usr --with-ffmpeg-path=/usr --with-freetype-config=/usr/bin/freetype-config
.....
checking for /usr/bin/freetype-config... no
ERROR:
The freetype-config development script you specified:
/usr/bin/freetype-config
was not found. Please check the path and make sure
the script exists and is executable.
configure: error: Fatal Error: no freetype-config detected.
[sl1pkn07@SpinFlo linux]$ ls /usr/bin/freetype*
/usr/bin/freetype-config
[sl1pkn07@SpinFlo linux]$
strange. There should be no problem. I'll check that. Nevertheless, it's useless to give the path of freetype-config if it's in the PATH (/usr/bin should be in the path, I think). Also, disable ffmpeg (--disable-ffmpeg), it's not supported anymore as it has some problems with audio.
more errors:
C: text/freetype/library.cpp
../../src/text/freetype/library.cpp: In constructor ‘avs::text::freetype::Library::Library()’:
../../src/text/freetype/library.cpp:41: aviso: variable ‘error’ sin uso
../../src/text/freetype/library.cpp: In destructor ‘avs::text::freetype::Library::~Library()’:
../../src/text/freetype/library.cpp:49: aviso: variable ‘error’ sin uso
C: text/freetype/outline.cpp
../../src/text/freetype/outline.cpp: In destructor ‘avs::text::freetype::Outline::~Outline()’:
../../src/text/freetype/outline.cpp:52: aviso: variable ‘error’ sin uso
............
C: filters/levels/coloryuv/analyze.cpp
../../src/filters/levels/coloryuv/analyze.cpp: In member function ‘virtual avs::CPVideoFrame avs::filters::coloryuv::Analyze::MakeFrame(const avs::PVideoFrame&) const’:
../../src/filters/levels/coloryuv/analyze.cpp:51: aviso: variable ‘yLooseLimit’ sin uso
../../src/filters/levels/coloryuv/analyze.cpp:52: aviso: variable ‘uLooseLimit’ sin uso
../../src/filters/levels/coloryuv/analyze.cpp:53: aviso: variable ‘vLooseLimit’ sin uso
..............
C: freetype/face.cpp
../../src/freetype/face.cpp: In member function ‘avs::Vecteur avs::freetype::Face::GetKerning(unsigned int, unsigned int) const’:
../../src/freetype/face.cpp:67: aviso: variable ‘error’ sin uso
../../src/freetype/face.cpp: In member function ‘void avs::freetype::Face::SetCharSize(const avs::Dimension&, const avs::Dimension&)’:
../../src/freetype/face.cpp:77: aviso: variable ‘error’ sin uso
C: freetype/glyph.cpp
C: freetype/library.cpp
../../src/freetype/library.cpp: In constructor ‘avs::freetype::Library::Library()’:
../../src/freetype/library.cpp:40: aviso: variable ‘error’ sin uso
../../src/freetype/library.cpp: In destructor ‘avs::freetype::Library::~Library()’:
../../src/freetype/library.cpp:48: aviso: variable ‘error’ sin uso
............
C: avisynth_c/clip_c.cpp
../../src/avisynth_c/clip_c.cpp:60: aviso: se definió ‘stlp_std::string get_script(char*)’ pero no se usa
C: gstreamer/structure.cpp
../../src/gstreamer/structure.cpp: In member function ‘int avs::gstreamer::Structure::GetIntField(const char*) const’:
../../src/gstreamer/structure.cpp:44: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘bool avs::gstreamer::Structure::GetBoolField(const char*) const’:
../../src/gstreamer/structure.cpp:55: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘double avs::gstreamer::Structure::GetDoubleField(const char*) const’:
../../src/gstreamer/structure.cpp:66: aviso: variable ‘success’ sin uso
../../src/gstreamer/structure.cpp: In member function ‘long unsigned int avs::gstreamer::Structure::GetFourCCField(const char*) const’:
../../src/gstreamer/structure.cpp:77: aviso: variable ‘success’ sin uso
C: gstreamer/signalhandler.cpp
C: gstreamer/structure/audio.cpp
C: gstreamer/structure/video.cpp
../../src/gstreamer/structure/video.cpp:109:9: warning: multi-character character constant
../../src/gstreamer/structure/video.cpp:110:9: warning: multi-character character constant
../../src/gstreamer/structure/video.cpp:111:9: warning: multi-character character constant
..............
C: import/avi/streamheader.cpp
In file included from ../../src/import/avi/streamheader.cpp:25:
../../src/import/avi/streamheader.h:70:44: warning: multi-character character constant
../../src/import/avi/streamheader.h:71:44: warning: multi-character character constant
../../src/import/avi/streamheader.h:72:43: warning: multi-character character constant
C: import/avi/chunkheader.cpp
../../src/import/avi/chunkheader.cpp: In static member function ‘static boost::optional<avs::import::avi::ChunkHeader> avs::import::avi::ChunkHeader::Locate(stlp_std::istream&, long unsigned int, long int&)’:
../../src/import/avi/chunkheader.cpp:66: aviso: comparación entre expresiones enteras signed y unsigned
C: import/avi/listheader.cpp
../../src/import/avi/listheader.cpp: In static member function ‘static boost::optional<avs::import::avi::ListHeader> avs::import::avi::ListHeader::Locate(stlp_std::istream&, long unsigned int, long int&)’:
../../src/import/avi/listheader.cpp:45: aviso: comparación entre expresiones enteras signed y unsigned
............
C: parser/function/scriptfunction.cpp
../../src/parser/function/call.h: In member function ‘void avs::parser::functor::function::Call<returnVoid>::operator()(avs::parser::VMState&) const [with bool returnVoid = false]’:
../../src/parser/function/../vmoperation.h:71: instantiated from ‘void avs::parser::detail::functor_callback<void, Functor>::operator()(avs::parser::VMState&) const [with Functor = avs::parser::functor::function::Call<false>]’
../../src/parser/function/scriptfunction.cpp:66: instantiated from here
../../src/parser/function/call.h:57: aviso: variable ‘type’ sin uso
../../src/parser/function/call.h: In member function ‘void avs::parser::functor::function::Call<returnVoid>::operator()(avs::parser::VMState&) const [with bool returnVoid = true]’:
../../src/parser/function/../vmoperation.h:71: instantiated from ‘void avs::parser::detail::functor_callback<void, Functor>::operator()(avs::parser::VMState&) const [with Functor = avs::parser::functor::function::Call<true>]’
../../src/parser/function/scriptfunction.cpp:66: instantiated from here
../../src/parser/function/call.h:57: aviso: variable ‘type’ sin uso
.............
C: core/colorspace/get.cpp
../../src/core/colorspace/concrete/../../utility/valuecache.h: In member function ‘boost::shared_ptr<T> avs::utility::value_cache<T, Synchronizer, Creator>::Get() const [with T = const avs::ColorSpace, Synchronizer = avs::utility::synchronizer::None, Creator = const avs::ColorSpace* (*)()]’:
../../src/core/colorspace/concrete/map.h:75: instantiated from here
../../src/core/colorspace/concrete/../../utility/valuecache.h:63: aviso: variable ‘synchronizer’ sin uso
C: core/colorspace/concrete/map.cpp
../../src/core/colorspace/concrete/../../utility/valuecache.h: In member function ‘boost::shared_ptr<T> avs::utility::value_cache<T, Synchronizer, Creator>::Get() const [with T = const avs::ColorSpace, Synchronizer = avs::utility::synchronizer::None, Creator = const avs::ColorSpace* (*)()]’:
../../src/core/colorspace/concrete/map.h:75: instantiated from here
../../src/core/colorspace/concrete/../../utility/valuecache.h:63: aviso: variable ‘synchronizer’ sin uso
..........
C: core/colorspace/concrete/yv12.cpp
In file included from ../../src/core/colorspace/concrete/yv12.cpp:28:
../../src/core/colorspace/concrete/../../../export/vfw/exporter/yv12.h:40:41: warning: multi-character character constant
..........
any idea?
dew
I think that aviso means warning. It's not errors. It's not important : the compiler does not see that these variables are used
note that STLport 5.0 has been released.
I'll suppress the stlport 4.6.2 support in configuration.
for the first problem, I don't understand how it's possible to have this error. Dimension is declared. Also, memcpy should be on your computer
what is your distro ?
also, I would like to say that the test program should be a bit bigger in some days. It will be possible to compress a file with x264. The gui will look a bit like virtualdub's one
sl1pkn07
24th November 2005, 01:23
my system is Fedora Core4, use GCC 4.0.1 and Kernel 2.6.14-1.1637
esby
24th November 2005, 12:13
hm, so if avisynth 3.0 is not relying anymore on vfw, will it also be able to handle variable framerate content?
any news on this?
For having talked a bit with bidoche one week ago, I think the answer might be a 'no' for the current state.
Probably because the vfr does not bring much in term of video treatment, of course, it is useful when you want to storage video stream using different framerates, but in this case, it is not really a variable framerate, but just a video having segments of different but fixed framerate, I think mkv support that already.
Since the avi container does not support vfr, I don't personnaly expect avisynth (any version) to support it.
Now you can still simulate it with external timestamp files or maybe with an application asking the timestamp/framerate for each frame, supposing the container used can support it and supposing the corresponding interface is implemented.
esby
d'Oursse
19th December 2005, 23:52
@sl1pkn07: the errors in memcopy.cpp are fixed in cvs.
it has just compiled fine on my distro (ubuntu hoary with g++ 4.0).
tell me if there are others errors for you. Ignore the warnings.
other changes:
* STLport 4.6.2 support is removed. Only STLport 5.0 is supported now. Follow the instructions for the installation of STLport 5.0 in the docs/html directory
* ffmpeg support is removed. Only gstreamer (0.8.11) is used. When gstreamer 0.10 is usuable, i'll add support for it. It's supposed to be better than gstreamer 0.8, but it has a BIG problem with seeking, so that it's completely useless with avs3 right now.
when i finish the gtk widget for the configuration of the x264 (and when it is accepted by Lauren), i'll commit an upgraded test program, which will be able to compress with x264 and put the video in a mkv. Right now, the one on my hd works :)
sl1pkn07
20th December 2005, 02:52
hi.
http://sl1pkn07.no-ip.com/Downloads/avisynth-error.log :S
Fedora Core 4
STLport 5.0.0 (compile)
Boost 1.33 (RPM)
Freetype 2.1.9 (RPM)
GStreamer 0.8.11 (RPM)
GStreamer-ffmpeg 0.8.7 (RPM)
GStreamer-plugins 0.8.11 (RPM)
Boost-Jam 3.1.11 (RPM)
GCC & G++ 4.0.2 (RPM)
GTK2 2.8.7 (RPM)
saludos
PD: revise "Installation d'Avisynth 3.0" steps in http://www.unite-video.com/phpbb/viewtopic.php?p=68206&sid=4e7fe87320bf6d8739455423c21f0b0d#68206
d'Oursse
20th December 2005, 11:29
i've also that when I use ifstream with stlport 5.0. I've fixed that by using C code. It's not a good solution, but the test program should compile, now.
What are the problems with the installation steps on Unite Video ?
edit: don't forget to set LD_LIBRARY_PATH to the correct directories if a shared library is not found
sl1pkn07
21st December 2005, 13:33
you can put the steps to do it?
------------------------------
cd avisynth/build
tar jxvf circular_buffer_v3.7.tar.bz2
cd circular_buffer
su (tapez votre mot de passe root)
cp -R boost /usr/local/include/boost-1_33/ -> cp -R * /usr/local/include/boost-1_33/
[ctrl-D] (pour revenir un mode utillisateur)
cd ../linux
./booststrap.sh -> ./boostrap.sh (chmod +x)
./configure
Kopernikus
21st March 2006, 12:18
Are there any news? Is the parser working?
d'Oursse
21st March 2006, 12:24
i'm working on the gstreamer 0.10 port, but I have 1 remaining problem :( Gstreamer 0.8 is not supported anymore, and gstreamer 0.10 is thread safe, has better seeking, lots of fixes compared to the 0.8, ...
I let Bidoche answer for the core stuff
d'Oursse
7th April 2006, 22:12
Some news :
I've ported, finally, avisynth to gstreamer 0.10 (linux version). It was harder than I thought, because of threads problems. Now I have made a specific gstreamer sink for avs3. It makes the code simpler and smaller.
i've updated the C API, and now the application test uses that api. The application can read script files.
Example of avs file:
GstreamerSource("/mnt/win_d/provi/blood.avi",0,0)
the 2 last parameters are the index of the video and audio streams. You wonder why I have added an index for the video stream. Well someone told me that mkv can have several video streams, so, I've added it.
I don't think that Bidoche has worked a lot on the parser, so I think that right now, only sources can be used, iirc.
Things that I have to work on :
audio part : I have to add the code, and maybe a specific gstreamer sink for that :) Right now, all files with audio part will not work because of this.
add more feature to the app test (save a file using x264, slider not handled yet, ...)
it compiles on my computer and the test program works on avi and ogm without sound. But it has some problems. Some come from gstreamer (mkv files), some from me (mainly, missing code of the audio part).
So I know that most of those who will try to test it will certainly have a lot of problems with using it. But, I would be glad to, at least, have some reports about difficulties while compiling it.
here are the last news ;)
thank you
edit : the anon cvs of SF is certainly not up to date with the dev one. Wait some hours after this post before doing a check out
IanB
8th April 2006, 05:55
The sync between dev and anon is still disabled after the crash. See here for details http://sourceforge.net/docs/A04/en
Zarxrax
14th April 2006, 22:17
It looks like Google's Summer of Code is up for another year. Will Avisynth 3.0 be getting in on the act this time around?
d'Oursse
18th April 2006, 08:14
it's not obvious.
1) It needs a mentor.
2) It needs a good student, who want to code on avs3
3) It needs to be accepted by the program.
Only point 2) would be easy to match, afaik :/ For example, enlightenment (which is a big project) has been rejected (point 3) )
dirio49
4th June 2006, 14:45
Any news?;)
d'Oursse
4th June 2006, 20:18
about the Summer code project : it's not in the project.
about the code itself, look at my homepage, it's the avs3 web page. There is some news on it. Especially, the installation on linux is there, now (look at the documentation link)
Bidoche is working on a new parser. I'll improve the avisynth test and i'm supporting fontconfig, so that fonts are correctly found on linux system (it can be used on windows too).
d'Oursse
25th June 2006, 12:34
i've made a small archive that contains the library and the test program (for linux. I'll try to make a windows version during the next week with mingw)
the archive can be downloaded there :
http://www.iecn.u-nancy.fr/~torri/files/avs3.tar.bz2
it contains 2 subdirs :
avs3/lib : contains the libraries for avisynth, boost, freetype fontconfig and x264
avs3/bin : contains the program avisynth_test
copy the libraries of avs3/lib that you don't have in /usr/lib (or any dir where shared lib can be found)
copy avisynth_test in a dir of your PATH
You must have gstreamer 0.10 and gtk+ 2.8 installed
with the test program, you can load scripts (I'va added one in the dir avs3/ of the archive), compress with x264, go through the clip with the slider of the gui.
right now, gstreamer can't load ogm files. I've tested some mpeg, avi, mp4 and mkv files. It seems to work.
tell me if i've missed a file in the archive ;)
sl1pkn07
25th June 2006, 19:28
[sl1pkn07@SpinFlo bin]$ ./avisynth_test
accept /home/sl1pkn07/.wine/drive_c/prueba.avs
terminate called after throwing an instance of 'avs::exception::Generic'
what(): Unable to resolve function
Abortado
[sl1pkn07@SpinFlo bin]$
[sl1pkn07@SpinFlo bin]$ ./avisynth_test
accept /home/sl1pkn07/.wine/drive_c/amv.avi
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Abortado
[sl1pkn07@SpinFlo bin]$
[sl1pkn07@SpinFlo bin]$ cat /home/sl1pkn07/.wine/drive_c/prueba.avs
GstreamerSource("/home/sl1pkn07/.wine/drive_c/amv.avi")
[sl1pkn07@SpinFlo bin]$
VIDEO: [DX50] 640x480 24bpp 23.980 fps 635.0 kbps (77.5 kbyte/s)
using Fedora core 5 and all dependences (freetype, x264, boost, gstreamer,STLport....)
d'Oursse
25th June 2006, 19:32
use :
GstreamerSource("/home/sl1pkn07/.wine/drive_c/amv.avi", 0, 0)
for the script.
Also, could you tell me if it works with blood.avi and blood.mkv, that you can find here : http://www.iecn.u-nancy.fr/~torri/files/gstreamer_test_seek/
thank you
sl1pkn07
25th June 2006, 19:55
oks, sorry :S
one cuestion... VSfilter (subtitle render) working on this method? or he is not compatible still with avisynth 3.0
thanks
d'Oursse
25th June 2006, 20:07
helas, no. No avs 2.5 filter will be compatible. We'll have nevertheless a good text renderer (for example : http://avisynth3.unite-video.com/avs_text.png)
A friend will make some plugin ports this summer. Maybe he'll do the vsfilter port :)
sl1pkn07
25th June 2006, 20:43
roger! ^^
whereupon it has effects karaoke, scrolls, moves, fades (the basic thing for fansubing) would be very useful, is what we needed more at this moment to be able to encoder in this platform (linux/macos).
greetings and good luck!
sory for my blablabla english :P
Mug Funky
26th June 2006, 05:31
ooh, this is exciting :)
No avs 2.5 filter will be compatible.
would it be possible to fudge it with a "loadpluginex" type plugin?
it doesn't worry me either way, but it'd be nice because a lot of old filters are no longer developed but are still useful.
Blue_MiSfit
26th June 2006, 18:28
This is excellent news. I assume that if 3.0 will run on Linux that it could theoretically be ported to Mac OS X without too much trouble. Imagine Final Cut Pro -> AviSynth -> x264 for output. I'm very excited by this possibility!
~MiSfit
d'Oursse
26th June 2006, 18:56
mug funky : i think that everything is possible :)
blue_misfit : No problem for Mac OSX : if you have a c++ compiler (g++ exists for Mac OSX, if i'm not misaken), freetype, fontconfig, gstreamer and its plugins, you can have the lib. With gtk and x264, you can have the gui.
that makes me think that maybe a small app with no gui can be usefull. And in fact, when avisynth 3.0 is stable, an x264 input will be great too (i've already made one, but pengvado didn't want to add it, as avs3 is not released yet)
danpos
27th June 2006, 01:44
@d'Oursse
I tried it you and I got this error:
danpos@WOLF:~/avs3/bin$ ./avisynth_test
./avisynth_test: symbol lookup error: ./avisynth_test: undefined symbol: _ZTIN8stlp_std8ios_baseE
Did I miss something?
TIA,
d'Oursse
27th June 2006, 07:02
danpos : do you have an amd 64 or another processor different from common x86 ?
danpos
27th June 2006, 07:43
danpos : do you have an amd 64 or another processor different from common x86 ?
I think that this isn't the case: AMD Athlon XP+ 2600. I'm running Ubuntu 'Dapper Drake' GNU/Linux ...
See you,
d'Oursse
27th June 2006, 07:59
strange. It should not use stlport iostream. And if it needs it, the error message would be different.
nevertheless, install that file :
http://www.iecn.u-nancy.fr/~torri/files/libstlport.so.5.0.0
in the same dir than the boost files, and do a symbolic link from this file to the files libstlport.so.5.0 libstlport.so.5and libstlport.so
danpos
27th June 2006, 09:15
@d'Oursse
OK, this lib fixed the pb and I got load the avisynth_test program! :)
But when I tried load the test.avs script out, avisynth_test crashes out:
danpos@WOLF:~/avs3/bin$ ./avisynth_test
accept /home/danpos/avs3/bin/test.avs
Pipeline Create
Pipeline Create
new pad video/x-raw-rgb; video/x-raw-yuv
(<unknown>:8769): GStreamer-CRITICAL **: gst_bin_add: assertion `GST_IS_ELEMENT (element)' failed
(<unknown>:8769): GStreamer-CRITICAL **: gst_element_get_pad: assertion `GST_IS_ELEMENT (element)' failed
(<unknown>:8769): GStreamer-CRITICAL **: gst_pad_link_prepare: assertion `GST_IS_PAD (sinkpad)' failed
terminate called after throwing an instance of 'avs::exception::Generic'
what(): Gstreamer: can not link pads
Abortado
I tried an avi and mkv file using full path to both files:
GstreamerSource("/home/danpos/Vídeos/bla.avi",0,0)
and
GstreamerSource("/home/danpos/avs3/bin.avi",0,0)
Ideas?
Regards,
d'Oursse
27th June 2006, 11:13
hohooo, i think that i have forgotten the video and audio sinks in the archive :)
I'll make another archive this evening, with stlport and those sinks.
sl1pkn07
27th June 2006, 11:58
blabla.avi",(space)0,(space)0)
=)
d'Oursse
27th June 2006, 18:19
I've made an archive here :
http://www.iecn.u-nancy.fr/~torri/files/avs3.tar.bz2
1) in avs3/ run 'make' to have informations where the files will be intalled
2) In Makefile, change prefix, libdir, bindir and libdir_gstreamer to where you want to install the files. Check also if you need to install freetype, fontconfig or x264
3) 'make install' in order to install the files
4) 'make uninstall to remove them
I suggest that you install the files in a specific prefix (see the output of 'make'). Be sure that libdir_gstreamer is the dir where the gstreamer plugins are located
I hope that everything is in the archive, now
danpos
27th June 2006, 18:46
@d'Oursse
OK, time to boot my Ubunty GNU/Linux SO and so try this new package out. :)
I let you know about my findings soon.
See you,
danpos
28th June 2006, 04:26
@d'Oursse
Hi there! I got success to build the avisynth_test.exe following yours hints. :) I play with it a bit and so I got some success to renders some videos which were done with different container. Lets go to output from using avisynth_test.exe (again, I'm using GNU/Linux Ubuntu 'Dapper'):
#1: container MPEG (MPEG2 PS - video MPEG-2 NTSC DVD / audio AC3 2.0 - encoded from a small AVI clip with avidemuxer 2.2.0 svn 2091):
I load the .mpg file into avisynth_test.exe and got sucess to use menus (see the picture, where I used the 'info' button present on file Menu; I got success to go frames back and forth using edit Menu -> Goto), but the slider bar is buggy: avisynth_test.exe hungs up and so <ctrl>+c is the way to go ...
http://img46.imageshack.us/img46/5134/capturadatela8tx.th.png (http://img46.imageshack.us/my.php?image=capturadatela8tx.png)
Here's the stdout from avisynth_test.exe:
danpos@WOLF:~/avs3$ avisynth_test
accept /home/danpos/avs3/test.avs
Pipeline Create
Pipeline Create
new pad video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001, 60/1 }
No accelerated IMDCT transform found
new pad audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
new pad video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001, 60/1 }
No accelerated IMDCT transform found
new pad audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
size : 720x480
frame count : 2452
fps : 30000/1001
colorspace : YV12
sample count : 3927266
sample rate : 48000
channels : 2
frame count !! : 2452
we seek video... 0
Seek !
Frame number : 0
Time : 0
Timestamp : 161322222
Stream time : 161322222
seek to : 0
size (preview) : 720x480 1
FRAME : 0
we seek video... 50
Seek !
Frame number : 50
Time : 1668333333
Timestamp : 7752244444
Stream time : 7752244444
seek to : 1668333333
size (preview) : 720x480 1
we seek video... 50
Seek !
Frame number : 50
Time : 1668333333
Timestamp : 7752244444
Stream time : 7752244444
seek to : 1668333333
size (preview) : 720x480 1
we seek video... 1000
Seek !
Frame number : 1000
Time : 33366666666
Timestamp : 75319744444
Stream time : 75319744444
seek to : 33366666666
size (preview) : 720x480 1
we seek video... 1000
Seek !
Frame number : 1000
Time : 33366666666
Timestamp : 75319744444
Stream time : 75319744444
seek to : 33366666666
size (preview) : 720x480 1
we seek video... 2500
Seek !
Frame number : 2500
Time : 83416666666
Timestamp : 154899244444
Stream time : 154899244444
seek to : 83416666666
size (preview) : 720x480 1
we seek video... 2451
Seek !
Frame number : 2451
Time : 81781700000
Timestamp : 151896244444
Stream time : 151896244444
seek to : 81781700000
size (preview) : 720x480 1
temps : 81,815067
x264.cfg: Arquivo ou diretório não encontrado
Loading default configuration
Writing configuration to /home/danpos/.x264/x264.cfg
Loading configuration from /home/danpos/.x264/x264.cfg
Pipeline Create
Pipeline Create
new pad video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001, 60/1 }
No accelerated IMDCT transform found
new pad audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
new pad video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001, 60/1 }
No accelerated IMDCT transform found
new pad audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
size : 720x480
frame count : 2451
fps : 30000/1001
colorspace : YV12
sample count : 3927132
sample rate : 48000
channels : 2
avs3 [info]: 720x480 @ 1,00 fps (2451 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE 3DNow!
we seek video... 0
Seek !
Frame number : 0
Time : 0
Timestamp : 161322222
Stream time : 161322222
seek to : 0
we seek video... 1
Seek !
Frame number : 1
Time : 33366666
we seek video... 0
Seek !
Frame number : 0
Time : 0
Timestamp : 161322222
Stream time : 161322222
seek to : 0
Falha de segmentação
#2: container AVI (video codec DIV5 / audio LPCM 48 KHz, previously edited with avidemux):
http://img263.imageshack.us/img263/6342/capturadatela14ah.th.png (http://img263.imageshack.us/my.php?image=capturadatela14ah.png)
danpos@WOLF:~/avs3$ avisynth_test
accept /home/danpos/avs3/test.avs
Pipeline Create
Pipeline Create
new pad video/x-raw-rgb; video/x-raw-yuv
new pad video/x-raw-rgb; video/x-raw-yuv
size : 512x384
frame count : 4661
fps : 2997/125
colorspace : YV12
No audio...
frame count !! : 4661
we seek video... 0
Seek !
Frame number : 0
Time : 0
Timestamp : 12595929262
Stream time : 12595929262
seek to : 0
size (preview) : 512x384 1
FRAME : 0
temps : 194,402736
temps : 194,402736
we seek video... 4660
Seek !
Frame number : 4660
Time : 194361027694
Timestamp : 194361061027
Stream time : 194361061027
seek to : 194361027694
size (preview) : 512x384 1
we seek video... 4660
Seek !
Frame number : 4660
Time : 194361027694
Timestamp : 194361061027
Stream time : 194361061027
seek to : 194361027694
size (preview) : 512x384 1
we seek video... 0
Seek !
Frame number : 0
Time : 0
With this file, avisynth_test.exe hung up when I tried go to end of video.
I don't got sucess load a MKV file (H.264 / AAC) and with some others small AVI clips with MP3 VBR audio ...
Take care,
d'Oursse
28th June 2006, 05:54
danpos: I'm not surprised about the mpeg file. Gtreamer is not that good with them. But it's strange that you have problems with the avi and mkv files. Can I download these files somewhere, please ? (i don't have many)
danpos
28th June 2006, 21:44
Can I download these files somewhere, please ? (i don't have many)
You've got a PM! :)
See you,
d'Oursse
2nd July 2006, 19:15
the main problem (exception thrown + segmentation fault) was coming from a bug in the audio part of avs3 (mp3, mainly). It's fixed. The hang up is coming from the exact seeking in gstreamer, which is not... exact. Well, not for all demuxers and decoders. I can't do much about that for now, except a bad hack. Gstreamer needs to be fixed ;)
danpos
2nd July 2006, 20:51
the main problem (exception thrown + segmentation fault) was coming from a bug in the audio part of avs3 (mp3, mainly). It's fixed. The hang up is coming from the exact seeking in gstreamer, which is not... exact. Well, not for all demuxers and decoders. I can't do much about that for now, except a bad hack. Gstreamer needs to be fixed ;)
OK, good to know that you've fixed the problem with avs3. Lets wait for a Gstreamer fix so ... ;)
Keep up the development. :)
Regards,
ChrisBensch
1st November 2006, 07:56
Is this still being working on? I can't download the files earlier in the post...
d'Oursse
1st November 2006, 16:25
yes it is, even if it has been slow down, as the new parser takes some time to be written. I've changed my server, and i've not moved the new files.
I'll try to put new files on my new server next week (i'll be far from a computer for somes days)
Spotteri
10th November 2006, 12:35
It's excellent news that avisynth is finally available for linux (without wine). Linux video editing just took major step forward.
I'm trying to compile avisynth using the guide on the avs3 homepage. Everything goes fine and no errors (well some headers and libraries had to be linked), but I was left without a GUI. For some reason ./configure doesn't find my x264 install (latest from svn). Has anyone had a similar problem? Where does the ./configure look for it?
d'Oursse
10th November 2006, 13:38
you need the gtk interface for x264
you can enable it with --enable-gtk passed to x264 configure. It's disabled by default
I should add more precise comments about the problems
Spotteri
10th November 2006, 21:11
Well that did it.
Sorry about being so vague, but that was my problem. Only thing I had was ./configure telling it can't find x264 codec(not even where it was looking for it). Good thing that you knew what was going on. And now for some testing....
d'Oursse
10th November 2006, 21:21
well, I wrote the gtk interface of x264 especially for the gui of avs3, so it was easy for me to know what the problem was :D
d'Oursse
12th March 2007, 00:05
Gstreamer developpers are allowing projects using Gstreamer to participate to the Google Summer of Code. As Avisynth 3 uses it...
Here is the SoC project page ( http://live.gnome.org/GStreamer/SoC2007) of Gstreamer.
If you are a student and are interested in that project, here is the timeline (http://code.google.com/support/bin/answer.py?answer=60325&topic=10729
).
and about the progress, well the low level parser is almost finished and the C api and the gui are a bit improved. I'm also writing a doc for the design of the parser.
liquidator87
4th March 2008, 19:00
How can I obtain the binary? the code from CVS doesn't compile, and the link return 404...
liquidator87
19th March 2008, 11:10
Anyone? Can someone send me the archive mentioned earlier?
smet
2nd April 2008, 18:51
Finally got it configured on Ubuntu Gutsy.... was missing some packages, especially libgstreamer-plugins-base0.10-dev and the circular_buffer thingy....
Got it configured with this:
./configure --with-boost-includedir-path=/usr/include --with-boost-lib-name=boost_thread-gcc41-mt-1_34_1
All packages are from Ubuntu Gutzy, excerpt the circular_buffer. That doesn't seem to exist. Found a download in this thread...
...but I also end up with:
make: *** [parser/grammar/statement.o] Error 1
in ../../src/parser/grammar/statement.cpp:198
Funny thing is, that this is the second last line of the file, and there is nothing on that line....
Further investigations turned out (I believe) that the problem is somehow in line 165 of src/parser/grammar/statement.cpp
bind(&action::Check::TRecurseAllowed)(! self.termRecInfo)
It is, as far as I can figure out, some trouble with the "!" (negation?) of self.termRecInfo. Boost can't figure out how to convert this (tuple?) into a boolean, so it can negate it...
I'm very rusty in my C++, so any help would be greatly appreciated!!!
Please help us! Please someone start up this one again... I was sad to find this:
Q5) How many developers are working on it?
None. The progress is stalled for a while now, and at the moment there is no hope for improvement. So if you want to help, drop a note here or at IRC.
here: http://avisynth.org/mediawiki/AviSynth_v3#Q5.29_How_many_developers_are_working_on_it.3F
/smet
P.S. Please help us!!! We need this on linux!
P.P.S. If I remove the "!" in line 165 (mentioned above) `make` is fine, but even I don't believe that's a solution ;)
shevegen
13th May 2011, 20:12
Perhaps it was too ambitious.
I think the idea behind Avisynth is awesome.
I used 2.x for a very long time when I was on windows, but switching to Linux, I kind of lost avisynth. :(
I miss my old scripts!
Perhaps 2.x could be just improved incrementially and eventually a Linux port can be done of 2.x?
Perhaps 2.x could be just improved incrementially and eventually a Linux port can be done of 2.x?
Just use wine and be happy :) (Avisynth 2.x has worked with wine since circa 2003 or so IIRC)
Even if Avisynth 2.x was to be brought over to *nix, you'd still have to bring over the plugins etc. as well, many of which aren't open source.
TheFluff
13th May 2011, 22:33
Perhaps it was too ambitious.
I think the idea behind Avisynth is awesome.
I used 2.x for a very long time when I was on windows, but switching to Linux, I kind of lost avisynth. :(
I miss my old scripts!
Perhaps 2.x could be just improved incrementially and eventually a Linux port can be done of 2.x?
why are you bumping a thread that has been dead for over three years with a completely contentless "me too" post
if you want to discuss a linux port of 2.5 or 2.6 just start a new thread, jeez
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.