Fix m_bHasHistogram flag
This commit is contained in:
@@ -161,6 +161,7 @@ Void PlaYUVerFrame::frameFromBuffer( Pel *Buff, UInt64 uiBuffSize )
|
||||
return;
|
||||
m_pcPelFormat->frameFromBuffer( Buff, m_pppcInputPel, m_uiWidth, m_uiHeight );
|
||||
m_bHasRGBPel = false;
|
||||
m_bHasHistogram = false;
|
||||
fillRGBBuffer();
|
||||
}
|
||||
|
||||
@@ -182,6 +183,7 @@ Void PlaYUVerFrame::copyFrom( PlaYUVerFrame* input_frame )
|
||||
if( m_iPixelFormat != input_frame->getPelFormat() && m_uiWidth == input_frame->getWidth() && m_uiHeight == input_frame->getHeight() )
|
||||
return;
|
||||
m_bHasRGBPel = false;
|
||||
m_bHasHistogram = false;
|
||||
memcpy( *m_pppcInputPel[LUMA], input_frame->getPelBufferYUV()[LUMA][0], getBytesPerFrame() * sizeof(Pel) );
|
||||
}
|
||||
|
||||
@@ -210,7 +212,6 @@ Void PlaYUVerFrame::copyFrom( PlaYUVerFrame* input_frame, UInt xPos, UInt yPos )
|
||||
{
|
||||
if( m_iPixelFormat != input_frame->getPelFormat() )
|
||||
return;
|
||||
m_bHasRGBPel = false;
|
||||
Pel ***pInput = input_frame->getPelBufferYUV();
|
||||
for( UInt ch = 0; ch < m_pcPelFormat->numberChannels; ch++ )
|
||||
{
|
||||
@@ -221,6 +222,8 @@ Void PlaYUVerFrame::copyFrom( PlaYUVerFrame* input_frame, UInt xPos, UInt yPos )
|
||||
memcpy( m_pppcInputPel[ch][i], &( pInput[ch][yPos / ratioH + i][xPos / ratioW] ), m_uiWidth / ratioW * sizeof(Pel) );
|
||||
}
|
||||
}
|
||||
m_bHasRGBPel = false;
|
||||
m_bHasHistogram = false;
|
||||
}
|
||||
|
||||
PlaYUVerFrame::Pixel PlaYUVerFrame::getPixelValue( Int xPos, Int yPos, Int eColorSpace )
|
||||
@@ -376,6 +379,7 @@ Void PlaYUVerFrame::fromCvMat( Void* voidFrame )
|
||||
}
|
||||
|
||||
m_bHasRGBPel = false;
|
||||
m_bHasHistogram = false;
|
||||
|
||||
if( m_iPixelFormat != GRAY )
|
||||
{
|
||||
|
||||
@@ -73,7 +73,9 @@ Void PlaYUVerFrameStats::xSetupStatistics( const PlaYUVerFrame *pcFrame, UInt op
|
||||
Void PlaYUVerFrameStats::calcHistogram()
|
||||
{
|
||||
m_bRunningFlag = true;
|
||||
m_bHasHistogram = false;
|
||||
//m_bHasHistogram = false;
|
||||
if( m_bHasHistogram )
|
||||
return;
|
||||
getMem1D<Double>( &( m_pdHistogram ), m_uiHistoSegments * histoChannels );
|
||||
|
||||
if( !m_pdHistogram )
|
||||
|
||||
Reference in New Issue
Block a user