AppDecGL sample Nv12ToBgra32 kernel function of file

In the file how do you got the grid and block size of function Nv12ToBgra32.

The Grid size: dim3((nWidth + 63) / 32 / 2, (nHeight + 3) / 2)
And the block size :dim3(32, 2)

If I use less Grid size the picture will display only some part of my video not the full frame, what is the reason?


Please go through the which explains the concepts of thread, Block and GIRD. In this specific Kernel you have mentioned one pixel is run on thread. If you would reduce the GRID size then the kernel wont process the entire image and you are getting part of the pixels getting converted to RGB.


Ryan Park