Posts: 357
Threads: 118
Joined: Oct 2004
I need to build a sub that will scale an image. I can do that pretty easily, however I need it to be FAST. For loops are just too slow, I remember hearing that FB's GET and PUT routines were written in assembly and are much faster than anything I could write. What I want to do is insert that assembly code in an inline assembly block and tweak it to do what I want it to do. Does anybody know where the source code for it is? I searched Freebasic.net and couldn't find it.
Alternativly does anybody have a superfast image scaling program?
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.
Posts: 324
Threads: 12
Joined: Nov 2005
No, they're written in C, and the source (v0.15b) is available at:
http://www.freebasic.net/index.php/detai...y=src&id=1
My usual advice is to profile and make sure you'e not trying to prematurely optimize, or are optimizing the wrong thing.
Have fun.
stylin:
Posts: 1,407
Threads: 117
Joined: Dec 2002
D.J. Peters posted this code some days ago, you may find it useful
http://www.freebasic.net/forum/viewtopic.php?t=2441
Antoni
Posts: 602
Threads: 27
Joined: Oct 2004
the blitters of the gfx lib are written in assembler ( the core of them ). i can't browse the cvs on sourceforge currently so download the source with the cvs client of your choice and search for .s files. i can't remember the names of the procedures but have a look for MMX and the like
quote="NecrosIhsan"]
[/quote]
Posts: 324
Threads: 12
Joined: Nov 2005
Ah yes, I guess I wasn't sure what you were asking. You're going to want to take a look at:
Code:
/FreeBASIC/src/gfxlib2
libfb_gfx_blitter_mmx.s
libfb_gfx_put_mmx.s
libfb_gfx_mmx.s
stylin:
Posts: 140
Threads: 13
Joined: Apr 2005