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 > Assembly Language > Re: Fast way of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 35 of 36 Topic 4980 of 5163
Post > Topic >>

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

by "Skybuck Flying" <BloodyShame@[EMAIL PROTECTED] > May 5, 2008 at 01:40 AM

"Nils" <n.pipenbrinck@[EMAIL PROTECTED]
> wrote in message 
news:686n42F2q3salU1@[EMAIL PROTECTED]
>
> That C2P stuff is well worth understanding.
>
> However, it's tuned for CPU cycles, not performance on machines with 
> caches. What you have to do is to split your working-set of data into a 
> ****tion that fits nicely into the data-cache. Check your algorithm
target 
> platform and try to do your processing in blocks of 64x64 pixels or so.
>
> You will see an huge speed improvment simply due to better cache usage.

I am starting to have doubts about the claim that C2P solves the problem.

In fact it probably doesn't really solve the problem fully.

As you mention it just turns a block of pixels in r,g,b format into bit 
plane format but only for the block of pixels.

So:

R0R1R2R3R4R5R6R7, G0G1G2G3G4G5G6G7, B0B12B3B4B5B6B7, A0A1A2A3A4A5A6A7
R0R1R2R3R4R5R6R7, G0G1G2G3G4G5G6G7, B0B12B3B4B5B6B7, A0A1A2A3A4A5A6A7
R0R1R2R3R4R5R6R7, G0G1G2G3G4G5G6G7, B0B12B3B4B5B6B7, A0A1A2A3A4A5A6A7
R0R1R2R3R4R5R6R7, G0G1G2G3G4G5G6G7, B0B12B3B4B5B6B7, A0A1A2A3A4A5A6A7

Will be transformed to:

Memory Address X:

R0R0R0R0
G0G0G0G0
B0B0B0B0
A0A0A0A0
R1R1R1R1
G1G1G1G1
B1B1B1B1
A1A1A1A1
etc

However the next pixel block well end up here:

Memory Address Y:

R0R0R0R0
G0G0G0G0
B0B0B0B0
A0A0A0A0
R1R1R1R1
G1G1G1G1
B1B1B1B1
A1A1A1A1

This means there is still a large gap to overcome between R0 of pixel
block 
0 and R0 of pixel block 1.

Gap = Memory Y - Memory X.

Thus if I am correct C2P does not solve the problem fully because it
simply 
doesn't return a true bit plane.

A true bit plane is a plane which has all the bits in order/sequential.

In other words C2P returns a fragmented/chunky bit plane.

Which is not really that desireable since it complicates things further.

The whole idea was to get a nice sequential bit plane to make processing
it 
easy, which now might even become harder ?!? ;) :)

Anyway the tutorials do not mention this shortcoming in the C2P...

The tutorials use a nice square looking input and output, so it's
misleading 
at best, it doesn't show the fragmentation/gaps that will occur, because
it 
just shows one pixel block. Had it shown multiple pixel blocks the gaps 
would have become apperent ;)

If you think about it, it makes perfect sense.

It's simply impossible to transform 64x64 pixels into 64x64 pixels with
the 
same memory addressess.

The bit planes don't belong there... they must be moved elsewhere to their

true positions.

Conclusion:

It's simply impossible to prevent random memory access.

Final conclusion:

C2P might help by first converting to fragmented/chunky bit planes.

Then 8 bits can be read in sequence with gaps and be moved to their final 
destinations, which could still give some speed ups ;)

Bye,
  Skybuck.
 




 36 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 ? (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 Sat Oct 11 18:19:17 CDT 2008.