Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: Fast way of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 37 Topic 3714 of 3940
Post > Topic >>

Re: Fast way of splitting an image into bit planes ?

by "Skybuck Flying" <BloodyShame@[EMAIL PROTECTED] > Apr 27, 2008 at 09:46 PM

Hmm, maybe I should try a differen technique to get more speed.

I want to process each bit plane individually.

Maybe I should just try and do it in parallel, and then store the results
in 
parallel as well.

For example, top of my head:

Bit : array[0..23] of byte;

for vIndex := 0 to 23 do
begin
    Bit[vIndex] := (Pixel shr vIndex) and 1;
end;

Then keep track of data bit for each plane
DataBit[Index] etc. for first pixel.

Then to run time length encode in parallel:

for loop etc
if DataBit[Index] = Bit[vIndex] then
begin
    Count[Index] := Count[Index] + 1;
end else
begin
    Output Count... only problem is... how will reader know what is what
;)
end;

Only if the count is written in parallel in one bit for each thingy or so 
might it work.

and ofcourse then it won't work, since some counts will stop and others
will 
continue.

Anyway maybe storing every bit in a seperate byte might be a nice way to 
extract everything fastly and work with it fastly.

Or maybe not...

Ofcourse for each bit plane a count array could be kept.

So it might be something like:

Count[BitIndex,CountIndex]

This will store all the runtime lengths for each bit plane.

It will require some memory... but access will probably be pretty fast.

Then finally only thing which needs to happen is to output the counts... 
which could happen in any order really..
but the most logic way would to simply be,

begin with bit plane 0, write the counts, when down, continue to bit plane
1 
and repeat.

Pretty easy really.

This is actually how I did it more or less for some other processing...
but 
I am not sure if it's fast.

It's probably a lot faster then the stupid set/get ****ing code.

Well don't worry if you not understand any of this.

It's vague idea/description but it will probably work.

Though it does need a CounterCount for each bit plane which must be 
incremented as well, which adds further cpu overhead...
but it's still doable me thinks.

Well maybe somebody else knows better way to do what I want... which is 
split image into bit planes and store the bit planes next to each 
sequentially like I described earlier.

Tomorrow I will try this wacky idea above though... it should be pretty
easy 
to implement.

Bye,
  Skybuck.
 




 37 Posts in Topic:
Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-04-27 21:23:00 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-04-27 21:46:14 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-04-27 21:53:57 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-28 20:43:33 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 09:39:52 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 10:14:23 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 10:25:46 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 10:27:56 
Re: Fast way of splitting an image into bit planes ?
Ivan Levashew <octagra  2008-04-28 02:58:04 
Re: Fast way of splitting an image into bit planes ?
Robert Redelmeier <red  2008-04-27 21:35:35 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-04-28 09:07:10 
Re: Fast way of splitting an image into bit planes ?
Wolfgang Draxinger <wd  2008-04-28 11:12:18 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-04-28 11:59:50 
Re: Fast way of splitting an image into bit planes ? (How would
penang@[EMAIL PROTECTED]   2008-04-29 03:42:18 
Re: Fast way of splitting an image into bit planes ? (How would
"Ken Hagan" <  2008-04-29 12:46:09 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 13:56:42 
Re: Fast way of splitting an image into bit planes ? (How would
penang@[EMAIL PROTECTED]   2008-04-29 05:35:15 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 14:59:43 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 18:54:19 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 19:02:51 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 21:14:29 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-29 21:19:49 
Re: Fast way of splitting an image into bit planes ? (How would
"Skybuck Flying"  2008-04-30 11:19:55 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
"Skybuck Flying"  2008-04-30 17:20:12 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
"Skybuck Flying"  2008-04-30 17:39:30 
Re: Fast way of splitting an image into bit planes ?
Bo Schwarzstein <Bo.Sc  2008-05-01 03:54:28 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
pg <penang@[EMAIL PROT  2008-05-01 08:21:30 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
"Skybuck Flying"  2008-05-01 20:19:01 
Re: Fast way of splitting an image into bit planes ?
Terence <tbwright@[EMA  2008-05-01 16:06:03 
Re: Fast way of splitting an image into bit planes ?
pg <penang@[EMAIL PROT  2008-05-02 18:01:31 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
pg <penang@[EMAIL PROT  2008-05-02 18:03:40 
Re: Fast way of splitting an image into bit planes ? (Skybuck's
"Skybuck Flying"  2008-05-03 19:40:48 
Re: Fast way of splitting an image into bit planes ?
"windenntw@[EMAIL PR  2008-05-04 13:09:13 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-05-04 22:54:19 
Re: Fast way of splitting an image into bit planes ?
Nils <n.pipenbrinck@[E  2008-05-04 23:11:31 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-05-05 01:40:01 
Re: Fast way of splitting an image into bit planes ?
"Skybuck Flying"  2008-05-05 01:55:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 7 15:57:59 CDT 2008.