Skip to content

Commit bf62815

Browse files
antond-wetasoswow
andauthored
v2 - remove libraw and aces_container (#167)
Changes: replaces direct Libraw calls with OIIO for reading raw images replaces AcesContainer with OIIO for writing exr images replaces all pixel operations with OIIO IBAs Since not all Libraw flags are exposed in the raw input plugin of OIIO, these command line parameters have been removed: -P - bad pixel mask -K - dark frame -j - fuji-rotate -m - median filter -f - four-colour RGB -T - print Libraw-supported cameras -F - use big file -E - mmap-ed IO -s - image index in the file We may want to reintroduce them on the OIIO side later, if required. This is a breaking change and not supposed to be compatible with v1.x. ________________ Signed-off-by: Anton Dukhovnikov <[email protected]> Co-authored-by: Aleksandr Motsjonov <[email protected]>
1 parent fe9fa7c commit bf62815

26 files changed

+1481
-2114
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
- desc: gcc11
2121
nametag: linux-vfx2022-gcc11
2222
os: ubuntu-latest
23-
container: aswf/ci-osl:2022-clang11
23+
container: aswf/ci-osl:2022-clang11.10
2424
vfxyear: 2022
2525
cxx_std: 17
2626
- desc: clang14
2727
nametag: linux-vfx2022-clang14
2828
os: ubuntu-latest
29-
container: aswf/ci-osl:2022-clang11
29+
container: aswf/ci-osl:2022-clang11.10
3030
vfxyear: 2022
3131
cc_compiler: clang
3232
cxx_compiler: clang++
@@ -62,8 +62,7 @@ jobs:
6262
- name: Dependencies
6363
shell: bash
6464
run: |
65-
build_scripts/install_aces_container.bash
66-
sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel LibRaw-devel json-devel
65+
sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel json-devel
6766
6867
- name: Configure CMake
6968
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -77,11 +76,15 @@ jobs:
7776
7877
- name: Build
7978
run: |
80-
sudo cmake --build build
79+
sudo cmake --build build --config Release
8180
8281
- name: Test
8382
working-directory: build
84-
run: ctest --rerun-failed --output-on-failure
83+
run: >
84+
ctest
85+
--build-config Release
86+
--rerun-failed
87+
--output-on-failure
8588
8689
aswf:
8790
name: "VFX${{matrix.vfxyear}} ${{matrix.desc}}"
@@ -146,8 +149,7 @@ jobs:
146149
- name: Dependencies
147150
shell: bash
148151
run: |
149-
build_scripts/install_aces_container.bash
150-
sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel LibRaw-devel json-devel
152+
sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel json-devel
151153
152154
- name: Configure CMake
153155
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -230,7 +232,6 @@ jobs:
230232
- name: Dependencies
231233
shell: bash
232234
run: |
233-
build_scripts/install_aces_container.bash
234235
build_scripts/${{ matrix.install_deps }}.bash
235236
236237
- name: Configure CMake
@@ -254,7 +255,8 @@ jobs:
254255
- name: Test
255256
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
256257
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
257-
run: ctest --build-config ${{ matrix.build_type }} --rerun-failed --output-on-failure
258+
working-directory: build
259+
run: ctest --build-config Release --rerun-failed --output-on-failure
258260

259261
- name: Configure config_tests
260262
run: >

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set( RAWTOACES_PATCH_VERSION 0 )
1212
set( RAWTOACES_VERSION ${RAWTOACES_MAJOR_VERSION}.${RAWTOACES_MINOR_VERSION}.${RAWTOACES_PATCH_VERSION} )
1313

1414
set(RAWTOACES_CORE_LIB "rawtoaces_core")
15-
set(RAWTOACESLIB "rawtoaces_util")
15+
set(RAWTOACES_UTIL_LIB "rawtoaces_util")
1616

1717
set( CMAKE_MACOSX_RPATH 1 )
1818

@@ -78,7 +78,7 @@ include ( configure.cmake )
7878

7979
add_definitions( -DPACKAGE="RAWTOACES" -DVERSION="${RAWTOACES_VERSION}" )
8080
add_subdirectory("src/${RAWTOACES_CORE_LIB}")
81-
add_subdirectory("src/${RAWTOACESLIB}")
81+
add_subdirectory("src/${RAWTOACES_UTIL_LIB}")
8282
add_subdirectory("src/rawtoaces")
8383

8484
enable_testing()

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,29 +186,20 @@ A help message with a description of all command line options can be obtained by
186186
Raw conversion options:
187187
-c float Set adjust maximum threshold (default = 0.75)
188188
-C <r b> Correct chromatic aberration
189-
-P <file> Fix the dead pixels listed in this file
190-
-K <file> Subtract dark frame (16-bit raw PGM)
191189
-k <num> Set the darkness level
192190
-S <num> Set the saturation level
193191
-n <num> Set threshold for wavelet denoising
194192
-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild) (default = 0)
195193
-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)
196-
-j Don't stretch or rotate raw pixels
197194
-W Don't automatically brighten the image
198195
-b <num> Adjust brightness (default = 1.0)
199196
-q [0-3] Set the interpolation quality
200197
-h Half-size color image (twice as fast as "-q 0")
201-
-f Interpolate RGGB as four colors
202-
-m <num> Apply a 3x3 median filter to R-G and B-G
203-
-s [0..N-1] Select one raw image from input file
204-
-G Use green_matching() filter
205198
-B <x y w h> Use cropbox
206199

207200
Benchmarking options:
208201
-v Verbose: print progress messages (repeated -v will add verbosity)
209-
-F Use FILE I/O instead of streambuf API
210202
-d Detailed timing report
211-
-E Use mmap()-ed buffer instead of plain FILE I/O
212203

213204
### RAW conversion options
214205

build_scripts/install_deps_linux.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ time sudo apt-get -q -f install -y \
99
libboost-dev \
1010
libboost-system-dev \
1111
libboost-test-dev \
12-
libraw-dev libceres-dev \
13-
nlohmann-json3-dev
12+
libceres-dev \
13+
nlohmann-json3-dev \
14+
libopencv-dev \
15+
openimageio-tools libopenimageio-dev

build_scripts/install_deps_mac.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -ex
44

5-
brew install ceres-solver imath libraw boost nlohmann-json
5+
brew install ceres-solver imath boost nlohmann-json openimageio

build_scripts/install_deps_windows.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
set -ex
44

55
vcpkg install \
6-
libraw:x64-windows \
76
ceres:x64-windows \
87
imath:x64-windows \
98
boost-system:x64-windows \
109
boost-foreach:x64-windows \
1110
boost-test:x64-windows \
1211
boost-property-tree:x64-windows \
13-
nlohmann-json:x64-windows
12+
nlohmann-json:x64-windows \
13+
openimageio:x64-windows

config/RAWTOACES.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ RAWTOACES_includedir=@INSTALL_INCLUDE_DIR@/rawtoaces
77
Name: RAWTOACES
88
Description: RAWTOACES raw image to ACES
99
Version: @RAWTOACES_VERSION@
10-
Libs: -L${libdir} -lCeres -lraw -lAcesContainer -lHalf
10+
Libs: -L${libdir} -lCeres
1111
Cflags: -I${RAWTOACES_includedir}

config/RAWTOACESConfig.cmake.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/RAWTOACESTargets.cmake)
88

99
include(CMakeFindDependencyMacro)
1010

11-
find_dependency ( AcesContainer )
1211
find_dependency ( Eigen3 )
1312
find_dependency ( Ceres )
14-
find_dependency ( libraw )
15-
find_dependency ( Imath )
1613
find_dependency ( Boost COMPONENTS system )
14+
find_dependency ( OpenImageIO )
15+
1716

1817
check_required_components(rawtoaces)

configure.cmake

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
33
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/CMake")
44

5-
65
find_package ( nlohmann_json CONFIG REQUIRED )
7-
find_package ( AcesContainer CONFIG REQUIRED )
6+
find_package ( OpenImageIO CONFIG REQUIRED )
87
find_package ( Eigen3 CONFIG REQUIRED )
9-
find_package ( Imath CONFIG REQUIRED )
8+
#find_package ( Imath CONFIG REQUIRED )
109
find_package ( Boost CONFIG REQUIRED
1110
COMPONENTS
1211
system
@@ -18,13 +17,3 @@ if (RTA_CENTOS7_CERES_HACK)
1817
else ()
1918
find_package ( Ceres CONFIG REQUIRED )
2019
endif ()
21-
22-
find_package (libraw CONFIG QUIET )
23-
24-
if (libraw_FOUND )
25-
message("STATUS LibRaw config found")
26-
set ( LIBRAW_CONFIG_FOUND TRUE )
27-
else ()
28-
message("WARNING LibRaw config not found, trying to find a module.")
29-
find_package(libraw MODULE REQUIRED)
30-
endif ()

0 commit comments

Comments
 (0)