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
image: ultravideo/kvazaar_ci_base:latest
# Build kvazaar
build-kvazaar: &build-template
stage: build
# Build and test kvazaar
test-kvazaar: &test-template
stage: test
script:
- export PATH="${HOME}/bin:${PATH}"
- ./autogen.sh
- ./configure --enable-werror || (cat config.log && false)
- make --jobs=8 V=1
- make --jobs=8
- make check --jobs=8 VERBOSE=1
artifacts:
paths:
- src/kvazaar
- src/.libs
expire_in: 1 week
build-asan:
<<: *build-template
test-asan:
<<: *test-template
variables:
CFLAGS: '-fsanitize=address'
# LeakSanitizer doesn't work inside the container because it requires
# ptrace so we disable it.
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:
<<: *build-template
test-tsan:
<<: *test-template
variables:
CFLAGS: '-fsanitize=thread'
build-ubsan:
<<: *build-template
test-ubsan:
<<: *test-template
variables:
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-template
dependencies:
- build-kvazaar
variables:
KVAZAAR_OVERRIDE_angular_pred: generic
KVAZAAR_OVERRIDE_sao_band_ddistortion: generic
KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic
KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic
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 "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 i;
@ -250,10 +247,18 @@ static void encoder_sao_reconstruct(const encoder_state_t *const state,
{
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];
kvz_pixel sao_buf_u_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C];
kvz_pixel sao_buf_v_array[SAO_BUF_WIDTH_C * SAO_BUF_WIDTH_C];
// Temporary buffers for SAO input pixels. The buffers cover the pixels
// inside the LCU (LCU_WIDTH x LCU_WIDTH), SAO_DELAY_PX wide bands to the
// 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.
kvz_pixel *const sao_buf_y = &sao_buf_y_array[(SAO_DELAY_PX + 1) * (SAO_BUF_WIDTH + 1)];