Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
5 Views

PixelAlphaEnable

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
Highlighted
5 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

0 Kudos
Highlighted
Beginner
5 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

0 Kudos