Merge lot of cool stuff in master
Make it stable and release it
This commit is contained in:
1 parent
3e6b04e983
commit
58a0b11c8f
69 files changed
+1854
-2487
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
### CMakeLists for playuver lib component
|
||||
###
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
|
||||
|
||||
set(plaYUver_Lib_SRCS
|
||||
# Frame
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -43,7 +43,7 @@ PlaYUVerFrameStats::PlaYUVerFrameStats() :
|
||||
PlaYUVerFrameStats::~PlaYUVerFrameStats()
|
||||
{
|
||||
if( m_pdHistogram )
|
||||
delete[] m_pdHistogram;
|
||||
freeMem1D( m_pdHistogram );
|
||||
|
||||
}
|
||||
|
||||
@@ -72,7 +72,10 @@ Void PlaYUVerFrameStats::xSetupStatistics( const PlaYUVerFrame *pcFrame, UInt op
|
||||
|
||||
Void PlaYUVerFrameStats::calcHistogram()
|
||||
{
|
||||
m_bHasHistogram = false;
|
||||
m_bRunningFlag = true;
|
||||
//m_bHasHistogram = false;
|
||||
if( m_bHasHistogram )
|
||||
return;
|
||||
getMem1D<Double>( &( m_pdHistogram ), m_uiHistoSegments * histoChannels );
|
||||
|
||||
if( !m_pdHistogram )
|
||||
@@ -97,7 +100,7 @@ Void PlaYUVerFrameStats::calcHistogram()
|
||||
m_pdHistogram[*( data[LUMA] ) + LUMA * m_uiHistoSegments]++;
|
||||
data[LUMA] += 1;
|
||||
}
|
||||
for( i = 0; ( i < imageChromaSize ) && runningFlag; i++ )
|
||||
for( i = 0; ( i < imageChromaSize ) && m_bRunningFlag; i++ )
|
||||
{
|
||||
for( j = 1; j < m_uiChannels; j++ )
|
||||
{
|
||||
@@ -115,7 +118,7 @@ Void PlaYUVerFrameStats::calcHistogram()
|
||||
data[COLOR_G] = m_pppImageData[COLOR_G][0];
|
||||
data[COLOR_B] = m_pppImageData[COLOR_B][0];
|
||||
|
||||
for( i = 0; ( i < m_uiImageHeight * m_uiImageWidth ) && runningFlag; i++ )
|
||||
for( i = 0; ( i < m_uiImageHeight * m_uiImageWidth ) && m_bRunningFlag; i++ )
|
||||
{
|
||||
for( j = 0; j < m_uiChannels; j++ )
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -80,6 +80,17 @@ public:
|
||||
*/
|
||||
Int getHistogramSegment();
|
||||
|
||||
/**
|
||||
* Control calculation
|
||||
*/
|
||||
Void setRunningFlag( Bool bFlag )
|
||||
{
|
||||
m_bRunningFlag = bFlag;
|
||||
}
|
||||
Bool getHasHistogram()
|
||||
{
|
||||
return m_bHasHistogram;
|
||||
}
|
||||
private:
|
||||
|
||||
/** The histogram data.*/
|
||||
@@ -103,7 +114,7 @@ private:
|
||||
UInt m_uiHistoSegments;
|
||||
|
||||
/** Used to stop thread during calculations.*/
|
||||
Bool runningFlag;
|
||||
Bool m_bRunningFlag;
|
||||
|
||||
Int getRealHistoChannel( Int channel );
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -254,6 +254,7 @@ Void PlaYUVerStream::close()
|
||||
#ifdef USE_FFMPEG
|
||||
if( m_uiStreamHandler == FFMPEG )
|
||||
m_cLibAvContext->closeAvFormat();
|
||||
delete m_cLibAvContext;
|
||||
#endif
|
||||
|
||||
if( m_ppcFrameBuffer )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
Reference in new issue
Block a user