Change formater style
This commit is contained in:
1 parent
8bb20a26ca
commit
a96b086657
4 files changed
+32
-35
No files matched your search
@@ -9,7 +9,7 @@
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list" value="0"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list" value="49"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if" value="insert"/>
|
||||
@@ -27,14 +27,14 @@
|
||||
<setting id="org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment" value="2"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer" value="49"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.tabulation.size" value="2"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_enumerator_list" value="48"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_enumerator_list" value="49"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
|
||||
@@ -42,7 +42,7 @@
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch" value="do not insert"/>
|
||||
@@ -142,7 +142,7 @@
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_switch" value="next_line"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain" value="16"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain" value="83"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
|
||||
+16
-19
@@ -73,7 +73,7 @@ InputStream::~InputStream()
|
||||
QString InputStream::supportedReadFormats()
|
||||
{
|
||||
QString formats;
|
||||
formats = "*.yuv " // Raw video
|
||||
formats = "*.yuv " // Raw video
|
||||
#ifdef USE_FFMPEG
|
||||
"*.avi " // Audio video interleaved
|
||||
"*.wmv "// Windows media video
|
||||
@@ -90,31 +90,27 @@ QString InputStream::supportedWriteFormats()
|
||||
"*.jpeg "// Joint Photographic Experts Group
|
||||
"*.png "// Portable Network Graphics
|
||||
;
|
||||
|
||||
return formats;
|
||||
}
|
||||
|
||||
QStringList InputStream::supportedReadFormatsList()
|
||||
{
|
||||
QStringList formats;
|
||||
formats << "Raw video (*.yuv)" // Raw video
|
||||
formats << "Raw video (*.yuv)"
|
||||
#ifdef USE_FFMPEG
|
||||
<< "Audio video interleaved (*.avi)" // Audio video interleaved
|
||||
<< "Windows media video (*.wmv)" // Windows media video
|
||||
<< "Audio video interleaved (*.avi)"
|
||||
<< "Windows media video (*.wmv)"
|
||||
#endif
|
||||
;
|
||||
|
||||
;
|
||||
return formats;
|
||||
}
|
||||
|
||||
QStringList InputStream::supportedWriteFormatsList()
|
||||
{
|
||||
QStringList formats;
|
||||
formats << "Windows Bitmap (*.bmp)" // Windows Bitmap
|
||||
<< "Joint Photographic Experts Group (*.jpg *.jpeg)" // Joint Photographic Experts Group
|
||||
<< "Portable Network Graphics (*.png)" // Portable Network Graphics
|
||||
;
|
||||
|
||||
formats << "Windows Bitmap (*.bmp)"
|
||||
<< "Joint Photographic Experts Group (*.jpg *.jpeg)"
|
||||
<< "Portable Network Graphics (*.png)";
|
||||
return formats;
|
||||
}
|
||||
|
||||
@@ -168,7 +164,7 @@ Void InputStream::init( QString filename, UInt width, UInt height, Int input_for
|
||||
m_ppcFrameBuffer[i] = new PlaYUVerFrame( m_uiWidth, m_uiHeight, m_iPixelFormat );
|
||||
}
|
||||
m_uiFrameBufferIndex = 0;
|
||||
m_pcCurrFrame = m_pcNextFrame = m_ppcFrameBuffer[m_uiFrameBufferIndex];
|
||||
m_pcCurrFrame = m_pcNextFrame = m_ppcFrameBuffer[m_uiFrameBufferIndex];
|
||||
|
||||
UInt64 frame_bytes_input = m_pcCurrFrame->getBytesPerFrame();
|
||||
|
||||
@@ -184,7 +180,7 @@ Void InputStream::init( QString filename, UInt width, UInt height, Int input_for
|
||||
m_uiTotalFrameNum = ftell( m_pFile ) / ( frame_bytes_input );
|
||||
fseek( m_pFile, 0, SEEK_SET );
|
||||
|
||||
m_cFormatName = QString::fromUtf8("Raw Video");
|
||||
m_cFormatName = QString::fromUtf8( "Raw Video" );
|
||||
|
||||
}
|
||||
if( !getMem1D<Pel>( &m_pInputBuffer, m_pcCurrFrame->getBytesPerFrame() ) )
|
||||
@@ -195,7 +191,7 @@ Void InputStream::init( QString filename, UInt width, UInt height, Int input_for
|
||||
|
||||
m_cStreamInformationString = QString( "[" );
|
||||
m_cStreamInformationString.append( m_cFormatName );
|
||||
m_cStreamInformationString.append( QString(" / "));
|
||||
m_cStreamInformationString.append( QString( " / " ) );
|
||||
m_cStreamInformationString.append( PlaYUVerFrame::supportedPixelFormatList().at( m_iPixelFormat ) );
|
||||
m_cStreamInformationString.append( "] " );
|
||||
m_cStreamInformationString.append( QFileInfo( m_cFilename ).fileName() );
|
||||
@@ -242,7 +238,7 @@ Void InputStream::readNextFrame()
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_iCurrFrameNum + 1 >= (Int)m_uiTotalFrameNum )
|
||||
if( m_iCurrFrameNum + 1 >= ( Int )m_uiTotalFrameNum )
|
||||
{
|
||||
m_iErrorStatus = END_OF_SEQ;
|
||||
m_iCurrFrameNum = 0;
|
||||
@@ -263,7 +259,8 @@ Void InputStream::readNextFrame()
|
||||
if( bytes_read != frame_bytes_input )
|
||||
{
|
||||
m_iErrorStatus = READING;
|
||||
qDebug( ) << " Reading error !!!" << endl;
|
||||
qDebug( ) << " Reading error !!!"
|
||||
<< endl;
|
||||
return;
|
||||
}
|
||||
m_pcNextFrame->FrameFromBuffer( m_pInputBuffer, m_iPixelFormat );
|
||||
@@ -289,7 +286,7 @@ PlaYUVerFrame* InputStream::getCurrFrame( PlaYUVerFrame *pyuv_image )
|
||||
if( pyuv_image == NULL )
|
||||
pyuv_image = new PlaYUVerFrame( m_pcCurrFrame->getWidth(), m_pcCurrFrame->getHeight(), m_pcCurrFrame->getPelFormat() );
|
||||
|
||||
pyuv_image->CopyFrom(m_pcCurrFrame);
|
||||
pyuv_image->CopyFrom( m_pcCurrFrame );
|
||||
return pyuv_image;
|
||||
}
|
||||
|
||||
@@ -309,7 +306,7 @@ cv::Mat InputStream::getFrameCvMat()
|
||||
|
||||
Void InputStream::seekInput( Int new_frame_num )
|
||||
{
|
||||
if( new_frame_num < 0 || new_frame_num >= (Int)m_uiTotalFrameNum )
|
||||
if( new_frame_num < 0 || new_frame_num >= ( Int )m_uiTotalFrameNum )
|
||||
return;
|
||||
#ifdef USE_FFMPEG
|
||||
if( m_cLibAvContext.getStatus() )
|
||||
|
||||
@@ -50,7 +50,9 @@ namespace plaYUVer
|
||||
|
||||
enum InputStream_Errors
|
||||
{
|
||||
NO_STREAM_ERROR = 0, READING = 1, END_OF_SEQ = 2,
|
||||
NO_STREAM_ERROR = 0,
|
||||
READING = 1,
|
||||
END_OF_SEQ = 2,
|
||||
};
|
||||
|
||||
class InputStream
|
||||
@@ -97,7 +99,8 @@ public:
|
||||
|
||||
enum InputStreamFormats
|
||||
{
|
||||
INVALID = -1, YUVFormat = 0, // Use color space.
|
||||
INVALID = -1,
|
||||
YUVFormat = 0, // Use color space.
|
||||
};
|
||||
|
||||
Bool needFormatDialog( QString filename );
|
||||
@@ -130,9 +133,9 @@ public:
|
||||
return m_cFilename;
|
||||
}
|
||||
QString getStreamInformationString()
|
||||
{
|
||||
return m_cStreamInformationString;
|
||||
}
|
||||
{
|
||||
return m_cStreamInformationString;
|
||||
}
|
||||
QString getFormatName()
|
||||
{
|
||||
return m_cFormatName;
|
||||
|
||||
@@ -39,7 +39,6 @@ class QImage;
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
|
||||
static const QString gInputStreamFormatsNames[] =
|
||||
{
|
||||
"YUV420p",
|
||||
@@ -47,9 +46,7 @@ static const QString gInputStreamFormatsNames[] =
|
||||
"YUV422p",
|
||||
"YUV411p",
|
||||
"YUV410p",
|
||||
"GRAY",
|
||||
"RGB8",
|
||||
};
|
||||
"GRAY" };
|
||||
|
||||
class PlaYUVerFrame
|
||||
{
|
||||
@@ -75,7 +72,7 @@ public:
|
||||
QStringList formats;
|
||||
for( Int i = 0; i < NUMBER_FORMATS; i++ )
|
||||
{
|
||||
formats.append(gInputStreamFormatsNames[i]);
|
||||
formats.append( gInputStreamFormatsNames[i] );
|
||||
}
|
||||
return formats;
|
||||
}
|
||||
@@ -97,7 +94,7 @@ public:
|
||||
}
|
||||
|
||||
static Pixel ConvertPixel( Pixel sInputPixel, ColorSpace eOutputSpace );
|
||||
Pixel getPixelValue(const QPoint &pos, ColorSpace color);
|
||||
Pixel getPixelValue( const QPoint &pos, ColorSpace color );
|
||||
|
||||
UChar* getQImageBuffer()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user