Issue with writing YUV image frame in C/C++

后端 未结 2 1406
醉话见心
醉话见心 2021-02-06 17:31

I am trying to convert an RGB frame, which is taken from OpenGL glReadPixels(), to a YUV frame, and write the YUV frame to a file (.yuv). Later on I would like to write it to a

2条回答
  •  一个人的身影
    2021-02-06 18:09

    I compiled your code and surely there is a problem when computing upos and vpos values. For me this worked (RGB to YUV NV12):

    vpos = length + (windowWidth * (j/2)) + (i/2)*2;
    upos = vpos + 1;
    

提交回复
热议问题