Archive: avs 2.8 alpha 3-4 and EXP1 (Woo)


29th November 2003 07:38 UTC

avs 2.8 alpha 3
http://www.firehose.net/~deadbeef/avs28alpha3.zip

- Fixed the doublesize mouse issues.
- Optimized evallib more (woo fun shit writing stuff that generates x86 asm), generated code is now 40% smaller and slightly faster.
- Added evallib code stats in debug window.
- Reduced overall memory use.

Woot. Thursday's gettin closer! hehe.
I think I am also gonna add setmousepos(x,y) soon, so that if the avs window has focus, the script can reset the mouse position, in order to detect movement (i.e. for mouse controlled relative movements)...

-Justin


29th November 2003 09:58 UTC

I'm experiencing a very weird bug with this alpha (using rc9).
Occasionally when loading a preset, the first 'n' components of it will be missing. Sometimes the entire preset is even entirely empty, and sometimes only the last component remains. How many components are missing seems completely random, even for the same preset.

I'm trying to figure out what causes it, but it's happening only occasionally.
I.e. if I flip around a lot with next/prev, it will occur sometimes.

It happens both on large and small presets, on presets with or without effect lists and with or without apes.


29th November 2003 10:18 UTC

Using rc8, this problem has not occured to me yet.


29th November 2003 10:23 UTC

I use winamp2.91 and it has happened to me once so far. A preset lost it's first four components: a set rendermode, a superscope, an entire effectlist and a texer II.


29th November 2003 10:51 UTC

imo a setmousepos(x,y) function would be very, very, very annoying and would only lead to very, very, very annoying presets from very, very, very annoying n00bs that tend to use things like <blink>.

\o/ rock on justin for making avs 1337, even though i'm not using any more new alphas until people start saying it's not borked \o/


29th November 2003 13:21 UTC

Wohoo... that called fps :D
i get 75-100fps @ 384x256 with my solid (and phonged ;)) icosahedron but, yes the 'n' bug is really stupid, i have had this few times with ssc and once with texer2 O_o

heh, i dont think setmousepos(x,y) is good idea


29th November 2003 14:32 UTC

i have the feeling the random of avs got even worse, i often get the same preset played twice. i wish both -winamp and avs- had a more advanced random mode, one that does not repeat a track/preset before all in a dir/playlist were played.


29th November 2003 15:41 UTC

Originally posted by skupers
I use winamp2.91 and it has happened to me once so far. A preset lost it's first four components: a set rendermode, a superscope, an entire effectlist and a texer II.
Another preset lost it first 8 components.

29th November 2003 18:08 UTC

I'm getting the missing components bug too. Seems to happen when switching presets quickly, for example hitting U and then Y in quick succession.


29th November 2003 18:28 UTC

Yep, it occurs over here now as well, Almost half of UCD's LOTR preset dissapeared.


29th November 2003 21:17 UTC

i cornloaded this one and now I've gotten the components bug about three times as well...running wa2.91 on win98se.


29th November 2003 21:49 UTC

I think setmousepos(x,y) is not useful :(
What about $mouseX and $mouseY - that'll be interesting... :p

[EDIT]
oh, and BTW UnConeD, where did you get RC9? :winamp::winamp::winamp:


29th November 2003 22:07 UTC

$mousex and $mousey already exist. pay attention foo'

and i just realized this...since when is there a limit on variable name lengths? if it was implimented after 2.6 it could cause problems for old presets. imo this is a really stupid idea in the first place...yes it does discourage cluttered code, but it can cause trouble if don't know about it in the first place....


30th November 2003 00:19 UTC

I think the most important question is: 'Will the final AVS release with Winamp 5 be stable?'. All the new features are great, but who will use a vis plugin that crashes every 10 seconds?

BTW: has anyone noticed how superscopes will randomly switch from lines to dots during editing?


30th November 2003 06:39 UTC

nah. i think after hearing all these porblems i wont download this alpha :rolleyes:


30th November 2003 09:06 UTC

Originally posted by jheriko
BTW: has anyone noticed how superscopes will randomly switch from lines to dots during editing?
Now I think about it, I do remember a few times where I thought I set a scope to lines, but later it was set to dots. I thought I just clicked wrong or something, but maybe it's a bug like you said.

30th November 2003 14:24 UTC

I just realized you implemented a rather big change in alpha behaviour for DM's... a gradient between alpha=0 and alpha=1 will not be the same as a gradient between alpha=-1 and alpha=2.
So basically AVS is interpolating between the coded alpha values, and clamping the interpolated result to 0..1.

The previous behaviour was that alpha would clamp the gridpoint's alpha before interpolation. Some situations do benefit from the new style, but it should be a toggle not to clamp alpha before interpolation IMO, with old presets retaining the old behaviour. There are many presets that depend on the old style to pull off some visual tricks (like Retrosquares, which is included in the Winamp5 picks!).
Add alpha=max(0,min(1,alpha)); to the end of the point code in the first DM in Retrosquares to see how it should look. The second DM in retrosquares does benefit from the new behaviour, so it would be handy to be able to toggle.


There was an alpha clamping bug, but this was not what was meant...
The bug was that when you get large alpha values, it starts toggling on/off randomly. You'd need to clamp alpha for this, however for the new alpha behaviour (if togglable) to be useful, you couldn't clamp at 0 and 1. I suggest determining the upper/lower limit for alpha based on code, and clamping at that.

To see this in action, try this:
* Render / Clear Screen: White
* Trans / DM: No Movement, Blend only. Per point code: alpha=10

Now add more zeroes to 10... sometimes the alpha will invert, for example at 1000.


By the way, just letting AVS play in Winamp on random preset mode is enough to make it crash after couple of minutes.
The cause is reading a nullpointer. I'll see if I can figure out where.

PS: Next time you're unsure what a particular bug is, please send me a mail... I collected the wishlist and authored most entries myself ;).


30th November 2003 15:51 UTC

Originally posted by UnConeD
There was an alpha clamping bug, but this was not what was meant...
The bug was that when you get large alpha values, it starts toggling on/off randomly. You'd need to clamp alpha for this, however for the new alpha behaviour (if togglable) to be useful, you couldn't clamp at 0 and 1. I suggest determining the upper/lower limit for alpha based on code, and clamping at that.

To see this in action, try this:
* Render / Clear Screen: White
* Trans / DM: No Movement, Blend only. Per point code: alpha=10

Now add more zeroes to 10... sometimes the alpha will invert, for example at 1000.
Is this what causes those irritating dots on some 3d movements at the places where the distance is extremely far?

30th November 2003 16:35 UTC

Yup... ;)


30th November 2003 16:45 UTC

I'm going to be able to make some crazy presets with this.


1st December 2003 07:11 UTC

Originally posted by UnConeD
PS: Next time you're unsure what a particular bug is, please send me a mail... I collected the wishlist and authored most entries myself ;).
Actually, I didn't do what you thought, and make it clamp at each interpolated point... rather I was just fixing the clamping to clamp to 0..1 at each eval point. But my code was fucked, so clamping was disabled altogether. Oops. Here is the fixed version:

http://firehose.net/~deadbeef/avs28alpha4.zip

Some other optimizations in there too... This one should hopefully
go in WA5 on thursday, heh.

-Justin

1st December 2003 07:37 UTC

Sweet!


1st December 2003 14:12 UTC

hehe i hope this version is good enough!:rolleyes:


1st December 2003 21:35 UTC

I'm still getting disappearing components when switching presets sometimes. I'm not yet sure if it still crashes though. I'll fool around with it later.

EDIT: It just crashed while I was trying to save a preset. I hope these bugs get ironed out before the Winamp 5 release.


1st December 2003 22:26 UTC

wa5 is out thursday?!?!?! neato


2nd December 2003 00:16 UTC

got some weird stuff going on in my avs screen, but after restarting winamp it's all good. wtg justin :)


2nd December 2003 05:57 UTC

Originally posted by Shock Value
I'm still getting disappearing components when switching presets sometimes. I'm not yet sure if it still crashes though. I'll fool around with it later.

EDIT: It just crashed while I was trying to save a preset. I hope these bugs get ironed out before the Winamp 5 release.
Can you send me (justin at nullsoft dot com) your vis_Avs.ini? Thx.

-J

2nd December 2003 06:39 UTC

Alpha4 is running nicely Justin, and thanks for ironing out the component bug! So will there be a full AVS 2.8 ready for Thursday, or will you stick with the alpha?

BTW...

Originally posted by justin
justin at nullsoft dot com
Keyboard broken or something? :D

2nd December 2003 22:44 UTC

NDD : It's to prevent spambots from doing what they do :)


2nd December 2003 23:04 UTC

Actually it's dead easy to grab these supposed spam proof addresses:

[a-zA-Z0-9_-~+]+ at ([a-zA-Z0-9_-~+]+ dot )+[a-zA-Z0-9_-~+]+

(regular expression)

You're better off using some smarter scheme, e.g. "my first name at nullsoft dot com"

Humans won't have a problem, spambots will ;).


2nd December 2003 23:13 UTC

what if they didn't know his name was justin, even tho there were sooo many hints for it


2nd December 2003 23:46 UTC

Being THAT stupid, they have no business mailing him anyway


3rd December 2003 01:44 UTC

Originally posted by UnConeD
Actually it's dead easy to grab these supposed spam proof addresses:

[a-zA-Z0-9_-~+]+ at ([a-zA-Z0-9_-~+]+ dot )+[a-zA-Z0-9_-~+]+

(regular expression)

You're better off using some smarter scheme, e.g. "my first name at nullsoft dot com"

Humans won't have a problem, spambots will ;).
Yeah well I wasn't too terribly afraid, I get so much spam anyway.. was just making it non-superduper-trivialobviouslybad. :)

-J

3rd December 2003 06:30 UTC

OK I think this finally fixes (thanks to Unconed's diagnostic help):

http://firehose.net/~deadbeef/avs28exp2.zip

The exp1 (err now exp2 fixing the deadlock bug) is because this uses my new evallib version which has some pretty major architectural changes (supports unlimited variables yay!)... So if you notice any new eval related bugs let me know, and I'll either fix or revert to the old code if need be.

-Justin

Edit: updated it again, resolving lots of little preset/transition issues. If you got it before reading this notice, get again =)


3rd December 2003 19:10 UTC

i only have one problem:
when i close the avs window a "plugin has executed an ilegal opperation. restart of winamp is recomended" message pops up.


3rd December 2003 19:54 UTC

Doesn't occur over here. Not even when I tap ctrl+shift+k really fast. Try reinstalling.


3rd December 2003 21:53 UTC

Justin could you make the text have codable x,y,size,on/off and it would be extra cool if it could be used as an array (would return length and you could set the index for the rendered word) multiline text would also kick ass but if you do the others that wouldnt be hard to do with code.


4th December 2003 01:00 UTC

Originally posted by jonasc1
i only have one problem:
when i close the avs window a "plugin has executed an ilegal opperation. restart of winamp is recomended" message pops up.
Same here. I'm using exp2. It doesn't really make much of a difference in the operation of the program itself, but it's damn annoying.

4th December 2003 12:40 UTC

Same thing for me. It also happens when I dock the AVS window in or out of the Winamp 'window'.


4th December 2003 13:07 UTC

And still, when I return from fullscreen to normal (undocked), the cursor disappears behind the editor and all other WA windows.
Clicking on any window fixes this, but it's quite annoying.
Changing priorities shoud fix this, I guess.

I know this is a WA5-related bug, but since we're listing bugs anyway...

Using W98 and WXP, happens with both.


4th December 2003 15:39 UTC

has been happening in w98se on wa2.x for a long time too. i seriously don't see what the problem is though....


14th December 2003 09:57 UTC

Not a bug but to consider:

In previous version of AVS the image is lost on resizing the AVS-window. Now there is this option "reuse image on window resize" found in display settings which is turned on by default.

I do not know if this thing really makes sense here. Especially when doing SSC/DynaMove-coding depending on w and h it is comfortable to get an empty image after resizing to start back from "black" with the new res. Plus with some extra-code one can check for resizing and then start drawing from the very start, i.e.

Frame:
new=if(equal(resold,w*h),0,1);
resold = w*h;
...

Now with this new option some unwanted leftovers of the previous res stay on the screen which causes some of my presets to look ugly.

I think this new option should be better placed somewhere inside a preset i.e. inside "main". So one can decide for every single preset if the image is kept on resizing.


14th December 2003 15:09 UTC

Using effect list coding you can do your own check though, and make every effect 'first frame/resize only'.

By the way it's probably better to check w/h separately rather than their product.


15th December 2003 03:43 UTC

It's better to use h*1600+w instead, no one's really gonna run AVS at a higher horizontal resolution of 1600. Or if you can spare the division, h+1/w. This puts the height on the left, and width on the right of the decimal point, as we know that both w and h are integers.


15th December 2003 05:26 UTC

Why would a multiplication+sum or even a division+sum be faster than simple equal-checks?


15th December 2003 08:45 UTC

Originally posted by UnConeD
Using effect list coding you can do your own check though, and make every effect 'first frame/resize only'.

Yep, but I am thinking of compabilitiy - means running Presets made with previous AVS-versions in new AVS2.8

15th December 2003 11:16 UTC

Originally posted by UnConeD
Why would a multiplication+sum or even a division+sum be faster than simple equal-checks?
Because you know as well as I do that jumps kill the cache.

15th December 2003 16:41 UTC

True but FP multiplication and especially division are still slow. I'm not sure if branch prediction will have an effect on such a single piece of code.

Remember though, due to the evallib changes, a lot of code that used to be slow will be fast now (best example: Neon Coaster which runs 3-4x faster).


19th December 2003 00:30 UTC

ok maybe this isn't the best place to post but i didn't want to create a new thread...

when clicking the channel shift winamp crashes without even showing the menu, it happened in the final that came with wa5.

*edit: nevermind, spotted the problem... the channel shift ape was still in the avs directory, this is what makes it crash.