sws_scale( img_convert_ctx,
pVideoFrame[nChannel]->data,
pVideoFrame[nChannel]->linesize,
0,
pCodeContext[nChannel]->height,
pRGBFrame->data,
pRGBFrame->linesize);
CreateBmp(szFileName, pRGBFrame->data[0],
pCodeContext[nChannel]->width,
pCodeContext[nChannel]->height,
24)
BOOL CreateBmp(char *filename, uint8_t *pRGBBuffer, int width, int height, int bpp)
{
BITMAPFILEHEADER bmpheader;
BITMAPINFO bmpinfo;
FILE *fp = NULL;
fp = fopen(filename,"wb");
if( fp == NULL )
{
return FALSE;
}
bmpheader.bfType = ('M' < <8)|'B';
bmpheader.bfReserved1 = 0;
bmpheader.bfReserved2 = 0;
bmpheader.bfOffBits = sizeof
pVideoFrame[nChannel]->data,
pVideoFrame[nChannel]->linesize,
0,
pCodeContext[nChannel]->height,
pRGBFrame->data,
pRGBFrame->linesize);
CreateBmp(szFileName, pRGBFrame->data[0],
pCodeContext[nChannel]->width,
pCodeContext[nChannel]->height,
24)
BOOL CreateBmp(char *filename, uint8_t *pRGBBuffer, int width, int height, int bpp)
{
BITMAPFILEHEADER bmpheader;
BITMAPINFO bmpinfo;
FILE *fp = NULL;
fp = fopen(filename,"wb");
if( fp == NULL )
{
return FALSE;
}
bmpheader.bfType = ('M' < <8)|'B';
bmpheader.bfReserved1 = 0;
bmpheader.bfReserved2 = 0;
bmpheader.bfOffBits = sizeof