Archive: APEs programming


15th April 2002 11:05 UTC

APEs programming
Hello ! I'd like to share the source code for APE with others programmers...I hope some people will join this topic and post their source code :)

here are the source code for the 3 APE I just programmed:

ScreenReverse.APE
AddBorder.APE
RGBfilter.APE


15th April 2002 16:13 UTC

I am at a computer at school, so I am not able to download the apes right now. I do not know anything about them but have heard that they are writen in c++ so wouldnt this require a compiler and decent ones cost a pretty penny. Just wondering where I can get a free c++ compiler that works pretty good, to join the ape bandwagon. :winamp:


16th April 2002 04:26 UTC

dev c++ should works
you can get it from sourceforge.net

huh do you guys think a command can be done to take the avs's layer to skin a 3d ape?


16th April 2002 05:15 UTC

dev c plus plus
i works with c++ cause it's free and cause i'm a programmer...so to compile these codes how should i operates (basicly to makes changes to the sources won't realy be a trouble...the worst i can get is a crash..héhé)


16th April 2002 05:22 UTC

wow UnConeD....i just seen whacko!!
man now i know what is an ape!!!!


16th April 2002 06:00 UTC

Well it wouldn't be too hard to improve the metaballs so that a buffer is mapped onto it as texture. Just don't have time for that now :).


16th April 2002 22:18 UTC

direct3d ape?
hey friend do you think it'd be possible to make an ape (like an effect list) that outputs the visual from 3d hardware

and a way to reduce colors in it (or anything to incrase the speed of hungry presets) in it

yeah i was thinking about an ape using 8bf files from adobe photoshop and pals to make fxs like false 3d , 360 rotation , chrome , (and cloning from others like hot wax coating ((((ok and using a comm to reduce quality to incerase speed))))

an ape to make transparencity fading and move edges over edges to remove ugly lines un ddm rb and zooming purpose parts




!!!!!!!!!!!!!hey budddies..who did ask to get sourcecodes from avs...for what purpose! ape's been created!!!!!!!!!!!!!!!


héhé so that's it.....

i posted some more stuff directly about avs in the whishlist)

see ya


17th April 2002 19:05 UTC

damn
well i downloaded the zip onto my school's computer.
they have borland C++, visual C++, visual J++, and VB 6 but no damn winzip. im gonna go dl it write now and check your stuff out.


18th April 2002 05:31 UTC

comme promis.....
......................


18th April 2002 05:33 UTC

the full size one
.............


18th April 2002 15:11 UTC

the buffers/blending
is there any way to make an alternative to effect list or to buffer save to make a chosen color being blended..like completely avoided...
cause i think that evry parts of avs can be converted to ape and then being modified

in another post i made i asked for this...i got some answers..but didn't realy satisfy me cause there is always some pixels half blended and the rest is transparent(the good part)
so i can't realy get the little flyin fairie to be all opaque (even if i use no fairie:confused:)

so it'd be great to make an ape that tells <<hey the machine , remove this color and make it transparent or hey avs take this color and give it some alphablending , and do nothing to the rest>>


i did find an excelent slideshowmaker ape that takes jpg..

if there were an ape that simply use gif with transparent colorcode
or png with simple tansparentcode it'd mayby do the job great
but the first alternative would mayby help elsewere...like in presets like cartoon from unconed......

you'd take an effect list with movin particles/rotto blitter/water/buffer save then another effect list with
with cartoon effect, then aply the ape to one color or two (hum mayby usin the color gradian inside fractal fx (like the one in photoshop when making a gradian with a form like left to right /square/circle)

huh and you there can chose 2 or 3 colors to become transparent

(ok here there is the option of buffer save and/or effect list to be modified as an evolved ape


so here i send what i've made upon now to understand how to works with tools i have

sorry to explain so badly.....i'm kinda stressed out and i made a white night too......i'm stressed cause i'm gona be a vj if i can show a bit more of quality to my talents (if i got any talent)

so priv msg me if you find any better synthax the 180 (minutes or hour i don't remember)after i wrote


26th April 2002 14:27 UTC

No more posts in this topic ...... Don't anyone want to share his sources with the community ????


26th April 2002 17:32 UTC

I'm working on an AVS-script compiler and intend to release it as public domain here if I ever get it to work. That enough? :)

By the way, I took a quick look at your code and noticed it's quite inefficient. Here are a few ideas:
* RGBFilter:
- Why don't you calculate the mask in realtime? Simply do something like:

int mask = (0xFF && enabled1) || (0xFF00 && enabled2) || (0xFF0000 && enabled3);
That should reduce your code by about 95%.
- Why are you putting everything in fbout[]? You could just as well do the modifications to framebuffer[] itself, because there is no dependancy between the pixels.

* ScreenReverse
- The pos() method is called twice for every pixel in the image, which means an immense slowdown. Replace it with a macro:
#define pos(a,b,c) ((a)+(b)*(c))
The compiler will replace every instance of pos() with the real code, which means that there is no extra function call per pixel, but you still get nice code.


Also, if you want fast APE's, you need to use assembly and MMX in critical routines. It's already very slow :) For example, here's the critical code for my Color-reduction APE:

/* render */
int a,b,c;
a = 8-config.levels;
b = 0xFF;
while (a--) b=(b<<1)&0xFF;
b |= (b<<16) | (b<<8);
c = w*h;
int a,b,c;
a = 8-config.levels;
b = 0xFF;
while (a--) b=(b<<1)&0xFF;
b |= (b<<16) | (b<<8);
c = w*h;
__asm {
mov ebx, framebuffer;
mov ecx, c;
mov edx, b;
lp:
sub ecx, 4;
test ecx, ecx;
jz end;
and dword ptr [ebx+ecx*4], edx;
and dword ptr [ebx+ecx*4+4], edx;
and dword ptr [ebx+ecx*4+8], edx;
and dword ptr [ebx+ecx*4+12], edx;
jmp lp;
end:
}
return 0;
/* end render */

This might seem weird at first, but it's actually pretty tight code. It takes advantage of the fact that AVS's imagewidth is always divisable by 4, to do 4 pixels in one cycle. This means only 1/4th the amount of jumps.

By the way, mucks: it's not possible to make Effect List APE's. APE's can only behave like a misc, trans or render.

26th April 2002 17:42 UTC

can anyone compile goebish 3 apes so i can use them?


6th May 2002 14:05 UTC

thank you for your code Unconed, i'm really a begginer at C++ programming but I can understand your code (I love assembly coz I love reverse enginering :) ) so I'll publish versions 1.2 of my APEs (and their source code) very soon.
Montana: If you want my compiled APEs go to this page ( french only at the moment :) ):
http://vfx10.***********/softs.htm

You'll find 4 apes with their source code and some utilities I made recently...AVS Playlister is an AVS presets list manager I just made.to use it, read the doc ! (in french :) if someone want to translate it to english please tell me )


6th May 2002 16:15 UTC

A new one !
here come a new one: NegativeStrobe.APE

also check this page to get the latests versions of my APEs and their sources: http://vfx10.***********/softs.htm


6th May 2002 16:18 UTC

I feel alone
AM I THE ONLY ONE TO POST CODE HERE ?????


6th May 2002 18:47 UTC

You're probably one of the few people who writes code in the first place. I'd post code...if I had any


7th May 2002 11:20 UTC

Of course i could post the Hotlist Code here but first, it would fill more than 20 Pages, second, it is all written in Delphi, third, i have a really unusual style of programming and dont want to torture anybody by letting him unscramble those 20 pages of code.

If anyone wants it nevertheless, i'll post it here, but dont make me responsible, i warned you. :P


7th May 2002 12:08 UTC

No, I'd like this thread to be about APE programming only...not 3rd party utilities...But wouldn't you try C++ and assembly to join us :)
And I've a remark: european peoples are very active on this forum :)


9th May 2002 13:25 UTC

compiled goebish APEs
some peoples asked me for my compiled APEs coz' they don't own VC++..so here they are..To install them, copy the .APE files that are in the zip file into your AVS directory (the default directory is c:\program files\winamp\plugins\avs )...Have fun


16th May 2002 13:35 UTC

weird .ASC fileformat...
Please Unconed, How can I make .ASC files for your 3D.APE, I've tried lot of converters but none works...This APE could be very usefull to me if I could insert my own objects....


17th May 2002 12:19 UTC

If you mean the wireframe renderer APE, I didn't make that one... I made Tentacles and Metaballs.


22nd May 2002 22:34 UTC

Video Capture APE
Has anybody gotten the AVS Video Capture APE to work right? I got it to work with my crappy IBM PC Camera, but it made my FPS crawl at like 1 or 2 fps. I haven't been able to get it working with any other cameras or capture devices because they don't support 32 bit mode. Perhaps somebody could improve the APE. I think the original coder abandoned the project, but he might be willing to give up the source code.

I'd be willing to help, but my C++ is pretty limited. If I can get the source code from the original author I will post it to this forum.


23rd May 2002 06:58 UTC

maybe try another one...
I know there are more than one video input APE and some work better than others...I don't use it at the moment, but a friend do, I'll ask him to send it to me and I'll post it here...Hope this will help

Note: I basically come from Visual Basic world and my C++ knowledge is limited too ( the APEs I made are my first C++ programming attempt), so why don't you try it too ? :D


23rd May 2002 18:54 UTC

I know well C++ & VC++
but how can i compile APE?
the compiler compile only 2 exe.


23rd May 2002 20:56 UTC

lol
do you really know "well" VC++ ???? It can't just compile to exe but also dll...and ape is a sort of dll (not really but...), just go here to download my sources : http://vfxsoftwares.fr.st and open the dsw files with "open workspace" in visual c++, compile and OOOHHHHHH :eek:!!!!!! It compile to an APE :eek:


29th May 2002 01:06 UTC

animated gifs...
I'd like to develop an APE to render animated GIFs (with size, positioning, transparent colors and so on...),but as my C++ knowledge is limited for now (thanks again UncoNeD for the tips you gave me:)), I'd like someone serious to help me when I'm having problems...Can someone join this project please ?


15th June 2009 15:02 UTC

hey goebish, it would be very useful if you could add a version resource to your APEs. though it might be unlikely you will still update them, it'd allow a proper installation (checking for up-to-date versions).


26th June 2009 13:51 UTC

what is wrong with the file date and time?


27th June 2009 23:35 UTC

the installer has to *know* which ape file is the latest, with version resource you can do a simple comparison. lower chances to fuck it up.


28th June 2009 11:49 UTC

ok, i noticed i wrote some bs before. however, it's still true that the filedate is very unreliable to determine the version. using a checksum would be more reliable, but the installer had to know the checksum for every installer. so, the version resource remains the best way. i'm pretty sure that every guide to coding would mention these as proper standards anyway and i don't see a need to act like a rebel (you are just lazy!).


30th June 2009 13:54 UTC

Originally posted by Yathosho
ok, i noticed i wrote some bs before. however, it's still true that the filedate is very unreliable to determine the version. using a checksum would be more reliable, but the installer had to know the checksum for every installer. so, the version resource remains the best way. i'm pretty sure that every guide to coding would mention these as proper standards anyway and i don't see a need to act like a rebel (you are just lazy!).
I get your point about the file date/time being unreliable but its better than nothing. Maybe fallback to date/time if the version is absent?

As for version resources being good practice... the version resource system is a hacky pile of crap of its own. The real coder's solution is to get the information from the PE header like Windows does... whether or not there is a suitable API for doing this though is another matter entirely. I'm sure that has something to do with the general crappiness of versions in executable code. Rather than solve the problem MS devoted their attention to their horrible WinSxS / .NET assembly system.

It's all very backwards... "DLL hell" is only an issue if you suck at writing DLLs and programs to begin with. IMO there is nothing for MS to fix, except maybe the crappiness of their PE/COFF implementation which:
(O/S side)
* isn't consistent across the different flavours of Windows (a "do nothing" executable that runs on XP may not run on Vista)
* doesn't conform to the actual PE/COFF specs
* doesn't conform to their own PE/COFF specs
* isn't accurately documented anywhere (that I've found)
* isn't necessarily used as the source of information for .exe properties sheet
* doesn't come with an API to use it
(compiler side)
* doesn't grumble if there is missing information (i.e. no version)
* doesn't check the validity of values
* imposes more restrictions than either version of the standard or the implementation require

I went off on a bit of a tangent there... but the relevant point to this discussion is that the PE could provide a checksum AND a version if it wasn't implemented by MS monkeys.

30th June 2009 19:51 UTC

While we're talking about detecting versions.. Can PB somehow detect the AVS version in the same, or some other way?

If it could, the installer could prevent installing Video Delay and [the other pre-installed one, convo filter?], if the current AVS version also includes those effects, or even remove those (unwanted) duplicates


30th June 2009 20:26 UTC

pimpbot already disables the sections for those apes in during setup. however, the user can override this and install the APEs anyway. in that case and extra question will bother the user, default action set to no overwrite. pimpbot also warns the user if an APE with version resource is newer than the one included the installer.


1st July 2009 14:52 UTC

Then, did Micro D use an old version? During the installation of xen-ON, it tried to install Video Delay (the checkbox is green)


1st July 2009 15:23 UTC

afaik videodelay is circulating around in two different names. pimpbot uses delay.ape since day one, but maybe that's a mistake.

edit: is the ape part of avs? when did that happen?


2nd July 2009 18:12 UTC

I don't have a delay.ape in my \avs folder, but I can use video delayin my presets. I just installed delay.ape there (for testing), there are two instances now.

Don't know when it was added, but my guess would be ever since 2.81b.