Skip to content

Commit 7c7a56b

Browse files
committed
Merge branch 'macos-CI'
2 parents 96ade5c + 22490f6 commit 7c7a56b

File tree

4 files changed

+52
-8
lines changed

4 files changed

+52
-8
lines changed

Diff for: .gitlab-ci.yml

+26-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test-uvg266: &test-template
66
stage: test
77
script:
88
- bash .travis-install.bash
9-
- export PATH="${HOME}/bin:${PATH}"
9+
- export PATH="/opt/homebrew/bin/:${HOME}/bin:${PATH}"
1010
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=./ . || (cat config.log && false)
1111
- make install
1212
- env CTEST_PARALLEL_LEVEL=8 CTEST_OUTPUT_ON_FAILURE=1 make test
@@ -43,9 +43,31 @@ test-valgrind:
4343
variables:
4444
UVG_TEST_VALGRIND: 1
4545

46-
# TODO: If someone knows YAML better, there has to be some better way to
47-
# concatenate stuff into the test-template script than just manually copy
48-
# pasting
46+
test-macos:
47+
<<: *test-template
48+
tags:
49+
- macOS
50+
51+
test-macos-asan:
52+
<<: *test-template
53+
tags:
54+
- macOS
55+
variables:
56+
CFLAGS: '-fsanitize=address -g'
57+
# LeakSanitizer doesn't work inside the container because it requires
58+
# ptrace so we disable it.
59+
ASAN_OPTIONS: 'detect_leaks=0'
60+
# AddressSanitizer adds some extra symbols so we expect a failure from
61+
# the external symbols test.
62+
XFAIL_TESTS: test_external_symbols
63+
64+
test-macos-ubsan:
65+
<<: *test-template
66+
tags:
67+
- macOS
68+
variables:
69+
CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment -g'
70+
4971
#test-distcheck:
5072
# <<: *test-template
5173
# script:

Diff for: .travis-install.bash

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
#!/bin/bash
22

3-
# Download FFmpeg and HM decoder and place them in $PATH.
3+
# Download FFmpeg and VTM decoder and place them in $PATH.
44

55
set -euvo pipefail
66

77
mkdir -p "${HOME}/bin"
88

9+
export PATH="/opt/homebrew/bin/:${PATH}"
10+
11+
if [ "$(uname)" == "Darwin" ]; then
12+
wget http://ultravideo.fi/ffmpeg-release-7.0-static-applesilicon.tar.xz
13+
sha256sum -c - << EOF
14+
c2bf6c192fac269ec298ee20b403cc6c9b493970ca3902a2123e649813ea1aba ffmpeg-release-7.0-static-applesilicon.tar.xz
15+
EOF
16+
tar xf ffmpeg-release-7.0-static-applesilicon.tar.xz
17+
cp ffmpeg "${HOME}/bin/ffmpeg"
18+
chmod +x "${HOME}/bin/ffmpeg"
19+
20+
wget http://ultravideo.fi/vtm-23.4-applesilicon.tar.xz
21+
sha256sum -c - << EOF
22+
193c71adca4f4882425de20f93f63ec6e20fe84154137d6894571a354962c7e1 vtm-23.4-applesilicon.tar.xz
23+
EOF
24+
tar xf vtm-23.4-applesilicon.tar.xz
25+
cp DecoderApp "${HOME}/bin/DecoderAppStatic"
26+
chmod +x "${HOME}/bin/DecoderAppStatic"
27+
28+
else
929
wget http://ultravideo.fi/ffmpeg-release-4.2.1-32bit-static.tar.xz
1030
sha256sum -c - << EOF
1131
226f55f8a94d71f3d231a20fe59fcbb7f6100cabf663f9bcb887d17b332a91c5 ffmpeg-release-4.2.1-32bit-static.tar.xz
@@ -21,5 +41,6 @@ EOF
2141
tar xf ubuntu-vtm-13.0.tgz
2242
cp DecoderApp "${HOME}/bin/DecoderAppStatic"
2343
chmod +x "${HOME}/bin/DecoderAppStatic"
44+
fi
2445

2546
export PATH="${HOME}/bin:${PATH}"

Diff for: src/intra.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@ static void predict_cclm(
584584
if (x_scu == 0) available_left_below = MIN(MIN(height / 2, (64 - y_scu - height * 2) / 4), (state->tile->frame->height - y0 - height * 2) / 4);
585585
for (; available_left_below < height / 2; available_left_below++) {
586586
int y_extension = y_scu + height * 2 + 4 * available_left_below;
587+
if (y_extension >= ctu_size) break;
587588
const cu_info_t* pu = LCU_GET_CU_AT_PX(lcu, (x_scu) - 4, y_extension);
588-
if (y_extension >= ctu_size || pu->type == CU_NOTSET || (pu->type == CU_INTRA && pu->intra.mode_chroma == -1)) break;
589+
if (pu->type == CU_NOTSET || (pu->type == CU_INTRA && pu->intra.mode_chroma == -1)) break;
589590
if(x_scu == 32 && y_scu == 0 && pu->log2_height == 6 && pu->log2_width == 6 ) break;
590591
}
591592
for(int i = 0; i < height + available_left_below * 2; i++) {

Diff for: tests/test_external_symbols.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh
22

3-
# Check for external symbols without uvg_ prefix.
3+
# Check for external symbols without uvg_ prefix (or _uvg_ on macOS).
44

55
set -eu${BASH+o pipefail}
66

7-
if nm -go --defined-only ../lib/libuvg266.a | grep -v ' uvg_'; then
7+
if nm -go --defined-only ../lib/libuvg266.a | grep -v ' uvg_' | grep -v ' _uvg_'; then
88
printf '%s\n' 'Only symbols prefixed with "uvg_" should be exported from libuvg266.'
99
false
1010
fi

0 commit comments

Comments
 (0)