Hi,
Gustavo González <[email protected]> wrote:
// Capturing image data
int size = avpicture_get_size(PIX_FMT_YUV420P, width, height);
uint8_t * pic_dat = reinterpret_cast<UINT8 *>(malloc(size));
memset(pic_dat, image.bits(), size);
AFAIU, this is not correct.
size = (width * height * 3) / 2 for YUV420 color space. But you're trying to
fill it out with RGB image data (which are width *height * 3 in size).
AFAIK, QImage is a usual RGB(A) image. It doesn't support YUV color space.
You must manually convert RGB => YUV. Am I incorrect?
Best regards,
Alexander
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user