YV12内存布局 1 unsigned char *pY = (unsigned char *)pBuf; 2 unsigned char *pV = pY + nWidth * nHeight; 3 unsigned char *pU = pV + (nWidth>>1)*(nHeight>>1); 4 5 //加上出入口数字指纹,以便确认识别出来的是哪个口 6 if(nPort==0) 7 { 8 pY[0]=0; 9 pV[0]=0; 10 pU[0]=0; 11 } 12 else 13 { 14 pY[0]=255; 15 pV[0]=255; 16 pU[0]=255; 17 }
时间: 2024-10-15 22:09:06