My application needs to create image buffers outside of IPP, and use them within IPP.
I need to process YCbCr, YCbCrA, RGB and RGBA data with 8 and 16 bit sample sizes.
I've managed to get a basic blur filter working in my environment - I had to carefully avoid the edges of my image to make it work. Having complete control over how I define and build the images external to IPP, I'd love to understand how the memory is laid out inside of IPP so I can replicate it.
Specifically, being able to use the YCbCr functions would be super awesome. I need to know the memory layout for these images and, being in the body rather than header files precludes me from getting the info from the source code available to me.
I'd like to accommodate up to 16x16 kernels over my image data, so what I'm thinking of doing for planar YCbCr is...
- allocate "overscan" areas outside the active image area - 8 rows and 8 columns both before and after the active image.
- use ptr + 8 * width + 8, to point to the top left / first pixel in the active image
- use width + 16 as the stride (multiplied by whatever the size of the sample type is)
- align every start of line (starting with the overscan) to 64 byte boundaries and pad with zeros at the end of the line
My assumption is that, for planar images, the Cb data starts lumaSamples above the Luma data, and the Cr data starts chromaSamples above the Cb data. Where lumaSamples = (width + 16) x (height x 16) and chromaSamples = (width / 2 + 8) x (height + 16).
Does this have a decent chance of working? If not, how should I tweak it?