hello community - have just discovered this nice forum and tried the search function
to get some answers but without success...

perhaps someone could give me some advise or help  ...

My problem:
I have to decode a single plane (pf1bit) bitmap. (could be a dib...)
I need to find a fast method to get all nonzero pixels column by column.(Pixels from  top to bottom) 1 byte would represent 8 pixels.

One aproach would be to rotate the bitmap by 90 degrees and use scanline... but rotating a bitmap with Delphi built in functions consumes too much time atm.

I'm not very experienced in asm but I think that using the asm directive in Delphi to have fast access to the pixels might be the best approach.

Does anybody have an idea how to get a proper and fast routine for a "scancolumn" routine?

Thanks and cheers,

Posted on 2011-10-24 02:35:45 by bytecook
The main problem, depending on the bitmap's size, seems to be the cache speed limit. Cache-bypassing loads or manual prefetching comes to mind here.
Posted on 2011-10-28 19:51:44 by ti_mo_n
MMX would allow you to do a 4x32 bit zerotest lookup in the vertical columns for a 32 bit machine, and more is available to 64 bits
Posted on 2011-10-29 05:25:08 by Homer