Quantcast
Channel: Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1294

ippA0C4

$
0
0

The IPP headers define ppA0C4, but I didn't see any actual calls for the format. The documentation says:

If an alpha (opacity) channel is present in image data, the image must have four channels, with alpha channel being the last or the first one. This data type is indicated by the AC4 or A0C4 descriptors respectively.

So, for example, ARGB (or uRGB where u stands for unused) is A0C4 whereas RGBA (or RGBu) is AC4.

But 8-bit ARGB and uRGB are quite common formats, so what to do with them ? One trick is to call ippiSwapChannels, but that costs extra processing time, as one may have to call it three times (on the source and then after filtering on the target and source to get back to ARGB or uRGB).

Another trick is to offset the data pointers by one channel. But does that process one extra pixel-channel at the end ? The documentation is rather vague about AC4. It says

The presence of the alpha channel can modify the function's behavior. For such functions, Intel IPP provides versions with and without alpha. If an alpha channel is specified, the operation usually is not performed on that channel.

So, it would be good if AC4 would really mean "A channel not processed" to imply "A channel memory location not touched".

Another question is if the one-channel offset ruins performance by disalignment ?

By the way, I am confused by AC4 being implemented or not. For example, ippiFilterBorder has C4 but no AC4 variants. Do we really want convolution on the alpha channel ? And what is the purpose of convolution (etcetera) on a channel that has (in most cases) all zeros or all ones (255 or 65535 or 1.0) ?


Viewing all articles
Browse latest Browse all 1294

Trending Articles