Improvements in PlaYUVerFrame

Add bits per channel and number of channels
Add const return in some methods
This commit is contained in:
jfmcarreira committed 2014-04-05 05:54:52 +01:00
1 parent 6109ee6c2b
commit 915621addb
2 files changed
+13 -6

No files matched your search

+2
View File
@@ -38,6 +38,8 @@ PlaYUVerFrame::PlaYUVerFrame( UInt width, UInt height, Int pel_format )
m_uiHeight = height;
m_iPixelFormat = pel_format;
m_iNumberChannels = 3;
Int max_bits_per_pel = sizeof( Pel ) * 8;
m_iBitsChannels = assert( 8 <= max_bits_per_pel );
if( m_uiWidth == 0 || m_uiWidth == 0 || m_iPixelFormat == -1 )
{
+11 -6
View File
@@ -97,7 +97,7 @@ public:
static Pixel ConvertPixel( Pixel sInputPixel, ColorSpace eOutputSpace );
Pixel getPixelValue( const QPoint &pos, ColorSpace color );
UChar* getQImageBuffer()
UChar* getQImageBuffer() const
{
return m_pcRGBPelInterlaced;
}
@@ -106,24 +106,28 @@ public:
cv::Mat getCvMat();
#endif
UInt getWidth()
UInt getWidth() const
{
return m_uiWidth;
}
UInt getHeight()
UInt getHeight() const
{
return m_uiHeight;
}
Int getPelFormat()
Int getPelFormat() const
{
return m_iPixelFormat;
}
Int getNumberChannels()
Int getNumberChannels() const
{
return m_iNumberChannels;
}
Int getBitsChannel() const
{
return m_iBitsChannels;
}
Bool isValid()
Bool isValid() const
{
return ( m_uiWidth > 0 ) && ( m_uiHeight > 0 ) && ( m_iPixelFormat >= 0 );
}
@@ -133,6 +137,7 @@ private:
UInt m_uiHeight;
Int m_iPixelFormat;
Int m_iNumberChannels;
Int m_iBitsChannels
Bool m_bHasRGBPel;
Pel*** m_pppcInputPel;