Skip to content

Commit 44522c3

Browse files
committedApr 26, 2024
- Performance improvements
1 parent d0de7fa commit 44522c3

File tree

476 files changed

+241297
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

476 files changed

+241297
-146
lines changed
 

‎CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111
include_directories(motioncam_decoder lib/include thirdparty)
1212

1313
add_library(motioncam_decoder lib/Decoder.cpp lib/RawData.cpp)
14+
set_property(TARGET motioncam_decoder PROPERTY POSITION_INDEPENDENT_CODE ON)
1415

1516
add_executable(example example.cpp)
1617

@@ -19,5 +20,5 @@ target_link_libraries(example PRIVATE motioncam_decoder)
1920
if (MSVC)
2021
add_compile_options(/W4 /WX)
2122
else()
22-
add_compile_options(-Wall -Wextra -pedantic -Werror)
23+
add_compile_options(-Wall -Werror -O3)
2324
endif()

‎lib/Decoder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ namespace motioncam {
167167
const size_t outputSizeBytes = sizeof(uint16_t) * width*height;
168168
outData.resize(outputSizeBytes);
169169

170-
if(raw::Decode(outData.data(), width, height, mTmpBuffer.data(), mTmpBuffer.size()) <= 0)
170+
if(raw::Decode(outData.data(), width, height, mTmpBuffer.data(), mTmpBuffer.size(), mThreadPool) <= 0)
171171
throw IOException("Failed to uncompress frame");
172172
}
173173

0 commit comments

Comments
 (0)
Please sign in to comment.