From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2006-10-07 11:23:59
Lubomir Bourdev wrote:
> Stefan Seefeld wrote:
>> ...IPP provides a heterogenous 16-bit RGB type with 5 bits red, 6 bits green,
>> and 5 bits blue. I wonder whether that could be mapped to GIL, and how.
> Although we don't have an existing model, I believe it is possible.
> You will need to make a heterogeneous pixel (i.e. pixel whose channels are of different type). Its channels will have proxy references.
> Here is how I would go about doing it.
Excellent ! I'll play a bit with it and see whether I can bind IPP to it.
As I indicated in my other mail, I'm very interested into a C++ API to manipulate
images and pixels, but it is important to be able to provide bindings to highly optimized
'backends' such as IPP for special functions, because a) that is what users at present
use and b) there is a lot of efford put into these so it would be foolish to throw them
away just because they aren't written in C++.
> You don't have to worry about planar representation here, as 565 pixels are always interleaved as far as I know.
Indeed, that's what I would expect, too.
> In theory GIL shouldn't have to change.
> "In theory, theory and practice are the same, but in practice..." :-)
> I suspect there will be a few glitches since this will be the first such model.
That's why I ask. :-)
By the way, I think such a hands-on guide to write a user-defined pixel type may make
a good addition to the documentation.
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk