Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   AVS Wishlist (http://forums.winamp.com/forumdisplay.php?f=138)
-   -   Framerate Limiter - Request to UnConeD (http://forums.winamp.com/showthread.php?t=135351)

Magic.X 14th May 2003 11:09

Framerate Limiter - Request to UnConeD
 
I know the Framerate Limiter idea is nothing new,but as i read that UnConeD has already written a FPS Detector ape, i thought that this could easily be transformed into an Framerate Limiter by inserting some delay code.

This would be kinda great as i have a lot of best at xx.x fps presets!

mikm 14th May 2003 20:25

and what if the framerate is below xx.x? what then?

I think the biggest problem with this is that it might cause the framerate to be 'blocky'.

Magic.X 15th May 2003 11:09

BLOCKY???

Don't know what you mean by this.

It could be done like this:

Check fps

If fps>xx.x increase %loop%
If fps<xx.x decrease %loop%
If fps=xx.x do nothing

do some hungry processes for %loop% times (could be a double inversion of the frame for example)

See if your pc is not able to even achieve xx.x fps the loop will be always 0.

Otherways the ape will always adjust it to the desired fps.

Quite simple, i'snt it? I'd do it myself, only prob is that i'm too busy with coding hotlist and my c++ knowledge is not the best.

sidd 15th May 2003 13:29

obviously if the fps is already less than desired, you cant do much abuot it. but thats not the point. i think its a damn nice idea magicX

mikm 15th May 2003 20:27

what I'm saying is that if you have a FPS slowing APE at the end, it would stop the processing for one frame. Thus, there would be 'delays' in the updates. (At least I think...not positive).

Magic.X 16th May 2003 10:57

I cant imageine that it would cause delays ina an other way than desired. But that would have to be tested.

sidd 17th May 2003 06:06

hang on, are you saying it will physically limit the fps, or just run code loops so that the preset is running slower.

the second one should have no problems at all, because it is just like puting in heaps of pointless effects to slow it down.

shreyas_potnis 18th May 2003 08:30

hang on...this one is quite an easy one, i can do it.
so, should i?

UnConeD 18th May 2003 11:26

code:

struct apeconfig {
int mFrameLimit;
};

class C_THISCLASS {
...
private:
int mLastTicks;
apeconfig config;
...
}

C_THISCLASS::C_THISCLASS {
mLastTicks = GetLastTicks();
}

C_THISCLASS::render(...) {
int vTicks = GetLastTicks();
int vDelay = 1000/config.mFrameLimit;
int vRenderTime = vTicks - mLastTicks;
if (vRenderTime < vDelay) {
Sleep(vDelay - vRenderTime);
}
mLastTicks = GetLastTicks();
}



That should do the trick, it measures the rendering time of everything except the APE itself and adjusts framerate accordingly. I don't feel like whipping up an APE project for it.

shreyas_potnis 18th May 2003 13:55

great, but should i make an ape for it?

UnConeD 19th May 2003 01:31

Dunno, I still don't see the use of this. If a preset goes too fast, increase the AVS size and be amazed at the miracles of 400x300 or 512x384...

Raz 19th May 2003 02:18

Or 1024 x 768, i love teh new processor :D

anubis2003 19th May 2003 02:29

Speaking of new processor, I may be getting a dual Intel Xeon 3.06Ghz computer with 4GB(max of 12) PC-2100 RAM this summer. I'll also have at least 500GB of harddrive space as well. It's going to be sweet.

uNDefineD 19th May 2003 03:47

Quote:

Originally posted by anubis2003
Speaking of new processor, I may be getting a dual Intel Xeon 3.06Ghz computer with 4GB(max of 12) PC-2100 RAM this summer. I'll also have at least 500GB of harddrive space as well. It's going to be sweet.
:eek: Fuck me.

Seen the latest PowerMac yet? Dual 1.42GHz G4's with 2MB cache. *drool* (Not that I'm a Mac user or anything...)

Magic.X 19th May 2003 10:55

Ahem, back to the Topic.

Shreyas, go for it, will be great.

And UnConed, you can go to higher res of course as the ape should always keep the fps if possible, so it won't limit the resolution you can do with it.

But i recently watched old Presets i did on My Celeron 400 and now they ran on 63 fps and looked all messy unless i reduced the framerate to 20 again.

That should be the purpose of this APE, getting the same effect on each machine no matter which hardware is used.

shreyas_potnis 20th May 2003 15:17

ok, gimme some time because i am not that free these days :)

Magic.X 22nd May 2003 10:56

I know what you mean, i'm messing with nsis2 for hotlist2.2 since 4 days because i never have more than 1 houre per day for this stuff :(

Take your time, but get it done ;)

Magic.X 23rd June 2003 15:05

Erm Shreyas, any progress made?

[Ishan] 23rd June 2003 16:05

Yes i'm waiting for it too

mikm 23rd June 2003 17:55

/sigh. he will post it when it is ready. there is no need to revive dead posts

shreyas_potnis 24th June 2003 15:35

ehh, so wait a bit, lemme submit my pack. what is over is : couple of well, something is over. sort of buggy though. crashes winamp for no reason at all, will figure out soon

blazer1504 25th June 2003 09:12

naah naah
 
ooOOh, but I already have a fps limiter.. yup yup, it never gets over 64 fps with this :P You must be jealous as hell ;) ;)

Shock Value 28th June 2003 06:02

Heh Blazer same with me. But try opening up Kazaa and clicking the theater tab. This causes the frame rate to be normal on my machine until I close Kazaa for some reason. Some other programs will do this as well, usually ones that have to do with multimedia type stuff. I don't know why this happens, though, or why the frame rate was stuck in the first place.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.