Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

PixelAlphaEnable

BMart1
New Contributor II
156 Views
Hi, Is there any sample using per pixel alpha compositing via PixelAlphaEnable? I understand only the linux sdk supports it at the moment. I read the samples but couldn't understand where alpha is stored in a nv12/rgb sample. Shouldn't it be rgba? Bruno
0 Kudos
2 Replies
Sravanthi_K_Intel
156 Views

The sample_vpp application is a good example of Composition. In that sample, ParseCompositionParfile() (in sample_vpp_parser.cpp and sample_vpp_utils.cpp) accepts PixelAlphaEnable as one of the inputs from the par file. So, if your input is in RGB colorspace and you provide the PixelAlphaEnable, that should enable the alpha blending in composition.

Here is how a sample par file looks like:

stream=/home/lmsdk/Videos/in_352_288.yuv
width=352
height=288
cropx=0
cropy=0
cropw=352
croph=288
dstx=0
dsty=0
dstw=352
dsth=288
fourcc=nv12

stream=/home/lmsdk/Videos/in_176_144.rgb
width=176
height=144
cropx=0
cropy=0
cropw=100
croph=100
dstx=0
dsty=0
dstw=100
dsth=100
fourcc=rgb4
PixelAlphaEnable=128

zhou_i_
Beginner
156 Views

As I have tried,if you want to use alpha channel in RGBA,two input source must all be RGBA,and set PixelAlphaEnable = 1

Reply