16,471
社区成员
发帖
与我相关
我的任务
分享
BYTE *pData;
long samplesize;
samplesize=pSample->GetActualDataLength();
pSample->GetPointer(&pData);
for(int j=1;j<=240;j=j+2)//bob_deinterlace
{ for(int i=0;i<320;i++)
*(pData+i+320*j)=*(pData+i);
}
long nDataSize = 320*240*3;
int iPixel = 32; //RGB24
BITMAPINFOHEADER bmih; //Information header
bmih.biSize = sizeof(BITMAPINFOHEADER);
bmih.biWidth =320; //Image width
bmih.biHeight = 240; //Image height
bmih.biPlanes = 1;
bmih.biBitCount = iPixel; //RGB24
bmih.biCompression = BI_RGB;
bmih.biSizeImage = 0; //Uncompressed RGB bitmaps
bmih.biXPelsPerMeter = 0;
bmih.biYPelsPerMeter = 0;
bmih.biClrUsed = 0;
bmih.biClrImportant = 0;
BITMAPINFO bmif;
HBITMAP hdps=CreateDIBitmap(m_pDisplaydc,&bmih,CBM_INIT,pData,&bmif,DIB_RGB_COLORS);
CClientDC dcTest(this);
CDC memDC;
memDC.CreateCompatibleDC(&dcTest);
memDC.SelectObject(hb);
dcTest.BitBlt(x,y,w,h,&memDC,xsrc,ysrc);