Format code
This commit is contained in:
@@ -49,8 +49,7 @@ bool AbsoluteFrameDifference::create( std::vector<CalypFrame*> apcFrameList )
|
||||
_BASIC_MODULE_API_2_CHECK_
|
||||
|
||||
for( unsigned int i = 1; i < apcFrameList.size(); i++ )
|
||||
if( !apcFrameList[i]->haveSameFmt( apcFrameList[0], CalypFrame::MATCH_COLOR_SPACE_IGNORE_GRAY
|
||||
| CalypFrame::MATCH_COLOR_SPACE | CalypFrame::MATCH_RESOLUTION | CalypFrame::MATCH_BITS ) )
|
||||
if( !apcFrameList[i]->haveSameFmt( apcFrameList[0], CalypFrame::MATCH_COLOR_SPACE_IGNORE_GRAY | CalypFrame::MATCH_COLOR_SPACE | CalypFrame::MATCH_RESOLUTION | CalypFrame::MATCH_BITS ) )
|
||||
return false;
|
||||
|
||||
m_pcFrameDifference = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), CLP_GRAY, apcFrameList[0]->getBitsPel() );
|
||||
|
||||
@@ -23,19 +23,21 @@
|
||||
*/
|
||||
|
||||
#include "CalypModulesFactory.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_DYNLOAD
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
// Generated by cmake
|
||||
#include "ModulesListHeader.h"
|
||||
|
||||
CalypModulesFactory::CalypModulesFactory(){REGISTER_ALL_MODULES}
|
||||
CalypModulesFactory::CalypModulesFactory(){ REGISTER_ALL_MODULES }
|
||||
|
||||
CalypModulesFactory::~CalypModulesFactory()
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ FrameDifference::FrameDifference()
|
||||
m_uiModuleRequirements = CLP_MODULE_REQUIRES_NEW_WINDOW | CLP_MODULE_REQUIRES_OPTIONS;
|
||||
m_uiNumberOfFrames = 2;
|
||||
|
||||
m_cModuleOptions.addOptions() /**/
|
||||
m_cModuleOptions.addOptions() /**/
|
||||
( "BitsPerpixel", m_uiBitsPixel, "Bits per pixel (use zero to avoid scaling) [0]" ) /**/
|
||||
( "SumOperation", m_uiSumOperation, "Sum instead of difference [0]" );
|
||||
|
||||
@@ -68,7 +68,7 @@ bool FrameDifference::create( std::vector<CalypFrame*> apcFrameList )
|
||||
}
|
||||
|
||||
uiMaxBitsPixel = m_uiSumOperation ? uiMaxBitsPixel : uiMaxBitsPixel + 1;
|
||||
m_uiBitsPixel = !m_uiBitsPixel ? uiMaxBitsPixel & 0x0F : m_uiBitsPixel;
|
||||
m_uiBitsPixel = !m_uiBitsPixel ? uiMaxBitsPixel & 0x0F : m_uiBitsPixel;
|
||||
|
||||
m_iDiffBitShift = uiMaxBitsPixel - m_uiBitsPixel;
|
||||
m_iMaxDiffValue = ( 1 << ( m_uiSumOperation ? m_uiBitsPixel : m_uiBitsPixel - 1 ) );
|
||||
@@ -76,7 +76,7 @@ bool FrameDifference::create( std::vector<CalypFrame*> apcFrameList )
|
||||
m_pcFrameDifference = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(),
|
||||
apcFrameList[0]->getPelFormat(), m_uiBitsPixel, m_uiSumOperation == 1 ? false : true );
|
||||
|
||||
m_iOperation = m_uiSumOperation == 0 ? -1 : 1 ;
|
||||
m_iOperation = m_uiSumOperation == 0 ? -1 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ CalypFrame* FrameDifference::process( std::vector<CalypFrame*> apcFrameList )
|
||||
for( unsigned int y = 0; y < m_pcFrameDifference->getHeight( ch ); y++ )
|
||||
for( unsigned int x = 0; x < m_pcFrameDifference->getWidth( ch ); x++ )
|
||||
{
|
||||
aux_pel_1 = frame1(ch, x, y, false );
|
||||
aux_pel_2 = frame2(ch, x, y, false );
|
||||
aux_pel_1 = frame1( ch, x, y, false );
|
||||
aux_pel_2 = frame2( ch, x, y, false );
|
||||
diff = aux_pel_1 + m_iOperation * aux_pel_2;
|
||||
diff = m_iDiffBitShift > 0 ? diff >> m_iDiffBitShift : diff << -m_iDiffBitShift;
|
||||
diff = std::min<short>( diff, m_iMaxDiffValue - 1 );
|
||||
|
||||
@@ -45,10 +45,10 @@ FrameResampling::FrameResampling()
|
||||
m_uiNumberOfFrames = 1;
|
||||
m_uiModuleRequirements = CLP_MODULE_REQUIRES_OPTIONS;
|
||||
|
||||
m_cModuleOptions.addOptions() /**/
|
||||
( "width", m_iWidth, "Width of the crop region [-1]" ) /**/
|
||||
m_cModuleOptions.addOptions() /**/
|
||||
( "width", m_iWidth, "Width of the crop region [-1]" ) /**/
|
||||
( "height", m_iHeight, "Height of the crop region [-1]" ) /**/
|
||||
( "Interpolation", m_iInterpolation, "Interpolation method (1-4) [4]" ) ;
|
||||
( "Interpolation", m_iInterpolation, "Interpolation method (1-4) [4]" );
|
||||
|
||||
m_iInterpolation = 4;
|
||||
m_iWidth = -1;
|
||||
|
||||
@@ -42,7 +42,8 @@ class FrameResampling : public CalypModuleIf
|
||||
private:
|
||||
int m_iWidth;
|
||||
int m_iHeight;
|
||||
int m_iInterpolation;
|
||||
int m_iInterpolation;
|
||||
|
||||
public:
|
||||
FrameResampling();
|
||||
virtual ~FrameResampling() {}
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
*/
|
||||
|
||||
#include "HEVCIntraPrediction.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "lib/LibMemory.h"
|
||||
|
||||
HEVCIntraPrediction::HEVCIntraPrediction()
|
||||
@@ -67,11 +69,11 @@ bool HEVCIntraPrediction::create( std::vector<CalypFrame*> apcFrameList )
|
||||
return true;
|
||||
}
|
||||
|
||||
static const int g_AngularParamLookUp[] = {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, // Horizontal
|
||||
-32, -26, -21, -17, -13, -9, -5, -2, 0, 2, 5, 9, 13, 17, 21, 26, 32}; // Vertical
|
||||
static const int g_AngularParamLookUp[] = { 32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, // Horizontal
|
||||
-32, -26, -21, -17, -13, -9, -5, -2, 0, 2, 5, 9, 13, 17, 21, 26, 32 }; // Vertical
|
||||
|
||||
static const int g_InverAngularParamLookup[2][8] = {{-32, -26, -21, -17, -13, -9, -5, -2},
|
||||
{-256, -315, -390, -482, -630, -910, -1638, -4096}};
|
||||
static const int g_InverAngularParamLookup[2][8] = { { -32, -26, -21, -17, -13, -9, -5, -2 },
|
||||
{ -256, -315, -390, -482, -630, -910, -1638, -4096 } };
|
||||
|
||||
int getAngularParam( int mode )
|
||||
{
|
||||
|
||||
@@ -64,11 +64,11 @@ bool MeasureOpticalFlowDualTVL1::create( std::vector<CalypFrame*> apcFrameList )
|
||||
return false;
|
||||
|
||||
m_iStep = 16;
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
m_cTvl1 = cv::optflow::createOptFlow_DualTVL1();
|
||||
#else
|
||||
#else
|
||||
m_cTvl1 = cv::createOptFlow_DualTVL1();
|
||||
#endif
|
||||
#endif
|
||||
m_pcOutputFrame = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), CLP_GRAY );
|
||||
|
||||
return true;
|
||||
|
||||
@@ -166,11 +166,11 @@ bool OpticalFlowDualTVL1::create( std::vector<CalypFrame*> apcFrameList )
|
||||
bool bRet = commonCreate( apcFrameList );
|
||||
if( !bRet )
|
||||
return bRet;
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
m_cOpticalFlow = cv::optflow::createOptFlow_DualTVL1();
|
||||
#else
|
||||
#else
|
||||
m_cOpticalFlow = cv::createOptFlow_DualTVL1();
|
||||
#endif
|
||||
#endif
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#include "OptimiseDisplay.h"
|
||||
|
||||
#include "lib/LibMemory.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "lib/LibMemory.h"
|
||||
|
||||
OptimiseDisplay::OptimiseDisplay()
|
||||
{
|
||||
/* Module Definition */
|
||||
|
||||
@@ -94,7 +94,7 @@ CalypFrame* ThreeSixtyFaceConcatenation::process( std::vector<CalypFrame*> apcFr
|
||||
|
||||
switch( m_uiProjectionType )
|
||||
{
|
||||
case 1: // Cube-map
|
||||
case 1: // Cube-map
|
||||
for( unsigned i = 0; i < m_uiFacesX * m_uiFacesY; i++ )
|
||||
{
|
||||
CalypFrame* pcFrame = apcFrameList[i];
|
||||
|
||||
@@ -91,7 +91,7 @@ CalypFrame* ThreeSixtyFaceExtraction::process( std::vector<CalypFrame*> apcFrame
|
||||
|
||||
switch( m_uiProjectionType )
|
||||
{
|
||||
case 1: // Cube-map
|
||||
case 1: // Cube-map
|
||||
x = m_uiFaceNum % m_uiFacesX * m_pcOutputFrame->getWidth();
|
||||
y = ( m_uiFaceNum / m_uiFacesX ) * m_pcOutputFrame->getHeight();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user