4void VideoToBMP(TYPE_VideoFrame *VideoFrame,
int BMPwidth,
int BMPheight,
byte *BMPPixelBuffer,
int DstX,
int DstY,
int DstWidth,
int DstHeight)
14 VideoData = (dword*)VideoFrame->data;
15 for(y = DstY; y < (DstY + DstHeight); y++)
17 SY = (y - DstY) * VideoFrame->height / DstHeight;
18 for(x = DstX; x < (DstX + DstWidth); x++)
20 SX = (x - DstX) * VideoFrame->width / DstWidth;
21 SrcPixel = (dword*)&VideoData[SX + SY * VideoFrame->width];
23 DstPixel = &BMPPixelBuffer[((BMPheight - y - 1) * BMPwidth + x) * 3];
24 DstPixel[0] =
B8888(*SrcPixel);
25 DstPixel[1] =
G8888(*SrcPixel);
26 DstPixel[2] =
R8888(*SrcPixel);
void VideoToBMP(TYPE_VideoFrame *VideoFrame, int BMPwidth, int BMPheight, byte *BMPPixelBuffer, int DstX, int DstY, int DstWidth, int DstHeight)