Add new class PlaYUVerPixel

This commit is contained in:
jfmcarreira committed 2016-03-10 00:13:44 +00:00
1 parent 6841e57135
commit 201a2ebdd6
10 files changed
+258 -162

No files matched your search

+5 -5
View File
@@ -290,7 +290,7 @@ Void FramePropertiesDock::setFrame( PlaYUVerFrame* pcFrame )
if( m_iLastFrameType != colorSpace )
{
m_iLastFrameType = colorSpace;
if( colorSpace == PlaYUVerFrame::COLOR_RGB || colorSpace == PlaYUVerFrame::COLOR_ARGB )
if( colorSpace == PlaYUVerPixel::COLOR_RGB || colorSpace == PlaYUVerPixel::COLOR_ARGB )
{
channelCB->clear();
channelCB->clear();
@@ -298,7 +298,7 @@ Void FramePropertiesDock::setFrame( PlaYUVerFrame* pcFrame )
channelCB->insertItem( FirstChannel, QIcon( ":/images/channel-red.png" ), "Red" );
channelCB->insertItem( SecondChannel, QIcon( ":/images/channel-green.png" ), "Green" );
channelCB->insertItem( ThirdChannel, QIcon( ":/images/channel-blue.png" ), "Blue" );
if( colorSpace == PlaYUVerFrame::COLOR_ARGB )
if( colorSpace == PlaYUVerPixel::COLOR_ARGB )
{
channelCB->insertItem( AlphaChannel, QIcon( ":/images/channel-alpha.png" ), "Alpha" );
}
@@ -316,7 +316,7 @@ Void FramePropertiesDock::setFrame( PlaYUVerFrame* pcFrame )
colorsCB->show();
colorsLabel->show();
}
else if( colorSpace == PlaYUVerFrame::COLOR_YUV )
else if( colorSpace == PlaYUVerPixel::COLOR_YUV )
{
channelCB->clear();
channelCB->insertItem( FirstChannel, QIcon( ":/images/channel-luma.png" ), "Luminance" );
@@ -500,9 +500,9 @@ Void FramePropertiesDock::slotHistogramComputationFailed()
Void FramePropertiesDock::slotChannelChanged( Int channel )
{
if( m_pcFrame->getColorSpace() == PlaYUVerFrame::COLOR_YUV )
if( m_pcFrame->getColorSpace() == PlaYUVerPixel::COLOR_YUV )
channel += 1;
if( channel == AlphaChannel && m_pcFrame->getColorSpace() != PlaYUVerFrame::COLOR_ARGB )
if( channel == AlphaChannel && m_pcFrame->getColorSpace() != PlaYUVerPixel::COLOR_ARGB )
channel = ColorChannels;
switch( channel )
+4 -4
View File
@@ -903,7 +903,7 @@ Void VideoSubWindow::updatePixelValueStatusBar( const QPoint& pos )
{
if( m_pcCurrFrame )
{
PlaYUVerFrame::Pixel sPixelValue;
PlaYUVerPixel sPixelValue;
Int iWidth, iHeight;
Int posX = pos.x();
Int posY = pos.y();
@@ -917,18 +917,18 @@ Void VideoSubWindow::updatePixelValueStatusBar( const QPoint& pos )
strStatus = QString( "(%1,%2) " ).arg( posX ).arg( posY );
Int ColorSpace = m_pcCurrFrame->getColorSpace();
if( ColorSpace == PlaYUVerFrame::COLOR_GRAY )
if( ColorSpace == PlaYUVerPixel::COLOR_GRAY )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pos.x(), pos.y() );
strStatus.append( QString( "Y: %1" ).arg( sPixelValue.Y() ) );
}
if( ColorSpace == PlaYUVerFrame::COLOR_YUV )
if( ColorSpace == PlaYUVerPixel::COLOR_YUV )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pos.x(), pos.y() );
strStatus.append( QString( "Y: %1 U: %2 V: %3" ).arg( sPixelValue.Y() ).arg( sPixelValue.Cb() ).arg( sPixelValue.Cr() ) );
}
if( ( ColorSpace == PlaYUVerFrame::COLOR_RGB ) )
if( ( ColorSpace == PlaYUVerPixel::COLOR_RGB ) )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pos.x(), pos.y() );
strStatus.append( QString( "R: %1 G: %2 B: %3" ).arg( sPixelValue.R() ).arg( sPixelValue.G() ).arg( sPixelValue.B() ) );
+4 -4
View File
@@ -482,7 +482,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
{
Int imageWidth = m_pixmap.width();
Int imageHeight = m_pixmap.height();
PlaYUVerFrame::Pixel sPixelValue;
PlaYUVerPixel sPixelValue;
QFont font( "Helvetica" );
font.setPixelSize( 12 );
@@ -501,7 +501,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
Int frFormat = m_pcCurrFrame->getColorSpace();
if( frFormat == PlaYUVerFrame::COLOR_YUV )
if( frFormat == PlaYUVerPixel::COLOR_YUV )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pixelTopLeft.x(), pixelTopLeft.y() );
@@ -514,7 +514,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
"Y: " + QString::number( sPixelValue.Y() ) + "\n" + "U: " + QString::number( sPixelValue.Cb() ) + "\n" + "V: "
+ QString::number( sPixelValue.Cr() ) );
}
if( frFormat == PlaYUVerFrame::COLOR_GRAY )
if( frFormat == PlaYUVerPixel::COLOR_GRAY )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pixelTopLeft.x(), pixelTopLeft.y() );
@@ -526,7 +526,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
paInter.drawText( pixelRect, Qt::AlignCenter, "Y: " + QString::number( sPixelValue.Y() ) );
}
if( ( frFormat == PlaYUVerFrame::COLOR_RGB ) )
if( ( frFormat == PlaYUVerPixel::COLOR_RGB ) )
{
sPixelValue = m_pcCurrFrame->getPixelValue( pixelTopLeft.x(), pixelTopLeft.y() );