Major changes in ColorSpace Definition

Now color space is defined in PlaYUVerFrame
New function to check if a pixel format is RGB or YUV or Gray or ARGB
implemented
This commit is contained in:
jfmcarreira committed 2014-04-05 06:24:54 +01:00
1 parent 3754caa865
commit 518d68483a
5 files changed
+37 -16

No files matched your search

+1 -9
View File
@@ -112,14 +112,6 @@ typedef UChar Pel; ///< 8-bit pixel type
// PlaYUVer definitions
// ====================================================================================================================
enum ColorSpace
{
COLOR_INVALID = -1,
COLOR_YUV = 0,
COLOR_RGB,
};
enum YUVcomponent
{
LUMA = 0,
@@ -136,7 +128,7 @@ enum RGBcomponent
typedef struct __pixel_definition
{
ColorSpace color_space;
Int color_space;
union
{
Pel Luma;
+1 -1
View File
@@ -372,7 +372,7 @@ void ViewArea::paintEvent( QPaintEvent *event )
for(Int j=vr.y() ; j<=vr.bottom() ; j++)
{
QPoint pixelTopLeft(i,j);
sPixelValue = curFrame->getPixelValue( pixelTopLeft, COLOR_YUV );
sPixelValue = curFrame->getPixelValue( pixelTopLeft, PlaYUVerFrame::COLOR_YUV );
QRect pixelRect(viewToWindow(pixelTopLeft), QSize(m_zoomFactor,m_zoomFactor));
if( sPixelValue.Luma < 128 )
+1 -1
View File
@@ -491,7 +491,7 @@ void plaYUVerApp::updatePixelValueStatusBar( const QPoint & pos, InputStream* st
if( ( posX < iWidth ) && ( posX >= 0 ) && ( posY < iHeight ) && ( posY >= 0 ) )
{
sPixelValue = curFrame->getPixelValue( pos, COLOR_YUV );
sPixelValue = curFrame->getPixelValue( pos, PlaYUVerFrame::COLOR_YUV );
strPixel = QString( "Y: %1 U: %2 V: %3" ).arg( sPixelValue.Luma ).arg( sPixelValue.ChromaU ).arg( sPixelValue.ChromaV );
strStatus.append( strPixel );
statusBar()->showMessage( strStatus, 0 );