Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   AVS (http://forums.winamp.com/forumdisplay.php?f=85)
-   -   New improved avi player APE (http://forums.winamp.com/showthread.php?t=202158)

goebish 15th December 2004 18:01

New improved avi player APE
 
Hi !
I just made an improved AVI renderer for AVS featuring:

- better stability (no more crash when changing files without disabling rendering)
- better speed control, with frames skipping
- pause & reset video buttons
- luma & chroma keying

http://goebish.free.fr/vfx/aviplayer.jpg

Controls should be self explanary,
Chroma keying is far from being perfect but it works
pretty well for what I do with it :)

Get this new APE at: http://goebish.free.fr/vfx

fsk 16th December 2004 16:53

nice ape.
never realy used avis in my presets or anywhere:). might i ask whats wrong with Pixelplayer ape? it seems to work fast and somewhat stable. Havent tryed to work with it myself and it prolly woldnt be a good thing to use with hotlist because they both need lots of ram.




btw why doesnt playlister work with the new avs:/

goebish 16th December 2004 22:07

Pixelplayer APE require ram because it decompress entire video stream into memory for fast frames access, allowing reverse playing with non/poor keyed video file and other things.
Mine doesn't, but they don't have the same application (both are for live performance anyway).

Magic's Hotlist (hi mate!) doesn't take so much memory, it just preload presets's snapshots, that's not so much.

Playlister works very well with newer Winamp/AVS, just use classic style instead of modern, only resizing of render window don't work.

fsk 20th December 2004 07:12

Quote:

Magic's Hotlist (hi mate!) doesn't take so much memory, it just preload presets's snapshots, that's not so much.
it does if you have a lot of them:)

Quote:

Playlister works very well with newer Winamp/AVS, just use classic style instead of modern, only resizing of render window don't work.
I read it in the help file, and because i cant get it to work i thought this was the reason. It crashes when i want to add a preset to the playlist. Any ideas why?

ps: i know this is a bit offtopic but since you are probably goning to read this thread again i thought i'd ask here:)

goebish 20th December 2004 07:53

Quote:

Originally posted by fsk
I read it in the help file, and because i cant get it to work i thought this was the reason. It crashes when i want to add a preset to the playlist. Any ideas why?
I just made it work without problem. Does it give you an error number/message so I can try to fix it?

fsk 20th December 2004 18:27

ok when i first run it after install it sais:

Quote:

erreurd'execution '97':

impossible d'appeler une function aime sur un objet qui n'est pas une instance de classe de definition
after that it shuts down and when i run it again, and add a preset it just crashes without any error messages.

goebish 20th December 2004 18:52

The first error after install is normal (well, this is a bug coz the .ini isn't here yet).
I've no idea about your crash and the problem is that this is a 2 years old crappy VB program.
If enough peoples get interested maybe I can try to remake it using C/C++

fsk 24th December 2004 07:28

that probably will not happen, so i gues this will die just like hotlist did:/.

thx anyway:)

goebish 24th December 2004 08:09

I tested it on some computers (98/2K/XPsp1) while the week and I had no problem. Probably your problem is due to a dll-hell as I compiled it with a french edition of visual basic. If you have a VB6 compiler I can send you source code so that you can compile it by yourself and maybe solve your issue (pm me,I'll do my best to help you).

goebish 29th January 2005 17:07

Back to the topic ;)
 
I just updated the .ape

http://goebish.free.fr/vfx/aviplayer.jpg

------------------------
V1.04 Changes Log
------------------------
- faster chroma keying
- keys inverters
- adjustable blend mode
- .avi files folder selection
- configurable auto stream change

TomyLobo 29th January 2005 22:34

nice ape, but why an own menu for that ape? shouldnt it be in the 'Render' menu?

TomyLobo 30th January 2005 05:23

from the AVS Wishlist:
Render / AVI: Ability to provide code to define playback speed (or current frame)

You could implement that in your AVI player :)
setting the current frame might be hard though as you said your APE streams the AVIs instead of pre-loading them

What about implementing the remaining blend modes? (by adding an option "Default renderer blend mode", like Render/Clear Screen has)
I can give you fast MMX code for all of the blend modes, especially for maximum/minimum blending.

goebish 30th January 2005 08:17

Can I access (at least read) global registers from inside my APE ?
How do I retrieve default renderer blend mode ?

Thanks :)

TomyLobo 31st January 2005 01:08

yes you can
if you didnt find out how yet, you prolly have an old SDK
get the new one here:
http://download.nullsoft.com/winamp/.../wa502_sdk.zip
you can also make codable components with it
read the avs_ape.h file and you'll find out everything you need
further questions: post here or pm me :)

btw: don't use the blend functions in that header. they're about the slowest thing possible to do the job :) PM me if you want MMX blend functions

goebish 31st January 2005 08:06

I didn't know there was a new ape SDK version. I'm just looking at it, thanks :)
My code use these BLEND & BLEND_AVG functions, there're not so slow (but I use MMX asm for adjustable blend).
I'll try to implement missing render modes soon, I'll ask you if i've problem with it. Don't really know when I'll have time because I start my new job tomorrow, so maybe one of those week end :)
Is there an sample code for a codable component somewhere (so I can make x,y,w,h,speed & frameskip codable) ?

TomyLobo 2nd February 2005 08:12

i'm afraid there's no sample code anywhere...
you get a VM context handle with the "allocVM" function.
you should do this once per instance, so that every instance has its own variables and things like that.
the next thing you do (also once per instance) is registering variables. you might find this macro useful :) (modify to fit your variable name for the VM context)
code:

#define regvar(varname, initval) *(VMV_##varname = g_extinfo->regVMvariable(vmcontext, #varname)) = initval;


it registers a variable with the given name and initialises it to the given initvalue
example: regvar(w, (double)w);
you need to declare this variable somewhere (preferably in the class definition)
double *VMV_w;

after you have completed these steps, you can compile code with the "compileVMcode" function. This function takes a VM context and a piece of code as parameters and returns a VM code handle.
you can then execute the code with the "executeCode" function.
when you're done, don't forget to free the code, using the "freeCode" function, and the VM, using the "freeVM" function.

btw about that mmx stuff:
i have maximum blending in 2 MMX ops per 2 pixels and minimum blending in 3 MMX ops per 2 pixels (not including loading the mmx registers and storing the data back)

goebish 2nd February 2005 16:21

Thank for your answer, I'll try to play with this VM.
I'm interested by your MMX routines but I need per pixel (not 2) because of keying as I don't render every pixels.
I need a function like:
code:
static unsigned int inline minblend(unsigned int a, unsigned int b)

TomyLobo 3rd February 2005 02:21

code:

static unsigned int inline maxblend(unsigned int a, unsigned int b) {
unsigned int tmp;
__asm {
movd mm0, a
movd mm1, b
PSUBUSB mm0, mm1
PADDB mm0, mm1
movd tmp, mm0
}
return tmp;
}
static unsigned int inline minblend(unsigned int a, unsigned int b) {
unsigned int tmp;
__asm {
movd mm0, a
movd mm1, b
MOVQ mm2, mm0
PSUBUSB mm2, mm1
PSUBUSB mm0, mm2
movd tmp, mm0
}
return tmp;
}



don't forget "__asm emms" after you're done, or every floating point operation after that will fail (AVS code contains lots of floating point operations)

goebish 3rd February 2005 05:31

You man are really great :)
As I said before I've not too much time now but I'll implement that one of these week end.

TomyLobo 3rd February 2005 08:18

btw you should really think about doing the whole filtering (including keying) in MMX asm... i'm sure there's a lot of speed to gain this way

Yathosho 16th February 2005 15:07

would be helpful to add a version-resource to your APEs


All times are GMT. The time now is 22:19.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.