《周星星教你学ffmpeg》技巧
libyuv源码:
static void NV12ToI420(BYTE* pNV12_Y, BYTE* pNV12_UV, BYTE* pYV12, int width, int height)
{
libyuv::NV12ToI420(pNV12_Y, width, pNV12_UV, width, pYV12, width, pYV12 + height*width, width / 2, pYV12 + height*width * 5 / 4, width / 2, width, height);//去掉注释就是libyuv了
}
static void NV12ToBGR24(BYTE* pNV12_Y, BYTE* pNV12_UV, BYTE* pRGB24, int width, int height)
{
libyuv::NV12ToRGB24(pNV12_Y, width, pNV12_UV, width, pRGB24, width*3, width, height);//去掉注释就是libyuv了
}
static void NV12ToARGB(BYTE* pNV12_Y, BYTE* pNV12_UV, BYTE* pARGB, int width, int height)
{
libyuv::NV12ToARGB(pNV12_Y, width, pNV12_UV, width, pARGB, width * 4, width, height);//去掉注释就是libyuv了
}