0

I am currently using BitBlt function to capture the screen and then I encode it. Since my encoder uses YUV420 format for the input I need to convert the data from RGB to YUV before encoding. I was wondering if there is any way to capture the screen in YUV format instead of RGB?

Thanks, Jay

Dundar
  • 1,311
  • 1
  • 14
  • 25

1 Answers1

0

I will try to answer this, though i don´t fully know how BitBlt works as i haven´t got it to work myself.

But here goes.

From my understanding, BiBlt is capturing from Graphic Card, meaning it will go fast as there is no roundabout. That should mean if you display in RGB (which a PC normally does) you will get that same format.

So, if you want YV12, you will have to do a downsampling Before using the image.

something like this i guess.

CaptureBitBlt to IMG. Convert IMG to YV12. Encode IMG.

Well that just looks ugly, but hope you get what i mean. You will have to do a convert before working with the picture.

Take this with a grain of salt, i may be out in the woods, but i think it´s how it should be done.

Zerowalker
  • 761
  • 2
  • 8
  • 27