資源簡(jiǎn)介
YUV播放器源代碼。VC的工程,可以播放YUV數(shù)據(jù)。
代碼片段和文件信息
/************************************************************************
?*
?*??Ye-Kui?Wang???????wyk@ieee.org
?*??Juan-Juan?Jiang???juanjuan_j@hotmail.com
?*??
?*??March?14?2002
?*
?************************************************************************/
/*
?*?Disclaimer?of?Warranty
?*
?*?These?software?programs?are?available?to?the?user?without?any
?*?license?fee?or?royalty?on?an?“as?is“?basis.??The?developers?disclaim?
?*?any?and?all?warranties?whether?express?implied?or?statuary?including?
?*?any?implied?warranties?or?merchantability?or?of?fitness?for?a?particular?
?*?purpose.??In?no?event?shall?the?copyright-holder?be?liable?for?any?incidental
?*?punitive?or?consequential?damages?of?any?kind?whatsoever?arising?from?
?*?the?use?of?these?programs.
?*
?*?This?disclaimer?of?warranty?extends?to?the?user?of?these?programs
?*?and?user‘s?customers?employees?agents?transferees?successors
?*?and?assigns.
?*
?*?The?developers?does?not?represent?or?warrant?that?the?programs?furnished?
?*?hereunder?are?free?of?infringement?of?any?third-party?patents.
?*
?*?*/
//?ChildWindow.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“YUVviewer.h“
#include?“ChildWindow.h“
#include?“YUVviewerDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChildWindow
IMPLEMENT_DYNCREATE(CChildWindow?CframeWnd)
CChildWindow::CChildWindow()
{
}
CChildWindow::~CChildWindow()
{
GlobalUnlock(hloc);
GlobalFree(hloc);??
free(RGBbuf);
free(Y);
free(Cb);
free(Cr);
}
CChildWindow::CChildWindow(?CframeWnd?*pParentWndint?Widthint?Height?BOOL?bColor)
{????
iWidth=Width;iHeight=Height;bColorImage=bColor;
??m_iCount?=?((CYUVviewerDlg?*)pParentWnd)->m_iCount;
??inSeqName?=?((CYUVviewerDlg?*)pParentWnd)->inSeqName[m_iCount];
if(((CYUVviewerDlg?*)pParentWnd)->m_nZoom?==?-1)
m_nzoom?=?1;
else?if(((CYUVviewerDlg?*)pParentWnd)->m_nZoom?==?0)
m_nzoom?=?2;
nPicShowOrder=0;
if?(NULL==?(Y?=?(unsigned?char?*)malloc(iWidth*iHeight)?)?)?
{
AfxMessageBox(“Couldn‘t?allocate?memory?for?RGBbuf\n“);
return;
}
if?(NULL==?(Cb?=?(unsigned?char?*)malloc(iWidth*iHeight/4)?)?)?
{
AfxMessageBox(“Couldn‘t?allocate?memory?for?RGBbuf\n“);
return;
}
if?(NULL==?(Cr?=?(unsigned?char?*)malloc(iWidth*iHeight/4)?)?)?
{
AfxMessageBox(“Couldn‘t?allocate?memory?for?RGBbuf\n“);
return;
}
if?(NULL==?(RGBbuf?=?(unsigned?char?*)malloc(iWidth*iHeight*3)?)?)?
{
AfxMessageBox(“Couldn‘t?allocate?memory?for?RGBbuf\n“);
return;
}
DWORD?Attrstyle;
????
hloc?=?GlobalAlloc(GMEM_ZEROINIT?|?GMEM_MOVEABLE
??? sizeof(BITMAPINFOHEADER)?+?(sizeof(RGBQUAD)?*?256));
BmpInfo?=?(LPBITMAPINFO)?GlobalLock(hloc);
Attrstyle?=?//WS_OVERLAPPEDWINDOW;
WS_OVERLAPPED|WS_CAPTION|WS_THICKframe|WS_MAXIMIZEBOX|WS_MINIMIZEBOX;
????C
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件???????7157??2003-02-28?22:49??YUV_Pla
?????文件???????2757??2002-03-14?13:49??YUV_Pla
?????文件???????1379??2001-07-28?11:41??YUV_Pla
?????文件???????6142??2001-07-28?11:41??YUV_Pla
?????文件???????7062??2010-12-27?16:05??YUV_Pla
?????文件??????37414??2010-12-27?15:45??YUV_Pla
?????文件?????????67??2010-12-27?16:05??YUV_Pla
?????文件?????464025??2010-12-27?15:33??YUV_Pla
?????文件?????904192??2010-12-27?16:05??YUV_Pla
?????文件????1978368??2010-12-27?16:05??YUV_Pla
?????文件????1792000??2010-12-27?16:05??YUV_Pla
?????文件????????406??2010-12-27?15:46??YUV_Pla
?????文件????????472??2010-12-27?15:46??YUV_Pla
?????文件????????381??2010-12-27?16:05??YUV_Pla
?????文件????5699008??2010-12-27?16:05??YUV_Pla
?????文件??????25459??2010-12-27?15:45??YUV_Pla
?????文件???24772608??2010-12-27?15:33??YUV_Pla
?????文件???11193344??2010-12-27?16:05??YUV_Pla
?????文件??????16968??2010-12-27?15:46??YUV_Pla
?????文件?????116280??2010-12-27?16:05??YUV_Pla
?????文件???????1761??2002-03-14?13:45??YUV_Pla
?????文件???????1078??2001-08-20?23:44??YUV_Pla
?????文件????????401??2001-08-20?23:44??YUV_Pla
?????文件???????1647??2003-04-08?23:41??YUV_Pla
?????文件????????211??2001-08-20?23:44??YUV_Pla
?????文件????????999??2001-08-20?23:44??YUV_Pla
?????文件??????23992??2010-12-27?15:33??YUV_Pla
?????文件???????2560??2003-04-08?23:49??YUV_Pla
?????文件???????3042??2002-03-14?13:49??YUV_Pla
?????文件???????4465??2002-01-09?21:42??YUV_Pla
............此處省略20個(gè)文件信息
評(píng)論
共有 條評(píng)論