Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Question about working with YUY2 colorspace

diehard21
Beginner
763 Views
Hi guys,

I have images being given to me in YUY2 (YCbCr422?). These are not planar images. I am wondering what the best way to work with these images is. Firstly, I created a new image buffer using ippiMalloc_8u_C2 so I would have correct alignment (YUY2 should be two channels right?). Then I want to copy my original image into the aligned buffer. However, there does not seem to be an appropriate ippiCopy function for two channel data. What copy function should I use?

Secondly, I only want to operate on the Luma component since my images are black and white. For instance, if I want to use a Median filter, how would I only filter the luma component? Thanks for the help.

~Steve
0 Kudos
5 Replies
foreststone
Beginner
763 Views
I didnt find any functions too.
When using dv encoder , we must do format transform ,maybe we should
write codes with mmx/sseX etc. IPP functions help nothing , isnt it ?
0 Kudos
andrewk88
Beginner
763 Views
What I'm doing is:
1) copy a data to 16s buffer
2) delete chroma UV/CbCr byte by logical And with 0x00FF constant using ippiAndC_16u_C1R
3) coverting to 8u or 32f format whatever is needed using e.g. ippiConvert_16s32f_C1R
... works for me :-)
Regards,
Andrew
0 Kudos
diehard21
Beginner
763 Views
I would have thought there would be an easier way to work with YUY2 and just the Luma component. This seriously cuts down on the number of calculations :(. Oh well, back to the hand coding.

~Steve
0 Kudos
diehard21
Beginner
763 Views
Hello everyone,

Just following up. I figured the easiest way to do it was to define three plane and then split it up using Split422. I can then work on that image buffer and rejoin them when I'm finished. Have a good day.

~Steve
0 Kudos
Vladimir_Dudnik
Employee
763 Views
Great!
Thanks everybody for the helping with answering this question. It was real example how IPP community can help.
Regards,
Vladimir
0 Kudos
Reply