《周星星教你学ffmpeg》技巧
libyuv源码:
static int YV12ToARGB(const uint8* src_frame,uint8* dst_frame,int width,int height)
{
const uint8* yplane= src_frame;
const uint8* uplane= src_frame + width * height;
const uint8* vplane= uplane+ (width * height/4);
int n = libyuv::I420ToARGB(yplane,width,uplane, width/2,vplane, width/2,dst_frame, width*4,width, height);
return n;
}
调用YV12ToARGB(pIn, pOut, 1920, 1080,);//将1080P@YUV420P颜色空间的图像转换为ARGB32位RGB格式(适用于OPENGL显示或者其他需要32位RGB的环境)
有问题联系作者QQ:35744025