Skip to content

Commit 33fbf27

Browse files
committed
add ACES 1.0.1 tests
1 parent 43609db commit 33fbf27

File tree

2 files changed

+249
-0
lines changed

2 files changed

+249
-0
lines changed

Dockerfile_ACES_1_0_1_test

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM ubuntu:noble
2+
3+
RUN apt-get update
4+
5+
# disable interactive install
6+
ENV DEBIAN_FRONTEND noninteractive
7+
8+
# install developement tools
9+
RUN apt-get -y install cmake
10+
RUN apt-get -y install g++
11+
RUN apt-get -y install git
12+
13+
# install developement debugging tools
14+
RUN apt-get -y install valgrind
15+
16+
# install CTL dependencies
17+
RUN apt-get -y install libopenexr-dev
18+
RUN apt-get -y install libtiff-dev
19+
20+
# install workflow tools
21+
RUN apt-get update
22+
RUN apt-get -y install curl
23+
RUN apt-get -y install imagemagick
24+
RUN apt-get -y install openexr
25+
RUN apt-get -y install nano
26+
27+
# download ACES reference images
28+
WORKDIR /usr/src/aces-reference/images/camera
29+
RUN curl -L -o DigitalLAD.2048x1556.dpx https://www.dropbox.com/sh/9xcfbespknayuft/AACKMuLir6h28b1R-5YYEelua/camera/DigitalLAD.2048x1556.dpx
30+
RUN curl -L -o SonyF35.StillLife.dpx https://www.dropbox.com/sh/9xcfbespknayuft/AADJ96mOT-gRT2QXGPRW72tXa/camera/SonyF35.StillLife.dpx
31+
RUN curl -L -o syntheticChart.01.exr https://www.dropbox.com/sh/9xcfbespknayuft/AABCNt5Z2sKrCyXK3WDGM9wna/camera/syntheticChart.01.exr
32+
WORKDIR /usr/src/aces-reference/images/ACES
33+
RUN curl -L -o DigitalLAD.2048x1556.exr https://www.dropbox.com/sh/9xcfbespknayuft/AAD1ksjBqOnnLdNou4f7UR16a/ACES/DigitalLAD.2048x1556.exr
34+
RUN curl -L -o SonyF35.StillLife.exr https://www.dropbox.com/sh/9xcfbespknayuft/AAA04zUZyBYeHRHLaFry2XfDa/ACES/SonyF35.StillLife.exr
35+
RUN curl -L -o syntheticChart.01.exr https://www.dropbox.com/sh/9xcfbespknayuft/AACjjNwsp7iLGkK2f1X-Aysya/ACES/syntheticChart.01.exr
36+
WORKDIR /usr/src/aces-reference/images/OCES
37+
RUN curl -L -o SonyF35.StillLife.exr https://www.dropbox.com/sh/9xcfbespknayuft/AABHm7Vsi1lNqnpLFULRJBy8a/OCES/SonyF35.StillLife.exr
38+
RUN curl -L -o syntheticChart.01.exr https://www.dropbox.com/sh/9xcfbespknayuft/AAAsH92hT7okPkiGIycPZb3ua/OCES/syntheticChart.01.exr
39+
WORKDIR /usr/src/aces-reference/images/ODT
40+
RUN curl -L -o SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff https://www.dropbox.com/sh/9xcfbespknayuft/AABmEQ5iue-1jXDdDFOKqeMKa/ODT/SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff
41+
RUN curl -L -o syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff https://www.dropbox.com/sh/9xcfbespknayuft/AADJi6mQiBnOgeDoGYrzh_dZa/ODT/syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff
42+
43+
# install ACES
44+
WORKDIR /usr/src/
45+
RUN git clone https://github.com/ampas/aces-dev.git
46+
WORKDIR /usr/src/aces-dev
47+
RUN git checkout tags/v1.0 -b v1.0-master
48+
49+
# # build aces_container
50+
# WORKDIR /usr/src/
51+
# RUN git clone https://github.com/ampas/aces_container.git
52+
# WORKDIR /usr/src/aces_container/build
53+
# RUN cmake ..
54+
# RUN make
55+
# RUN make install
56+
57+
# build CTL
58+
WORKDIR /usr/src/CTL
59+
COPY . .
60+
WORKDIR /usr/src/CTL/build
61+
RUN rm -R * || true
62+
RUN cmake ..
63+
RUN make
64+
RUN make install
65+
66+
# finalize docker environment
67+
WORKDIR /usr/src/CTL
68+
CMD bash /usr/src/CTL/resources/test/scripts/test_aces_v1.0.sh
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
#!/bin/bash
2+
3+
set -x
4+
#set -v
5+
set -u
6+
#set -e
7+
8+
# input/output image directories
9+
INPUT_IMAGE_DIR=/usr/src/aces-reference/images
10+
OUTPUT_IMAGE_DIR=/tmp
11+
12+
# CTL ACES base path
13+
CTLBASE=/usr/src/aces-dev/transforms/ctl
14+
15+
# set path to ACES CTL modules
16+
export CTL_MODULE_PATH=$CTLBASE/unbuild/universal/:$CTLBASE/idt/vendorSupplied/sony/:$CTLBASE/lib/:$CTLBASE/lmt/:$CTLBASE/odt/rec709/:$CTLBASE/rrt/:$CTLBASE/utilities/
17+
18+
# camera to ACES
19+
ctlrender -force -compression NONE -ctl $CTLBASE/unbuild/universal/ACEScsc.ADX10_to_ACES.a1.0.0.ctl -global_param1 aIn 1.0 -format exr16 $INPUT_IMAGE_DIR/camera/DigitalLAD.2048x1556.dpx $OUTPUT_IMAGE_DIR/ACES_DigitalLAD.2048x1556.exr
20+
ctlrender -force -compression NONE -ctl $CTLBASE/idt/vendorSupplied/sony/IDT.Sony.SLog1_SGamut_10i.a1.v1.ctl -global_param1 aIn 1.0 -format exr16 $INPUT_IMAGE_DIR/camera/SonyF35.StillLife.dpx $OUTPUT_IMAGE_DIR/ACES_SonyF35.StillLife.exr
21+
ctlrender -force -compression NONE -ctl $CTLBASE/utilities/ACESlib.Unity.a1.0.0.ctl -global_param1 aIn 1.0 -format exr16 $INPUT_IMAGE_DIR/camera/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/ACES_syntheticChart.01.exr
22+
23+
# ACES to OCES
24+
ctlrender -force -compression NONE -ctl $CTLBASE/rrt/RRT.a1.0.0.ctl -format exr16 $INPUT_IMAGE_DIR/ACES/SonyF35.StillLife.exr $OUTPUT_IMAGE_DIR/OCES_SonyF35.StillLife.exr
25+
ctlrender -force -compression NONE -ctl $CTLBASE/rrt/RRT.a1.0.0.ctl -format exr16 $INPUT_IMAGE_DIR/ACES/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/OCES_syntheticChart.01.exr
26+
27+
# OCES to Rec709
28+
ctlrender -force -compression NONE -ctl $CTLBASE/odt/rec709/ODT.Academy.Rec709_100nits_dim.a1.0.0.ctl -format tiff16 $INPUT_IMAGE_DIR/OCES/SonyF35.StillLife.exr $OUTPUT_IMAGE_DIR/ODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff
29+
ctlrender -force -compression NONE -ctl $CTLBASE/odt/rec709/ODT.Academy.Rec709_100nits_dim.a1.0.0.ctl -format tiff16 $INPUT_IMAGE_DIR/OCES/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/ODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff
30+
31+
# concatenated ctl rendering
32+
ctlrender -force -compression NONE -ctl $CTLBASE/idt/vendorSupplied/sony/IDT.Sony.SLog1_SGamut_10i.a1.v1.ctl -global_param1 aIn 1.0 -ctl $CTLBASE/rrt/RRT.a1.0.0.ctl -ctl $CTLBASE/odt/rec709/ODT.Academy.Rec709_100nits_dim.a1.0.0.ctl -format tiff16 $INPUT_IMAGE_DIR/camera/SonyF35.StillLife.dpx $OUTPUT_IMAGE_DIR/ACESOCESODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff
33+
ctlrender -force -compression NONE -global_param1 aIn 1.0 -ctl $CTLBASE/utilities/ACESlib.Unity.a1.0.0.ctl -ctl $CTLBASE/rrt/RRT.a1.0.0.ctl -ctl $CTLBASE/odt/rec709/ODT.Academy.Rec709_100nits_dim.a1.0.0.ctl -format tiff16 $INPUT_IMAGE_DIR/camera/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/ACESOCESODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff
34+
35+
# copy reference images to output directory to simplify debugging and comparison
36+
cp $INPUT_IMAGE_DIR/ACES/DigitalLAD.2048x1556.exr $OUTPUT_IMAGE_DIR/ACESreference_ACES_DigitalLAD.2048x1556.exr
37+
cp $INPUT_IMAGE_DIR/ACES/SonyF35.StillLife.exr $OUTPUT_IMAGE_DIR/ACESreference_SonyF35.StillLife.exr
38+
cp $INPUT_IMAGE_DIR/ACES/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/ACESreference_syntheticChart.01.exr
39+
cp $INPUT_IMAGE_DIR/OCES/SonyF35.StillLife.exr $OUTPUT_IMAGE_DIR/OCESreference_SonyF35.StillLife.01.exr
40+
cp $INPUT_IMAGE_DIR/OCES/syntheticChart.01.exr $OUTPUT_IMAGE_DIR/OCESreference_syntheticChart.01.exr
41+
cp $INPUT_IMAGE_DIR/ODT/SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff $OUTPUT_IMAGE_DIR/ODTreference_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff
42+
cp $INPUT_IMAGE_DIR/ODT/syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff $OUTPUT_IMAGE_DIR/ODTreference_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff
43+
44+
# compare images
45+
METRIC_VALUE="PAE"
46+
#DIFFERENCE_IMAGE_FILENAME="null:" # use null: to prevent creation of output difference image file
47+
48+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ACES_DigitalLAD.2048x1556.exr"
49+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ACES/DigitalLAD.2048x1556.exr"
50+
DIFFERENCE_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/difference_image_ACES_DigitalLAD.2048x1556.exr"
51+
compare -verbose -metric ${METRIC_VALUE} ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
52+
test_01_exitcode=$?
53+
test_01_label="ACES_DigitalLAD.2048x1556.exr"
54+
55+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ACES_SonyF35.StillLife.exr"
56+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ACES/SonyF35.StillLife.exr"
57+
#DIFFERENCE_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/difference_image_ACES_SonyF35.StillLife.exr"
58+
DIFFERENCE_IMAGE_FILENAME="null:"
59+
compare -verbose -metric ${METRIC_VALUE} ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
60+
test_02_exitcode=$?
61+
test_02_label="ACES_SonyF35.StillLife.exr"
62+
63+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ACES_syntheticChart.01.exr"
64+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ACES/syntheticChart.01.exr"
65+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
66+
test_03_exitcode=$?
67+
test_03_label="ACES_syntheticChart.01.exr"
68+
69+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/OCES_SonyF35.StillLife.exr"
70+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/OCES/SonyF35.StillLife.exr"
71+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
72+
test_04_exitcode=$?
73+
test_04_label="OCES_SonyF35.StillLife.exr"
74+
75+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/OCES_syntheticChart.01.exr"
76+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/OCES/syntheticChart.01.exr"
77+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
78+
test_05_exitcode=$?
79+
test_05_label="OCES_syntheticChart.01.exr"
80+
81+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
82+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ODT/SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
83+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
84+
test_06_exitcode=$?
85+
test_06_label="ODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
86+
87+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
88+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ODT/syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
89+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
90+
test_07_exitcode=$?
91+
test_07_label="ODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
92+
93+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ACESOCESODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
94+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ODT/SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
95+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
96+
test_08_exitcode=$?
97+
test_08_label="ACESOCESODT_SonyF35.StillLife_ODT.Academy.Rec709_100nits_dim.tiff"
98+
99+
COMPUTED_IMAGE_FILENAME="${OUTPUT_IMAGE_DIR}/ACESOCESODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
100+
REFERENCE_IMAGE_FILENAME="${INPUT_IMAGE_DIR}/ODT/syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
101+
compare -verbose -metric $METRIC_VALUE ${COMPUTED_IMAGE_FILENAME} ${REFERENCE_IMAGE_FILENAME} ${DIFFERENCE_IMAGE_FILENAME} 2>&1
102+
test_09_exitcode=$?
103+
test_09_label="ACESOCESODT_syntheticChart.01_ODT.Academy.Rec709_100nits_dim.tiff"
104+
105+
set +x
106+
echo ""
107+
echo "Test Summary:"
108+
109+
if [ $test_01_exitcode -eq 0 ] && [ $test_02_exitcode -eq 0 ] && [ $test_03_exitcode -eq 0 ] && [ $test_04_exitcode -eq 0 ] && [ $test_05_exitcode -eq 0 ] && [ $test_06_exitcode -eq 0 ] && [ $test_07_exitcode -eq 0 ] && [ $test_08_exitcode -eq 0 ] && [ $test_09_exitcode -eq 0 ] && [ $test_10_exitcode -eq 0 ]
110+
then
111+
echo "SUCCESS: ACES ctlrender output matches ACES reference files exactly"
112+
exit 0
113+
else
114+
echo "FAILURE: ACES ctlrender output does not match ACES reference files exactly"
115+
116+
if [ $test_01_exitcode -ne 0 ]
117+
then
118+
echo "$test_01_label: imagemagick compare detected differences"
119+
else
120+
echo "$test_01_label: imagemagick compare no detected differences"
121+
fi
122+
123+
if [ $test_02_exitcode -ne 0 ]
124+
then
125+
echo "$test_02_label: imagemagick compare detected differences"
126+
else
127+
echo "$test_02_label: imagemagick compare no detected differences"
128+
fi
129+
130+
if [ $test_03_exitcode -ne 0 ]
131+
then
132+
echo "$test_03_label: imagemagick compare detected differences"
133+
else
134+
echo "$test_03_label: imagemagick compare no detected differences"
135+
fi
136+
137+
if [ $test_04_exitcode -ne 0 ]
138+
then
139+
echo "$test_04_label: imagemagick compare detected differences"
140+
else
141+
echo "$test_04_label: imagemagick compare no detected differences"
142+
fi
143+
144+
if [ $test_05_exitcode -ne 0 ]
145+
then
146+
echo "$test_05_label: imagemagick compare detected differences"
147+
else
148+
echo "$test_05_label: imagemagick compare no detected differences"
149+
fi
150+
151+
if [ $test_06_exitcode -ne 0 ]
152+
then
153+
echo "$test_06_label: imagemagick compare detected differences"
154+
else
155+
echo "$test_06_label: imagemagick compare no detected differences"
156+
fi
157+
158+
if [ $test_07_exitcode -ne 0 ]
159+
then
160+
echo "$test_07_label: imagemagick compare detected differences"
161+
else
162+
echo "$test_07_label: imagemagick compare no detected differences"
163+
fi
164+
165+
if [ $test_08_exitcode -ne 0 ]
166+
then
167+
echo "$test_08_label: imagemagick compare detected differences"
168+
else
169+
echo "$test_08_label: imagemagick compare no detected differences"
170+
fi
171+
172+
if [ $test_09_exitcode -ne 0 ]
173+
then
174+
echo "$test_09_label: imagemagick compare detected differences"
175+
else
176+
echo "$test_09_label: imagemagick compare no detected differences"
177+
fi
178+
179+
exit 1
180+
181+
fi

0 commit comments

Comments
 (0)