Merge branch 'gitlab-ci-fix'

This commit is contained in:
Arttu Ylä-Outinen 2018-07-06 08:59:55 +03:00
commit cbb5b20449
2 changed files with 27 additions and 42 deletions

View file

@ -1,67 +1,47 @@
# Use Kvazaar CI base image which includes the build tools and ffmpeg + hmdec in ${HOME}/bin # Use Kvazaar CI base image which includes the build tools and ffmpeg + hmdec in ${HOME}/bin
image: ultravideo/kvazaar_ci_base:latest image: ultravideo/kvazaar_ci_base:latest
# Build kvazaar # Build and test kvazaar
build-kvazaar: &build-template test-kvazaar: &test-template
stage: build stage: test
script: script:
- export PATH="${HOME}/bin:${PATH}"
- ./autogen.sh - ./autogen.sh
- ./configure --enable-werror || (cat config.log && false) - ./configure --enable-werror || (cat config.log && false)
- make --jobs=8 V=1 - make --jobs=8
- make check --jobs=8 VERBOSE=1
artifacts: artifacts:
paths: paths:
- src/kvazaar - src/kvazaar
- src/.libs - src/.libs
expire_in: 1 week expire_in: 1 week
build-asan: test-asan:
<<: *build-template <<: *test-template
variables: variables:
CFLAGS: '-fsanitize=address' CFLAGS: '-fsanitize=address'
# LeakSanitizer doesn't work inside the container because it requires # LeakSanitizer doesn't work inside the container because it requires
# ptrace so we disable it. # ptrace so we disable it.
ASAN_OPTIONS: 'detect_leaks=0' ASAN_OPTIONS: 'detect_leaks=0'
# AddressSanitizer adds some extra symbols so we expect a failure from
# the external symbols test.
XFAIL_TESTS: test_external_symbols.sh
build-tsan: test-tsan:
<<: *build-template <<: *test-template
variables: variables:
CFLAGS: '-fsanitize=thread' CFLAGS: '-fsanitize=thread'
build-ubsan: test-ubsan:
<<: *build-template <<: *test-template
variables: variables:
CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment' CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment'
.test-template: &test-template
stage: test
script:
- export PATH="${HOME}/bin:${PATH}"
- ./autogen.sh
- ./configure --enable-werror
- make check --jobs=8 VERBOSE=1
test-valgrind: test-valgrind:
<<: *test-template <<: *test-template
dependencies:
- build-kvazaar
variables: variables:
KVAZAAR_OVERRIDE_angular_pred: generic KVAZAAR_OVERRIDE_angular_pred: generic
KVAZAAR_OVERRIDE_sao_band_ddistortion: generic KVAZAAR_OVERRIDE_sao_band_ddistortion: generic
KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic
KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic
KVZ_TEST_VALGRIND: 1 KVZ_TEST_VALGRIND: 1
test-asan:
<<: *test-template
dependencies:
- build-asan
test-tsan:
<<: *test-template
dependencies:
- build-tsan
test-ubsan:
<<: *test-template
dependencies:
- build-ubsan

View file

@ -37,9 +37,6 @@
#include "tables.h" #include "tables.h"
#include "threadqueue.h" #include "threadqueue.h"
#define SAO_BUF_WIDTH (LCU_WIDTH + SAO_DELAY_PX + 2)
#define SAO_BUF_WIDTH_C (SAO_BUF_WIDTH / 2)
int kvz_encoder_state_match_children_of_previous_frame(encoder_state_t * const state) { int kvz_encoder_state_match_children_of_previous_frame(encoder_state_t * const state) {
int i; int i;
@ -250,10 +247,18 @@ static void encoder_sao_reconstruct(const encoder_state_t *const state,
{ {
videoframe_t *const frame = state->tile->frame; videoframe_t *const frame = state->tile->frame;
// Temporary buffers for SAO input pixels.
kvz_pixel sao_buf_y_array[SAO_BUF_WIDTH * SAO_BUF_WIDTH]; // Temporary buffers for SAO input pixels. The buffers cover the pixels
kvz_pixel sao_buf_u_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C]; // inside the LCU (LCU_WIDTH x LCU_WIDTH), SAO_DELAY_PX wide bands to the
kvz_pixel sao_buf_v_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C]; // left and above the LCU, and one pixel border on the left and top
// sides. We add two extra pixels to the buffers because the AVX2 SAO
// reconstruction reads up to two extra bytes when using edge SAO in the
// horizontal direction.
#define SAO_BUF_WIDTH (1 + SAO_DELAY_PX + LCU_WIDTH)
#define SAO_BUF_WIDTH_C (1 + SAO_DELAY_PX/2 + LCU_WIDTH_C)
kvz_pixel sao_buf_y_array[SAO_BUF_WIDTH * SAO_BUF_WIDTH + 2];
kvz_pixel sao_buf_u_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C + 2];
kvz_pixel sao_buf_v_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C + 2];
// Pointers to the top-left pixel of the LCU in the buffers. // Pointers to the top-left pixel of the LCU in the buffers.
kvz_pixel *const sao_buf_y = &sao_buf_y_array[(SAO_DELAY_PX + 1) * (SAO_BUF_WIDTH + 1)]; kvz_pixel *const sao_buf_y = &sao_buf_y_array[(SAO_DELAY_PX + 1) * (SAO_BUF_WIDTH + 1)];