-
Notifications
You must be signed in to change notification settings - Fork 2
/
redo-try-chroma-decoder
executable file
·51 lines (45 loc) · 1.14 KB
/
redo-try-chroma-decoder
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh -ex
# For each of the non-tmp versions tested in the past, build that version of
# the chroma decoders again and rerun try-chroma-decoder. (This doesn't rerun
# ld-decode for each version.)
testsuitedir="$(realpath $(dirname $0))"
ldddir="$(realpath $testsuitedir/../ld-decode)"
build_dir () {
(
# This is a bit specific to Adam's test machine...
cd "$1"
qmake
sed -i \
-e 's/-pipe -O2/-O3 -march=native/g' \
-e 's/-lopencv_imgcodecs //' \
Makefile
make clean
make -j4
)
}
cd $ldddir
for thisdir in "$testsuitedir"/output/*; do
case "$thisdir" in
*tmp*)
continue
;;
esac
if ! [ -f "$thisdir/git-revision" ]; then
continue
fi
rev=$(head -1 "$thisdir/git-revision" | cut -d' ' -f2)
git checkout $rev
if [ -f tools/ld-decode-shared/sourcefield.h ]; then
build_dir tools/ld-decode-shared
fi
if [ -f tools/ld-comb-ntsc/main.cpp ]; then
build_dir tools/ld-comb-ntsc
fi
if [ -f tools/ld-comb-pal/main.cpp ]; then
build_dir tools/ld-comb-pal
fi
if [ -f tools/ld-chroma-decoder/main.cpp ]; then
build_dir tools/ld-chroma-decoder
fi
"$testsuitedir/try-chroma-decoder" -n $(basename "$thisdir") "$@"
done