Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
libpgf
libpgf-r148.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libpgf-r148.patch of Package libpgf
diff -up libpgf/src/Decoder.cpp.r148 libpgf/src/Decoder.cpp --- libpgf/src/Decoder.cpp.r148 2015-08-10 10:46:21.632558343 -0500 +++ libpgf/src/Decoder.cpp 2015-08-10 10:46:21.945565702 -0500 @@ -87,29 +87,6 @@ CDecoder::CDecoder(CPGFStream* stream, P int count, expected; - // set number of threads -#ifdef LIBPGF_USE_OPENMP - m_macroBlockLen = omp_get_num_procs(); -#else - m_macroBlockLen = 1; -#endif - - if (useOMP && m_macroBlockLen > 1) { -#ifdef LIBPGF_USE_OPENMP - omp_set_num_threads(m_macroBlockLen); -#endif - - // create macro block array - m_macroBlocks = new(std::nothrow) CMacroBlock*[m_macroBlockLen]; - if (!m_macroBlocks) ReturnWithError(InsufficientMemory); - for (int i=0; i < m_macroBlockLen; i++) m_macroBlocks[i] = new CMacroBlock(); - m_currentBlock = m_macroBlocks[m_currentBlockIndex]; - } else { - m_macroBlocks = 0; - m_macroBlockLen = 1; // there is only one macro block - m_currentBlock = new CMacroBlock(); - } - // store current stream position m_startPos = m_stream->GetPos(); @@ -209,6 +186,30 @@ CDecoder::CDecoder(CPGFStream* stream, P // store current stream position m_encodedHeaderLength = UINT32(m_stream->GetPos() - m_startPos); + + // set number of threads +#ifdef LIBPGF_USE_OPENMP + m_macroBlockLen = omp_get_num_procs(); +#else + m_macroBlockLen = 1; +#endif + + if (useOMP && m_macroBlockLen > 1) { +#ifdef LIBPGF_USE_OPENMP + omp_set_num_threads(m_macroBlockLen); +#endif + + // create macro block array + m_macroBlocks = new(std::nothrow) CMacroBlock*[m_macroBlockLen]; + if (!m_macroBlocks) ReturnWithError(InsufficientMemory); + for (int i = 0; i < m_macroBlockLen; i++) m_macroBlocks[i] = new CMacroBlock(); + m_currentBlock = m_macroBlocks[m_currentBlockIndex]; + } else { + m_macroBlocks = 0; + m_macroBlockLen = 1; // there is only one macro block + m_currentBlock = new(std::nothrow) CMacroBlock(); + if (!m_currentBlock) ReturnWithError(InsufficientMemory); + } } /////////////////////////////////////////////////////////////////////
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor