Skip to content
Forum Archive

A call for source code

32 posts

J_Darnley#

A call for source code

Hello everyone. I've been working on rewriting AVS into a plain C library. I would like to start out by thanking the old Nullsoft for releasing it under the 3-clause BSD license. I've come quite a way through the code base, removing the C++ classes as I go. I'm nearing the end of the built-in components with about a dozen to go. There are still a few major structure features missing (like effect lists and an actual Winamp plugin).

Now onto what I want.

I'm looking for source to APEs, the plugins for the AVS plugin. I'm particularly interested in the ones that come bundled with Winamp: Texer, Texer II, Convolution, Colour Map, and Multi Filter. If you are the author of one of these and read this: please get in touch. I would greatly appreciate a reply from you, even if it is a flat out no. I will also try to find some current contact information for the authors and see if I can speak to them directly.

Finally, I guess I should add a link to my code. I didn't want this to be seen as advertising though. If you want to look: https://gitorious.org/jdarnley/advan...ization-studio
DrO#
it couldn't be included with 6.x due to being GPLv3. it shouldn't stop people using it, but it's a no-no for official inclusion if things were to progress to that stage.

between now this, justin's newer version, the build i tried to patch and other varients, AVS is somewhat off a mess with what can and cannot be used.

as we're not going to natively ship it in the 6.x distro since it only truly works on XP and we don't have the time / resources to try to bring it to a point of removing the DirectDraw requirement and getting it to work correctly on modern OSes). we'll instead just provide a standalone installer for what was in the main installer for those wanting to get it still.

anyway good luck on trying to get source code for them, we tried a few years back with no luck or being told that the source code had long since been lost.
DrO#
just being practical as i could see what your comment was hinting at. so sorry to bring you down to the land of realism, but AVS as-is i.e. what counts as the official version is a pain to deal with, has been in its death-throws for a while when it comes to 'official' support. hence why it'll be spun-off as a legacy download (which i've been pushing for to happen for a few years).

if something modern and which still supports all of the old presets correctly without the legacy issues could be created (officially or via a 3rd party) then that'd be good for those still wanting to use AVS on modern OSes. but sadly none of the projects i've seen so far either are license-permissive (as we cannot use GPL code) or have been started and then just stop without anything off use that can be back-ported to help with the official version or they don't resolve the fundamental issues (which is stability and fullscreen not working).


J_Darnley: if we (well mainly me) can help with any Winamp related questions then do ask and will try to answer as best as possible.
Victhor#
I know, I'm all enthusiasm and not much realism hehe.

I know most projects end up like you say in the last paragraph, so that's what I was trying to avoid, sometimes encourage is all it takes to at least have something done to the end.. (it isn´t like my comment will spark and help the project all the way ´till it's finished, but..)
J_Darnley#
It's good to see that there is a little interest. I'm sure that I will have questions later when I actually try a Winamp plugin, thanks DrO.
Yathosho#
While I doubt that UnConeD still has the sources for his APEs, the best way to get in touch is probably his Twitter account
Yathosho#
Have you had a look at Webvs? Azeem has reverse engineered some of the effects afaik. Getting your heads together could be of benefit for both projects.
J_Darnley#
I wanted to post an update after coming back to work on this.

I've rendered a short video for anyone who wants to see somthing. You can get through this magnet link magnet:?xt=urn:btih:a122b516cdf80be9...monii.com:1337

I really need to get effect lists working.

Originally Posted by Warrior of the Light View Post
whose contact information do you need?
I've located the author of Texer II, Color Map (and others), Steven Wittens, here: http://acko.net/blog/avs/. I'll be sending him an email shortly.

I'm still looking for:
Tom Holden, the author of "Trans / Convolution filter"
Contact info for jheriko, author of "Trans / Multi Filter". I see a deviant art URL in the filter so I might see if I can resurrect my ~10yr old account there.
Anything about the author of "Trans / Texer" like a name, a nick, something.

Originally Posted by Yathosho View Post
While I doubt that UnConeD still has the sources for his APEs, the best way to get in touch is probably his Twitter account
Ugh, maybe, eventually. I might ask someone with an account to send him some sort of PM.

Originally Posted by Yathosho View Post
Have you had a look at Webvs? Azeem has reverse engineered some of the effects afaik. Getting your heads together could be of benefit for both projects.
I have seen it and have been thoroughly put off by the javascript. It has more black magic than the C++ I've been decoding to write this. I also found AVS file decoder which, despite also being javascript, was actually extremely helpful at showing me how to parse the files.
J_Darnley#
Okay. I now have a question.

In an Effect List there is an input/output blend option list, in these lists there is a Buffer entry which lets the user select one of the eight global buffers. My question is: does the selected buffer act as an alpha "channel" for the purposes of blending the input and output buffers together?

I think it does because I have seen this adjustable blend mode being used as an alpha blend in Dynamic Shift but the depthof() function threw me because it comes from Unique Tone.

If you're going to look at the source code, let me point you to the lines: r_list.cpp, lines 676 and 856.
Yathosho#
The most important question for me: do you design this with Winamp-independency in mind? Or, even better, cross-plattform? I don't think that many people still use Winamp anymore, maybe a small dedicated core.
J_Darnley#
Originally Posted by Yathosho View Post
The most important question for me: do you design this with Winamp-independency in mind? Or, even better, cross-plattform? I don't think that many people still use Winamp anymore, maybe a small dedicated core.
I do indeed design the core library to be independent from both Winamp and Windows. I have not yet tested on anything but 32-bit Cygwin (read this as Windows if you don't know what it is).

I have a very basic filter for FFmpeg's libavfilter library. I am using that to test the code by rendering simple AVS presets (that I save in vis_avs) to test each component as I create it. Doing that I can check that it doesn't horribly crash and that the output looks similar to what vis_avs is showing.

Nobody can use this code with Winamp yet as I haven't written a plugin for it. That is my ultimate goal though.

If you would like to try compiling, or writing a plugin for something else (VLC was mentioned in another thread), please feel free. I will answer any questions and address any issues you have.

P.S. I would like to bitch about the complexity of Dynamic Movement. This one is not very easy to make a half-way intelligent port. Then again, maybe I am just over thinking it.
J_Darnley#
Long time no see, everyone. I am here with an update. I now have an extremely basic plugin you can try, at your own risk.

It will render onto its own window at 320x240 at up to 30 fps. It has no skin integration yet (hence its own window). There is almost no reporting/logging of errors yet. If a preset tries to use a unimplemented APE then it will just fail at init and tell you. Texer and Texer II are the big missing features.

Oh, if you get the message RegisterClassEx failed at some point, restarting Winamp can remedy that until it happens again.

Since Gitorious is shutting down I need to put my code elsewhere. I'll probably move over to Gitlab who bought them. In the meantime there is source.tar in my attachment which has the up-to-date source in it (not that most people will be interested in that).
Yathosho#
Judging by the name of the DLL, this is a Winamp plugin then?

First of all it requires libgcc_s_sjlj-1.dll. Since I'm running Windows in a VM, I downloaded the first version I found (here), but I wonder if there's a more trustworthy source to download it. Is this part of MinGW?

Secondly, once Winamp stops complaining about the missing DLL, the plugin does not show up in my list.
J_Darnley#
Well, I was just about to post a new version anyway.

Firstly, I do apologise about the dependency. They are the most annoying thing when trying to run software. It was not my intention to require any non-windows libraries. I only noticed it yesterday when I opened several thing in Dependency Walker. This new one only depends on Windows' own libraries.

Secondly, yes it is a Winamp plugin.

Thirdly, yes that lib will be from mingw, specifically Cygwin's build of mingw64. Although my system apparently found a compatible one though GPG (which has just reminded me to create some signatures for my new version). Perhaps that one you downloaded doesn't have all the needed symbols causing the plugin to not show for you.

Anyway... The new version is almost entirely changes to the Winamp plugin and the Windows code. It has a configure window that lets you choose the preset, the render size, and an attempt at a framerate. I added a status bar to the display window which shows size and framerate, somewhat similar to the old AVS Editor window.

Less interestingly, I tried to improve my use of the Windows' API: slightly better checking and removing most of the error MessageBoxes, and most importantly I have now compiled the plugin using the Unicode defines and features.
Dr.Flay#
BTW. Don't forget that many Winamp plugins are used with other programs, and that "the way of the Llama" has become a semi-standard in its own right.
I use various Winamp Visualisers, DSPs, general purpose, inputs and outputs, etc. with XMPlay. (The skins are ported, but it can make a convincing Winamp clone)
Winamp users may be in the minority but the support is big.
DrO#
which ends up compromising improving how Winamp works with its own plug-ins as all of those programs stick on the plug-in api style from Winamp 2.x and then Winamp got complaints for not improving things or "breaking" external programs. it used to annoy me the requests to provide "updated" versions of my plug-ins to work with those non-Winamp setups which wasn't possible as those things didn't provide the Winamp features needed.
J_Darnley#
Shit! Fukken forum just vanished my reply. Well, time to re-type it.

Originally Posted by Dr.Flay View Post
BTW. Don't forget that many Winamp plugins are used with other programs, and that "the way of the Llama" has become a semi-standard in its own right.
I use various Winamp Visualisers, DSPs, general purpose, inputs and outputs, etc. with XMPlay. (The skins are ported, but it can make a convincing Winamp clone)
Winamp users may be in the minority but the support is big.
I envision the core visualization library to be portable meaning you can write a plugin for any player. (As I said previously, I already have a working filter for FFmpeg's libavfilter.) I don't intend to use any features that are not part of the C99 standard. Things that are, like multi-threading and assembly, will be optional. That being said I guess I am making similar assumptions as other software: two's complement, size of int, and signed shifts.

Some more implementation thoughts: everything will be optional.
  • Not on x86? Current assembly is optional and used though function pointers set at init.
  • No SSE2 or AVX2 support? It will fallback to MMX. However I intend to use some inline assembly for blending single pixels. The minimum feature set will be chosen at compile time. My future plans are to require SSE2 (saving countless emms instructions) for the DLL I provide much like the original plugin requires MMX(2).
  • No multi-threading on your platform? Optional and disabled at compile time.
  • A single core on your machine? 1 thread used.
  • Components like Texer will load bitmaps through a function pointer provided by the "plugin" layer.
  • Multi-threading will probably be done like that too, when/if I get around to it.
  • An options system will allow any software to interactively control the visualizer rather than original AVS's built-in Windows' dialogs.

Lots to do.

As for the Winamp plugin, it will be developed on a Windows 7 system with a Lynnfield Core i5 processor and designed with Winamp 5.666 in mind, which means I might inadvertently use some too-new features. I plan on supporting XP though (which I would be using right now but my old PC died). I probably won't consider other players while writing but if you can explain why, where, and exactly how I should make a change I will listen.

Originally Posted by DrO View Post
which ends up compromising improving how Winamp works with its own plug-ins as all of those programs stick on the plug-in api style from Winamp 2.x and then Winamp got complaints for not improving things or "breaking" external programs.
That must be the price of being so popular. I wonder whether you can tell me if there are already any large changes to the vis API in version 6?

Oh and I just realised that I have said that I did move the code onto GitLab and that I didn't provide a link. Here's the new location for anyone wondering: https://gitlab.com/J_Darnley/Advance...ization-Studio
Victhor#
Originally Posted by DrO View Post
you're asking the wrong person re: API changes.
The right one being...?
Yathosho#
Originally Posted by J_Darnley View Post
Oh and I just realised that I have said that I did move the code onto GitLab and that I didn't provide a link. Here's the new location for anyone wondering: https://gitlab.com/J_Darnley/Advance...ization-Studio
did you move the repository (again)?
Warrior of the Light#
works fine for me.
J_Darnley#
Originally Posted by Yathosho View Post
did you move the repository (again)?
No. I didn't. WotL seems to have found it. I think I remember Gitlab being unavailable a little while ago. Perhaps you visited then. Sorry I didn't see your post sooner. I haven't visited in a while and I thought I had subscribed (I hadn't but have now).
Yathosho#
Originally Posted by J_Darnley View Post
I think I remember Gitlab being unavailable a little while ago.
Yeah, that was it!

Also, a little bird told me you got the Texer source code in the meantime. Would love to test a new version soon. Speaking of which, I was wondering whether it's wise to use the same project- and file name for this. Ultimately, this could create some confusion. AVS-C99 (or something more creative) maybe?
J_Darnley#
Originally Posted by Yathosho View Post
Also, a little bird told me you got the Texer source code in the meantime. Would love to test a new version soon. Speaking of which, I was wondering whether it's wise to use the same project- and file name for this. Ultimately, this could create some confusion. AVS-C99 (or something more creative) maybe?
It was actually Texer II. Anyway I do have a proof of concept written for Texer which draws a static sprite (a sort of RGB test pattern) where it should. I didn't commit it because I was planning to write the bitmap file loader first. I could build it with that so you can see it. Do you want me to do that?

I haven't pushed to Gitlab in a while but I don't have many new features to tout. The main one would be using sse2 intrinsics for pixel drawing functions. It worked fantastically for a preset which spent most of its time in the sub-sample pixel blending function reducing time spent per frame from ~30ms to ~16ms. I can now run that preset marginally faster than vis_avs.dll although I'm not drawing anything to the screen in that test.

As for the name. You do have a good point. I'm not creative enough to come up with a good name. I called the directory I'm working in "advistu". If I get far enough or deviate far from vis_avs then I will give it some serious thought.
Yathosho#
Tried building, but I'm getting this error

makefile:11: config.mak: No such file or directory
Actually none of those first three includes are present when I clone the source
J_Darnley#
Dammit! I did remove the config files because I was intending to replace them with some configure script which would create them. I tried out a few options but didn't like any enough to actually commit one (I was also trying out alternate build methods). I guess I forgot about that small detail when I pushed.

I guess I'll commit them again for now. [EDIT] Done.