Clean code of the public lib PlaYUVerFrame PlaYUVerFrame

This commit is contained in:
jfmcarreira committed 2014-06-25 03:03:54 +01:00
1 parent 655d2c8aa1
commit 99ab86a3c9
5 files changed
+25 -30

No files matched your search

+2 -2
View File
@@ -31,8 +31,8 @@ namespace plaYUVer
PlaYUVerModuleIf::PlaYUVerModuleIf() :
m_pcAction( NULL ),
m_pcDisplaySubWindow( NULL ),
m_pcProcessedFrame( NULL ),
m_pcModuleStream( NULL )
m_pcModuleStream( NULL ),
m_pcProcessedFrame( NULL )
{
for( Int i = 0; i < MAX_NUMBER_FRAMES; i++ )
{
+15 -8
View File
@@ -21,10 +21,17 @@
* \file PlaYUVerFrame.cpp
* \brief Video Frame handling
*/
#include <cstdio>
#include "PlaYUVerFrame.h"
#include "config.h"
#include <cstdio>
#include "LibMemory.h"
#include "PlaYUVerFrame.h"
#ifdef USE_OPENCV
#include <opencv2/opencv.hpp>
#endif
#ifdef USE_PIXFC
#include "pixfc-sse.h"
#endif
namespace plaYUVer
{
@@ -125,9 +132,9 @@ Void PlaYUVerFrame::closePixfc()
#endif
}
#ifdef USE_PIXFC
inline Void PlaYUVerFrame::FrametoRGB8Pixfc()
Void PlaYUVerFrame::FrametoRGB8Pixfc()
{
#ifdef USE_PIXFC
switch( m_iPixelFormat )
{
case YUV420p:
@@ -148,9 +155,8 @@ inline Void PlaYUVerFrame::FrametoRGB8Pixfc()
break;
}
m_bHasRGBPel = true;
}
#endif
}
template<typename T>
Void yuvToRgb( T iY, T iU, T iV, T &iR, T &iG, T &iB )
@@ -599,8 +605,6 @@ Pixel PlaYUVerFrame::ConvertPixel( Pixel sInputPixel, Int eOutputSpace )
return sOutputPixel;
}
// Format conversion
#ifdef USE_OPENCV
cv::Mat PlaYUVerFrame::getCvMat()
{
@@ -634,7 +638,10 @@ cv::Mat PlaYUVerFrame::getCvMat()
}
return opencvFrame;
}
#endif
#ifdef USE_OPENCV
Void PlaYUVerFrame::copyFrom( cv::Mat* opencvFrame )
{
if( m_iPixelFormat == NO_FMT )
+4 -9
View File
@@ -33,14 +33,12 @@
#include <cstdio>
#include <cassert>
#include <QtCore>
#ifdef USE_OPENCV
#include <opencv2/opencv.hpp>
#endif
#ifdef USE_PIXFC
#include "pixfc-sse.h"
#endif
class QImage;
class PixFcSSE;
namespace plaYUVer
{
@@ -140,10 +138,9 @@ public:
static Pixel ConvertPixel( Pixel, Int );
#ifdef USE_OPENCV
cv::Mat getCvMat();
Void copyFrom( cv::Mat* );
#endif
UInt getWidth() const
{
@@ -184,10 +181,8 @@ private:
Void init( UInt width, UInt height, Int pel_format );
Void openPixfc();
Void closePixfc();
#ifdef USE_PIXFC
PixFcSSE* m_pcPixfc;
inline Void FrametoRGB8Pixfc();
#endif
Void FrametoRGB8Pixfc();
}
;
+2 -1
View File
@@ -22,12 +22,13 @@
* \brief Input stream handling
*/
#include "config.h"
#include <cstdio>
#include "LibMemory.h"
#include "PlaYUVerStream.h"
#ifdef USE_FFMPEG
#include "LibAvContextHandle.h"
#endif
#include "LibMemory.h"
namespace plaYUVer
{
+2 -10
View File
@@ -25,22 +25,14 @@
#ifndef __PLAYUVERSTREAM_H__
#define __PLAYUVERSTREAM_H__
#ifdef PLAYUVER
#include "config.h"
#endif
#include "PlaYUVerDefs.h"
#include <iostream>
#include <cstdio>
#include <QtCore>
#ifdef USE_OPENCV
#include <opencv2/opencv.hpp>
#endif
#ifdef USE_FFMPEG
#include "LibAvContextHandle.h"
#endif
#include "PlaYUVerFrame.h"
class LibAvContextHandle;
namespace plaYUVer
{