How to insert cursor image in YUV(NV12) buffer?

188 Views Asked by At

i have captured screen with Intel Capture in NV12(YUV) format. Intel capture does not capture Mouse cursor.

So i have to include cursor image in Intel captured yuv buffer.

Is it possible to edit(include) cursor image in yuv buffer ?

Guide me this. Thanks in advance.

1

There are 1 best solutions below

0
On

You can look how image is stored in NV12 (http://www.fourcc.org/yuv.php#NV12)

YUV 4:2:0 image with a plane of 8 bit Y samples followed by an interleaved U/V plane containing 8 bit 2x2 subsampled colour difference samples.

You can try this:

  1. Convert your cursor to YUV: https://en.wikipedia.org/wiki/YUV#Conversion_to.2Ffrom_RGB
  2. Add cursor to frame. Y plane of the cursor to Y plane of the frame, the same with UV.

Also you can convert frame to RGB and insert cursor in RGB colorspace, but it is slowly.