Improvements in PlaYUVerFrame
Add default parameters in constructor Add a number of channels Add function to verify is frame is valid
This commit is contained in:
1 parent
2efc127d7a
commit
6109ee6c2b
2 files changed
+23
-3
No files matched your search
@@ -33,9 +33,16 @@ namespace plaYUVer
|
||||
PlaYUVerFrame::PlaYUVerFrame( UInt width, UInt height, Int pel_format )
|
||||
{
|
||||
m_pppcInputPel = NULL;
|
||||
m_pcRGBPelInterlaced = NULL;
|
||||
m_uiWidth = width;
|
||||
m_uiHeight = height;
|
||||
m_iPixelFormat = pel_format;
|
||||
m_iNumberChannels = 3;
|
||||
|
||||
if( m_uiWidth == 0 || m_uiWidth == 0 || m_iPixelFormat == -1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_bHasRGBPel = false;
|
||||
|
||||
@@ -57,6 +64,9 @@ PlaYUVerFrame::PlaYUVerFrame( UInt width, UInt height, Int pel_format )
|
||||
case RGB8:
|
||||
getMem3ImageComponents<Pel>( &m_pppcInputPel, m_uiHeight, m_uiWidth, 1, 1 );
|
||||
break;
|
||||
default:
|
||||
m_pppcInputPel = NULL;
|
||||
break;
|
||||
}
|
||||
getMem1D<Pel>( &m_pcRGBPelInterlaced, m_uiHeight * m_uiWidth * 3 );
|
||||
openPixfc();
|
||||
|
||||
Reference in new issue
Block a user