- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to emulate the hardware overlay in software. I have one primary surface with destination color key and an overlay surface, which goes on to the overlay shadow location in the primary buffer. One problem i see is that the arbitary windows overlapping on the shadow location. I think to solve this problem,
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - nyryder
I am trying to emulate the hardware overlay in software. I have one primary surface with destination color key and an overlay surface, which goes on to the overlay shadow location in the primary buffer. One problem i see is that the arbitary windows overlapping on the shadow location. I think to solve this problem,
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
Hi,
IPP copy with image like a matrix in memory. Could you provide a small test case (a matrix or copy aimage) to show what you hope to preform?
Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. I have attached a BMP file. That shows the problem that i explained. The overlay is usualy done in the hardware. I am trying to do that in the software. The overlay is used in video rendering(VLC). It is a seperate surface/memory location from the primary surface/memory. The primary contains only the color key. The GPU, look for the chroma key, and replace the chroma key from the pixels in the overlay buffer.
Assume the overlay buffer is in RGB format. It is easy to do if there is no overlapping on the color key location(note pad in my example), but if there is an overlapping, then i am thinking to do that by composition. I know the overlay location (shadow) in the primary buffer and its width and height.
Copy the shadow into a buffer and a compare function that compares each pixel for the color key. If it is not a color key then it would update the alpha channel with a predefined value, othrewise not. It is my Mask.
Once a video is rendered in overlay buffer, i can copy the video data and do the composition with the MASK.
If the MASK alpha channel is == PREDEFINED value then it takes the pixel from the mask otherwise it takes from the video buffer.
(This could be more complicated if i do it in YUV). I can optimize it further with only on ROI instead of whole screen.
I am looking for IPP functions to acheive my goal.
Assume the overlay buffer is in RGB format. It is easy to do if there is no overlapping on the color key location(note pad in my example), but if there is an overlapping, then i am thinking to do that by composition. I know the overlay location (shadow) in the primary buffer and its width and height.
Copy the shadow into a buffer and a compare function that compares each pixel for the color key. If it is not a color key then it would update the alpha channel with a predefined value, othrewise not. It is my Mask.
Once a video is rendered in overlay buffer, i can copy the video data and do the composition with the MASK.
If the MASK alpha channel is == PREDEFINED value then it takes the pixel from the mask otherwise it takes from the video buffer.
(This could be more complicated if i do it in YUV). I can optimize it further with only on ROI instead of whole screen.
I am looking for IPP functions to acheive my goal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - nyryder
I am trying to emulate the hardware overlay in software. I have one primary surface with destination color key and an overlay surface, which goes on to the overlay shadow location in the primary buffer. One problem i see is that the arbitary windows overlapping on the shadow location. I think to solve this problem,
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
i can copy the shadow location (that includes the overlapping window) from the primary surface to a temproary buffer, and apply compostion with the overlay surface. The steps are the following,
Apply the compare function (like ippiCompare) on colorkey and make all color key entiries of alpha channel to be zero transparent and non color key (overlapping windows) to have a full transparent. This is my mask.
Then the overlay surface and mask can be merged through composition. when doing the composition if the mask pixels has an full transparent alpha channel it needs to take the mask pixel value other wise it needs to take pixel from the overlay buffer.
The output can be copied back to the primary surface to have the hardware overlay effect.
My question is that when i looked in the ipp image processing functions, i did not find suitable functions to acheive my goal.
Can you point to me proper functions?.
Is my question clear?.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
did you noticed ippiAlphaComp function family? These functions allow you to do blending of two images.
Regards,
Vladimir
did you noticed ippiAlphaComp function family? These functions allow you to do blending of two images.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
Hi,
did you noticed ippiAlphaComp function family? These functions allow you to do blending of two images.
Regards,
Vladimir
did you noticed ippiAlphaComp function family? These functions allow you to do blending of two images.
Regards,
Vladimir
Is there a function that performs similarly but on YUV images?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you need any special processing for YUV images when you blend them? Or your question is about support of sub-sampled images, like 4:2:4 or 4:2:0?
Regards,
Vladimir
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
Do you need any special processing for YUV images when you blend them? Or your question is about support of sub-sampled images, like 4:2:4 or 4:2:0?
Regards,
Vladimir
Regards,
Vladimir
I am looking for blending of sub-sampled imaged.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yeah, that's something what missed in our offering. Could you please specify what particular YUV formats you are interested in? Although I would not commit on implementing this in the nearest release but at least we will know exactly what our customers are looking for?
Regards,
Vladimir
Regards,
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page