Community
cancel
Showing results for 
Search instead for 
Did you mean: 
dchris
Beginner
74 Views

Video Overlay

I am using the IPP 6.0.2 samples to play video in an application based on the simple_player application.

I am trying to overlay some text on the video as it is played.

I have written a class based on the UMC::BaseCodec class to perform the overlay and I added my class to the first in line of the post-proccessing operations in the UMC::VideoProcessing class.

To overly the text I'm using GDI functions to write text to a bitmap. I then create a mask of the text using the ippiCompareC_8u_C3R function. In the GetFrame call of my class I colorspace convert my bitmap to match the incoming video frame's color space(YUV420). I now need to overlay only the masked pixels of my image onto the video frame.

I can use ippiCopy_8u_C1MR to copy the pixels from the Y channel, but I cannot find an IPP function to help me copy the U & V pixels. Is there such a function (ippCopy_4u_C1MR) or a better way of doing a masked copy into a YUV frame? Thanks,

D
0 Kudos
2 Replies
gol
Beginner
74 Views

If I had to do this I know I would
-force cleartype quality on the font (not for the RGB trick itself, but because cleartype is also a good rasterizer)
-blit pure white text on a black background (in a RGBA DIB)
-use IPP to convert it to B&W
-copy one of the planes to the alpha channel
-(convert this to your needed color format)
-use IPP's AlphaComp to blit it
dchris
Beginner
74 Views

Quoting - gol
If I had to do this I know I would
-force cleartype quality on the font (not for the RGB trick itself, but because cleartype is also a good rasterizer)
-blit pure white text on a black background (in a RGBA DIB)
-use IPP to convert it to B&W
-copy one of the planes to the alpha channel
-(convert this to your needed color format)
-use IPP's AlphaComp to blit it


Thanks for the suggestion, however, that still doesn't get to a YUV format, nor does it allow to bring any color information with the overlay text, which I need.
Reply