From 28595ed1cf32f89f23fc7692bdceafb3e0e42ec4 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Fri, 28 May 2021 16:00:36 +0300 Subject: [PATCH 01/30] Update website to ultravideo.fi and IRC support channel to #ultravideo at Libera.Chat --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c617d485..3700e366 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Kvazaar ======= An open-source HEVC encoder licensed under LGPLv2.1 -Join channel #kvazaar_hevc in Freenode IRC network to contact us. +Join channel [#ultravideo](https://web.libera.chat/#ultravideo) in [Libera.Chat](https://libera.chat/) IRC network to contact us. Kvazaar is still under development. Speed and RD-quality will continue to improve. -http://ultravideo.cs.tut.fi/#encoder for more information. +http://ultravideo.fi/#encoder for more information. - Linux/Mac [![Build Status](https://travis-ci.org/ultravideo/kvazaar.svg?branch=master)](https://travis-ci.org/ultravideo/kvazaar) - Windows [![Build status](https://ci.appveyor.com/api/projects/status/88sg1h25lp0k71pu?svg=true)](https://ci.appveyor.com/project/Ultravideo/kvazaar) From 720e262c684d2319b4f94c20f31dec4622f89b20 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 3 Jun 2021 21:56:45 +0800 Subject: [PATCH 02/30] Use COPY instead of ADD for files and folders in Dockerfile Reference: - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b861dc43..c5cca64f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ MAINTAINER Marko Viitanen # List of needed packages to be able to build kvazaar with autotools ENV REQUIRED_PACKAGES automake autoconf libtool m4 build-essential git yasm pkgconf -ADD . kvazaar +COPY . kvazaar # Run all the commands in one RUN so we don't have any extra history # data in the image. RUN apt-get update \ From b7befcd6807fd9fb9ed668bd73c4e016417a3379 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 3 Jun 2021 22:00:29 +0800 Subject: [PATCH 03/30] Remove additional apt-get clean in Dockerfile Reference: - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get > Official Debian and Ubuntu images automatically run `apt-get clean`, > so explicit invocation is not required. --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b861dc43..73293311 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,6 @@ ADD . kvazaar # data in the image. RUN apt-get update \ && apt-get install -y $REQUIRED_PACKAGES \ - && apt-get clean \ && cd kvazaar \ && ./autogen.sh \ && ./configure --disable-shared \ @@ -35,7 +34,6 @@ RUN apt-get update \ && make install \ && AUTOINSTALLED_PACKAGES=`apt-mark showauto` \ && apt-get remove --purge --force-yes -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES \ - && apt-get clean autoclean \ && apt-get autoremove -y \ && rm -rf /var/lib/{apt,dpkg,cache,log}/ From bad8bd419e0f98dbbda2abfd75567e6157c9898a Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 8 Jun 2021 14:52:28 +0300 Subject: [PATCH 04/30] Replace Travis CI with Github Actions using own runner --- .github/workflows/kvazaar.yml | 83 ++++++++++++++++++++ .github/workflows/pull_request.yml | 117 +++++++++++++++++++++++++++++ .travis.yml | 53 ------------- README.md | 2 +- 4 files changed, 201 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/kvazaar.yml create mode 100644 .github/workflows/pull_request.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/kvazaar.yml b/.github/workflows/kvazaar.yml new file mode 100644 index 00000000..323abb21 --- /dev/null +++ b/.github/workflows/kvazaar.yml @@ -0,0 +1,83 @@ +name: Kvazaar_tests + +on: + push: + pull_request: + types: [closed] + +jobs: + basic-test: + runs-on: self-hosted + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + test-ubsan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-asan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=address + 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 + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-tsan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=thread + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-valgrind: + runs-on: self-hosted + + env: + KVAZAAR_OVERRIDE_angular_pred: generic + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && KVZ_TEST_VALGRIND=1 make check -j4 VERBOSE=1 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 00000000..d1308a6b --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,117 @@ +name: Kvazaar_pr_tests + +on: + pull_request_target: + types: [labeled] + +jobs: + basic-test: + runs-on: self-hosted + + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + basic-test: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + test-ubsan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-asan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=address + 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 + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-tsan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=thread + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-valgrind: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + + env: + KVAZAAR_OVERRIDE_angular_pred: generic + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && KVZ_TEST_VALGRIND=1 make check -j4 VERBOSE=1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c75bdd68..00000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -language: c - -# Use container based infrastructure. -sudo: false - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - autoconf - - gcc-4.8 - - libtool - - valgrind - - yasm - -matrix: - fast_finish: true - - include: - - compiler: clang - env: KVZ_TEST_VALGRIND=1 KVAZAAR_OVERRIDE_angular_pred=generic - - - compiler: clang - env: CFLAGS='-fsanitize=thread' - - - compiler: clang - env: CFLAGS='-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment' - - - compiler: gcc-4.8 - env: CFLAGS='-fsanitize=address' - - # We have some Mac specific code and Mac sometimes has odd build issues. - - os: osx - compiler: clang # gcc is actually clang on Travis OS X - install: true - script: - - ./autogen.sh - - ./configure --enable-werror || (cat config.log && false) - - make --jobs=2 V=1 - - make check TESTS=kvazaar_tests - -install: bash .travis-install.bash - -script: - - ./autogen.sh - - ./configure --enable-werror || (cat config.log && false) - - make --jobs=2 V=1 - - make check VERBOSE=1 - -after_script: - # Disable errors to work around Travis not knowing how to fix their stuff. - - set +e diff --git a/README.md b/README.md index 3700e366..bdbdaeda 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Kvazaar is still under development. Speed and RD-quality will continue to improv http://ultravideo.fi/#encoder for more information. -- Linux/Mac [![Build Status](https://travis-ci.org/ultravideo/kvazaar.svg?branch=master)](https://travis-ci.org/ultravideo/kvazaar) +- Linux [![Kvazaar_tests](https://github.com/ultravideo/kvazaar/actions/workflows/kvazaar.yml/badge.svg)](https://github.com/ultravideo/kvazaar/actions/workflows/kvazaar.yml) - Windows [![Build status](https://ci.appveyor.com/api/projects/status/88sg1h25lp0k71pu?svg=true)](https://ci.appveyor.com/project/Ultravideo/kvazaar) ## Table of Contents From 54dc87dac988c3e9baf195a5217b85bc09d2b311 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Thu, 17 Jun 2021 09:55:57 +0300 Subject: [PATCH 05/30] Remove duplicate test in pull_request.yml --- .github/workflows/pull_request.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d1308a6b..981df6bf 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,21 +5,6 @@ on: types: [labeled] jobs: - basic-test: - runs-on: self-hosted - - if: contains(github.event.pull_request.labels.*.name, 'safe to test') - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - name: configure - run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) - - name: make - run: make -j - - name: Run tests - run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 basic-test: runs-on: self-hosted From 7918628b8e447b7c410ab65fe4418197dbdb6b56 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Mon, 11 Oct 2021 11:18:58 +0300 Subject: [PATCH 06/30] Offset output dts by -1 when num_out >= gop_len, otherwise there will be a gap of 2 dts. Fixes #310 --- src/input_frame_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input_frame_buffer.c b/src/input_frame_buffer.c index 97506695..31f4d5a5 100644 --- a/src/input_frame_buffer.c +++ b/src/input_frame_buffer.c @@ -183,7 +183,7 @@ kvz_picture* kvz_encoder_feed_frame(input_frame_buffer_t *buf, dts_out = buf->pts_buffer[dts_idx % gop_buf_size] + buf->delay; } else { int dts_idx = buf->num_out - (cfg->gop_len - 1); - dts_out = buf->pts_buffer[dts_idx % gop_buf_size]; + dts_out = buf->pts_buffer[dts_idx % gop_buf_size] - 1; } } else { From b68625b8699abde4b0293c1fc302c52782bf4464 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Wed, 13 Oct 2021 10:54:35 +0300 Subject: [PATCH 07/30] Add correct reorder and buffering values to VPS, as they were only in SPS --- src/encoder_state-bitstream.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 79fbc017..22d9fb6f 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -100,6 +100,7 @@ static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream, #ifdef KVZ_DEBUG printf("=========== Video Parameter Set ID: 0 ===========\n"); #endif + const encoder_control_t* encoder = state->encoder_control; WRITE_U(stream, 0, 4, "vps_video_parameter_set_id"); WRITE_U(stream, 3, 2, "vps_reserved_three_2bits" ); @@ -112,12 +113,18 @@ static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream, WRITE_U(stream, 0, 1, "vps_sub_layer_ordering_info_present_flag"); - //for each layer - for (int i = 0; i < 1; i++) { - WRITE_UE(stream, 1, "vps_max_dec_pic_buffering"); - WRITE_UE(stream, 0, "vps_num_reorder_pics"); - WRITE_UE(stream, 0, "vps_max_latency_increase"); + if (encoder->cfg.gop_lowdelay) { + const int dpb = encoder->cfg.ref_frames; + WRITE_UE(stream, dpb - 1, "vps_max_dec_pic_buffering_minus1"); + WRITE_UE(stream, 0, "vps_max_num_reorder_pics"); } + else { + // Clip to non-negative values to prevent problems with GOP=0 + const int dpb = MIN(16, encoder->cfg.gop_len); + WRITE_UE(stream, MAX(dpb - 1, 0), "vps_max_dec_pic_buffering_minus1"); + WRITE_UE(stream, MAX(encoder->cfg.gop_len - 1, 0), "vps_max_num_reorder_pics"); + } + WRITE_UE(stream, 0, "vps_max_latency_increase"); WRITE_U(stream, 0, 6, "vps_max_nuh_reserved_zero_layer_id"); WRITE_UE(stream, 0, "vps_max_op_sets_minus1"); From 57883369ca05bee0dbc0b36fb2c78985f906a523 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Thu, 7 Oct 2021 11:32:59 +0300 Subject: [PATCH 08/30] Change all the license texts in source headers and LICENSE file to 3-clause BSD, closes #302 * All now have the same exact text string --- COPYING | 559 ------------------ LICENSE | 27 + LICENSE.greatest | 3 + LICENSE.x264asm | 2 + Makefile.am | 2 +- README.md | 2 +- appveyor.yml | 2 +- src/bitstream.c | 42 +- src/bitstream.h | 42 +- src/cabac.c | 42 +- src/cabac.h | 42 +- src/cfg.c | 42 +- src/cfg.h | 42 +- src/checkpoint.c | 42 +- src/checkpoint.h | 42 +- src/cli.c | 50 +- src/cli.h | 48 +- src/constraint.c | 42 +- src/constraint.h | 42 +- src/context.c | 42 +- src/context.h | 42 +- src/cu.c | 42 +- src/cu.h | 42 +- src/encmain.c | 42 +- src/encode_coding_tree.c | 42 +- src/encode_coding_tree.h | 42 +- src/encoder.c | 42 +- src/encoder.h | 42 +- src/encoder_state-bitstream.c | 42 +- src/encoder_state-bitstream.h | 42 +- src/encoder_state-ctors_dtors.c | 42 +- src/encoder_state-ctors_dtors.h | 42 +- src/encoder_state-geometry.c | 42 +- src/encoder_state-geometry.h | 42 +- src/encoderstate.c | 42 +- src/encoderstate.h | 42 +- src/fast_coeff_cost.c | 32 + src/fast_coeff_cost.h | 32 + src/filter.c | 42 +- src/filter.h | 42 +- src/global.h | 42 +- src/gop.h | 48 +- src/image.c | 42 +- src/image.h | 42 +- src/imagelist.c | 42 +- src/imagelist.h | 42 +- src/input_frame_buffer.c | 42 +- src/input_frame_buffer.h | 42 +- src/inter.c | 42 +- src/inter.h | 42 +- src/intra.c | 42 +- src/intra.h | 42 +- src/kvazaar.c | 48 +- src/kvazaar.h | 48 +- src/kvazaar_internal.h | 48 +- src/kvz_math.h | 48 +- src/ml_classifier_intra_depth_pred.c | 42 +- src/ml_classifier_intra_depth_pred.h | 42 +- src/ml_intra_cu_depth_pred.c | 42 +- src/ml_intra_cu_depth_pred.h | 42 +- src/nal.c | 42 +- src/nal.h | 42 +- src/rate_control.c | 42 +- src/rate_control.h | 42 +- src/rdo.c | 42 +- src/rdo.h | 42 +- src/sao.c | 42 +- src/sao.h | 42 +- src/scalinglist.c | 42 +- src/scalinglist.h | 42 +- src/search.c | 42 +- src/search.h | 42 +- src/search_inter.c | 48 +- src/search_inter.h | 48 +- src/search_intra.c | 48 +- src/search_intra.h | 48 +- src/strategies/altivec/picture-altivec.c | 42 +- src/strategies/altivec/picture-altivec.h | 42 +- src/strategies/avx2/avx2_common_functions.h | 32 + src/strategies/avx2/dct-avx2.c | 42 +- src/strategies/avx2/dct-avx2.h | 42 +- src/strategies/avx2/encode_coding_tree-avx2.c | 42 +- src/strategies/avx2/encode_coding_tree-avx2.h | 42 +- src/strategies/avx2/intra-avx2.c | 42 +- src/strategies/avx2/intra-avx2.h | 42 +- src/strategies/avx2/ipol-avx2.c | 42 +- src/strategies/avx2/ipol-avx2.h | 42 +- src/strategies/avx2/picture-avx2.c | 42 +- src/strategies/avx2/picture-avx2.h | 42 +- src/strategies/avx2/quant-avx2.c | 48 +- src/strategies/avx2/quant-avx2.h | 42 +- .../avx2/reg_sad_pow2_widths-avx2.h | 42 +- src/strategies/avx2/sao-avx2.c | 42 +- src/strategies/avx2/sao-avx2.h | 42 +- src/strategies/generic/dct-generic.c | 42 +- src/strategies/generic/dct-generic.h | 42 +- .../generic/encode_coding_tree-generic.c | 42 +- .../generic/encode_coding_tree-generic.h | 42 +- src/strategies/generic/intra-generic.c | 42 +- src/strategies/generic/intra-generic.h | 42 +- src/strategies/generic/ipol-generic.c | 42 +- src/strategies/generic/ipol-generic.h | 42 +- src/strategies/generic/nal-generic.c | 42 +- src/strategies/generic/nal-generic.h | 42 +- src/strategies/generic/picture-generic.c | 42 +- src/strategies/generic/picture-generic.h | 42 +- src/strategies/generic/quant-generic.c | 42 +- src/strategies/generic/quant-generic.h | 42 +- src/strategies/generic/sao-generic.c | 42 +- src/strategies/generic/sao-generic.h | 42 +- src/strategies/generic/sao_shared_generics.h | 32 + src/strategies/sse2/picture-sse2.c | 42 +- src/strategies/sse2/picture-sse2.h | 42 +- src/strategies/sse41/picture-sse41.c | 42 +- src/strategies/sse41/picture-sse41.h | 42 +- .../sse41/reg_sad_pow2_widths-sse41.h | 42 +- src/strategies/strategies-dct.c | 42 +- src/strategies/strategies-dct.h | 42 +- src/strategies/strategies-encode.c | 42 +- src/strategies/strategies-encode.h | 42 +- src/strategies/strategies-intra.c | 42 +- src/strategies/strategies-intra.h | 42 +- src/strategies/strategies-ipol.c | 42 +- src/strategies/strategies-ipol.h | 42 +- src/strategies/strategies-nal.c | 42 +- src/strategies/strategies-nal.h | 42 +- src/strategies/strategies-picture.c | 42 +- src/strategies/strategies-picture.h | 42 +- src/strategies/strategies-quant.c | 42 +- src/strategies/strategies-quant.h | 42 +- src/strategies/strategies-sao.c | 42 +- src/strategies/strategies-sao.h | 42 +- .../x86_asm/picture-x86-asm-sad.asm | 46 +- src/strategies/x86_asm/picture-x86-asm-sad.h | 42 +- .../x86_asm/picture-x86-asm-satd.asm | 46 +- src/strategies/x86_asm/picture-x86-asm-satd.h | 42 +- src/strategies/x86_asm/picture-x86-asm.c | 42 +- src/strategies/x86_asm/picture-x86-asm.h | 42 +- src/strategyselector.c | 42 +- src/strategyselector.h | 42 +- src/tables.h | 42 +- src/threadqueue.c | 42 +- src/threadqueue.h | 42 +- src/threads.h | 42 +- src/transform.c | 42 +- src/transform.h | 42 +- src/videoframe.c | 42 +- src/videoframe.h | 42 +- src/yuv_io.c | 42 +- src/yuv_io.h | 42 +- tests/coeff_sum_tests.c | 41 +- tests/dct_tests.c | 41 +- tests/inter_recon_bipred_tests.c | 47 +- tests/intra_sad_tests.c | 41 +- tests/mv_cand_tests.c | 41 +- tests/sad_tests.c | 41 +- tests/sad_tests.h | 41 +- tests/satd_tests.c | 41 +- tests/satd_tests.h | 41 +- tests/speed_tests.c | 41 +- tests/test_strategies.c | 41 +- tests/test_strategies.h | 41 +- tests/tests_main.c | 41 +- tools/generate_ref_pixel_tables.py | 41 +- tools/generate_tables.c | 41 +- tools/plot-threadqueue-log.py | 41 +- tools/update_readme.sh | 41 +- 167 files changed, 4419 insertions(+), 2929 deletions(-) delete mode 100644 COPYING create mode 100644 LICENSE create mode 100644 LICENSE.greatest create mode 100644 LICENSE.x264asm diff --git a/COPYING b/COPYING deleted file mode 100644 index e030d221..00000000 --- a/COPYING +++ /dev/null @@ -1,559 +0,0 @@ -Kvazaar is free software: you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 2.1 of the License, or (at your -option) any later version. - -Copyright to the code is held by the following parties: -2012-2015 Tampere University of Technology -2014 CES-Creative Electronic Systems SA -2013-2015 Private individuals who contributed to Kvazaar -2010-2012 ITU/ISO/IEC - - -This program incorporates work covered by the following copyright and -permission notice, all changes are however licensed under LGPLv2.1: - The copyright in this software is being made available under the BSD - License, included below. This software may be subject to other third party - and contributor rights, including patent rights, and no such rights are - granted under this license.   - - Copyright (c) 2010-2012, ITU/ISO/IEC - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the ITU/ISO/IEC nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - -Kvazaar uses x264asm abstraction layer -library (included in src/x86/x86inc.asm) -licensed under ISC license. - - -Kvazaar uses "Greatest" C unit testing library, licensed under ISC license. -A fork of the library is included in the git project as a submodule. The -original can be found at https://github.com/silentbicycle/greatest . - - -Copy of GPLv2 (also available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt): -GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..abd82c8f --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +* Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE.greatest b/LICENSE.greatest new file mode 100644 index 00000000..b6a0d97b --- /dev/null +++ b/LICENSE.greatest @@ -0,0 +1,3 @@ +Kvazaar uses "Greatest" C unit testing library, licensed under ISC license. +A fork of the library is included in the git project as a submodule. The +original can be found at https://github.com/silentbicycle/greatest . diff --git a/LICENSE.x264asm b/LICENSE.x264asm new file mode 100644 index 00000000..42aaf465 --- /dev/null +++ b/LICENSE.x264asm @@ -0,0 +1,2 @@ +Kvazaar uses x264asm abstraction layer -library (included in src/x86/x86inc.asm) +licensed under ISC license. diff --git a/Makefile.am b/Makefile.am index 1f89ba85..6f14ba30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = src tests dist_man1_MANS = doc/kvazaar.1 -dist_doc_DATA = COPYING CREDITS README.md +dist_doc_DATA = LICENSE CREDITS README.md EXTRA_DIST = \ build \ diff --git a/README.md b/README.md index bdbdaeda..2daa0fae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Kvazaar ======= -An open-source HEVC encoder licensed under LGPLv2.1 +An open-source HEVC encoder licensed under 3-clause BSD Join channel [#ultravideo](https://web.libera.chat/#ultravideo) in [Libera.Chat](https://libera.chat/) IRC network to contact us. diff --git a/appveyor.yml b/appveyor.yml index b22ac569..1bb6a3ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,7 @@ skip_commits: - .gitlab-ci.yml - .travis-install.bash - .travis.yml - - COPYING + - LICENSE - CREDITS - README.md - docs.doxy diff --git a/src/bitstream.c b/src/bitstream.c index 883b19b2..6a198632 100644 --- a/src/bitstream.c +++ b/src/bitstream.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "bitstream.h" diff --git a/src/bitstream.h b/src/bitstream.h index 62a7024d..e88e8c13 100644 --- a/src/bitstream.h +++ b/src/bitstream.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/cabac.c b/src/cabac.c index 50bfcc33..c0bbb26e 100644 --- a/src/cabac.c +++ b/src/cabac.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "cabac.h" diff --git a/src/cabac.h b/src/cabac.h index 05a9391a..3804fdf2 100644 --- a/src/cabac.h +++ b/src/cabac.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/cfg.c b/src/cfg.c index 3c98d39f..07c71a55 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "cfg.h" diff --git a/src/cfg.h b/src/cfg.h index ee2604a9..54ef387e 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/checkpoint.c b/src/checkpoint.c index c37c23bc..29e2d3ae 100644 --- a/src/checkpoint.c +++ b/src/checkpoint.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "checkpoint.h" diff --git a/src/checkpoint.h b/src/checkpoint.h index 859f0adb..84607e4f 100644 --- a/src/checkpoint.h +++ b/src/checkpoint.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/cli.c b/src/cli.c index 438e500a..811537b3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1,22 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /* * \file @@ -371,7 +383,7 @@ void print_version(void) { fprintf(stdout, "Kvazaar " VERSION_STRING "\n" - "Kvazaar license: LGPL version 2\n"); + "Kvazaar license: 3-clause BSD\n"); } diff --git a/src/cli.h b/src/cli.h index 42ba91bc..3be16db0 100644 --- a/src/cli.h +++ b/src/cli.h @@ -1,24 +1,36 @@ #ifndef CLI_H_ #define CLI_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \file diff --git a/src/constraint.c b/src/constraint.c index fad1600f..93edef58 100644 --- a/src/constraint.c +++ b/src/constraint.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "constraint.h" diff --git a/src/constraint.h b/src/constraint.h index bde96015..18f98518 100644 --- a/src/constraint.h +++ b/src/constraint.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "ml_intra_cu_depth_pred.h" diff --git a/src/context.c b/src/context.c index ada2683e..6295187b 100644 --- a/src/context.c +++ b/src/context.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "context.h" diff --git a/src/context.h b/src/context.h index de2cb112..a1dc4dd5 100644 --- a/src/context.h +++ b/src/context.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/cu.c b/src/cu.c index a9b5d8da..fdae8bce 100644 --- a/src/cu.c +++ b/src/cu.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include diff --git a/src/cu.h b/src/cu.h index c7776fcd..7cefb9fa 100644 --- a/src/cu.h +++ b/src/cu.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encmain.c b/src/encmain.c index 51764b8b..5804c7f8 100644 --- a/src/encmain.c +++ b/src/encmain.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/encode_coding_tree.c b/src/encode_coding_tree.c index b2e14582..90df4dd1 100644 --- a/src/encode_coding_tree.c +++ b/src/encode_coding_tree.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encode_coding_tree.h" diff --git a/src/encode_coding_tree.h b/src/encode_coding_tree.h index dc44aecb..4832eeb1 100644 --- a/src/encode_coding_tree.h +++ b/src/encode_coding_tree.h @@ -4,21 +4,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encoder.c b/src/encoder.c index 73697ecb..e582cc38 100644 --- a/src/encoder.c +++ b/src/encoder.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encoder.h" diff --git a/src/encoder.h b/src/encoder.h index 4b905518..89f6b3a2 100644 --- a/src/encoder.h +++ b/src/encoder.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 22d9fb6f..55586cb8 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encoder_state-bitstream.h" diff --git a/src/encoder_state-bitstream.h b/src/encoder_state-bitstream.h index eb2c626d..f5934548 100644 --- a/src/encoder_state-bitstream.h +++ b/src/encoder_state-bitstream.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encoder_state-ctors_dtors.c b/src/encoder_state-ctors_dtors.c index 6d829be8..a6e92d99 100644 --- a/src/encoder_state-ctors_dtors.c +++ b/src/encoder_state-ctors_dtors.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encoder_state-ctors_dtors.h" diff --git a/src/encoder_state-ctors_dtors.h b/src/encoder_state-ctors_dtors.h index 8ab69cfc..508f42d2 100644 --- a/src/encoder_state-ctors_dtors.h +++ b/src/encoder_state-ctors_dtors.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encoder_state-geometry.c b/src/encoder_state-geometry.c index fe5042d1..92fcf7f3 100644 --- a/src/encoder_state-geometry.c +++ b/src/encoder_state-geometry.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encoder_state-geometry.h" diff --git a/src/encoder_state-geometry.h b/src/encoder_state-geometry.h index 24989038..42718348 100644 --- a/src/encoder_state-geometry.h +++ b/src/encoder_state-geometry.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/encoderstate.c b/src/encoderstate.c index 1caac84f..6bcce76b 100644 --- a/src/encoderstate.c +++ b/src/encoderstate.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "encoderstate.h" diff --git a/src/encoderstate.h b/src/encoderstate.h index d34e2bfd..a65e8b35 100644 --- a/src/encoderstate.h +++ b/src/encoderstate.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/fast_coeff_cost.c b/src/fast_coeff_cost.c index 54230f4a..d769791d 100644 --- a/src/fast_coeff_cost.c +++ b/src/fast_coeff_cost.c @@ -1,3 +1,35 @@ +/***************************************************************************** + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ + #include "fast_coeff_cost.h" #include "kvazaar.h" #include "encoderstate.h" diff --git a/src/fast_coeff_cost.h b/src/fast_coeff_cost.h index 652aae9f..5ae6dc25 100644 --- a/src/fast_coeff_cost.h +++ b/src/fast_coeff_cost.h @@ -1,3 +1,35 @@ +/***************************************************************************** + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ + #ifndef FAST_COEFF_COST_H_ #define FAST_COEFF_COST_H_ diff --git a/src/filter.c b/src/filter.c index 3781d08e..d3bdfb7b 100644 --- a/src/filter.c +++ b/src/filter.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "filter.h" diff --git a/src/filter.h b/src/filter.h index 86e3e8c1..ba1a778e 100644 --- a/src/filter.h +++ b/src/filter.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/global.h b/src/global.h index 23ec550b..f43961a9 100644 --- a/src/global.h +++ b/src/global.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/gop.h b/src/gop.h index 3a57f624..388942b1 100644 --- a/src/gop.h +++ b/src/gop.h @@ -1,24 +1,36 @@ #ifndef GOP_H_ #define GOP_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2018 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ #include diff --git a/src/image.c b/src/image.c index 7572b1f3..a48e5a4f 100644 --- a/src/image.c +++ b/src/image.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "image.h" diff --git a/src/image.h b/src/image.h index 950066bf..ccac4553 100644 --- a/src/image.h +++ b/src/image.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/imagelist.c b/src/imagelist.c index 4e3f4031..bafdfc97 100644 --- a/src/imagelist.c +++ b/src/imagelist.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "imagelist.h" diff --git a/src/imagelist.h b/src/imagelist.h index 61c90301..8b823865 100644 --- a/src/imagelist.h +++ b/src/imagelist.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/input_frame_buffer.c b/src/input_frame_buffer.c index 31f4d5a5..ce5c534d 100644 --- a/src/input_frame_buffer.c +++ b/src/input_frame_buffer.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "input_frame_buffer.h" diff --git a/src/input_frame_buffer.h b/src/input_frame_buffer.h index 298d4ac2..9de1ef0d 100644 --- a/src/input_frame_buffer.h +++ b/src/input_frame_buffer.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/inter.c b/src/inter.c index b96b082c..65a981dc 100644 --- a/src/inter.c +++ b/src/inter.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "inter.h" diff --git a/src/inter.h b/src/inter.h index 24c69fa7..1a46e98a 100644 --- a/src/inter.h +++ b/src/inter.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/intra.c b/src/intra.c index 0d22f085..494e8dd6 100644 --- a/src/intra.c +++ b/src/intra.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "intra.h" diff --git a/src/intra.h b/src/intra.h index 6228a226..e0b56d70 100644 --- a/src/intra.h +++ b/src/intra.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/kvazaar.c b/src/kvazaar.c index 9b0d782e..1990d64f 100644 --- a/src/kvazaar.c +++ b/src/kvazaar.c @@ -1,22 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ #include "kvazaar.h" diff --git a/src/kvazaar.h b/src/kvazaar.h index aab9c621..856ea6e8 100644 --- a/src/kvazaar.h +++ b/src/kvazaar.h @@ -1,24 +1,36 @@ #ifndef KVAZAAR_H_ #define KVAZAAR_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \ingroup Control diff --git a/src/kvazaar_internal.h b/src/kvazaar_internal.h index 10a34da9..db1805e8 100644 --- a/src/kvazaar_internal.h +++ b/src/kvazaar_internal.h @@ -1,24 +1,36 @@ #ifndef KVAZAAR_INTERNAL_H_ #define KVAZAAR_INTERNAL_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \ingroup Control diff --git a/src/kvz_math.h b/src/kvz_math.h index 86aeaa57..3a592d18 100644 --- a/src/kvz_math.h +++ b/src/kvz_math.h @@ -1,24 +1,36 @@ #ifndef MATH_H_ #define MATH_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \file diff --git a/src/ml_classifier_intra_depth_pred.c b/src/ml_classifier_intra_depth_pred.c index 268e7e3e..4b462a7e 100644 --- a/src/ml_classifier_intra_depth_pred.c +++ b/src/ml_classifier_intra_depth_pred.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "ml_classifier_intra_depth_pred.h" diff --git a/src/ml_classifier_intra_depth_pred.h b/src/ml_classifier_intra_depth_pred.h index f46f4f51..52a5994b 100644 --- a/src/ml_classifier_intra_depth_pred.h +++ b/src/ml_classifier_intra_depth_pred.h @@ -4,21 +4,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "ml_intra_cu_depth_pred.h" diff --git a/src/ml_intra_cu_depth_pred.c b/src/ml_intra_cu_depth_pred.c index cb64dbf1..b7baa16d 100644 --- a/src/ml_intra_cu_depth_pred.c +++ b/src/ml_intra_cu_depth_pred.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "ml_intra_cu_depth_pred.h" diff --git a/src/ml_intra_cu_depth_pred.h b/src/ml_intra_cu_depth_pred.h index db4a9b25..6e6c1f01 100644 --- a/src/ml_intra_cu_depth_pred.h +++ b/src/ml_intra_cu_depth_pred.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include diff --git a/src/nal.c b/src/nal.c index 3b98ca06..a3d2ae79 100644 --- a/src/nal.c +++ b/src/nal.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "nal.h" diff --git a/src/nal.h b/src/nal.h index 377702e5..d1a95ff2 100644 --- a/src/nal.h +++ b/src/nal.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/rate_control.c b/src/rate_control.c index c586c9b7..4978ae04 100644 --- a/src/rate_control.c +++ b/src/rate_control.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "rate_control.h" diff --git a/src/rate_control.h b/src/rate_control.h index 48e96f2b..eabaf4b7 100644 --- a/src/rate_control.h +++ b/src/rate_control.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/rdo.c b/src/rdo.c index a34c2093..ec713603 100644 --- a/src/rdo.c +++ b/src/rdo.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "rdo.h" diff --git a/src/rdo.h b/src/rdo.h index fd6c4ad4..3b56ddcc 100644 --- a/src/rdo.h +++ b/src/rdo.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/sao.c b/src/sao.c index 368d8b07..8da94345 100644 --- a/src/sao.c +++ b/src/sao.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "sao.h" diff --git a/src/sao.h b/src/sao.h index f6ca449d..745abbec 100644 --- a/src/sao.h +++ b/src/sao.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/scalinglist.c b/src/scalinglist.c index 421042a1..eec5de81 100644 --- a/src/scalinglist.c +++ b/src/scalinglist.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include diff --git a/src/scalinglist.h b/src/scalinglist.h index c539b3d3..0f590a77 100644 --- a/src/scalinglist.h +++ b/src/scalinglist.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/search.c b/src/search.c index 4cc5a03b..909e7aa5 100644 --- a/src/search.c +++ b/src/search.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "search.h" diff --git a/src/search.h b/src/search.h index be24f043..774a4d7b 100644 --- a/src/search.h +++ b/src/search.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/search_inter.c b/src/search_inter.c index 029291f7..f246e48b 100644 --- a/src/search_inter.c +++ b/src/search_inter.c @@ -1,22 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ #include "search_inter.h" diff --git a/src/search_inter.h b/src/search_inter.h index 845df153..0d7fb81b 100644 --- a/src/search_inter.h +++ b/src/search_inter.h @@ -1,24 +1,36 @@ #ifndef SEARCH_INTER_H_ #define SEARCH_INTER_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \ingroup Compression diff --git a/src/search_intra.c b/src/search_intra.c index 782e58cf..9cf984db 100644 --- a/src/search_intra.c +++ b/src/search_intra.c @@ -1,22 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ #include "search_intra.h" diff --git a/src/search_intra.h b/src/search_intra.h index 766492ae..2fec39af 100644 --- a/src/search_intra.h +++ b/src/search_intra.h @@ -1,24 +1,36 @@ #ifndef SEARCH_INTRA_H_ #define SEARCH_INTRA_H_ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /** * \ingroup Compression diff --git a/src/strategies/altivec/picture-altivec.c b/src/strategies/altivec/picture-altivec.c index 743c5f75..f1a8916b 100644 --- a/src/strategies/altivec/picture-altivec.c +++ b/src/strategies/altivec/picture-altivec.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/altivec/picture-altivec.h" diff --git a/src/strategies/altivec/picture-altivec.h b/src/strategies/altivec/picture-altivec.h index e97ea69e..f692ebff 100644 --- a/src/strategies/altivec/picture-altivec.h +++ b/src/strategies/altivec/picture-altivec.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/avx2_common_functions.h b/src/strategies/avx2/avx2_common_functions.h index 59c7d6b0..59add87b 100644 --- a/src/strategies/avx2/avx2_common_functions.h +++ b/src/strategies/avx2/avx2_common_functions.h @@ -1,3 +1,35 @@ +/***************************************************************************** + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ + #ifndef AVX2_COMMON_FUNCTIONS_H #define AVX2_COMMON_FUNCTIONS_H diff --git a/src/strategies/avx2/dct-avx2.c b/src/strategies/avx2/dct-avx2.c index dbd8e3b8..76899195 100644 --- a/src/strategies/avx2/dct-avx2.c +++ b/src/strategies/avx2/dct-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/strategies/avx2/dct-avx2.h b/src/strategies/avx2/dct-avx2.h index 2d7e4a34..738c02a8 100644 --- a/src/strategies/avx2/dct-avx2.h +++ b/src/strategies/avx2/dct-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/encode_coding_tree-avx2.c b/src/strategies/avx2/encode_coding_tree-avx2.c index adf2b2ed..67d8e9e0 100644 --- a/src/strategies/avx2/encode_coding_tree-avx2.c +++ b/src/strategies/avx2/encode_coding_tree-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategyselector.h" diff --git a/src/strategies/avx2/encode_coding_tree-avx2.h b/src/strategies/avx2/encode_coding_tree-avx2.h index 0519571f..47f69d4f 100644 --- a/src/strategies/avx2/encode_coding_tree-avx2.h +++ b/src/strategies/avx2/encode_coding_tree-avx2.h @@ -4,21 +4,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/intra-avx2.c b/src/strategies/avx2/intra-avx2.c index f7b3f1af..4522e10c 100644 --- a/src/strategies/avx2/intra-avx2.c +++ b/src/strategies/avx2/intra-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/avx2/intra-avx2.h" diff --git a/src/strategies/avx2/intra-avx2.h b/src/strategies/avx2/intra-avx2.h index 1daa6035..9a18368a 100644 --- a/src/strategies/avx2/intra-avx2.h +++ b/src/strategies/avx2/intra-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/ipol-avx2.c b/src/strategies/avx2/ipol-avx2.c index e63cfb8a..49ba29c6 100644 --- a/src/strategies/avx2/ipol-avx2.c +++ b/src/strategies/avx2/ipol-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/strategies/avx2/ipol-avx2.h b/src/strategies/avx2/ipol-avx2.h index 87035ddc..aab07600 100644 --- a/src/strategies/avx2/ipol-avx2.h +++ b/src/strategies/avx2/ipol-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 499b0625..8aa64c1f 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/strategies/avx2/picture-avx2.h b/src/strategies/avx2/picture-avx2.h index cf641856..1bf3ccaf 100644 --- a/src/strategies/avx2/picture-avx2.h +++ b/src/strategies/avx2/picture-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/quant-avx2.c b/src/strategies/avx2/quant-avx2.c index e8f8c0f5..d78ca55d 100644 --- a/src/strategies/avx2/quant-avx2.c +++ b/src/strategies/avx2/quant-avx2.c @@ -1,22 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2013-2015 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify it under -* the terms of the GNU Lesser General Public License as published by the -* Free Software Foundation; either version 2.1 of the License, or (at your -* option) any later version. -* -* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ /* * \file diff --git a/src/strategies/avx2/quant-avx2.h b/src/strategies/avx2/quant-avx2.h index 1bba3872..fa29ba7a 100644 --- a/src/strategies/avx2/quant-avx2.h +++ b/src/strategies/avx2/quant-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/avx2/reg_sad_pow2_widths-avx2.h b/src/strategies/avx2/reg_sad_pow2_widths-avx2.h index ed2cbb54..ef1efb11 100644 --- a/src/strategies/avx2/reg_sad_pow2_widths-avx2.h +++ b/src/strategies/avx2/reg_sad_pow2_widths-avx2.h @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #ifndef REG_SAD_POW2_WIDTHS_AVX2_H_ diff --git a/src/strategies/avx2/sao-avx2.c b/src/strategies/avx2/sao-avx2.c index ce0e3ba3..b4a6e59d 100644 --- a/src/strategies/avx2/sao-avx2.c +++ b/src/strategies/avx2/sao-avx2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/avx2/sao-avx2.h" diff --git a/src/strategies/avx2/sao-avx2.h b/src/strategies/avx2/sao-avx2.h index 4b12227c..31017876 100644 --- a/src/strategies/avx2/sao-avx2.h +++ b/src/strategies/avx2/sao-avx2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/dct-generic.c b/src/strategies/generic/dct-generic.c index daf72ff5..c1bcab0f 100644 --- a/src/strategies/generic/dct-generic.c +++ b/src/strategies/generic/dct-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/dct-generic.h" diff --git a/src/strategies/generic/dct-generic.h b/src/strategies/generic/dct-generic.h index d30c94b6..6d6b58e2 100644 --- a/src/strategies/generic/dct-generic.h +++ b/src/strategies/generic/dct-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/encode_coding_tree-generic.c b/src/strategies/generic/encode_coding_tree-generic.c index 8ec15910..bed6cb7f 100644 --- a/src/strategies/generic/encode_coding_tree-generic.c +++ b/src/strategies/generic/encode_coding_tree-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategyselector.h" diff --git a/src/strategies/generic/encode_coding_tree-generic.h b/src/strategies/generic/encode_coding_tree-generic.h index d49c2428..1f5b2ea3 100644 --- a/src/strategies/generic/encode_coding_tree-generic.h +++ b/src/strategies/generic/encode_coding_tree-generic.h @@ -4,21 +4,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/intra-generic.c b/src/strategies/generic/intra-generic.c index 52970300..14f463cc 100644 --- a/src/strategies/generic/intra-generic.c +++ b/src/strategies/generic/intra-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/intra-generic.h" diff --git a/src/strategies/generic/intra-generic.h b/src/strategies/generic/intra-generic.h index db984d06..0ea06332 100644 --- a/src/strategies/generic/intra-generic.h +++ b/src/strategies/generic/intra-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/ipol-generic.c b/src/strategies/generic/ipol-generic.c index e5c5cef6..67db7db9 100644 --- a/src/strategies/generic/ipol-generic.c +++ b/src/strategies/generic/ipol-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/ipol-generic.h" diff --git a/src/strategies/generic/ipol-generic.h b/src/strategies/generic/ipol-generic.h index 85eb2931..98711164 100644 --- a/src/strategies/generic/ipol-generic.h +++ b/src/strategies/generic/ipol-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/nal-generic.c b/src/strategies/generic/nal-generic.c index dc15c953..1762c8ba 100644 --- a/src/strategies/generic/nal-generic.c +++ b/src/strategies/generic/nal-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/nal-generic.h" diff --git a/src/strategies/generic/nal-generic.h b/src/strategies/generic/nal-generic.h index e3ab153b..3b35469b 100644 --- a/src/strategies/generic/nal-generic.h +++ b/src/strategies/generic/nal-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 53073487..16dde988 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/picture-generic.h" diff --git a/src/strategies/generic/picture-generic.h b/src/strategies/generic/picture-generic.h index e8ec997c..eae562aa 100644 --- a/src/strategies/generic/picture-generic.h +++ b/src/strategies/generic/picture-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/quant-generic.c b/src/strategies/generic/quant-generic.c index 589e1939..24bd73de 100644 --- a/src/strategies/generic/quant-generic.c +++ b/src/strategies/generic/quant-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/quant-generic.h" diff --git a/src/strategies/generic/quant-generic.h b/src/strategies/generic/quant-generic.h index 13d24cb9..0cfdc7e2 100644 --- a/src/strategies/generic/quant-generic.h +++ b/src/strategies/generic/quant-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/sao-generic.c b/src/strategies/generic/sao-generic.c index c453d46d..8c115868 100644 --- a/src/strategies/generic/sao-generic.c +++ b/src/strategies/generic/sao-generic.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/generic/sao-generic.h" diff --git a/src/strategies/generic/sao-generic.h b/src/strategies/generic/sao-generic.h index 60a78c46..d8f5ef85 100644 --- a/src/strategies/generic/sao-generic.h +++ b/src/strategies/generic/sao-generic.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/generic/sao_shared_generics.h b/src/strategies/generic/sao_shared_generics.h index 679394da..357177c7 100644 --- a/src/strategies/generic/sao_shared_generics.h +++ b/src/strategies/generic/sao_shared_generics.h @@ -1,3 +1,35 @@ +/***************************************************************************** + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ + #ifndef SAO_BAND_DDISTORTION_H_ #define SAO_BAND_DDISTORTION_H_ diff --git a/src/strategies/sse2/picture-sse2.c b/src/strategies/sse2/picture-sse2.c index 421c979f..b8c54d6c 100644 --- a/src/strategies/sse2/picture-sse2.c +++ b/src/strategies/sse2/picture-sse2.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/sse2/picture-sse2.h" diff --git a/src/strategies/sse2/picture-sse2.h b/src/strategies/sse2/picture-sse2.h index 9a0ce769..5e37b25d 100644 --- a/src/strategies/sse2/picture-sse2.h +++ b/src/strategies/sse2/picture-sse2.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/sse41/picture-sse41.c b/src/strategies/sse41/picture-sse41.c index 2f1e4f18..16d4949f 100644 --- a/src/strategies/sse41/picture-sse41.c +++ b/src/strategies/sse41/picture-sse41.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "global.h" diff --git a/src/strategies/sse41/picture-sse41.h b/src/strategies/sse41/picture-sse41.h index 899a9a1b..16b9e949 100644 --- a/src/strategies/sse41/picture-sse41.h +++ b/src/strategies/sse41/picture-sse41.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/sse41/reg_sad_pow2_widths-sse41.h b/src/strategies/sse41/reg_sad_pow2_widths-sse41.h index ec401695..af72f174 100644 --- a/src/strategies/sse41/reg_sad_pow2_widths-sse41.h +++ b/src/strategies/sse41/reg_sad_pow2_widths-sse41.h @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #ifndef REG_SAD_POW2_WIDTHS_SSE41_H_ diff --git a/src/strategies/strategies-dct.c b/src/strategies/strategies-dct.c index 22b8bb55..66eadd3f 100644 --- a/src/strategies/strategies-dct.c +++ b/src/strategies/strategies-dct.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-dct.h" diff --git a/src/strategies/strategies-dct.h b/src/strategies/strategies-dct.h index c0f4c14f..a537c51e 100644 --- a/src/strategies/strategies-dct.h +++ b/src/strategies/strategies-dct.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-encode.c b/src/strategies/strategies-encode.c index 00976a18..bb9e6fa8 100644 --- a/src/strategies/strategies-encode.c +++ b/src/strategies/strategies-encode.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-encode.h" diff --git a/src/strategies/strategies-encode.h b/src/strategies/strategies-encode.h index da97acb7..0e9b2a33 100644 --- a/src/strategies/strategies-encode.h +++ b/src/strategies/strategies-encode.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-intra.c b/src/strategies/strategies-intra.c index c4de7353..69fdc824 100644 --- a/src/strategies/strategies-intra.c +++ b/src/strategies/strategies-intra.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-intra.h" diff --git a/src/strategies/strategies-intra.h b/src/strategies/strategies-intra.h index 528693c2..180b004d 100644 --- a/src/strategies/strategies-intra.h +++ b/src/strategies/strategies-intra.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-ipol.c b/src/strategies/strategies-ipol.c index 0a8990f1..47bf6d2a 100644 --- a/src/strategies/strategies-ipol.c +++ b/src/strategies/strategies-ipol.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-ipol.h" diff --git a/src/strategies/strategies-ipol.h b/src/strategies/strategies-ipol.h index 79d4dd4c..84d66820 100644 --- a/src/strategies/strategies-ipol.h +++ b/src/strategies/strategies-ipol.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-nal.c b/src/strategies/strategies-nal.c index d4149129..fc51b39d 100644 --- a/src/strategies/strategies-nal.c +++ b/src/strategies/strategies-nal.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-nal.h" diff --git a/src/strategies/strategies-nal.h b/src/strategies/strategies-nal.h index 826a88b8..b659a4d3 100644 --- a/src/strategies/strategies-nal.h +++ b/src/strategies/strategies-nal.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-picture.c b/src/strategies/strategies-picture.c index 37431544..2ba7ed49 100644 --- a/src/strategies/strategies-picture.c +++ b/src/strategies/strategies-picture.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-picture.h" diff --git a/src/strategies/strategies-picture.h b/src/strategies/strategies-picture.h index c5545628..7b2b509c 100644 --- a/src/strategies/strategies-picture.h +++ b/src/strategies/strategies-picture.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-quant.c b/src/strategies/strategies-quant.c index 0a7e8f91..04ee14c2 100644 --- a/src/strategies/strategies-quant.c +++ b/src/strategies/strategies-quant.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-quant.h" diff --git a/src/strategies/strategies-quant.h b/src/strategies/strategies-quant.h index b8642f97..e9e23744 100644 --- a/src/strategies/strategies-quant.h +++ b/src/strategies/strategies-quant.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/strategies-sao.c b/src/strategies/strategies-sao.c index 39abb0ea..3c64f7f8 100644 --- a/src/strategies/strategies-sao.c +++ b/src/strategies/strategies-sao.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/strategies-sao.h" diff --git a/src/strategies/strategies-sao.h b/src/strategies/strategies-sao.h index 0c58b719..a2d63aad 100644 --- a/src/strategies/strategies-sao.h +++ b/src/strategies/strategies-sao.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/x86_asm/picture-x86-asm-sad.asm b/src/strategies/x86_asm/picture-x86-asm-sad.asm index beea5545..dc7b3241 100644 --- a/src/strategies/x86_asm/picture-x86-asm-sad.asm +++ b/src/strategies/x86_asm/picture-x86-asm-sad.asm @@ -1,22 +1,34 @@ -;/**************************************************************************** +;/***************************************************************************** ; * This file is part of Kvazaar HEVC encoder. ; * -; * Copyright (C) 2013-2015 Tampere University of Technology and others (see -; * COPYING file). -; * -; * Kvazaar is free software: you can redistribute it and/or modify it under -; * the terms of the GNU Lesser General Public License as published by the -; * Free Software Foundation; either version 2.1 of the License, or (at your -; * option) any later version. -; * -; * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -; * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -; * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -; * more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with Kvazaar. If not, see . -; ***************************************************************************/ +; * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors +; * All rights reserved. +; * +; * Redistribution and use in source and binary forms, with or without modification, +; * are permitted provided that the following conditions are met: +; * +; * * Redistributions of source code must retain the above copyright notice, this +; * list of conditions and the following disclaimer. +; * +; * * Redistributions in binary form must reproduce the above copyright notice, this +; * list of conditions and the following disclaimer in the documentation and/or +; * other materials provided with the distribution. +; * +; * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its +; * contributors may be used to endorse or promote products derived from +; * this software without specific prior written permission. +; * +; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +; * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +; * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +; * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +; * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +; ****************************************************************************/ %include "x86inc.asm" diff --git a/src/strategies/x86_asm/picture-x86-asm-sad.h b/src/strategies/x86_asm/picture-x86-asm-sad.h index 25ecba2b..f8edc3d9 100644 --- a/src/strategies/x86_asm/picture-x86-asm-sad.h +++ b/src/strategies/x86_asm/picture-x86-asm-sad.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/x86_asm/picture-x86-asm-satd.asm b/src/strategies/x86_asm/picture-x86-asm-satd.asm index 6774b1fb..ef915260 100644 --- a/src/strategies/x86_asm/picture-x86-asm-satd.asm +++ b/src/strategies/x86_asm/picture-x86-asm-satd.asm @@ -1,22 +1,34 @@ -;/**************************************************************************** +;/***************************************************************************** ; * This file is part of Kvazaar HEVC encoder. ; * -; * Copyright (C) 2013-2015 Tampere University of Technology and others (see -; * COPYING file). -; * -; * Kvazaar is free software: you can redistribute it and/or modify it under -; * the terms of the GNU Lesser General Public License as published by the -; * Free Software Foundation; either version 2.1 of the License, or (at your -; * option) any later version. -; * -; * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY -; * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -; * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -; * more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with Kvazaar. If not, see . -; ***************************************************************************/ +; * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors +; * All rights reserved. +; * +; * Redistribution and use in source and binary forms, with or without modification, +; * are permitted provided that the following conditions are met: +; * +; * * Redistributions of source code must retain the above copyright notice, this +; * list of conditions and the following disclaimer. +; * +; * * Redistributions in binary form must reproduce the above copyright notice, this +; * list of conditions and the following disclaimer in the documentation and/or +; * other materials provided with the distribution. +; * +; * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its +; * contributors may be used to endorse or promote products derived from +; * this software without specific prior written permission. +; * +; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +; * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +; * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +; * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +; * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +; ****************************************************************************/ %include "x86inc.asm" diff --git a/src/strategies/x86_asm/picture-x86-asm-satd.h b/src/strategies/x86_asm/picture-x86-asm-satd.h index c00fcab8..24a60433 100644 --- a/src/strategies/x86_asm/picture-x86-asm-satd.h +++ b/src/strategies/x86_asm/picture-x86-asm-satd.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategies/x86_asm/picture-x86-asm.c b/src/strategies/x86_asm/picture-x86-asm.c index b1ab63fd..882957cd 100644 --- a/src/strategies/x86_asm/picture-x86-asm.c +++ b/src/strategies/x86_asm/picture-x86-asm.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategies/x86_asm/picture-x86-asm.h" diff --git a/src/strategies/x86_asm/picture-x86-asm.h b/src/strategies/x86_asm/picture-x86-asm.h index 608b41ee..48803484 100644 --- a/src/strategies/x86_asm/picture-x86-asm.h +++ b/src/strategies/x86_asm/picture-x86-asm.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/strategyselector.c b/src/strategyselector.c index fc97635b..af95f6a3 100644 --- a/src/strategyselector.c +++ b/src/strategyselector.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "strategyselector.h" diff --git a/src/strategyselector.h b/src/strategyselector.h index 575accc3..b217dfe6 100644 --- a/src/strategyselector.h +++ b/src/strategyselector.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/tables.h b/src/tables.h index 54a9d602..907d7a90 100644 --- a/src/tables.h +++ b/src/tables.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/threadqueue.c b/src/threadqueue.c index ce402ee8..06437bb9 100644 --- a/src/threadqueue.c +++ b/src/threadqueue.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "global.h" diff --git a/src/threadqueue.h b/src/threadqueue.h index 3ecd8272..4785421b 100644 --- a/src/threadqueue.h +++ b/src/threadqueue.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/threads.h b/src/threads.h index 1a5dce07..fa4e0b4d 100644 --- a/src/threads.h +++ b/src/threads.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/transform.c b/src/transform.c index 363ecab1..f8e6325f 100644 --- a/src/transform.c +++ b/src/transform.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "transform.h" diff --git a/src/transform.h b/src/transform.h index 9295b0b7..6098c804 100644 --- a/src/transform.h +++ b/src/transform.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/videoframe.c b/src/videoframe.c index ad32aa16..530a7e9d 100644 --- a/src/videoframe.c +++ b/src/videoframe.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "videoframe.h" diff --git a/src/videoframe.h b/src/videoframe.h index 8e5de8ec..d35a9a1b 100644 --- a/src/videoframe.h +++ b/src/videoframe.h @@ -3,21 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /** diff --git a/src/yuv_io.c b/src/yuv_io.c index aa43b0ac..b308b94d 100644 --- a/src/yuv_io.c +++ b/src/yuv_io.c @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ /* diff --git a/src/yuv_io.h b/src/yuv_io.h index efbf4755..38530e33 100644 --- a/src/yuv_io.h +++ b/src/yuv_io.h @@ -1,21 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #ifndef YUV_IO_H_ diff --git a/tests/coeff_sum_tests.c b/tests/coeff_sum_tests.c index 7b33e1cb..6a7161fb 100644 --- a/tests/coeff_sum_tests.c +++ b/tests/coeff_sum_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2017 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/dct_tests.c b/tests/dct_tests.c index 38eb4ba7..0790819e 100644 --- a/tests/dct_tests.c +++ b/tests/dct_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/inter_recon_bipred_tests.c b/tests/inter_recon_bipred_tests.c index 20d6fdd6..565bfa95 100644 --- a/tests/inter_recon_bipred_tests.c +++ b/tests/inter_recon_bipred_tests.c @@ -1,21 +1,34 @@ /***************************************************************************** -* This file is part of Kvazaar HEVC encoder. -* -* Copyright (C) 2017 Tampere University of Technology and others (see -* COPYING file). -* -* Kvazaar is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License version 2.1 as -* published by the Free Software Foundation. -* -* Kvazaar is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Kvazaar. If not, see . -****************************************************************************/ + * This file is part of Kvazaar HEVC encoder. + * + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS + ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/intra_sad_tests.c b/tests/intra_sad_tests.c index d0416cd7..23ad70cc 100644 --- a/tests/intra_sad_tests.c +++ b/tests/intra_sad_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/mv_cand_tests.c b/tests/mv_cand_tests.c index 87228df5..c8db997b 100644 --- a/tests/mv_cand_tests.c +++ b/tests/mv_cand_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "src/inter.c" diff --git a/tests/sad_tests.c b/tests/sad_tests.c index 43b723d2..10cdeee3 100644 --- a/tests/sad_tests.c +++ b/tests/sad_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/sad_tests.h b/tests/sad_tests.h index f6280ed4..46692c9f 100644 --- a/tests/sad_tests.h +++ b/tests/sad_tests.h @@ -3,20 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ void sad_tests(void); diff --git a/tests/satd_tests.c b/tests/satd_tests.c index 5f0cf93b..19773cba 100644 --- a/tests/satd_tests.c +++ b/tests/satd_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/satd_tests.h b/tests/satd_tests.h index e076547b..0b14a30d 100644 --- a/tests/satd_tests.h +++ b/tests/satd_tests.h @@ -3,20 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ void satd_tests(void); diff --git a/tests/speed_tests.c b/tests/speed_tests.c index e9b3d5ef..9e809e11 100644 --- a/tests/speed_tests.c +++ b/tests/speed_tests.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tests/test_strategies.c b/tests/test_strategies.c index 58305fbf..1e8e4e44 100644 --- a/tests/test_strategies.c +++ b/tests/test_strategies.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "test_strategies.h" diff --git a/tests/test_strategies.h b/tests/test_strategies.h index a691a7a4..c18bc8ec 100644 --- a/tests/test_strategies.h +++ b/tests/test_strategies.h @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #ifndef TEST_STRATEGIES_H_ diff --git a/tests/tests_main.c b/tests/tests_main.c index 74fde444..42dcfe01 100644 --- a/tests/tests_main.c +++ b/tests/tests_main.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ #include "greatest/greatest.h" diff --git a/tools/generate_ref_pixel_tables.py b/tools/generate_ref_pixel_tables.py index 4e099344..ba5286d2 100644 --- a/tools/generate_ref_pixel_tables.py +++ b/tools/generate_ref_pixel_tables.py @@ -3,20 +3,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ This script is provided as reference, in case we ever need to change the tables diff --git a/tools/generate_tables.c b/tools/generate_tables.c index 84704728..e8c3fb94 100644 --- a/tools/generate_tables.c +++ b/tools/generate_tables.c @@ -1,20 +1,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ //Compile with gcc -o generate_tables generate_tables.c diff --git a/tools/plot-threadqueue-log.py b/tools/plot-threadqueue-log.py index 69844a1d..57dac750 100644 --- a/tools/plot-threadqueue-log.py +++ b/tools/plot-threadqueue-log.py @@ -2,20 +2,33 @@ /***************************************************************************** * This file is part of Kvazaar HEVC encoder. * - * Copyright (C) 2013-2015 Tampere University of Technology and others (see - * COPYING file). - * - * Kvazaar is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * Kvazaar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kvazaar. If not, see . + * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ****************************************************************************/ """ diff --git a/tools/update_readme.sh b/tools/update_readme.sh index b83b284e..8f454df3 100755 --- a/tools/update_readme.sh +++ b/tools/update_readme.sh @@ -1,20 +1,33 @@ #!/bin/sh # This file is part of Kvazaar HEVC encoder. # -# Copyright (C) 2013-2016 Tampere University of Technology and others (see -# COPYING file). -# -# Kvazaar is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 2.1 as -# published by the Free Software Foundation. -# -# Kvazaar is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Kvazaar. If not, see . +# Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, this +# list of conditions and the following disclaimer in the documentation and/or +# other materials provided with the distribution. +# +# * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # This script updates parameter documentation in ../README.md file. From cc22233117a90cb66b057024eb174aacc942a134 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Wed, 13 Oct 2021 14:32:04 +0300 Subject: [PATCH 09/30] Change version to v2.1.0 --- Makefile.am | 2 +- configure.ac | 2 +- doc/kvazaar.1 | 2 +- src/global.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6f14ba30..b9079dd9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = src tests dist_man1_MANS = doc/kvazaar.1 -dist_doc_DATA = LICENSE CREDITS README.md +dist_doc_DATA = LICENSE LICENSE.greatest LICENSE.x264asm CREDITS README.md EXTRA_DIST = \ build \ diff --git a/configure.ac b/configure.ac index f940272c..832b584d 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_CONFIG_SRCDIR([src/encmain.c]) # # Here is a somewhat sane guide to lib versioning: http://apr.apache.org/versioning.html ver_major=6 -ver_minor=5 +ver_minor=6 ver_release=0 # Prevents configure from adding a lot of defines to the CFLAGS diff --git a/doc/kvazaar.1 b/doc/kvazaar.1 index 722e1cc3..93def73f 100644 --- a/doc/kvazaar.1 +++ b/doc/kvazaar.1 @@ -1,4 +1,4 @@ -.TH KVAZAAR "1" "January 2021" "kvazaar v2.0.0" "User Commands" +.TH KVAZAAR "1" "October 2021" "kvazaar v2.1.0" "User Commands" .SH NAME kvazaar \- open source HEVC encoder .SH SYNOPSIS diff --git a/src/global.h b/src/global.h index f43961a9..c6a6ebba 100644 --- a/src/global.h +++ b/src/global.h @@ -218,7 +218,7 @@ typedef int16_t coeff_t; // NOTE: When making a release, check to see if incrementing libversion in // configure.ac is necessary. #ifndef KVZ_VERSION -#define KVZ_VERSION 2.0.0 +#define KVZ_VERSION 2.1.0 #endif #define VERSION_STRING QUOTE_EXPAND(KVZ_VERSION) From 7856583ee05f627bbab153bedb68d586ccb3750d Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Wed, 13 Oct 2021 17:44:34 +0300 Subject: [PATCH 10/30] Rename external licenses so that github autodetects the Kvazaar license correctly --- LICENSE | 1 + LICENSE.greatest => LICENSE.EXT.greatest | 0 LICENSE.x264asm => LICENSE.EXT.x264asm | 0 Makefile.am | 2 +- 4 files changed, 2 insertions(+), 1 deletion(-) rename LICENSE.greatest => LICENSE.EXT.greatest (100%) rename LICENSE.x264asm => LICENSE.EXT.x264asm (100%) diff --git a/LICENSE b/LICENSE index abd82c8f..c65d95b1 100644 --- a/LICENSE +++ b/LICENSE @@ -25,3 +25,4 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/LICENSE.greatest b/LICENSE.EXT.greatest similarity index 100% rename from LICENSE.greatest rename to LICENSE.EXT.greatest diff --git a/LICENSE.x264asm b/LICENSE.EXT.x264asm similarity index 100% rename from LICENSE.x264asm rename to LICENSE.EXT.x264asm diff --git a/Makefile.am b/Makefile.am index b9079dd9..48963a44 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = src tests dist_man1_MANS = doc/kvazaar.1 -dist_doc_DATA = LICENSE LICENSE.greatest LICENSE.x264asm CREDITS README.md +dist_doc_DATA = LICENSE LICENSE.EXT.greatest LICENSE.EXT.x264asm CREDITS README.md EXTRA_DIST = \ build \ From d4880be6f256bb7ccbcab844c2488162b9580f15 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Tue, 19 Oct 2021 02:34:32 +0300 Subject: [PATCH 11/30] Compute proper count of buffered frames for vps and sps. Use common function. --- src/encoder_state-bitstream.c | 72 +++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 55586cb8..50fa74fc 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -9,15 +9,15 @@ * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. - * + * * * Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. - * + * * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -54,37 +54,37 @@ #include "rate_control.h" -static void encoder_state_write_bitstream_aud(encoder_state_t * const state) +static void encoder_state_write_bitstream_aud(encoder_state_t *const state) { - bitstream_t * const stream = &state->stream; + bitstream_t *const stream = &state->stream; kvz_nal_write(stream, KVZ_NAL_AUD_NUT, 0, 1); uint8_t pic_type = state->frame->slicetype == KVZ_SLICE_I ? 0 - : state->frame->slicetype == KVZ_SLICE_P ? 1 - : 2; + : state->frame->slicetype == KVZ_SLICE_P ? 1 + : 2; WRITE_U(stream, pic_type, 3, "pic_type"); kvz_bitstream_add_rbsp_trailing_bits(stream); } static void encoder_state_write_bitstream_PTL(bitstream_t *stream, - encoder_state_t * const state) + encoder_state_t *const state) { // PTL // Profile Tier WRITE_U(stream, 0, 2, "general_profile_space"); WRITE_U(stream, state->encoder_control->cfg.high_tier, 1, "general_tier_flag"); // Main Profile == 1, Main 10 profile == 2 - WRITE_U(stream, (state->encoder_control->bitdepth == 8)?1:2, 5, "general_profile_idc"); + WRITE_U(stream, (state->encoder_control->bitdepth == 8) ? 1 : 2, 5, "general_profile_idc"); /* Compatibility flags should be set at general_profile_idc * (so with general_profile_idc = 1, compatibility_flag[1] should be 1) * According to specification, when compatibility_flag[1] is set, * compatibility_flag[2] should be set too. */ - WRITE_U(stream, 3<<29, 32, "general_profile_compatibility_flag[]"); + WRITE_U(stream, 3 << 29, 32, "general_profile_compatibility_flag[]"); WRITE_U(stream, 1, 1, "general_progressive_source_flag"); - WRITE_U(stream, state->encoder_control->in.source_scan_type!= 0, 1, "general_interlaced_source_flag"); + WRITE_U(stream, state->encoder_control->in.source_scan_type != 0, 1, "general_interlaced_source_flag"); WRITE_U(stream, 0, 1, "general_non_packed_constraint_flag"); WRITE_U(stream, 0, 1, "general_frame_only_constraint_flag"); @@ -106,6 +106,25 @@ static void encoder_state_write_bitstream_PTL(bitstream_t *stream, // end PTL } +static uint8_t max_required_dpb_size(const encoder_control_t * const encoder) +{ + int max_buffer = 1; + for (int g = 0; g < encoder->cfg.gop_len; ++g) { + int neg_refs = encoder->cfg.gop[g].ref_neg_count; + int pos_refs = encoder->cfg.gop[g].ref_pos_count; + if (neg_refs + pos_refs + 1 > max_buffer) max_buffer = neg_refs + pos_refs + 1; + } + + if (encoder->cfg.gop_len == 0) max_buffer = encoder->cfg.ref_frames + 1; + + return max_buffer; +} + +static uint8_t max_num_reorder_pics(const encoder_control_t * const encoder) +{ + return encoder->cfg.gop_lowdelay ? 0 : MAX(encoder->cfg.gop_len - 1, 0); +} + static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream, encoder_state_t * const state) { @@ -125,17 +144,11 @@ static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream, WRITE_U(stream, 0, 1, "vps_sub_layer_ordering_info_present_flag"); - if (encoder->cfg.gop_lowdelay) { - const int dpb = encoder->cfg.ref_frames; - WRITE_UE(stream, dpb - 1, "vps_max_dec_pic_buffering_minus1"); - WRITE_UE(stream, 0, "vps_max_num_reorder_pics"); - } - else { - // Clip to non-negative values to prevent problems with GOP=0 - const int dpb = MIN(16, encoder->cfg.gop_len); - WRITE_UE(stream, MAX(dpb - 1, 0), "vps_max_dec_pic_buffering_minus1"); - WRITE_UE(stream, MAX(encoder->cfg.gop_len - 1, 0), "vps_max_num_reorder_pics"); - } + int max_buffer = max_required_dpb_size(encoder); + int max_reorder = max_num_reorder_pics(encoder); + WRITE_UE(stream, max_buffer - 1, "vps_max_dec_pic_buffering_minus1"); + WRITE_UE(stream, max_reorder, "vps_max_num_reorder_pics"); + WRITE_UE(stream, 0, "vps_max_latency_increase"); WRITE_U(stream, 0, 6, "vps_max_nuh_reserved_zero_layer_id"); @@ -402,16 +415,11 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream, WRITE_U(stream, 0, 1, "sps_sub_layer_ordering_info_present_flag"); //for each layer - if (encoder->cfg.gop_lowdelay) { - const int dpb = encoder->cfg.ref_frames; - WRITE_UE(stream, dpb - 1, "sps_max_dec_pic_buffering_minus1"); - WRITE_UE(stream, 0, "sps_max_num_reorder_pics"); - } else { - // Clip to non-negative values to prevent problems with GOP=0 - const int dpb = MIN(16, encoder->cfg.gop_len); - WRITE_UE(stream, MAX(dpb - 1, 0), "sps_max_dec_pic_buffering_minus1"); - WRITE_UE(stream, MAX(encoder->cfg.gop_len - 1, 0), "sps_max_num_reorder_pics"); - } + int max_buffer = max_required_dpb_size(encoder); + int max_reorder = max_num_reorder_pics(encoder); + WRITE_UE(stream, max_buffer - 1, "sps_max_dec_pic_buffering_minus1"); + WRITE_UE(stream, max_reorder, "sps_max_num_reorder_pics"); + WRITE_UE(stream, 0, "sps_max_latency_increase_plus1"); //end for From 899c672ed15a522fe2391ff81eef682e0a9d89a9 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 19 Oct 2021 10:16:04 +0300 Subject: [PATCH 12/30] Make sure the dpb is more than max_num_reorder_pics --- src/encoder_state-bitstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 50fa74fc..707103ad 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -146,6 +146,7 @@ static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream, int max_buffer = max_required_dpb_size(encoder); int max_reorder = max_num_reorder_pics(encoder); + if (max_buffer - 1 < max_reorder) max_buffer = max_reorder + 1; WRITE_UE(stream, max_buffer - 1, "vps_max_dec_pic_buffering_minus1"); WRITE_UE(stream, max_reorder, "vps_max_num_reorder_pics"); @@ -417,6 +418,7 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream, //for each layer int max_buffer = max_required_dpb_size(encoder); int max_reorder = max_num_reorder_pics(encoder); + if (max_buffer - 1 < max_reorder) max_buffer = max_reorder + 1; WRITE_UE(stream, max_buffer - 1, "sps_max_dec_pic_buffering_minus1"); WRITE_UE(stream, max_reorder, "sps_max_num_reorder_pics"); From e7857cbb242bab3f206ae0a8e3a67330793f61e7 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sat, 4 Apr 2020 14:58:06 +0300 Subject: [PATCH 13/30] Remove avx2 blending --- src/strategies/avx2/picture-avx2.c | 237 +---------------------------- 1 file changed, 1 insertion(+), 236 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 8aa64c1f..e57f2535 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -769,241 +769,6 @@ static unsigned pixels_calc_ssd_avx2(const uint8_t *const ref, const uint8_t *co } } -static void inter_recon_bipred_avx2(const int hi_prec_luma_rec0, - const int hi_prec_luma_rec1, - const int hi_prec_chroma_rec0, - const int hi_prec_chroma_rec1, - const int height, - const int width, - const int ypos, - const int xpos, - const hi_prec_buf_t*high_precision_rec0, - const hi_prec_buf_t*high_precision_rec1, - lcu_t* lcu, - uint8_t* temp_lcu_y, - uint8_t* temp_lcu_u, - uint8_t* temp_lcu_v, -bool predict_luma, -bool predict_chroma) -{ - int y_in_lcu, x_in_lcu; - int shift = 15 - KVZ_BIT_DEPTH; - int offset = 1 << (shift - 1); - __m256i temp_epi8, temp_y_epi32, sample0_epi32, sample1_epi32, temp_epi16; - int32_t * pointer = 0; - __m256i offset_epi32 = _mm256_set1_epi32(offset); - - for (int temp_y = 0; temp_y < height; ++temp_y) { - - y_in_lcu = ((ypos + temp_y) & ((LCU_WIDTH)-1)); - - for (int temp_x = 0; temp_x < width; temp_x += 8) { - x_in_lcu = ((xpos + temp_x) & ((LCU_WIDTH)-1)); - - if (predict_luma) { - bool use_8_elements = ((temp_x + 8) <= width); - - if (!use_8_elements) { - if (width < 4) { - // If width is smaller than 4 there's no need to use SIMD - for (int temp_i = 0; temp_i < width; ++temp_i) { - x_in_lcu = ((xpos + temp_i) & ((LCU_WIDTH)-1)); - - int sample0_y = (hi_prec_luma_rec0 ? high_precision_rec0->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (temp_lcu_y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int sample1_y = (hi_prec_luma_rec1 ? high_precision_rec1->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - - lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_y + sample1_y + offset) >> shift); - } - } - - else { - // Load total of 4 elements from memory to vector - sample0_epi32 = hi_prec_luma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec0->y[y_in_lcu * LCU_WIDTH + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*)&(temp_lcu_y[y_in_lcu * LCU_WIDTH + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - - sample1_epi32 = hi_prec_luma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec1->y[y_in_lcu * LCU_WIDTH + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*) &(lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - - // (sample1 + sample2 + offset)>>shift - temp_y_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_y_epi32 = _mm256_add_epi32(temp_y_epi32, offset_epi32); - temp_y_epi32 = _mm256_srai_epi32(temp_y_epi32, shift); - - // Pack the bits from 32-bit to 8-bit - temp_epi16 = _mm256_packs_epi32(temp_y_epi32, temp_y_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - pointer = (int32_t*)&(lcu->rec.y[(y_in_lcu)* LCU_WIDTH + x_in_lcu]); - *pointer = _mm_cvtsi128_si32(_mm256_castsi256_si128(temp_epi8)); - - - - for (int temp_i = temp_x + 4; temp_i < width; ++temp_i) { - x_in_lcu = ((xpos + temp_i) & ((LCU_WIDTH)-1)); - - int16_t sample0_y = (hi_prec_luma_rec0 ? high_precision_rec0->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (temp_lcu_y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_y = (hi_prec_luma_rec1 ? high_precision_rec1->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - - lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_y + sample1_y + offset) >> shift); - } - - } - } else { - // Load total of 8 elements from memory to vector - sample0_epi32 = hi_prec_luma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec0->y[y_in_lcu * LCU_WIDTH + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32((_mm_loadl_epi64((__m128i*) &(temp_lcu_y[y_in_lcu * LCU_WIDTH + x_in_lcu])))), 14 - KVZ_BIT_DEPTH); - - sample1_epi32 = hi_prec_luma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec1->y[y_in_lcu * LCU_WIDTH + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32((_mm_loadl_epi64((__m128i*) &(lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu])))), 14 - KVZ_BIT_DEPTH); - - // (sample1 + sample2 + offset)>>shift - temp_y_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_y_epi32 = _mm256_add_epi32(temp_y_epi32, offset_epi32); - temp_y_epi32 = _mm256_srai_epi32(temp_y_epi32, shift); - - // Pack the bits from 32-bit to 8-bit - temp_epi16 = _mm256_packs_epi32(temp_y_epi32, temp_y_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - // Store 64-bits from vector to memory - _mm_storel_epi64((__m128i*)&(lcu->rec.y[(y_in_lcu)* LCU_WIDTH + x_in_lcu]), _mm256_castsi256_si128(temp_epi8)); - } - } - } - } - for (int temp_y = 0; temp_y < height >> 1; ++temp_y) { - int y_in_lcu = (((ypos >> 1) + temp_y) & (LCU_WIDTH_C - 1)); - - for (int temp_x = 0; temp_x < width >> 1; temp_x += 8) { - - int x_in_lcu = (((xpos >> 1) + temp_x) & (LCU_WIDTH_C - 1)); - - if (predict_chroma) { - if ((width >> 1) < 4) { - // If width>>1 is smaller than 4 there's no need to use SIMD - - for (int temp_i = 0; temp_i < width >> 1; ++temp_i) { - int temp_x_in_lcu = (((xpos >> 1) + temp_i) & (LCU_WIDTH_C - 1)); - int16_t sample0_u = (hi_prec_chroma_rec0 ? high_precision_rec0->u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (temp_lcu_u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_u = (hi_prec_chroma_rec1 ? high_precision_rec1->u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (lcu->rec.u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_u + sample1_u + offset) >> shift); - - int16_t sample0_v = (hi_prec_chroma_rec0 ? high_precision_rec0->v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (temp_lcu_v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_v = (hi_prec_chroma_rec1 ? high_precision_rec1->v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (lcu->rec.v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_v + sample1_v + offset) >> shift); - } - } - - else { - - bool use_8_elements = ((temp_x + 8) <= (width >> 1)); - - __m256i temp_u_epi32, temp_v_epi32; - - if (!use_8_elements) { - // Load 4 pixels to vector - sample0_epi32 = hi_prec_chroma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec0->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*) &(temp_lcu_u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - sample1_epi32 = hi_prec_chroma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec1->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*) &(lcu->rec.u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - // (sample1 + sample2 + offset)>>shift - temp_u_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_u_epi32 = _mm256_add_epi32(temp_u_epi32, offset_epi32); - temp_u_epi32 = _mm256_srai_epi32(temp_u_epi32, shift); - - - - sample0_epi32 = hi_prec_chroma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec0->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*) &(temp_lcu_v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - sample1_epi32 = hi_prec_chroma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadl_epi64((__m128i*) &(high_precision_rec1->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32_t*) &(lcu->rec.v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - - // (sample1 + sample2 + offset)>>shift - temp_v_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_v_epi32 = _mm256_add_epi32(temp_v_epi32, offset_epi32); - temp_v_epi32 = _mm256_srai_epi32(temp_v_epi32, shift); - - - temp_epi16 = _mm256_packs_epi32(temp_u_epi32, temp_u_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - pointer = (int32_t*)&(lcu->rec.u[(y_in_lcu)* LCU_WIDTH_C + x_in_lcu]); - *pointer = _mm_cvtsi128_si32(_mm256_castsi256_si128(temp_epi8)); - - - temp_epi16 = _mm256_packs_epi32(temp_v_epi32, temp_v_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - pointer = (int32_t*)&(lcu->rec.v[(y_in_lcu)* LCU_WIDTH_C + x_in_lcu]); - *pointer = _mm_cvtsi128_si32(_mm256_castsi256_si128(temp_epi8)); - - for (int temp_i = 4; temp_i < width >> 1; ++temp_i) { - - // Use only if width>>1 is not divideble by 4 - int temp_x_in_lcu = (((xpos >> 1) + temp_i) & (LCU_WIDTH_C - 1)); - int16_t sample0_u = (hi_prec_chroma_rec0 ? high_precision_rec0->u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (temp_lcu_u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_u = (hi_prec_chroma_rec1 ? high_precision_rec1->u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (lcu->rec.u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.u[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_u + sample1_u + offset) >> shift); - - int16_t sample0_v = (hi_prec_chroma_rec0 ? high_precision_rec0->v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (temp_lcu_v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_v = (hi_prec_chroma_rec1 ? high_precision_rec1->v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] : (lcu->rec.v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.v[y_in_lcu * LCU_WIDTH_C + temp_x_in_lcu] = (uint8_t)kvz_fast_clip_32bit_to_pixel((sample0_v + sample1_v + offset) >> shift); - } - } else { - // Load 8 pixels to vector - sample0_epi32 = hi_prec_chroma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec0->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i*) &(temp_lcu_u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - sample1_epi32 = hi_prec_chroma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec1->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i*) &(lcu->rec.u[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - // (sample1 + sample2 + offset)>>shift - temp_u_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_u_epi32 = _mm256_add_epi32(temp_u_epi32, offset_epi32); - temp_u_epi32 = _mm256_srai_epi32(temp_u_epi32, shift); - - sample0_epi32 = hi_prec_chroma_rec0 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec0->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i*) &(temp_lcu_v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - sample1_epi32 = hi_prec_chroma_rec1 ? _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*) &(high_precision_rec1->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))) : - _mm256_slli_epi32(_mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i*) &(lcu->rec.v[y_in_lcu * LCU_WIDTH_C + x_in_lcu]))), 14 - KVZ_BIT_DEPTH); - - - // (sample1 + sample2 + offset)>>shift - temp_v_epi32 = _mm256_add_epi32(sample0_epi32, sample1_epi32); - temp_v_epi32 = _mm256_add_epi32(temp_v_epi32, offset_epi32); - temp_v_epi32 = _mm256_srai_epi32(temp_v_epi32, shift); - - temp_epi16 = _mm256_packs_epi32(temp_u_epi32, temp_u_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - // Store 64-bit integer into memory - _mm_storel_epi64((__m128i*)&(lcu->rec.u[(y_in_lcu)* LCU_WIDTH_C + x_in_lcu]), _mm256_castsi256_si128(temp_epi8)); - - temp_epi16 = _mm256_packs_epi32(temp_v_epi32, temp_v_epi32); - temp_epi16 = _mm256_permute4x64_epi64(temp_epi16, _MM_SHUFFLE(3, 1, 2, 0)); - temp_epi8 = _mm256_packus_epi16(temp_epi16, temp_epi16); - - // Store 64-bit integer into memory - _mm_storel_epi64((__m128i*)&(lcu->rec.v[(y_in_lcu)* LCU_WIDTH_C + x_in_lcu]), _mm256_castsi256_si128(temp_epi8)); - } - } - } - } - } -} - static optimized_sad_func_ptr_t get_optimized_sad_avx2(int32_t width) { if (width == 0) @@ -1278,7 +1043,7 @@ int kvz_strategy_register_picture_avx2(void* opaque, uint8_t bitdepth) success &= kvz_strategyselector_register(opaque, "satd_any_size_quad", "avx2", 40, &satd_any_size_quad_avx2); success &= kvz_strategyselector_register(opaque, "pixels_calc_ssd", "avx2", 40, &pixels_calc_ssd_avx2); - success &= kvz_strategyselector_register(opaque, "inter_recon_bipred", "avx2", 40, &inter_recon_bipred_avx2); + //success &= kvz_strategyselector_register(opaque, "inter_recon_bipred", "avx2", 40, &inter_recon_bipred_avx2); success &= kvz_strategyselector_register(opaque, "get_optimized_sad", "avx2", 40, &get_optimized_sad_avx2); success &= kvz_strategyselector_register(opaque, "ver_sad", "avx2", 40, &ver_sad_avx2); success &= kvz_strategyselector_register(opaque, "hor_sad", "avx2", 40, &hor_sad_avx2); From b52a930bed2f4aea1009542b2f6dcdf08961e0cd Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sat, 4 Apr 2020 22:14:10 +0300 Subject: [PATCH 14/30] About working with generics --- src/image.c | 21 -- src/image.h | 16 +- src/inter.c | 256 ++++++++++++----------- src/kvazaar.h | 2 + src/strategies/generic/ipol-generic.c | 22 +- src/strategies/generic/picture-generic.c | 59 +++--- src/strategies/strategies-ipol.h | 22 ++ src/strategies/strategies-picture.h | 29 ++- 8 files changed, 226 insertions(+), 201 deletions(-) diff --git a/src/image.c b/src/image.c index a48e5a4f..ddd58d47 100644 --- a/src/image.c +++ b/src/image.c @@ -218,27 +218,6 @@ void kvz_yuv_t_free(yuv_t *yuv) FREE_POINTER(yuv); } -hi_prec_buf_t * kvz_hi_prec_buf_t_alloc(int luma_size) -{ - // Get buffers with separate mallocs in order to take advantage of - // automatic buffer overrun checks. - hi_prec_buf_t *yuv = (hi_prec_buf_t *)malloc(sizeof(*yuv)); - yuv->y = (int16_t *)malloc(luma_size * sizeof(*yuv->y)); - yuv->u = (int16_t *)malloc(luma_size / 2 * sizeof(*yuv->u)); - yuv->v = (int16_t *)malloc(luma_size / 2 * sizeof(*yuv->v)); - yuv->size = luma_size; - - return yuv; -} - -void kvz_hi_prec_buf_t_free(hi_prec_buf_t * yuv) -{ - free(yuv->y); - free(yuv->u); - free(yuv->v); - free(yuv); -} - static INLINE uint32_t reg_sad_maybe_optimized(const kvz_pixel * const data1, const kvz_pixel * const data2, const int32_t width, const int32_t height, const uint32_t stride1, const uint32_t stride2, optimized_sad_func_ptr_t optimized_sad) diff --git a/src/image.h b/src/image.h index ccac4553..a6a08b0c 100644 --- a/src/image.h +++ b/src/image.h @@ -51,13 +51,6 @@ typedef struct { enum kvz_chroma_format chroma_format; } lcu_yuv_t; -typedef struct { - int size; - int16_t *y; - int16_t *u; - int16_t *v; -} hi_prec_buf_t; - typedef struct { int size; kvz_pixel *y; @@ -65,6 +58,12 @@ typedef struct { kvz_pixel *v; } yuv_t; +typedef struct { + int size; + kvz_pixel_ip *y; + kvz_pixel_ip *u; + kvz_pixel_ip *v; +} yuv_ip_t; kvz_picture *kvz_image_alloc_420(const int32_t width, const int32_t height); kvz_picture *kvz_image_alloc(enum kvz_chroma_format chroma_format, const int32_t width, const int32_t height); @@ -82,9 +81,6 @@ kvz_picture *kvz_image_make_subimage(kvz_picture *const orig_image, yuv_t * kvz_yuv_t_alloc(int luma_size, int chroma_size); void kvz_yuv_t_free(yuv_t * yuv); -hi_prec_buf_t * kvz_hi_prec_buf_t_alloc(int luma_size); -void kvz_hi_prec_buf_t_free(hi_prec_buf_t * yuv); - //Algorithms unsigned kvz_image_calc_sad(const kvz_picture *pic, diff --git a/src/inter.c b/src/inter.c index 65a981dc..a311aecf 100644 --- a/src/inter.c +++ b/src/inter.c @@ -52,14 +52,15 @@ typedef struct { } merge_candidates_t; -static void inter_recon_frac_luma(const encoder_state_t *const state, - const kvz_picture *const ref, - int32_t xpos, - int32_t ypos, - int32_t block_width, - int32_t block_height, - const int16_t mv_param[2], - lcu_t *lcu) +static void inter_recon_frac_luma(const encoder_state_t * const state, + const kvz_picture * const ref, + int32_t xpos, + int32_t ypos, + int32_t block_width, + int32_t block_height, + const int16_t mv_param[2], + yuv_t *out, + unsigned out_stride) { int mv_frac_x = (mv_param[0] & 3); int mv_frac_y = (mv_param[1] & 3); @@ -349,130 +350,130 @@ static void inter_cp_with_ext_border(const kvz_pixel *ref_buf, int ref_stride, * * \param state encoder state * \param ref picture to copy the data from - * \param xpos PU x position - * \param ypos PU y position + * \param pu_x PU x position + * \param pu_y PU y position * \param width PU width * \param height PU height * \param mv_param motion vector - * \param lcu destination lcu - * \param hi_prec_out destination of high precision output, or NULL if not needed + * \param lcu_px destination lcu + * \param lcu_ip destination of high precision output, or NULL if not needed * \param predict_luma Enable or disable luma prediction for this call. * \param predict_chroma Enable or disable chroma prediction for this call. */ -static void inter_recon_unipred(const encoder_state_t * const state, - const kvz_picture * const ref, - int32_t xpos, - int32_t ypos, - int32_t width, - int32_t height, - const int16_t mv_param[2], - lcu_t *lcu, - hi_prec_buf_t *hi_prec_out, - bool predict_luma, - bool predict_chroma) +static unsigned inter_recon_unipred(const encoder_state_t * const state, + const kvz_picture * const ref, + int32_t pu_x, + int32_t pu_y, + int32_t pu_w, + int32_t pu_h, + int32_t out_stride_luma, + const int16_t mv_param[2], + yuv_t *yuv_px, + yuv_ip_t *yuv_ip, + bool predict_luma, + bool predict_chroma) { - const vector2d_t pu_in_tile = { xpos, ypos }; - const vector2d_t pu_in_lcu = { xpos % LCU_WIDTH, ypos % LCU_WIDTH }; - - const vector2d_t mv_in_pu = { mv_param[0] >> 2, mv_param[1] >> 2 }; - const vector2d_t mv_in_frame = { - mv_in_pu.x + pu_in_tile.x + state->tile->offset_x, - mv_in_pu.y + pu_in_tile.y + state->tile->offset_y + const vector2d_t int_mv = { mv_param[0] >> 2, mv_param[1] >> 2 }; + const vector2d_t int_mv_in_frame = { + int_mv.x + pu_x + state->tile->offset_x, + int_mv.y + pu_y + state->tile->offset_y }; - const bool mv_is_outside_frame = mv_in_frame.x < 0 || - mv_in_frame.y < 0 || - mv_in_frame.x + width > ref->width || - mv_in_frame.y + height > ref->height; + const bool int_mv_outside_frame = int_mv_in_frame.x < 0 || + int_mv_in_frame.y < 0 || + int_mv_in_frame.x + pu_w > ref->width || + int_mv_in_frame.y + pu_h > ref->height; // With 420, odd coordinates need interpolation. - const int8_t fractional_chroma = (mv_in_pu.x & 1) || (mv_in_pu.y & 1); - const int8_t fractional_luma = ((mv_param[0] & 3) || (mv_param[1] & 3)); + const bool fractional_chroma = (int_mv.x & 1) || (int_mv.y & 1); + const bool fractional_luma = (mv_param[0] & 3) || (mv_param[1] & 3); // Generate prediction for luma. if (predict_luma) { if (fractional_luma) { // With a fractional MV, do interpolation. - if (state->encoder_control->cfg.bipred && hi_prec_out) { + if (state->encoder_control->cfg.bipred && yuv_ip) { inter_recon_frac_luma_hi(state, ref, - pu_in_tile.x, pu_in_tile.y, - width, height, - mv_param, hi_prec_out); + pu_x, pu_y, + pu_w, pu_h, + mv_param, yuv_ip, out_stride_luma); } else { inter_recon_frac_luma(state, ref, - pu_in_tile.x, pu_in_tile.y, - width, height, - mv_param, lcu); + pu_x, pu_y, + pu_w, pu_h, + mv_param, yuv_px, out_stride_luma); } } else { // With an integer MV, copy pixels directly from the reference. - const int lcu_pu_index = pu_in_lcu.y * LCU_WIDTH + pu_in_lcu.x; - if (mv_is_outside_frame) { + if (int_mv_outside_frame) { inter_cp_with_ext_border(ref->y, ref->width, ref->width, ref->height, - &lcu->rec.y[lcu_pu_index], LCU_WIDTH, - width, height, - &mv_in_frame); + yuv_px->y, out_stride_luma, + pu_w, pu_h, + &int_mv_in_frame); } else { - const int frame_mv_index = mv_in_frame.y * ref->width + mv_in_frame.x; + const int frame_mv_index = int_mv_in_frame.y * ref->width + int_mv_in_frame.x; kvz_pixels_blit(&ref->y[frame_mv_index], - &lcu->rec.y[lcu_pu_index], - width, height, - ref->width, LCU_WIDTH); + yuv_px->y, + pu_w, pu_h, + ref->width, out_stride_luma); } } } if (!predict_chroma) { - return; + return fractional_luma; } + const unsigned out_stride_c = out_stride_luma / 2; + // Generate prediction for chroma. if (fractional_luma || fractional_chroma) { // With a fractional MV, do interpolation. - if (state->encoder_control->cfg.bipred && hi_prec_out) { + if (state->encoder_control->cfg.bipred && yuv_ip) { inter_recon_frac_chroma_hi(state, ref, - pu_in_tile.x, pu_in_tile.y, - width, height, - mv_param, hi_prec_out); + pu_x, pu_y, + pu_w, pu_h, + mv_param, yuv_ip, out_stride_c); } else { inter_recon_frac_chroma(state, ref, - pu_in_tile.x, pu_in_tile.y, - width, height, - mv_param, lcu); + pu_x, pu_y, + pu_w, pu_h, + mv_param, yuv_px, out_stride_c); } } else { // With an integer MV, copy pixels directly from the reference. - const int lcu_pu_index_c = pu_in_lcu.y / 2 * LCU_WIDTH_C + pu_in_lcu.x / 2; - const vector2d_t mv_in_frame_c = { mv_in_frame.x / 2, mv_in_frame.y / 2 }; + const vector2d_t int_mv_in_frame_c = { int_mv_in_frame.x / 2, int_mv_in_frame.y / 2 }; - if (mv_is_outside_frame) { + if (int_mv_outside_frame) { inter_cp_with_ext_border(ref->u, ref->width / 2, ref->width / 2, ref->height / 2, - &lcu->rec.u[lcu_pu_index_c], LCU_WIDTH_C, - width / 2, height / 2, - &mv_in_frame_c); + yuv_px->u, out_stride_c, + pu_w / 2, pu_h / 2, + &int_mv_in_frame_c); inter_cp_with_ext_border(ref->v, ref->width / 2, ref->width / 2, ref->height / 2, - &lcu->rec.v[lcu_pu_index_c], LCU_WIDTH_C, - width / 2, height / 2, - &mv_in_frame_c); + yuv_px->v, out_stride_c, + pu_w / 2, pu_h / 2, + &int_mv_in_frame_c); } else { - const int frame_mv_index = mv_in_frame_c.y * ref->width / 2 + mv_in_frame_c.x; + const int frame_mv_index = int_mv_in_frame_c.y * ref->width / 2 + int_mv_in_frame_c.x; kvz_pixels_blit(&ref->u[frame_mv_index], - &lcu->rec.u[lcu_pu_index_c], - width / 2, height / 2, - ref->width / 2, LCU_WIDTH_C); + yuv_px->u, + pu_w / 2, pu_h / 2, + ref->width / 2, out_stride_c); kvz_pixels_blit(&ref->v[frame_mv_index], - &lcu->rec.v[lcu_pu_index_c], - width / 2, height / 2, - ref->width / 2, LCU_WIDTH_C); + yuv_px->v, + pu_w / 2, pu_h / 2, + ref->width / 2, out_stride_c); } } + + return fractional_luma | ((fractional_luma || fractional_chroma) << 1); } /** * \brief Reconstruct bi-pred inter PU @@ -480,8 +481,8 @@ static void inter_recon_unipred(const encoder_state_t * const state, * \param state encoder state * \param ref1 reference picture to copy the data from * \param ref2 other reference picture to copy the data from - * \param xpos PU x position - * \param ypos PU y position + * \param pu_x PU x position + * \param pu_y PU y position * \param width PU width * \param height PU height * \param mv_param motion vectors @@ -489,56 +490,60 @@ static void inter_recon_unipred(const encoder_state_t * const state, * \param predict_luma Enable or disable luma prediction for this call. * \param predict_chroma Enable or disable chroma prediction for this call. */ -void kvz_inter_recon_bipred(const encoder_state_t * const state, - const kvz_picture * ref1, - const kvz_picture * ref2, - int32_t xpos, - int32_t ypos, - int32_t width, - int32_t height, - int16_t mv_param[2][2], - lcu_t* lcu, - bool predict_luma, - bool predict_chroma) +void kvz_inter_recon_bipred(const encoder_state_t *const state, + const kvz_picture *ref1, + const kvz_picture *ref2, + int32_t pu_x, + int32_t pu_y, + int32_t pu_w, + int32_t pu_h, + int16_t mv_param[2][2], + lcu_t *lcu, + bool predict_luma, + bool predict_chroma) { - kvz_pixel temp_lcu_y[LCU_WIDTH*LCU_WIDTH]; - kvz_pixel temp_lcu_u[LCU_WIDTH_C*LCU_WIDTH_C]; - kvz_pixel temp_lcu_v[LCU_WIDTH_C*LCU_WIDTH_C]; + // Allocate maximum size arrays for interpolated and copied samples + ALIGNED(64) kvz_pixel px_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel px_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_ip ip_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_ip ip_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; - const int hi_prec_luma_rec0 = mv_param[0][0] & 3 || mv_param[0][1] & 3; - const int hi_prec_luma_rec1 = mv_param[1][0] & 3 || mv_param[1][1] & 3; + yuv_t px_L0; + px_L0.size = pu_w * pu_h; + px_L0.y = &px_buf_L0[0]; + px_L0.u = &px_buf_L0[LCU_LUMA_SIZE]; + px_L0.v = &px_buf_L0[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - const int hi_prec_chroma_rec0 = mv_param[0][0] & 7 || mv_param[0][1] & 7; - const int hi_prec_chroma_rec1 = mv_param[1][0] & 7 || mv_param[1][1] & 7; + yuv_t px_L1; + px_L1.size = pu_w * pu_h; + px_L1.y = &px_buf_L1[0]; + px_L1.u = &px_buf_L1[LCU_LUMA_SIZE]; + px_L1.v = &px_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - hi_prec_buf_t* high_precision_rec0 = 0; - hi_prec_buf_t* high_precision_rec1 = 0; - if (hi_prec_chroma_rec0) high_precision_rec0 = kvz_hi_prec_buf_t_alloc(LCU_WIDTH*LCU_WIDTH); - if (hi_prec_chroma_rec1) high_precision_rec1 = kvz_hi_prec_buf_t_alloc(LCU_WIDTH*LCU_WIDTH); + yuv_ip_t ip_L0; + ip_L0.size = pu_w * pu_h; + ip_L0.y = &ip_buf_L0[0]; + ip_L0.u = &ip_buf_L0[LCU_LUMA_SIZE]; + ip_L0.v = &ip_buf_L0[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; + yuv_ip_t ip_L1; + ip_L1.size = pu_w * pu_h; + ip_L1.y = &ip_buf_L1[0]; + ip_L1.u = &ip_buf_L1[LCU_LUMA_SIZE]; + ip_L1.v = &ip_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - //Reconstruct both predictors - inter_recon_unipred(state, ref1, xpos, ypos, width, height, mv_param[0], lcu, high_precision_rec0, - predict_luma, predict_chroma); - if (!hi_prec_luma_rec0){ - memcpy(temp_lcu_y, lcu->rec.y, sizeof(kvz_pixel) * 64 * 64); // copy to temp_lcu_y - } - if (!hi_prec_chroma_rec0){ - memcpy(temp_lcu_u, lcu->rec.u, sizeof(kvz_pixel) * 32 * 32); // copy to temp_lcu_u - memcpy(temp_lcu_v, lcu->rec.v, sizeof(kvz_pixel) * 32 * 32); // copy to temp_lcu_v - } - inter_recon_unipred(state, ref2, xpos, ypos, width, height, mv_param[1], lcu, high_precision_rec1, - predict_luma, predict_chroma); + // Sample blocks from both reference picture lists. + // Flags state if the outputs were written to high-precision / interpolated sample buffers. + unsigned ip_flags_L0 = inter_recon_unipred(state, ref1, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[0], + &px_L0, &ip_L0, predict_luma, predict_chroma); + unsigned ip_flags_L1 = inter_recon_unipred(state, ref2, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[1], + &px_L1, &ip_L1, predict_luma, predict_chroma); // After reconstruction, merge the predictors by taking an average of each pixel - kvz_inter_recon_bipred_blend(hi_prec_luma_rec0, hi_prec_luma_rec1, - hi_prec_chroma_rec0, hi_prec_chroma_rec1, - height, width, ypos, xpos, - high_precision_rec0, high_precision_rec1, - lcu, temp_lcu_y, temp_lcu_u, temp_lcu_v, predict_luma, predict_chroma); - - if (high_precision_rec0 != 0) kvz_hi_prec_buf_t_free(high_precision_rec0); - if (high_precision_rec1 != 0) kvz_hi_prec_buf_t_free(high_precision_rec1); + kvz_inter_recon_bipred_blend(lcu, &px_L0, &px_L1, &ip_L0, &ip_L1, + pu_x, pu_y, pu_w, pu_h, + ip_flags_L0, ip_flags_L1, + predict_luma, predict_chroma); } @@ -626,12 +631,21 @@ void kvz_inter_pred_pu(const encoder_state_t * const state, state->frame->ref_LX[mv_idx][ pu->inter.mv_ref[mv_idx]]]; + const unsigned offset_luma = SUB_SCU(pu_y) * LCU_WIDTH + SUB_SCU(pu_x); + const unsigned offset_chroma = SUB_SCU(pu_y) / 2 * LCU_WIDTH_C + SUB_SCU(pu_x) / 2; + yuv_t lcu_adapter; + lcu_adapter.size = pu_w * pu_h; + lcu_adapter.y = lcu->rec.y + offset_luma, + lcu_adapter.u = lcu->rec.u + offset_chroma, + lcu_adapter.v = lcu->rec.v + offset_chroma, + inter_recon_unipred(state, ref, pu_x, pu_y, pu_w, pu_h, + LCU_WIDTH, pu->inter.mv[mv_idx], - lcu, + &lcu_adapter, NULL, predict_luma, predict_chroma); } diff --git a/src/kvazaar.h b/src/kvazaar.h index 856ea6e8..9cd97188 100644 --- a/src/kvazaar.h +++ b/src/kvazaar.h @@ -97,6 +97,8 @@ typedef uint8_t kvz_pixel; typedef uint16_t kvz_pixel; #endif +typedef int16_t kvz_pixel_ip; + /** * \brief Opaque data structure representing one instance of the encoder. */ diff --git a/src/strategies/generic/ipol-generic.c b/src/strategies/generic/ipol-generic.c index 67db7db9..cdd8c040 100644 --- a/src/strategies/generic/ipol-generic.c +++ b/src/strategies/generic/ipol-generic.c @@ -131,7 +131,16 @@ int32_t kvz_four_tap_filter_ver_16bit_generic(int8_t *filter, int16_t *data, int return temp; } -void kvz_sample_quarterpel_luma_generic(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height, kvz_pixel *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]) +void kvz_sample_quarterpel_luma_generic(const encoder_control_t * const encoder, + kvz_pixel *src, + int16_t src_stride, + int width, + int height, + kvz_pixel *dst, + int16_t dst_stride, + int8_t hor_flag, + int8_t ver_flag, + const int16_t mv[2]) { //TODO: horizontal and vertical only filtering int32_t x, y; @@ -669,7 +678,16 @@ void kvz_filter_qpel_blocks_diag_luma_generic(const encoder_control_t * encoder, } } -void kvz_sample_octpel_chroma_generic(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height,kvz_pixel *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]) +void kvz_sample_octpel_chroma_generic(const encoder_control_t * const encoder, + kvz_pixel *src, + int16_t src_stride, + int width, + int height, + kvz_pixel *dst, + int16_t dst_stride, + int8_t hor_flag, + int8_t ver_flag, + const int16_t mv[2]) { //TODO: horizontal and vertical only filtering int32_t x, y; diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 16dde988..f5fcb033 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -547,55 +547,52 @@ static unsigned pixels_calc_ssd_generic(const kvz_pixel *const ref, const kvz_pi return ssd >> (2*(KVZ_BIT_DEPTH-8)); } -static void inter_recon_bipred_generic(const int hi_prec_luma_rec0, - const int hi_prec_luma_rec1, - const int hi_prec_chroma_rec0, - const int hi_prec_chroma_rec1, - int32_t height, - int32_t width, - int32_t ypos, - int32_t xpos, - const hi_prec_buf_t*high_precision_rec0, - const hi_prec_buf_t*high_precision_rec1, - lcu_t* lcu, - kvz_pixel* temp_lcu_y, - kvz_pixel* temp_lcu_u, - kvz_pixel* temp_lcu_v, - bool predict_luma, - bool predict_chroma) { +static void inter_recon_bipred_generic(lcu_t *const lcu, + const yuv_t *const px_L0, + const yuv_t *const px_L1, + const yuv_ip_t *const ip_L0, + const yuv_ip_t *const ip_L1, + const unsigned pu_x, + const unsigned pu_y, + const unsigned pu_w, + const unsigned pu_h, + const unsigned ip_flags_L0, + const unsigned ip_flags_L1, + const bool predict_luma, + const bool predict_chroma) { int shift = 15 - KVZ_BIT_DEPTH; int offset = 1 << (shift - 1); + const unsigned pu_w_c = pu_w >> 1; + int y_in_lcu; int x_in_lcu; //After reconstruction, merge the predictors by taking an average of each pixel - for (int temp_y = 0; temp_y < height; ++temp_y) { - - - for (int temp_x = 0; temp_x < width; ++temp_x) { - y_in_lcu = ((ypos + temp_y) & ((LCU_WIDTH)-1)); - x_in_lcu = ((xpos + temp_x) & ((LCU_WIDTH)-1)); + for (int y = 0; y < pu_h; ++y) { + for (int x = 0; x < pu_w; ++x) { + y_in_lcu = (pu_y + y) & (LCU_WIDTH-1); + x_in_lcu = (pu_x + x) & (LCU_WIDTH-1); if (predict_luma) { - int16_t sample0_y = (hi_prec_luma_rec0 ? high_precision_rec0->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (temp_lcu_y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_y = (hi_prec_luma_rec1 ? high_precision_rec1->y[y_in_lcu * LCU_WIDTH + x_in_lcu] : (lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); + int16_t sample0_y = ((ip_flags_L0 & 1) ? ip_L0->y[y * pu_w + x] : (px_L0->y[y * pu_w + x] << (14 - KVZ_BIT_DEPTH))); + int16_t sample1_y = ((ip_flags_L1 & 1) ? ip_L1->y[y * pu_w + x] : (px_L1->y[y * pu_w + x] << (14 - KVZ_BIT_DEPTH))); lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_y + sample1_y + offset) >> shift); } - if (predict_chroma && (temp_x < width >> 1 && temp_y < height >> 1)) { + if (predict_chroma && (x < (pu_w >> 1) && y < (pu_h >> 1))) { - y_in_lcu = (((ypos >> 1) + temp_y) & (LCU_WIDTH_C - 1)); - x_in_lcu = (((xpos >> 1) + temp_x) & (LCU_WIDTH_C - 1)); + y_in_lcu = SUB_SCU(pu_y) / 2 + y; + x_in_lcu = SUB_SCU(pu_x) / 2 + x; - int16_t sample0_u = (hi_prec_chroma_rec0 ? high_precision_rec0->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] : (temp_lcu_u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_u = (hi_prec_chroma_rec1 ? high_precision_rec1->u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] : (lcu->rec.u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); + int16_t sample0_u = ((ip_flags_L0 & 2) ? ip_L0->u[y * pu_w_c + x] : (px_L0->u[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); + int16_t sample1_u = ((ip_flags_L1 & 2) ? ip_L1->u[y * pu_w_c + x] : (px_L1->u[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); lcu->rec.u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_u + sample1_u + offset) >> shift); - int16_t sample0_v = (hi_prec_chroma_rec0 ? high_precision_rec0->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] : (temp_lcu_v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_v = (hi_prec_chroma_rec1 ? high_precision_rec1->v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] : (lcu->rec.v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] << (14 - KVZ_BIT_DEPTH))); + int16_t sample0_v = ((ip_flags_L0 & 2) ? ip_L0->v[y * pu_w_c + x] : (px_L0->v[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); + int16_t sample1_v = ((ip_flags_L1 & 2) ? ip_L1->v[y * pu_w_c + x] : (px_L1->v[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); lcu->rec.v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_v + sample1_v + offset) >> shift); } } diff --git a/src/strategies/strategies-ipol.h b/src/strategies/strategies-ipol.h index 84d66820..7e02e73a 100644 --- a/src/strategies/strategies-ipol.h +++ b/src/strategies/strategies-ipol.h @@ -101,6 +101,28 @@ typedef void(kvz_sample_octpel_chroma_func)(const encoder_control_t * const enco typedef void(kvz_sample_quarterpel_luma_hi_func)(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height, int16_t *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]); typedef void(kvz_sample_octpel_chroma_hi_func)(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height, int16_t *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]); +typedef void(kvz_sample_14bit_quarterpel_luma_func)(const encoder_control_t * const encoder, + kvz_pixel *src, + int16_t src_stride, + int width, + int height, + int16_t *dst, + int16_t dst_stride, + int8_t hor_flag, + int8_t ver_flag, + const int16_t mv[2]); + +typedef void(kvz_sample_14bit_octpel_chroma_func)(const encoder_control_t *const encoder, + kvz_pixel *src, + int16_t src_stride, + int width, + int height, + int16_t *dst, + int16_t dst_stride, + int8_t hor_flag, + int8_t ver_flag, + const int16_t mv[2]); + // Declare function pointers. extern ipol_blocks_func * kvz_filter_hpel_blocks_hor_ver_luma; extern ipol_blocks_func * kvz_filter_hpel_blocks_diag_luma; diff --git a/src/strategies/strategies-picture.h b/src/strategies/strategies-picture.h index 7b2b509c..85b16bfd 100644 --- a/src/strategies/strategies-picture.h +++ b/src/strategies/strategies-picture.h @@ -133,22 +133,19 @@ typedef uint32_t (hor_sad_func)(const kvz_pixel *pic_data, const kvz_pixel *ref_ int32_t width, int32_t height, uint32_t pic_stride, uint32_t ref_stride, uint32_t left, uint32_t right); -typedef void (inter_recon_bipred_func)(const int hi_prec_luma_rec0, - const int hi_prec_luma_rec1, - const int hi_prec_chroma_rec0, - const int hi_prec_chroma_rec1, - int height, - int width, - int ypos, - int xpos, - const hi_prec_buf_t*high_precision_rec0, - const hi_prec_buf_t*high_precision_rec1, - lcu_t* lcu, - kvz_pixel temp_lcu_y[LCU_WIDTH*LCU_WIDTH], - kvz_pixel temp_lcu_u[LCU_WIDTH_C*LCU_WIDTH_C], - kvz_pixel temp_lcu_v[LCU_WIDTH_C*LCU_WIDTH_C], - bool predict_luma, - bool predict_chroma); +typedef void (inter_recon_bipred_func)(lcu_t * const lcu, + const yuv_t *const px_L0, + const yuv_t *const px_L1, + const yuv_ip_t *const ip_L0, + const yuv_ip_t *const ip_L1, + const unsigned pu_x, + const unsigned pu_y, + const unsigned pu_w, + const unsigned pu_h, + const unsigned ip_flags_L0, + const unsigned ip_flags_L1, + const bool predict_luma, + const bool predict_chroma); typedef double (pixel_var_func)(const kvz_pixel *buf, const uint32_t len); From f47bd5d86fd4a9b28ea26e2d6feaac7655131cfb Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 5 Apr 2020 15:39:35 +0300 Subject: [PATCH 15/30] Rename some bipred functions --- src/inter.c | 8 ++++---- src/strategies/avx2/picture-avx2.c | 2 +- src/strategies/generic/picture-generic.c | 4 ++-- src/strategies/strategies-picture.c | 2 +- src/strategies/strategies-picture.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/inter.c b/src/inter.c index a311aecf..8877dd94 100644 --- a/src/inter.c +++ b/src/inter.c @@ -540,10 +540,10 @@ void kvz_inter_recon_bipred(const encoder_state_t *const state, &px_L1, &ip_L1, predict_luma, predict_chroma); // After reconstruction, merge the predictors by taking an average of each pixel - kvz_inter_recon_bipred_blend(lcu, &px_L0, &px_L1, &ip_L0, &ip_L1, - pu_x, pu_y, pu_w, pu_h, - ip_flags_L0, ip_flags_L1, - predict_luma, predict_chroma); + kvz_bipred_average(lcu, &px_L0, &px_L1, &ip_L0, &ip_L1, + pu_x, pu_y, pu_w, pu_h, + ip_flags_L0, ip_flags_L1, + predict_luma, predict_chroma); } diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index e57f2535..09b2b7c7 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -1043,7 +1043,7 @@ int kvz_strategy_register_picture_avx2(void* opaque, uint8_t bitdepth) success &= kvz_strategyselector_register(opaque, "satd_any_size_quad", "avx2", 40, &satd_any_size_quad_avx2); success &= kvz_strategyselector_register(opaque, "pixels_calc_ssd", "avx2", 40, &pixels_calc_ssd_avx2); - //success &= kvz_strategyselector_register(opaque, "inter_recon_bipred", "avx2", 40, &inter_recon_bipred_avx2); + //success &= kvz_strategyselector_register(opaque, "bipred_average", "avx2", 40, &bipred_average_avx2); success &= kvz_strategyselector_register(opaque, "get_optimized_sad", "avx2", 40, &get_optimized_sad_avx2); success &= kvz_strategyselector_register(opaque, "ver_sad", "avx2", 40, &ver_sad_avx2); success &= kvz_strategyselector_register(opaque, "hor_sad", "avx2", 40, &hor_sad_avx2); diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index f5fcb033..0c7b3be6 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -547,7 +547,7 @@ static unsigned pixels_calc_ssd_generic(const kvz_pixel *const ref, const kvz_pi return ssd >> (2*(KVZ_BIT_DEPTH-8)); } -static void inter_recon_bipred_generic(lcu_t *const lcu, +static void bipred_average_generic(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, const yuv_ip_t *const ip_L0, @@ -743,7 +743,7 @@ int kvz_strategy_register_picture_generic(void* opaque, uint8_t bitdepth) success &= kvz_strategyselector_register(opaque, "satd_any_size_quad", "generic", 0, &satd_any_size_quad_generic); success &= kvz_strategyselector_register(opaque, "pixels_calc_ssd", "generic", 0, &pixels_calc_ssd_generic); - success &= kvz_strategyselector_register(opaque, "inter_recon_bipred", "generic", 0, &inter_recon_bipred_generic); + success &= kvz_strategyselector_register(opaque, "bipred_average", "generic", 0, &bipred_average_generic); success &= kvz_strategyselector_register(opaque, "get_optimized_sad", "generic", 0, &get_optimized_sad_generic); success &= kvz_strategyselector_register(opaque, "ver_sad", "generic", 0, &ver_sad_generic); diff --git a/src/strategies/strategies-picture.c b/src/strategies/strategies-picture.c index 2ba7ed49..f4c03d75 100644 --- a/src/strategies/strategies-picture.c +++ b/src/strategies/strategies-picture.c @@ -73,7 +73,7 @@ cost_pixel_any_size_multi_func * kvz_satd_any_size_quad = 0; pixels_calc_ssd_func * kvz_pixels_calc_ssd = 0; -inter_recon_bipred_func * kvz_inter_recon_bipred_blend = 0; +inter_recon_bipred_func * kvz_bipred_average = 0; get_optimized_sad_func *kvz_get_optimized_sad = 0; ver_sad_func *kvz_ver_sad = 0; diff --git a/src/strategies/strategies-picture.h b/src/strategies/strategies-picture.h index 85b16bfd..adb4ae2c 100644 --- a/src/strategies/strategies-picture.h +++ b/src/strategies/strategies-picture.h @@ -181,7 +181,7 @@ extern cost_pixel_any_size_multi_func *kvz_satd_any_size_quad; extern pixels_calc_ssd_func *kvz_pixels_calc_ssd; -extern inter_recon_bipred_func * kvz_inter_recon_bipred_blend; +extern inter_recon_bipred_func * kvz_bipred_average; extern get_optimized_sad_func *kvz_get_optimized_sad; extern ver_sad_func *kvz_ver_sad; @@ -220,7 +220,7 @@ cost_pixel_nxn_multi_func * kvz_pixels_get_sad_dual_func(unsigned n); {"satd_64x64_dual", (void**) &kvz_satd_64x64_dual}, \ {"satd_any_size_quad", (void**) &kvz_satd_any_size_quad}, \ {"pixels_calc_ssd", (void**) &kvz_pixels_calc_ssd}, \ - {"inter_recon_bipred", (void**) &kvz_inter_recon_bipred_blend}, \ + {"bipred_average", (void**) &kvz_bipred_average}, \ {"get_optimized_sad", (void**) &kvz_get_optimized_sad}, \ {"ver_sad", (void**) &kvz_ver_sad}, \ {"hor_sad", (void**) &kvz_hor_sad}, \ From ef69c65c5872e209a1386b17de415683ae1a521e Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 5 Apr 2020 16:41:32 +0300 Subject: [PATCH 16/30] New bipred average functions --- src/strategies/generic/picture-generic.c | 124 +++++++++++++++++------ 1 file changed, 94 insertions(+), 30 deletions(-) diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 0c7b3be6..38132716 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -547,6 +547,69 @@ static unsigned pixels_calc_ssd_generic(const kvz_pixel *const ref, const kvz_pi return ssd >> (2*(KVZ_BIT_DEPTH-8)); } +static void bipred_average_px_px(kvz_pixel *dst, + kvz_pixel *px_L0, + kvz_pixel *px_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_L0 = px_L0[i] << (14 - KVZ_BIT_DEPTH); + int16_t sample_L1 = px_L1[i] << (14 - KVZ_BIT_DEPTH); + int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } +} + +static void bipred_average_ip_ip(kvz_pixel *dst, + kvz_pixel_ip *ip_L0, + kvz_pixel_ip *ip_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_L0 = ip_L0[i]; + int16_t sample_L1 = ip_L1[i]; + int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } +} + +static void bipred_average_px_ip(kvz_pixel *dst, + kvz_pixel *px, + kvz_pixel_ip *ip, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); + int16_t sample_ip = ip[i]; + int32_t rounded = (sample_px + sample_ip + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } +} + static void bipred_average_generic(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, @@ -561,43 +624,44 @@ static void bipred_average_generic(lcu_t *const lcu, const bool predict_luma, const bool predict_chroma) { - int shift = 15 - KVZ_BIT_DEPTH; - int offset = 1 << (shift - 1); - - const unsigned pu_w_c = pu_w >> 1; - - int y_in_lcu; - int x_in_lcu; - //After reconstruction, merge the predictors by taking an average of each pixel - for (int y = 0; y < pu_h; ++y) { - for (int x = 0; x < pu_w; ++x) { - y_in_lcu = (pu_y + y) & (LCU_WIDTH-1); - x_in_lcu = (pu_x + x) & (LCU_WIDTH-1); + if (predict_luma) { + unsigned pb_offset = SUB_SCU(pu_y) * LCU_WIDTH + SUB_SCU(pu_x); - if (predict_luma) { - int16_t sample0_y = ((ip_flags_L0 & 1) ? ip_L0->y[y * pu_w + x] : (px_L0->y[y * pu_w + x] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_y = ((ip_flags_L1 & 1) ? ip_L1->y[y * pu_w + x] : (px_L1->y[y * pu_w + x] << (14 - KVZ_BIT_DEPTH))); + if (!(ip_flags_L0 & 1) && !(ip_flags_L1 & 1)) { + bipred_average_px_px(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); - lcu->rec.y[y_in_lcu * LCU_WIDTH + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_y + sample1_y + offset) >> shift); - } + } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { + bipred_average_ip_ip(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); - if (predict_chroma && (x < (pu_w >> 1) && y < (pu_h >> 1))) { - - y_in_lcu = SUB_SCU(pu_y) / 2 + y; - x_in_lcu = SUB_SCU(pu_x) / 2 + x; - - int16_t sample0_u = ((ip_flags_L0 & 2) ? ip_L0->u[y * pu_w_c + x] : (px_L0->u[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_u = ((ip_flags_L1 & 2) ? ip_L1->u[y * pu_w_c + x] : (px_L1->u[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.u[y_in_lcu * LCU_WIDTH_C + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_u + sample1_u + offset) >> shift); - - int16_t sample0_v = ((ip_flags_L0 & 2) ? ip_L0->v[y * pu_w_c + x] : (px_L0->v[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); - int16_t sample1_v = ((ip_flags_L1 & 2) ? ip_L1->v[y * pu_w_c + x] : (px_L1->v[y * pu_w_c + x] << (14 - KVZ_BIT_DEPTH))); - lcu->rec.v[y_in_lcu * LCU_WIDTH_C + x_in_lcu] = (kvz_pixel)kvz_fast_clip_32bit_to_pixel((sample0_v + sample1_v + offset) >> shift); - } + } else { + kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; + kvz_pixel_ip *src_ip = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + bipred_average_px_ip(lcu->rec.y + pb_offset, src_px, src_ip, pu_w, pu_h, LCU_WIDTH); } } + if (predict_chroma) { + unsigned pb_offset = SUB_SCU(pu_y) / 2 * LCU_WIDTH_C + SUB_SCU(pu_x) / 2; + unsigned pb_w = pu_w / 2; + unsigned pb_h = pu_h / 2; + if (!(ip_flags_L0 & 2) && !(ip_flags_L1 & 2)) { + bipred_average_px_px(lcu->rec.u + pb_offset, px_L0->u, px_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_px(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); + + } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { + bipred_average_ip_ip(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_ip_ip(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + + } else { + kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel_ip *src_ip_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; + kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel_ip *src_ip_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + bipred_average_px_ip(lcu->rec.u + pb_offset, src_px_u, src_ip_u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_ip(lcu->rec.v + pb_offset, src_px_v, src_ip_v, pb_w, pb_h, LCU_WIDTH_C); + } + } } From 146298a0dfa3b502e50ac621c1070aaed7edd221 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 5 Apr 2020 22:42:47 +0300 Subject: [PATCH 17/30] New AVX2 block averaging *WIP* missing small chroma block and SMP/AMP --- src/strategies/avx2/picture-avx2.c | 309 ++++++++++++++++++++++++++++- 1 file changed, 308 insertions(+), 1 deletion(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 09b2b7c7..84a92f2c 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -769,6 +769,313 @@ static unsigned pixels_calc_ssd_avx2(const uint8_t *const ref, const uint8_t *co } } +static INLINE void scatter_ymm_4x8_8bit(kvz_pixel * dst, __m256i ymm, unsigned dst_stride) +{ + __m128i ymm_lo = _mm256_castsi256_si128(ymm); + __m128i ymm_hi = _mm256_extracti128_si256(ymm, 1); + *(uint32_t *)dst = _mm_cvtsi128_si32(ymm_lo); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_lo, 1); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_lo, 2); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_lo, 3); dst += dst_stride; + *(uint32_t *)dst = _mm_cvtsi128_si32(ymm_hi); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_hi, 1); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_hi, 2); dst += dst_stride; + *(uint32_t *)dst = _mm_extract_epi32(ymm_hi, 3); +} + +static INLINE void scatter_ymm_8x4_8bit(kvz_pixel *dst, __m256i ymm, unsigned dst_stride) +{ + __m256d ymm_as_m256d = _mm256_castsi256_pd(ymm); + __m128d ymm_lo = _mm256_castpd256_pd128(ymm_as_m256d); + __m128d ymm_hi = _mm256_extractf128_pd(ymm_as_m256d, 1); + _mm_storel_pd((double*)dst, ymm_lo); dst += dst_stride; + _mm_storeh_pd((double*)dst, ymm_lo); dst += dst_stride; + _mm_storel_pd((double*)dst, ymm_hi); dst += dst_stride; + _mm_storeh_pd((double*)dst, ymm_hi); +} + +static INLINE void scatter_ymm_16x2_8bit(kvz_pixel *dst, __m256i ymm, unsigned dst_stride) +{ + __m128i ymm_lo = _mm256_castsi256_si128(ymm); + __m128i ymm_hi = _mm256_extracti128_si256(ymm, 1); + _mm_storeu_si128((__m128i *)dst, ymm_lo); dst += dst_stride; + _mm_storeu_si128((__m128i *)dst, ymm_hi); +} + +static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, + kvz_pixel *px_L0, + kvz_pixel *px_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + for (int i = 0; i < pu_w * pu_h; i += 32) { + int y = i / pu_w; + int x = i % pu_w; + __m256i sample_L0 = _mm256_loadu_si256((__m256i *)&px_L0[i]); + __m256i sample_L1 = _mm256_loadu_si256((__m256i *)&px_L1[i]); + __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i*)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } +} + +static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, + kvz_pixel *px_L0, + kvz_pixel *px_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + unsigned size = pu_w * pu_h; + bool multiple_of_32 = !(size % 32); + + if (MIN(pu_w, pu_h) >= 4) { + switch (pu_w) { + case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; + default: + printf("W: %d\n", pu_w); + assert(0 && "Unexpected block width."); + break; + } + } +} + +static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, + kvz_pixel_ip *ip_L0, + kvz_pixel_ip *ip_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t scalar_offset = 1 << (shift - 1); + __m256i offset = _mm256_set1_epi32(scalar_offset); + + for (int i = 0; i < pu_w * pu_h; i += 32) { + int y = i / pu_w; + int x = i % pu_w; + + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); + __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i + 16]); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i + 16]); + + __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); + + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3,1,2,0)); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } +} + +static void bipred_average_ip_ip_avx2(kvz_pixel *dst, + kvz_pixel_ip *ip_L0, + kvz_pixel_ip *ip_L1, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + unsigned size = pu_w * pu_h; + bool multiple_of_32 = !(size % 32); + + if (MIN(pu_w, pu_h) >= 4) { + switch (pu_w) { + case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + default: + assert(0 && "Unexpected block width."); + break; + } + } +} + +static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, + kvz_pixel *px, + kvz_pixel_ip *ip, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t scalar_offset = 1 << (shift - 1); + __m256i offset = _mm256_set1_epi32(scalar_offset); + + for (int i = 0; i < pu_w * pu_h; i += 32) { + int y = i / pu_w; + int x = i % pu_w; + + __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *)&px[i])); + __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *)&px[i + 16])); + sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i *)&ip[i]); + __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i *)&ip[i + 16]); + + __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); + + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } +} + +static void bipred_average_px_ip_avx2(kvz_pixel *dst, + kvz_pixel *px, + kvz_pixel_ip *ip, + unsigned pu_w, + unsigned pu_h, + unsigned dst_stride) +{ + unsigned size = pu_w * pu_h; + bool multiple_of_32 = !(size % 32); + + if (MIN(pu_w, pu_h) >= 4) { + switch (pu_w) { + case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + default: + assert(0 && "Unexpected block width."); + break; + } + } +} + +static void bipred_average_avx2(lcu_t *const lcu, + const yuv_t *const px_L0, + const yuv_t *const px_L1, + const yuv_ip_t *const ip_L0, + const yuv_ip_t *const ip_L1, + const unsigned pu_x, + const unsigned pu_y, + const unsigned pu_w, + const unsigned pu_h, + const unsigned ip_flags_L0, + const unsigned ip_flags_L1, + const bool predict_luma, + const bool predict_chroma) { + + //After reconstruction, merge the predictors by taking an average of each pixel + if (predict_luma) { + unsigned pb_offset = SUB_SCU(pu_y) * LCU_WIDTH + SUB_SCU(pu_x); + + if (!(ip_flags_L0 & 1) && !(ip_flags_L1 & 1)) { + bipred_average_px_px_avx2(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); + + } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { + bipred_average_ip_ip_avx2(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); + + } else { + kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; + kvz_pixel_ip *src_ip = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + bipred_average_px_ip_avx2(lcu->rec.y + pb_offset, src_px, src_ip, pu_w, pu_h, LCU_WIDTH); + } + } + if (predict_chroma) { + unsigned pb_offset = SUB_SCU(pu_y) / 2 * LCU_WIDTH_C + SUB_SCU(pu_x) / 2; + unsigned pb_w = pu_w / 2; + unsigned pb_h = pu_h / 2; + + if (!(ip_flags_L0 & 2) && !(ip_flags_L1 & 2)) { + bipred_average_px_px_avx2(lcu->rec.u + pb_offset, px_L0->u, px_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_px_avx2(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); + + } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { + bipred_average_ip_ip_avx2(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_ip_ip_avx2(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + + } else { + kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel_ip *src_ip_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; + kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel_ip *src_ip_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + bipred_average_px_ip_avx2(lcu->rec.u + pb_offset, src_px_u, src_ip_u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_ip_avx2(lcu->rec.v + pb_offset, src_px_v, src_ip_v, pb_w, pb_h, LCU_WIDTH_C); + } + } +} + static optimized_sad_func_ptr_t get_optimized_sad_avx2(int32_t width) { if (width == 0) @@ -1043,7 +1350,7 @@ int kvz_strategy_register_picture_avx2(void* opaque, uint8_t bitdepth) success &= kvz_strategyselector_register(opaque, "satd_any_size_quad", "avx2", 40, &satd_any_size_quad_avx2); success &= kvz_strategyselector_register(opaque, "pixels_calc_ssd", "avx2", 40, &pixels_calc_ssd_avx2); - //success &= kvz_strategyselector_register(opaque, "bipred_average", "avx2", 40, &bipred_average_avx2); + success &= kvz_strategyselector_register(opaque, "bipred_average", "avx2", 40, &bipred_average_avx2); success &= kvz_strategyselector_register(opaque, "get_optimized_sad", "avx2", 40, &get_optimized_sad_avx2); success &= kvz_strategyselector_register(opaque, "ver_sad", "avx2", 40, &ver_sad_avx2); success &= kvz_strategyselector_register(opaque, "hor_sad", "avx2", 40, &hor_sad_avx2); From e3aadd4272139a6dc0cfe7c693ab5e1ce860e182 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Mon, 15 Nov 2021 21:48:43 +0200 Subject: [PATCH 18/30] Add missing things after rebase --- src/inter.c | 89 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/src/inter.c b/src/inter.c index 8877dd94..9ebf9e0d 100644 --- a/src/inter.c +++ b/src/inter.c @@ -101,8 +101,8 @@ static void inter_recon_frac_luma(const encoder_state_t * const state, ext_s, block_width, block_height, - lcu->rec.y + (ypos % LCU_WIDTH) * LCU_WIDTH + (xpos % LCU_WIDTH), - LCU_WIDTH, + out->y, + out_stride, mv_frac_x, mv_frac_y, mv_param); @@ -115,7 +115,8 @@ static void inter_recon_frac_luma_hi(const encoder_state_t *const state, int32_t block_width, int32_t block_height, const int16_t mv_param[2], - hi_prec_buf_t *hi_prec_out) + yuv_ip_t *out, + const unsigned out_stride) { int mv_frac_x = (mv_param[0] & 3); int mv_frac_y = (mv_param[1] & 3); @@ -156,8 +157,8 @@ static void inter_recon_frac_luma_hi(const encoder_state_t *const state, ext_s, block_width, block_height, - hi_prec_out->y + (ypos % LCU_WIDTH) * LCU_WIDTH + (xpos % LCU_WIDTH), - LCU_WIDTH, + out->y, + out_stride, mv_frac_x, mv_frac_y, mv_param); @@ -165,16 +166,21 @@ static void inter_recon_frac_luma_hi(const encoder_state_t *const state, static void inter_recon_frac_chroma(const encoder_state_t *const state, const kvz_picture *const ref, - int32_t xpos, - int32_t ypos, - int32_t block_width, - int32_t block_height, + int32_t pu_x, + int32_t pu_y, + int32_t pu_w, + int32_t pu_h, const int16_t mv_param[2], - lcu_t *lcu) + yuv_t *out, + const unsigned out_stride) { int mv_frac_x = (mv_param[0] & 7); int mv_frac_y = (mv_param[1] & 7); + // Take into account chroma subsampling + unsigned pb_w = pu_w / 2; + unsigned pb_h = pu_h / 2; + // Space for extrapolated pixels and the part from the picture. // Some extra for AVX2. // The extrapolation function will set the pointers and stride. @@ -190,10 +196,10 @@ static void inter_recon_frac_chroma(const encoder_state_t *const state, .src_w = ref->width / 2, .src_h = ref->height / 2, .src_s = ref->stride / 2, - .blk_x = (state->tile->offset_x + xpos) / 2 + (mv_param[0] >> 3), - .blk_y = (state->tile->offset_y + ypos) / 2 + (mv_param[1] >> 3), - .blk_w = block_width / 2, - .blk_h = block_height / 2, + .blk_x = (state->tile->offset_x + pu_x) / 2 + (mv_param[0] >> 3), + .blk_y = (state->tile->offset_y + pu_y) / 2 + (mv_param[1] >> 3), + .blk_w = pb_w, + .blk_h = pb_h, .pad_l = KVZ_CHROMA_FILTER_OFFSET, .pad_r = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET, .pad_t = KVZ_CHROMA_FILTER_OFFSET, @@ -212,10 +218,10 @@ static void inter_recon_frac_chroma(const encoder_state_t *const state, kvz_sample_octpel_chroma(state->encoder_control, ext_origin, ext_s, - block_width / 2, - block_height / 2, - lcu->rec.u + ((ypos / 2) % LCU_WIDTH_C) * LCU_WIDTH_C + ((xpos / 2) % LCU_WIDTH_C), - LCU_WIDTH_C, + pb_w, + pb_h, + out->u, + out_stride, mv_frac_x, mv_frac_y, mv_param); @@ -226,10 +232,10 @@ static void inter_recon_frac_chroma(const encoder_state_t *const state, kvz_sample_octpel_chroma(state->encoder_control, ext_origin, ext_s, - block_width / 2, - block_height / 2, - lcu->rec.v + ((ypos / 2) % LCU_WIDTH_C) * LCU_WIDTH_C + ((xpos / 2) % LCU_WIDTH_C), - LCU_WIDTH_C, + pb_w, + pb_h, + out->v, + out_stride, mv_frac_x, mv_frac_y, mv_param); @@ -237,16 +243,21 @@ static void inter_recon_frac_chroma(const encoder_state_t *const state, static void inter_recon_frac_chroma_hi(const encoder_state_t *const state, const kvz_picture *const ref, - int32_t xpos, - int32_t ypos, - int32_t block_width, - int32_t block_height, + int32_t pu_x, + int32_t pu_y, + int32_t pu_w, + int32_t pu_h, const int16_t mv_param[2], - hi_prec_buf_t *hi_prec_out) + yuv_ip_t *out, + const unsigned out_stride) { int mv_frac_x = (mv_param[0] & 7); int mv_frac_y = (mv_param[1] & 7); + // Take into account chroma subsampling + unsigned pb_w = pu_w / 2; + unsigned pb_h = pu_h / 2; + // Space for extrapolated pixels and the part from the picture. // Some extra for AVX2. // The extrapolation function will set the pointers and stride. @@ -262,10 +273,10 @@ static void inter_recon_frac_chroma_hi(const encoder_state_t *const state, .src_w = ref->width / 2, .src_h = ref->height / 2, .src_s = ref->stride / 2, - .blk_x = (state->tile->offset_x + xpos) / 2 + (mv_param[0] >> 3), - .blk_y = (state->tile->offset_y + ypos) / 2 + (mv_param[1] >> 3), - .blk_w = block_width / 2, - .blk_h = block_height / 2, + .blk_x = (state->tile->offset_x + pu_x) / 2 + (mv_param[0] >> 3), + .blk_y = (state->tile->offset_y + pu_y) / 2 + (mv_param[1] >> 3), + .blk_w = pb_w, + .blk_h = pb_h, .pad_l = KVZ_CHROMA_FILTER_OFFSET, .pad_r = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET, .pad_t = KVZ_CHROMA_FILTER_OFFSET, @@ -284,10 +295,10 @@ static void inter_recon_frac_chroma_hi(const encoder_state_t *const state, kvz_sample_octpel_chroma_hi(state->encoder_control, ext_origin, ext_s, - block_width / 2, - block_height / 2, - hi_prec_out->u + ((ypos / 2) % LCU_WIDTH_C) * LCU_WIDTH_C + ((xpos / 2) % LCU_WIDTH_C), - LCU_WIDTH_C, + pb_w, + pb_h, + out->u, + out_stride, mv_frac_x, mv_frac_y, mv_param); @@ -298,10 +309,10 @@ static void inter_recon_frac_chroma_hi(const encoder_state_t *const state, kvz_sample_octpel_chroma_hi(state->encoder_control, ext_origin, ext_s, - block_width / 2, - block_height / 2, - hi_prec_out->v + ((ypos / 2) % LCU_WIDTH_C) * LCU_WIDTH_C + ((xpos / 2) % LCU_WIDTH_C), - LCU_WIDTH_C, + pb_w, + pb_h, + out->v, + out_stride, mv_frac_x, mv_frac_y, mv_param); From 5389842675878330ae0d1601149f3492f34ec426 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Wed, 17 Nov 2021 21:33:13 +0200 Subject: [PATCH 19/30] Add missing SIMD bipred functions for AMP blocks with size of 12 or larger --- src/strategies/avx2/picture-avx2.c | 345 +++++++++++++++++++++-------- 1 file changed, 249 insertions(+), 96 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 84a92f2c..ce94e297 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -802,6 +802,14 @@ static INLINE void scatter_ymm_16x2_8bit(kvz_pixel *dst, __m256i ymm, unsigned d _mm_storeu_si128((__m128i *)dst, ymm_hi); } +static INLINE void scatter_ymm_12x2_8bit(kvz_pixel *dst, __m256i ymm, unsigned dst_stride) +{ + __m256i mask_a = _mm256_setr_epi32(-1, -1, -1, 0, 0, 0, 0, 0); + __m256i mask_b = _mm256_setr_epi32(0, 0, 0, -1, -1, -1, 0, 0); + _mm256_maskstore_epi32((int32_t*)dst, mask_a, ymm); dst += dst_stride - 3 * 4; + _mm256_maskstore_epi32((int32_t*)dst, mask_b, ymm); +} + static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, kvz_pixel *px_L0, kvz_pixel *px_L1, @@ -809,22 +817,48 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, unsigned pu_h, unsigned dst_stride) { - for (int i = 0; i < pu_w * pu_h; i += 32) { - int y = i / pu_w; - int x = i % pu_w; - __m256i sample_L0 = _mm256_loadu_si256((__m256i *)&px_L0[i]); - __m256i sample_L1 = _mm256_loadu_si256((__m256i *)&px_L1[i]); - __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; + if (has_pow2_width) { + for (int i = 0; i < pu_w * pu_h; i += 32) { - switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i*)&dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + int y = i / pu_w; + int x = i % pu_w; + + __m256i sample_L0 = _mm256_loadu_si256((__m256i *) & px_L0[i]); + __m256i sample_L1 = _mm256_loadu_si256((__m256i *) & px_L1[i]); + __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } + } else { + for (int i = 0; i < pu_w * pu_h; i += 24) { + + int y = i / pu_w; + int x = i % pu_w; + + // Last 64 bits of the 256 are not used to simplify the loop + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i sample_L0 = _mm256_maskload_epi64((uint64_t*)&px_L0[i], mask); + __m256i sample_L1 = _mm256_maskload_epi64((uint64_t*)&px_L1[i], mask); + __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + + switch (pu_w) { + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((uint64_t*)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } } } } @@ -839,13 +873,17 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, unsigned size = pu_w * pu_h; bool multiple_of_32 = !(size % 32); - if (MIN(pu_w, pu_h) >= 4) { + if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE switch (pu_w) { case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; + + case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; default: printf("W: %d\n", pu_w); assert(0 && "Unexpected block width."); @@ -865,50 +903,101 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, int32_t scalar_offset = 1 << (shift - 1); __m256i offset = _mm256_set1_epi32(scalar_offset); - for (int i = 0; i < pu_w * pu_h; i += 32) { - int y = i / pu_w; - int x = i % pu_w; - - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); - __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i + 16]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); - __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i + 16]); + bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; + if (has_pow2_width) { + for (int i = 0; i < pu_w * pu_h; i += 32) { + int y = i / pu_w; + int x = i % pu_w; - __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i *) & ip_L0[i]); + __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i *) & ip_L0[i + 16]); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i *) & ip_L1[i]); + __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i *) & ip_L1[i + 16]); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); - - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); - __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3,1,2,0)); + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); - switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i *)&dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } + } else { + for (int i = 0; i < pu_w * pu_h; i += 24) { + + int y = i / pu_w; + int x = i % pu_w; + + // Last 64 bits of the 256 are not used to simplify the loop + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); + __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L0[i + 16])); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + __m256i sample_L1_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L1[i + 16])); + + __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); + __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); + + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + + switch (pu_w) { + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((uint64_t *)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } } } } @@ -923,13 +1012,17 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, unsigned size = pu_w * pu_h; bool multiple_of_32 = !(size % 32); - if (MIN(pu_w, pu_h) >= 4) { + if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE switch (pu_w) { case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + + case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; @@ -948,52 +1041,108 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, int32_t scalar_offset = 1 << (shift - 1); __m256i offset = _mm256_set1_epi32(scalar_offset); - for (int i = 0; i < pu_w * pu_h; i += 32) { - int y = i / pu_w; - int x = i % pu_w; + bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; + if (has_pow2_width) { + for (int i = 0; i < pu_w * pu_h; i += 32) { - __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *)&px[i])); - __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *)&px[i + 16])); - sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); - sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i *)&ip[i]); - __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i *)&ip[i + 16]); + int y = i / pu_w; + int x = i % pu_w; - __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); - __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *) & px[i])); + __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *) & px[i + 16])); + sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i *) & ip[i]); + __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i *) & ip[i + 16]); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); + __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); - __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); - switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i *)&dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + + switch (pu_w) { + case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } + } + } else { + for (int i = 0; i < pu_w * pu_h; i += 24) { + + int y = i / pu_w; + int x = i % pu_w; + + // Last 64 bits of the 256 / 32 bits of the 128 are not used to simplify the loop + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m128i sample_px_01_8bit = _mm_loadu_si128((__m128i*)&px[i]); + __m128i sample_px_23_8bit = _mm_loadl_epi64((__m128i*)&px[i + 16]); + __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(sample_px_01_8bit); + __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(sample_px_23_8bit); + sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_ip_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip[i + 16])); + + __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); + __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); + + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); + avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); + avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + + switch (pu_w) { + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((uint64_t *)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width"); + break; + } } } } @@ -1008,13 +1157,17 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, unsigned size = pu_w * pu_h; bool multiple_of_32 = !(size % 32); - if (MIN(pu_w, pu_h) >= 4) { + if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE switch (pu_w) { case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + + case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; From 5225dcea3c1ae983bee4569802c1fbdf41a2aa5d Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Fri, 19 Nov 2021 00:59:29 +0200 Subject: [PATCH 20/30] Implement missing block sizes. Fix types and conditions. --- src/strategies/avx2/picture-avx2.c | 293 ++++++++++++++++++++++++++--- 1 file changed, 267 insertions(+), 26 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index ce94e297..d3b6ca29 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -818,14 +818,18 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, unsigned dst_stride) { bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; - if (has_pow2_width) { + bool area_mod_32 = (pu_w * pu_h) % 32; + assert(!(pu_w == 4 && pu_h == 4) && "Branch for 4x4 not yet implemented."); + assert(!(pu_w == 2 && pu_h == 8) && "Branch for 2x8 not yet implemented."); + + if (has_pow2_width && area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 32) { int y = i / pu_w; int x = i % pu_w; - __m256i sample_L0 = _mm256_loadu_si256((__m256i *) & px_L0[i]); - __m256i sample_L1 = _mm256_loadu_si256((__m256i *) & px_L1[i]); + __m256i sample_L0 = _mm256_loadu_si256((__m256i*)&px_L0[i]); + __m256i sample_L1 = _mm256_loadu_si256((__m256i*)&px_L1[i]); __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); switch (pu_w) { @@ -839,7 +843,7 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, break; } } - } else { + } else if (area_mod_32 == 0){ for (int i = 0; i < pu_w * pu_h; i += 24) { int y = i / pu_w; @@ -847,19 +851,59 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, // Last 64 bits of the 256 are not used to simplify the loop __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m256i sample_L0 = _mm256_maskload_epi64((uint64_t*)&px_L0[i], mask); - __m256i sample_L1 = _mm256_maskload_epi64((uint64_t*)&px_L1[i], mask); + __m256i sample_L0 = _mm256_maskload_epi64((const long long*)&px_L0[i], mask); + __m256i sample_L1 = _mm256_maskload_epi64((const long long*)&px_L1[i], mask); __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); switch (pu_w) { case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((uint64_t*)&dst[y * dst_stride + x], mask, avg); break; + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; default: assert(0 && "Unexpected block width"); break; } } + } else { + // 8x2, 8x6, 6x8 blocks (and maybe 2x8 in the future) + switch (pu_w) { + __m128i sample_L0, sample_L1, avg; + case 8: // 8x2, 8x6 + for (int i = 0; i < pu_w * pu_h; i += 16) { + + int y = i / pu_w; + + sample_L0 = _mm_loadu_si128((__m128i*)&px_L0[i]); + sample_L1 = _mm_loadu_si128((__m128i*)&px_L1[i]); + avg = _mm_avg_epu8(sample_L0, sample_L1); + _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); + _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); + } + break; + case 6: // 6x8 + for (int i = 0; i < pu_w * pu_h; i += 12) { + + int y = i / pu_w; + + __m128i mask = _mm_setr_epi32(-1, -1, -1, 0); + __m128i sample_L0 = _mm_maskload_epi32((const int*)(&px_L0[i]), mask); + __m128i sample_L1 = _mm_maskload_epi32((const int*)(&px_L1[i]), mask); + __m128i avg = _mm_avg_epu8(sample_L0, sample_L1); + + uint32_t elements_0123 = _mm_cvtsi128_si32(avg); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint32_t elements_89ab = _mm_extract_epi32(avg, 2); + *(uint32_t*)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t*)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t*)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t*)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + } + break; + default: + assert(0 && "Unexpected block width"); + break; + } } } @@ -870,10 +914,8 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, unsigned pu_h, unsigned dst_stride) { - unsigned size = pu_w * pu_h; - bool multiple_of_32 = !(size % 32); - - if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE + // Use scalar code for yet unoptimized block sizes (4x4, 2x8) + if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; @@ -881,14 +923,27 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; + case 6: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 6, pu_h, dst_stride); break; case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; default: - printf("W: %d\n", pu_w); assert(0 && "Unexpected block width."); break; } + } else { + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_L0 = px_L0[i] << (14 - KVZ_BIT_DEPTH); + int16_t sample_L1 = px_L1[i] << (14 - KVZ_BIT_DEPTH); + int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } } } @@ -904,7 +959,11 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, __m256i offset = _mm256_set1_epi32(scalar_offset); bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; - if (has_pow2_width) { + bool area_mod_32 = (pu_w * pu_h) % 32; + assert(!(pu_w == 4 && pu_h == 4) && "Branch for 4x4 not yet implemented."); + assert(!(pu_w == 2 && pu_h == 8) && "Branch for 2x8 not yet implemented."); + + if (has_pow2_width && area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 32) { int y = i / pu_w; int x = i % pu_w; @@ -951,7 +1010,7 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, break; } } - } else { + } else if (area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 24) { int y = i / pu_w; @@ -993,12 +1052,86 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, switch (pu_w) { case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((uint64_t *)&dst[y * dst_stride + x], mask, avg); break; + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; default: assert(0 && "Unexpected block width"); break; } } + } else { + // 8x2, 8x6, 6x8 blocks (and maybe 2x8 in the future) + switch (pu_w) { + case 8: // 8x2, 8x6 + for (int i = 0; i < pu_w * pu_h; i += 16) { + + int y = i / pu_w; + + __m256i sample_L0_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); + __m256i sample_L1_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + + __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); + __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); + + avg_lo = _mm256_add_epi32(avg_lo, offset); + avg_hi = _mm256_add_epi32(avg_hi, offset); + + avg_lo = _mm256_srai_epi32(avg_lo, shift); + avg_hi = _mm256_srai_epi32(avg_hi, shift); + + __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); + + _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); + _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); + } + break; + case 6: // 6x8 + for (int i = 0; i < pu_w * pu_h; i += 12) { + + int y = i / pu_w; + + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i sample_L0_16bit = _mm256_maskload_epi64((const long long*)(&ip_L0[i]), mask); + __m256i sample_L1_16bit = _mm256_maskload_epi64((const long long*)(&ip_L1[i]), mask); + + __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); + __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); + + avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); + avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + + avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); + avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + + __m256i avg256 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); + + uint32_t elements_0123 = _mm_cvtsi128_si32(avg); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint32_t elements_89ab = _mm_extract_epi32(avg, 2); + *(uint32_t *)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t *)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t *)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t *)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + } + break; + default: + assert(0 && "Unexpected block width"); + break; + } } } @@ -1009,10 +1142,8 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, unsigned pu_h, unsigned dst_stride) { - unsigned size = pu_w * pu_h; - bool multiple_of_32 = !(size % 32); - - if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE + // Use scalar code for yet unoptimized block sizes (4x4, 2x8) + if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; @@ -1020,13 +1151,28 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; default: + printf("%dx%d\n", pu_w, pu_h); assert(0 && "Unexpected block width."); break; } + } else { + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_L0 = ip_L0[i]; + int16_t sample_L1 = ip_L1[i]; + int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } } } @@ -1042,7 +1188,11 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m256i offset = _mm256_set1_epi32(scalar_offset); bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; - if (has_pow2_width) { + bool area_mod_32 = (pu_w * pu_h) % 32; + assert(!(pu_w == 4 && pu_h == 4) && "Branch for 4x4 not yet implemented."); + assert(!(pu_w == 2 && pu_h == 8) && "Branch for 2x8 not yet implemented."); + + if (has_pow2_width && area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 32) { int y = i / pu_w; @@ -1092,7 +1242,7 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, break; } } - } else { + } else if (area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 24) { int y = i / pu_w; @@ -1138,12 +1288,91 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, switch (pu_w) { case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((uint64_t *)&dst[y * dst_stride + x], mask, avg); break; + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; default: assert(0 && "Unexpected block width"); break; } } + } else { + // 8x2, 8x6, 6x8 blocks (and maybe 2x8 in the future) + switch (pu_w) { + case 8: // 8x2, 8x6 + for (int i = 0; i < pu_w * pu_h; i += 16) { + + int y = i / pu_w; + + __m128i sample_px_8bit = _mm_loadu_si128((__m128i*)&px[i]); + __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); + sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + + __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); + __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + + avg_lo = _mm256_add_epi32(avg_lo, offset); + avg_hi = _mm256_add_epi32(avg_hi, offset); + + avg_lo = _mm256_srai_epi32(avg_lo, shift); + avg_hi = _mm256_srai_epi32(avg_hi, shift); + + __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); + + _mm_storel_epi64((__m128i*) & dst[y * dst_stride], avg); + _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); + } + break; + case 6: // 6x8 + for (int i = 0; i < pu_w * pu_h; i += 12) { + + int y = i / pu_w; + + __m128i mask128 = _mm_setr_epi32(-1, -1, -1, 0); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m128i sample_px_8bit = _mm_maskload_epi32((const int*)(&px[i]), mask128); + __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); + sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_16bit = _mm256_maskload_epi64((const long long*)(&ip[i]), mask); + + __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); + __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); + + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + + avg_lo = _mm256_add_epi32(avg_lo, offset); + avg_hi = _mm256_add_epi32(avg_hi, offset); + + avg_lo = _mm256_srai_epi32(avg_lo, shift); + avg_hi = _mm256_srai_epi32(avg_hi, shift); + + __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); + + uint32_t elements_0123 = _mm_cvtsi128_si32(avg); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint32_t elements_89ab = _mm_extract_epi32(avg, 2); + *(uint32_t *)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t *)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t *)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t *)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + } + break; + default: + assert(0 && "Unexpected block width"); + break; + } } } @@ -1154,10 +1383,8 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, unsigned pu_h, unsigned dst_stride) { - unsigned size = pu_w * pu_h; - bool multiple_of_32 = !(size % 32); - - if (MIN(pu_w, pu_h) >= 4) { // TODO: REMOVE + // Use scalar code for yet unoptimized block sizes (4x4, 2x8) + if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; @@ -1165,6 +1392,7 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; @@ -1172,6 +1400,19 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, assert(0 && "Unexpected block width."); break; } + } else { + int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines + int32_t offset = 1 << (shift - 1); + + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; + int x = i % pu_w; + int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); + int16_t sample_ip = ip[i]; + int32_t rounded = (sample_px + sample_ip + offset) >> shift; + dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); + } } } From a236b32c521cf8e1833888c6d044c0bc7acdcb3b Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sat, 20 Nov 2021 23:14:31 +0200 Subject: [PATCH 21/30] Fix newlines --- src/strategies/avx2/picture-avx2.c | 90 +++++++++++++++--------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index d3b6ca29..2c47f02d 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -916,28 +916,28 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, { // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { - switch (pu_w) { - case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; - - case 6: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; + switch (pu_w) { + case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; + + case 6: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); - break; + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_L0 = px_L0[i] << (14 - KVZ_BIT_DEPTH); int16_t sample_L1 = px_L1[i] << (14 - KVZ_BIT_DEPTH); @@ -1144,29 +1144,29 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, { // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { - switch (pu_w) { - case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; - - case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; + switch (pu_w) { + case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + + case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; default: printf("%dx%d\n", pu_w, pu_h); assert(0 && "Unexpected block width."); - break; + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_L0 = ip_L0[i]; int16_t sample_L1 = ip_L1[i]; @@ -1385,28 +1385,28 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, { // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { - switch (pu_w) { - case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; - - case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; + switch (pu_w) { + case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + + case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); - break; + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); int16_t sample_ip = ip[i]; From 8f0e96162a4d2507ca7492c3cc9607405812c433 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sat, 20 Nov 2021 23:33:57 +0200 Subject: [PATCH 22/30] Formatting --- src/strategies/avx2/picture-avx2.c | 384 ++++++++++++++--------------- 1 file changed, 192 insertions(+), 192 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 2c47f02d..39a78595 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -814,7 +814,7 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, kvz_pixel *px_L0, kvz_pixel *px_L1, unsigned pu_w, - unsigned pu_h, + unsigned pu_h, unsigned dst_stride) { bool has_pow2_width = _mm_popcnt_u32(pu_w) == 1; @@ -830,79 +830,79 @@ static INLINE void bipred_average_px_px_template_avx2(kvz_pixel *dst, __m256i sample_L0 = _mm256_loadu_si256((__m256i*)&px_L0[i]); __m256i sample_L1 = _mm256_loadu_si256((__m256i*)&px_L1[i]); - __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 4: scatter_ymm_4x8_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i *)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } - } else if (area_mod_32 == 0){ + } else if (area_mod_32 == 0) { for (int i = 0; i < pu_w * pu_h; i += 24) { int y = i / pu_w; int x = i % pu_w; // Last 64 bits of the 256 are not used to simplify the loop - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_L0 = _mm256_maskload_epi64((const long long*)&px_L0[i], mask); __m256i sample_L1 = _mm256_maskload_epi64((const long long*)&px_L1[i], mask); - __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); + __m256i avg = _mm256_avg_epu8(sample_L0, sample_L1); switch (pu_w) { - case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } } else { // 8x2, 8x6, 6x8 blocks (and maybe 2x8 in the future) switch (pu_w) { __m128i sample_L0, sample_L1, avg; - case 8: // 8x2, 8x6 - for (int i = 0; i < pu_w * pu_h; i += 16) { + case 8: // 8x2, 8x6 + for (int i = 0; i < pu_w * pu_h; i += 16) { - int y = i / pu_w; + int y = i / pu_w; - sample_L0 = _mm_loadu_si128((__m128i*)&px_L0[i]); - sample_L1 = _mm_loadu_si128((__m128i*)&px_L1[i]); - avg = _mm_avg_epu8(sample_L0, sample_L1); - _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); - _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); - } - break; - case 6: // 6x8 - for (int i = 0; i < pu_w * pu_h; i += 12) { + sample_L0 = _mm_loadu_si128((__m128i*)&px_L0[i]); + sample_L1 = _mm_loadu_si128((__m128i*)&px_L1[i]); + avg = _mm_avg_epu8(sample_L0, sample_L1); + _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); + _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); + } + break; + case 6: // 6x8 + for (int i = 0; i < pu_w * pu_h; i += 12) { - int y = i / pu_w; + int y = i / pu_w; - __m128i mask = _mm_setr_epi32(-1, -1, -1, 0); - __m128i sample_L0 = _mm_maskload_epi32((const int*)(&px_L0[i]), mask); - __m128i sample_L1 = _mm_maskload_epi32((const int*)(&px_L1[i]), mask); - __m128i avg = _mm_avg_epu8(sample_L0, sample_L1); + __m128i mask = _mm_setr_epi32(-1, -1, -1, 0); + __m128i sample_L0 = _mm_maskload_epi32((const int*)(&px_L0[i]), mask); + __m128i sample_L1 = _mm_maskload_epi32((const int*)(&px_L1[i]), mask); + __m128i avg = _mm_avg_epu8(sample_L0, sample_L1); - uint32_t elements_0123 = _mm_cvtsi128_si32(avg); - uint16_t elements_45 = _mm_extract_epi16(avg, 2); - uint16_t elements_67 = _mm_extract_epi16(avg, 3); - uint32_t elements_89ab = _mm_extract_epi32(avg, 2); - *(uint32_t*)&dst[(y + 0) * dst_stride + 0] = elements_0123; - *(uint16_t*)&dst[(y + 0) * dst_stride + 4] = elements_45; - *(uint16_t*)&dst[(y + 1) * dst_stride + 0] = elements_67; - *(uint32_t*)&dst[(y + 1) * dst_stride + 2] = elements_89ab; - } - break; - default: - assert(0 && "Unexpected block width"); - break; + uint32_t elements_0123 = _mm_cvtsi128_si32(avg); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint32_t elements_89ab = _mm_extract_epi32(avg, 2); + *(uint32_t*)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t*)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t*)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t*)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + } + break; + default: + assert(0 && "Unexpected block width."); + break; } } } @@ -917,19 +917,19 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; - - case 6: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; - default: - assert(0 && "Unexpected block width."); - break; + case 4: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 64, pu_h, dst_stride); break; + + case 6: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_px_template_avx2(dst, px_L0, px_L1, 48, pu_h, dst_stride); break; + default: + assert(0 && "Unexpected block width."); + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines @@ -968,17 +968,17 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i *) & ip_L0[i]); - __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i *) & ip_L0[i + 16]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i *) & ip_L1[i]); - __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i *) & ip_L1[i + 16]); + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i + 16]); + __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i + 16]); __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - __m256i all_ones = _mm256_set1_epi16(1); + __m256i all_ones = _mm256_set1_epi16(1); __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); @@ -994,20 +994,20 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 4: scatter_ymm_4x8_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i*)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } } else if (area_mod_32 == 0) { @@ -1017,10 +1017,10 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, int x = i % pu_w; // Last 64 bits of the 256 are not used to simplify the loop - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); - __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L0[i + 16])); __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L0[i + 16])); __m256i sample_L1_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L1[i + 16])); __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); @@ -1028,7 +1028,7 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - __m256i all_ones = _mm256_set1_epi16(1); + __m256i all_ones = _mm256_set1_epi16(1); __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); @@ -1044,18 +1044,18 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); switch (pu_w) { - case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } } else { @@ -1071,10 +1071,10 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); - + __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); - __m256i avg_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); + __m256i avg_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); avg_lo = _mm256_add_epi32(avg_lo, offset); avg_hi = _mm256_add_epi32(avg_hi, offset); @@ -1083,9 +1083,9 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, avg_hi = _mm256_srai_epi32(avg_hi, shift); __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); - avg256 = _mm256_packus_epi16(avg256, avg256); - avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i avg = _mm256_castsi256_si128(avg256); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); @@ -1103,7 +1103,7 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); - __m256i all_ones = _mm256_set1_epi16(1); + __m256i all_ones = _mm256_set1_epi16(1); __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); @@ -1114,22 +1114,22 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); __m256i avg256 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - avg256 = _mm256_packus_epi16(avg256, avg256); - avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i avg = _mm256_castsi256_si128(avg256); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); uint32_t elements_0123 = _mm_cvtsi128_si32(avg); - uint16_t elements_45 = _mm_extract_epi16(avg, 2); - uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); uint32_t elements_89ab = _mm_extract_epi32(avg, 2); - *(uint32_t *)&dst[(y + 0) * dst_stride + 0] = elements_0123; - *(uint16_t *)&dst[(y + 0) * dst_stride + 4] = elements_45; - *(uint16_t *)&dst[(y + 1) * dst_stride + 0] = elements_67; - *(uint32_t *)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + *(uint32_t*)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t*)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t*)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t*)&dst[(y + 1) * dst_stride + 2] = elements_89ab; } break; default: - assert(0 && "Unexpected block width"); + assert(0 && "Unexpected block width."); break; } } @@ -1145,20 +1145,19 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; - case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; - default: - printf("%dx%d\n", pu_w, pu_h); - assert(0 && "Unexpected block width."); - break; + case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; + default: + assert(0 && "Unexpected block width."); + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines @@ -1198,19 +1197,19 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; - __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *) & px[i])); - __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i *) & px[i + 16])); - sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); - sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i *) & ip[i]); - __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i *) & ip[i + 16]); + __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i])); + __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i + 16])); + sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i*)&ip[i + 16]); __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); - __m256i all_ones = _mm256_set1_epi16(1); + __m256i all_ones = _mm256_set1_epi16(1); __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); @@ -1226,20 +1225,20 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); switch (pu_w) { - case 4: scatter_ymm_4x8_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 8: scatter_ymm_8x4_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 32: // Same as case 64 - case 64: _mm256_storeu_si256((__m256i *) & dst[y * dst_stride + x], avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 4: scatter_ymm_4x8_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 8: scatter_ymm_8x4_8bit( &dst[y * dst_stride + x], avg, dst_stride); break; + case 16: scatter_ymm_16x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 32: // Same as case 64 + case 64: _mm256_storeu_si256((__m256i*)&dst[y * dst_stride + x], avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } } else if (area_mod_32 == 0) { @@ -1249,13 +1248,13 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, int x = i % pu_w; // Last 64 bits of the 256 / 32 bits of the 128 are not used to simplify the loop - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m128i sample_px_01_8bit = _mm_loadu_si128((__m128i*)&px[i]); - __m128i sample_px_23_8bit = _mm_loadl_epi64((__m128i*)&px[i + 16]); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m128i sample_px_01_8bit = _mm_loadu_si128((__m128i*)&px[i]); + __m128i sample_px_23_8bit = _mm_loadl_epi64((__m128i*)&px[i + 16]); __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(sample_px_01_8bit); __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(sample_px_23_8bit); - sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); - sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); __m256i sample_ip_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip[i + 16])); @@ -1264,7 +1263,7 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); - __m256i all_ones = _mm256_set1_epi16(1); + __m256i all_ones = _mm256_set1_epi16(1); __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); @@ -1280,18 +1279,18 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); - __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); + __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); switch (pu_w) { - case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; - case 24: // Same as case 48 - case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; - default: - assert(0 && "Unexpected block width"); - break; + case 12: scatter_ymm_12x2_8bit(&dst[y * dst_stride + x], avg, dst_stride); break; + case 24: // Same as case 48 + case 48: _mm256_maskstore_epi64((long long*)&dst[y * dst_stride + x], mask, avg); break; + default: + assert(0 && "Unexpected block width."); + break; } } } else { @@ -1302,17 +1301,17 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, int y = i / pu_w; - __m128i sample_px_8bit = _mm_loadu_si128((__m128i*)&px[i]); + __m128i sample_px_8bit = _mm_loadu_si128((__m128i*)&px[i]); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); - sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); __m256i sample_ip_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); - __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); avg_lo = _mm256_add_epi32(avg_lo, offset); avg_hi = _mm256_add_epi32(avg_hi, offset); @@ -1321,11 +1320,11 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, avg_hi = _mm256_srai_epi32(avg_hi, shift); __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); - avg256 = _mm256_packus_epi16(avg256, avg256); - avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i avg = _mm256_castsi256_si128(avg256); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); - _mm_storel_epi64((__m128i*) & dst[y * dst_stride], avg); + _mm_storel_epi64((__m128i*)&dst[y * dst_stride], avg); _mm_storeh_pd((double*)&dst[(y + 1) * dst_stride], _mm_castsi128_pd(avg)); } break; @@ -1334,19 +1333,20 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, int y = i / pu_w; - __m128i mask128 = _mm_setr_epi32(-1, -1, -1, 0); - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m128i sample_px_8bit = _mm_maskload_epi32((const int*)(&px[i]), mask128); + __m128i mask128 = _mm_setr_epi32(-1, -1, -1, 0); + __m128i sample_px_8bit = _mm_maskload_epi32((const int*)(&px[i]), mask128); + + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); - sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); __m256i sample_ip_16bit = _mm256_maskload_epi64((const long long*)(&ip[i]), mask); __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); - __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); avg_lo = _mm256_add_epi32(avg_lo, offset); avg_hi = _mm256_add_epi32(avg_hi, offset); @@ -1355,22 +1355,22 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, avg_hi = _mm256_srai_epi32(avg_hi, shift); __m256i avg256 = _mm256_packus_epi32(avg_lo, avg_hi); - avg256 = _mm256_packus_epi16(avg256, avg256); - avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i avg = _mm256_castsi256_si128(avg256); + avg256 = _mm256_packus_epi16(avg256, avg256); + avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); + __m128i avg = _mm256_castsi256_si128(avg256); uint32_t elements_0123 = _mm_cvtsi128_si32(avg); - uint16_t elements_45 = _mm_extract_epi16(avg, 2); - uint16_t elements_67 = _mm_extract_epi16(avg, 3); + uint16_t elements_45 = _mm_extract_epi16(avg, 2); + uint16_t elements_67 = _mm_extract_epi16(avg, 3); uint32_t elements_89ab = _mm_extract_epi32(avg, 2); - *(uint32_t *)&dst[(y + 0) * dst_stride + 0] = elements_0123; - *(uint16_t *)&dst[(y + 0) * dst_stride + 4] = elements_45; - *(uint16_t *)&dst[(y + 1) * dst_stride + 0] = elements_67; - *(uint32_t *)&dst[(y + 1) * dst_stride + 2] = elements_89ab; + *(uint32_t*)&dst[(y + 0) * dst_stride + 0] = elements_0123; + *(uint16_t*)&dst[(y + 0) * dst_stride + 4] = elements_45; + *(uint16_t*)&dst[(y + 1) * dst_stride + 0] = elements_67; + *(uint32_t*)&dst[(y + 1) * dst_stride + 2] = elements_89ab; } break; default: - assert(0 && "Unexpected block width"); + assert(0 && "Unexpected block width."); break; } } @@ -1386,19 +1386,19 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; - case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; - default: - assert(0 && "Unexpected block width."); - break; + case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; + default: + assert(0 && "Unexpected block width."); + break; } } else { int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines @@ -1441,7 +1441,7 @@ static void bipred_average_avx2(lcu_t *const lcu, bipred_average_ip_ip_avx2(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); } else { - kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; + kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; kvz_pixel_ip *src_ip = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; bipred_average_px_ip_avx2(lcu->rec.y + pb_offset, src_px, src_ip, pu_w, pu_h, LCU_WIDTH); } @@ -1460,9 +1460,9 @@ static void bipred_average_avx2(lcu_t *const lcu, bipred_average_ip_ip_avx2(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { - kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; kvz_pixel_ip *src_ip_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; - kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; kvz_pixel_ip *src_ip_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; bipred_average_px_ip_avx2(lcu->rec.u + pb_offset, src_px_u, src_ip_u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_ip_avx2(lcu->rec.v + pb_offset, src_px_v, src_ip_v, pb_w, pb_h, LCU_WIDTH_C); From a68d73674bcc4b64296cead82fafcabd35c24e54 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 00:32:01 +0200 Subject: [PATCH 23/30] Consistent naming part 1 --- src/image.h | 8 +- src/inter.c | 24 ++-- src/kvazaar.h | 2 +- src/strategies/avx2/picture-avx2.c | 142 +++++++++++------------ src/strategies/generic/picture-generic.c | 36 +++--- src/strategies/strategies-picture.h | 4 +- 6 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/image.h b/src/image.h index a6a08b0c..742627e7 100644 --- a/src/image.h +++ b/src/image.h @@ -60,10 +60,10 @@ typedef struct { typedef struct { int size; - kvz_pixel_ip *y; - kvz_pixel_ip *u; - kvz_pixel_ip *v; -} yuv_ip_t; + kvz_pixel_im *y; + kvz_pixel_im *u; + kvz_pixel_im *v; +} yuv_im_t; kvz_picture *kvz_image_alloc_420(const int32_t width, const int32_t height); kvz_picture *kvz_image_alloc(enum kvz_chroma_format chroma_format, const int32_t width, const int32_t height); diff --git a/src/inter.c b/src/inter.c index 9ebf9e0d..6ad41fcc 100644 --- a/src/inter.c +++ b/src/inter.c @@ -115,7 +115,7 @@ static void inter_recon_frac_luma_hi(const encoder_state_t *const state, int32_t block_width, int32_t block_height, const int16_t mv_param[2], - yuv_ip_t *out, + yuv_im_t *out, const unsigned out_stride) { int mv_frac_x = (mv_param[0] & 3); @@ -248,7 +248,7 @@ static void inter_recon_frac_chroma_hi(const encoder_state_t *const state, int32_t pu_w, int32_t pu_h, const int16_t mv_param[2], - yuv_ip_t *out, + yuv_im_t *out, const unsigned out_stride) { int mv_frac_x = (mv_param[0] & 7); @@ -367,7 +367,7 @@ static void inter_cp_with_ext_border(const kvz_pixel *ref_buf, int ref_stride, * \param height PU height * \param mv_param motion vector * \param lcu_px destination lcu - * \param lcu_ip destination of high precision output, or NULL if not needed + * \param lcu_im destination of high precision output, or NULL if not needed * \param predict_luma Enable or disable luma prediction for this call. * \param predict_chroma Enable or disable chroma prediction for this call. */ @@ -380,7 +380,7 @@ static unsigned inter_recon_unipred(const encoder_state_t * const state, int32_t out_stride_luma, const int16_t mv_param[2], yuv_t *yuv_px, - yuv_ip_t *yuv_ip, + yuv_im_t *yuv_im, bool predict_luma, bool predict_chroma) { @@ -403,11 +403,11 @@ static unsigned inter_recon_unipred(const encoder_state_t * const state, if (predict_luma) { if (fractional_luma) { // With a fractional MV, do interpolation. - if (state->encoder_control->cfg.bipred && yuv_ip) { + if (state->encoder_control->cfg.bipred && yuv_im) { inter_recon_frac_luma_hi(state, ref, pu_x, pu_y, pu_w, pu_h, - mv_param, yuv_ip, out_stride_luma); + mv_param, yuv_im, out_stride_luma); } else { inter_recon_frac_luma(state, ref, @@ -444,11 +444,11 @@ static unsigned inter_recon_unipred(const encoder_state_t * const state, // Generate prediction for chroma. if (fractional_luma || fractional_chroma) { // With a fractional MV, do interpolation. - if (state->encoder_control->cfg.bipred && yuv_ip) { + if (state->encoder_control->cfg.bipred && yuv_im) { inter_recon_frac_chroma_hi(state, ref, pu_x, pu_y, pu_w, pu_h, - mv_param, yuv_ip, out_stride_c); + mv_param, yuv_im, out_stride_c); } else { inter_recon_frac_chroma(state, ref, pu_x, pu_y, @@ -516,8 +516,8 @@ void kvz_inter_recon_bipred(const encoder_state_t *const state, // Allocate maximum size arrays for interpolated and copied samples ALIGNED(64) kvz_pixel px_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; ALIGNED(64) kvz_pixel px_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; - ALIGNED(64) kvz_pixel_ip ip_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; - ALIGNED(64) kvz_pixel_ip ip_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_im ip_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_im ip_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; yuv_t px_L0; px_L0.size = pu_w * pu_h; @@ -531,13 +531,13 @@ void kvz_inter_recon_bipred(const encoder_state_t *const state, px_L1.u = &px_buf_L1[LCU_LUMA_SIZE]; px_L1.v = &px_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - yuv_ip_t ip_L0; + yuv_im_t ip_L0; ip_L0.size = pu_w * pu_h; ip_L0.y = &ip_buf_L0[0]; ip_L0.u = &ip_buf_L0[LCU_LUMA_SIZE]; ip_L0.v = &ip_buf_L0[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - yuv_ip_t ip_L1; + yuv_im_t ip_L1; ip_L1.size = pu_w * pu_h; ip_L1.y = &ip_buf_L1[0]; ip_L1.u = &ip_buf_L1[LCU_LUMA_SIZE]; diff --git a/src/kvazaar.h b/src/kvazaar.h index 9cd97188..f03ffa27 100644 --- a/src/kvazaar.h +++ b/src/kvazaar.h @@ -97,7 +97,7 @@ typedef uint8_t kvz_pixel; typedef uint16_t kvz_pixel; #endif -typedef int16_t kvz_pixel_ip; +typedef int16_t kvz_pixel_im; // For intermediate precision (interpolation/bipred). /** * \brief Opaque data structure representing one instance of the encoder. diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 39a78595..27690fe2 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -947,9 +947,9 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, } } -static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, - kvz_pixel_ip *ip_L0, - kvz_pixel_ip *ip_L1, +static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, + kvz_pixel_im *ip_L0, + kvz_pixel_im *ip_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1135,9 +1135,9 @@ static INLINE void bipred_average_ip_ip_template_avx2(kvz_pixel *dst, } } -static void bipred_average_ip_ip_avx2(kvz_pixel *dst, - kvz_pixel_ip *ip_L0, - kvz_pixel_ip *ip_L1, +static void bipred_average_im_im_avx2(kvz_pixel *dst, + kvz_pixel_im *ip_L0, + kvz_pixel_im *ip_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1145,16 +1145,16 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + case 4: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; - case 6: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_ip_ip_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; + case 6: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; @@ -1175,9 +1175,9 @@ static void bipred_average_ip_ip_avx2(kvz_pixel *dst, } } -static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, +static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_ip *ip, + kvz_pixel_im *ip, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1201,19 +1201,19 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i + 16])); sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); - __m256i sample_ip_23_16bit = _mm256_loadu_si256((__m256i*)&ip[i + 16]); + __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_im_23_16bit = _mm256_loadu_si256((__m256i*)&ip[i + 16]); - __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); - __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); + __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); + __m256i sample_px_im_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_im_23_16bit); + __m256i sample_px_im_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_im_23_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); + __m256i avg_01_lo = _mm256_madd_epi16(sample_px_im_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_px_im_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_px_im_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_px_im_23_hi, all_ones); avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); @@ -1255,19 +1255,19 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(sample_px_23_8bit); sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); - __m256i sample_ip_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip[i + 16])); + __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_im_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip[i + 16])); - __m256i sample_px_ip_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_ip_01_16bit); - __m256i sample_px_ip_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_ip_23_16bit); - __m256i sample_px_ip_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_ip_23_16bit); + __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); + __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); + __m256i sample_px_im_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_im_23_16bit); + __m256i sample_px_im_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_im_23_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_px_ip_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_px_ip_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_px_ip_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_px_ip_23_hi, all_ones); + __m256i avg_01_lo = _mm256_madd_epi16(sample_px_im_01_lo, all_ones); + __m256i avg_01_hi = _mm256_madd_epi16(sample_px_im_01_hi, all_ones); + __m256i avg_23_lo = _mm256_madd_epi16(sample_px_im_23_lo, all_ones); + __m256i avg_23_hi = _mm256_madd_epi16(sample_px_im_23_hi, all_ones); avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); @@ -1304,14 +1304,14 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m128i sample_px_8bit = _mm_loadu_si128((__m128i*)&px[i]); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_im_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); - __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); - __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); + __m256i sample_px_im_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_im_16bit); + __m256i sample_px_im_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_im_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); - __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + __m256i avg_lo = _mm256_madd_epi16(sample_px_im_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_im_hi, all_ones); avg_lo = _mm256_add_epi32(avg_lo, offset); avg_hi = _mm256_add_epi32(avg_hi, offset); @@ -1339,14 +1339,14 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_ip_16bit = _mm256_maskload_epi64((const long long*)(&ip[i]), mask); + __m256i sample_im_16bit = _mm256_maskload_epi64((const long long*)(&ip[i]), mask); - __m256i sample_px_ip_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_ip_16bit); - __m256i sample_px_ip_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_ip_16bit); + __m256i sample_px_im_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_im_16bit); + __m256i sample_px_im_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_im_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_lo = _mm256_madd_epi16(sample_px_ip_lo, all_ones); - __m256i avg_hi = _mm256_madd_epi16(sample_px_ip_hi, all_ones); + __m256i avg_lo = _mm256_madd_epi16(sample_px_im_lo, all_ones); + __m256i avg_hi = _mm256_madd_epi16(sample_px_im_hi, all_ones); avg_lo = _mm256_add_epi32(avg_lo, offset); avg_hi = _mm256_add_epi32(avg_hi, offset); @@ -1376,9 +1376,9 @@ static INLINE void bipred_average_px_ip_template_avx2(kvz_pixel *dst, } } -static void bipred_average_px_ip_avx2(kvz_pixel *dst, +static void bipred_average_px_im_avx2(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_ip *ip, + kvz_pixel_im *ip, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1386,16 +1386,16 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_px_ip_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_ip_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_ip_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_ip_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_ip_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + case 4: bipred_average_px_im_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_im_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_im_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_im_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_im_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; - case 6: bipred_average_px_ip_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_ip_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_ip_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_ip_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; + case 6: bipred_average_px_im_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_im_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_im_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_im_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; @@ -1409,8 +1409,8 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); - int16_t sample_ip = ip[i]; - int32_t rounded = (sample_px + sample_ip + offset) >> shift; + int16_t sample_im = ip[i]; + int32_t rounded = (sample_px + sample_im + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } } @@ -1419,8 +1419,8 @@ static void bipred_average_px_ip_avx2(kvz_pixel *dst, static void bipred_average_avx2(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_ip_t *const ip_L0, - const yuv_ip_t *const ip_L1, + const yuv_im_t *const ip_L0, + const yuv_im_t *const ip_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, @@ -1438,12 +1438,12 @@ static void bipred_average_avx2(lcu_t *const lcu, bipred_average_px_px_avx2(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { - bipred_average_ip_ip_avx2(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); + bipred_average_im_im_avx2(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); } else { kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; - kvz_pixel_ip *src_ip = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; - bipred_average_px_ip_avx2(lcu->rec.y + pb_offset, src_px, src_ip, pu_w, pu_h, LCU_WIDTH); + kvz_pixel_im *src_im = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + bipred_average_px_im_avx2(lcu->rec.y + pb_offset, src_px, src_im, pu_w, pu_h, LCU_WIDTH); } } if (predict_chroma) { @@ -1456,16 +1456,16 @@ static void bipred_average_avx2(lcu_t *const lcu, bipred_average_px_px_avx2(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { - bipred_average_ip_ip_avx2(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_ip_ip_avx2(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im_avx2(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im_avx2(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; - kvz_pixel_ip *src_ip_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; + kvz_pixel_im *src_im_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; - kvz_pixel_ip *src_ip_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; - bipred_average_px_ip_avx2(lcu->rec.u + pb_offset, src_px_u, src_ip_u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_px_ip_avx2(lcu->rec.v + pb_offset, src_px_v, src_ip_v, pb_w, pb_h, LCU_WIDTH_C); + kvz_pixel_im *src_im_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + bipred_average_px_im_avx2(lcu->rec.u + pb_offset, src_px_u, src_im_u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_im_avx2(lcu->rec.v + pb_offset, src_px_v, src_im_v, pb_w, pb_h, LCU_WIDTH_C); } } } diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 38132716..c0e76ce0 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -568,9 +568,9 @@ static void bipred_average_px_px(kvz_pixel *dst, } } -static void bipred_average_ip_ip(kvz_pixel *dst, - kvz_pixel_ip *ip_L0, - kvz_pixel_ip *ip_L1, +static void bipred_average_im_im(kvz_pixel *dst, + kvz_pixel_im *ip_L0, + kvz_pixel_im *ip_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -589,9 +589,9 @@ static void bipred_average_ip_ip(kvz_pixel *dst, } } -static void bipred_average_px_ip(kvz_pixel *dst, +static void bipred_average_px_im(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_ip *ip, + kvz_pixel_im *ip, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -604,8 +604,8 @@ static void bipred_average_px_ip(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); - int16_t sample_ip = ip[i]; - int32_t rounded = (sample_px + sample_ip + offset) >> shift; + int16_t sample_im = ip[i]; + int32_t rounded = (sample_px + sample_im + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } } @@ -613,8 +613,8 @@ static void bipred_average_px_ip(kvz_pixel *dst, static void bipred_average_generic(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_ip_t *const ip_L0, - const yuv_ip_t *const ip_L1, + const yuv_im_t *const ip_L0, + const yuv_im_t *const ip_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, @@ -632,12 +632,12 @@ static void bipred_average_generic(lcu_t *const lcu, bipred_average_px_px(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { - bipred_average_ip_ip(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); + bipred_average_im_im(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); } else { kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; - kvz_pixel_ip *src_ip = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; - bipred_average_px_ip(lcu->rec.y + pb_offset, src_px, src_ip, pu_w, pu_h, LCU_WIDTH); + kvz_pixel_im *src_im = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + bipred_average_px_im(lcu->rec.y + pb_offset, src_px, src_im, pu_w, pu_h, LCU_WIDTH); } } if (predict_chroma) { @@ -650,16 +650,16 @@ static void bipred_average_generic(lcu_t *const lcu, bipred_average_px_px(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { - bipred_average_ip_ip(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_ip_ip(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; - kvz_pixel_ip *src_ip_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; + kvz_pixel_im *src_im_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; - kvz_pixel_ip *src_ip_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; - bipred_average_px_ip(lcu->rec.u + pb_offset, src_px_u, src_ip_u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_px_ip(lcu->rec.v + pb_offset, src_px_v, src_ip_v, pb_w, pb_h, LCU_WIDTH_C); + kvz_pixel_im *src_im_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + bipred_average_px_im(lcu->rec.u + pb_offset, src_px_u, src_im_u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_px_im(lcu->rec.v + pb_offset, src_px_v, src_im_v, pb_w, pb_h, LCU_WIDTH_C); } } } diff --git a/src/strategies/strategies-picture.h b/src/strategies/strategies-picture.h index adb4ae2c..e4aa4334 100644 --- a/src/strategies/strategies-picture.h +++ b/src/strategies/strategies-picture.h @@ -136,8 +136,8 @@ typedef uint32_t (hor_sad_func)(const kvz_pixel *pic_data, const kvz_pixel *ref_ typedef void (inter_recon_bipred_func)(lcu_t * const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_ip_t *const ip_L0, - const yuv_ip_t *const ip_L1, + const yuv_im_t *const ip_L0, + const yuv_im_t *const ip_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, From 6c0bdb45b93acbc24b951d21257fc48d2f3bced0 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 00:45:15 +0200 Subject: [PATCH 24/30] Consistent naming part 2 --- src/inter.c | 36 +++++----- src/strategies/avx2/picture-avx2.c | 88 ++++++++++++------------ src/strategies/generic/picture-generic.c | 42 +++++------ src/strategies/strategies-picture.h | 8 +-- 4 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/inter.c b/src/inter.c index 6ad41fcc..8f15fd66 100644 --- a/src/inter.c +++ b/src/inter.c @@ -516,8 +516,8 @@ void kvz_inter_recon_bipred(const encoder_state_t *const state, // Allocate maximum size arrays for interpolated and copied samples ALIGNED(64) kvz_pixel px_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; ALIGNED(64) kvz_pixel px_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; - ALIGNED(64) kvz_pixel_im ip_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; - ALIGNED(64) kvz_pixel_im ip_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_im im_buf_L0[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; + ALIGNED(64) kvz_pixel_im im_buf_L1[LCU_LUMA_SIZE + 2 * LCU_CHROMA_SIZE]; yuv_t px_L0; px_L0.size = pu_w * pu_h; @@ -531,29 +531,29 @@ void kvz_inter_recon_bipred(const encoder_state_t *const state, px_L1.u = &px_buf_L1[LCU_LUMA_SIZE]; px_L1.v = &px_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - yuv_im_t ip_L0; - ip_L0.size = pu_w * pu_h; - ip_L0.y = &ip_buf_L0[0]; - ip_L0.u = &ip_buf_L0[LCU_LUMA_SIZE]; - ip_L0.v = &ip_buf_L0[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; + yuv_im_t im_L0; + im_L0.size = pu_w * pu_h; + im_L0.y = &im_buf_L0[0]; + im_L0.u = &im_buf_L0[LCU_LUMA_SIZE]; + im_L0.v = &im_buf_L0[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; - yuv_im_t ip_L1; - ip_L1.size = pu_w * pu_h; - ip_L1.y = &ip_buf_L1[0]; - ip_L1.u = &ip_buf_L1[LCU_LUMA_SIZE]; - ip_L1.v = &ip_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; + yuv_im_t im_L1; + im_L1.size = pu_w * pu_h; + im_L1.y = &im_buf_L1[0]; + im_L1.u = &im_buf_L1[LCU_LUMA_SIZE]; + im_L1.v = &im_buf_L1[LCU_LUMA_SIZE + LCU_CHROMA_SIZE]; // Sample blocks from both reference picture lists. // Flags state if the outputs were written to high-precision / interpolated sample buffers. - unsigned ip_flags_L0 = inter_recon_unipred(state, ref1, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[0], - &px_L0, &ip_L0, predict_luma, predict_chroma); - unsigned ip_flags_L1 = inter_recon_unipred(state, ref2, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[1], - &px_L1, &ip_L1, predict_luma, predict_chroma); + unsigned im_flags_L0 = inter_recon_unipred(state, ref1, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[0], + &px_L0, &im_L0, predict_luma, predict_chroma); + unsigned im_flags_L1 = inter_recon_unipred(state, ref2, pu_x, pu_y, pu_w, pu_h, pu_w, mv_param[1], + &px_L1, &im_L1, predict_luma, predict_chroma); // After reconstruction, merge the predictors by taking an average of each pixel - kvz_bipred_average(lcu, &px_L0, &px_L1, &ip_L0, &ip_L1, + kvz_bipred_average(lcu, &px_L0, &px_L1, &im_L0, &im_L1, pu_x, pu_y, pu_w, pu_h, - ip_flags_L0, ip_flags_L1, + im_flags_L0, im_flags_L1, predict_luma, predict_chroma); } diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index 27690fe2..b6cc2731 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -948,8 +948,8 @@ static INLINE void bipred_average_px_px_avx2(kvz_pixel *dst, } static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, - kvz_pixel_im *ip_L0, - kvz_pixel_im *ip_L1, + kvz_pixel_im *im_L0, + kvz_pixel_im *im_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -968,10 +968,10 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); - __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i + 16]); - __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i + 16]); + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); + __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i + 16]); + __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i + 16]); __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); @@ -1018,10 +1018,10 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, // Last 64 bits of the 256 are not used to simplify the loop __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); - __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L0[i + 16])); - __m256i sample_L1_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip_L1[i + 16])); + __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); + __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); + __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L0[i + 16])); + __m256i sample_L1_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L1[i + 16])); __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); @@ -1066,8 +1066,8 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; - __m256i sample_L0_16bit = _mm256_loadu_si256((__m256i*)&ip_L0[i]); - __m256i sample_L1_16bit = _mm256_loadu_si256((__m256i*)&ip_L1[i]); + __m256i sample_L0_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); + __m256i sample_L1_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); @@ -1097,8 +1097,8 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m256i sample_L0_16bit = _mm256_maskload_epi64((const long long*)(&ip_L0[i]), mask); - __m256i sample_L1_16bit = _mm256_maskload_epi64((const long long*)(&ip_L1[i]), mask); + __m256i sample_L0_16bit = _mm256_maskload_epi64((const long long*)(&im_L0[i]), mask); + __m256i sample_L1_16bit = _mm256_maskload_epi64((const long long*)(&im_L1[i]), mask); __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); @@ -1136,8 +1136,8 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, } static void bipred_average_im_im_avx2(kvz_pixel *dst, - kvz_pixel_im *ip_L0, - kvz_pixel_im *ip_L1, + kvz_pixel_im *im_L0, + kvz_pixel_im *im_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1145,16 +1145,16 @@ static void bipred_average_im_im_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 4, pu_h, dst_stride); break; - case 8: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 8, pu_h, dst_stride); break; - case 16: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 16, pu_h, dst_stride); break; - case 32: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 32, pu_h, dst_stride); break; - case 64: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 64, pu_h, dst_stride); break; + case 4: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 4, pu_h, dst_stride); break; + case 8: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 8, pu_h, dst_stride); break; + case 16: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 16, pu_h, dst_stride); break; + case 32: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 32, pu_h, dst_stride); break; + case 64: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 64, pu_h, dst_stride); break; - case 6: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 6, pu_h, dst_stride); break; - case 12: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 12, pu_h, dst_stride); break; - case 24: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 24, pu_h, dst_stride); break; - case 48: bipred_average_im_im_template_avx2(dst, ip_L0, ip_L1, 48, pu_h, dst_stride); break; + case 6: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 6, pu_h, dst_stride); break; + case 12: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 12, pu_h, dst_stride); break; + case 24: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 24, pu_h, dst_stride); break; + case 48: bipred_average_im_im_template_avx2(dst, im_L0, im_L1, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; @@ -1167,8 +1167,8 @@ static void bipred_average_im_im_avx2(kvz_pixel *dst, { int y = i / pu_w; int x = i % pu_w; - int16_t sample_L0 = ip_L0[i]; - int16_t sample_L1 = ip_L1[i]; + int16_t sample_L0 = im_L0[i]; + int16_t sample_L1 = im_L1[i]; int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } @@ -1419,14 +1419,14 @@ static void bipred_average_px_im_avx2(kvz_pixel *dst, static void bipred_average_avx2(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_im_t *const ip_L0, - const yuv_im_t *const ip_L1, + const yuv_im_t *const im_L0, + const yuv_im_t *const im_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, const unsigned pu_h, - const unsigned ip_flags_L0, - const unsigned ip_flags_L1, + const unsigned im_flags_L0, + const unsigned im_flags_L1, const bool predict_luma, const bool predict_chroma) { @@ -1434,15 +1434,15 @@ static void bipred_average_avx2(lcu_t *const lcu, if (predict_luma) { unsigned pb_offset = SUB_SCU(pu_y) * LCU_WIDTH + SUB_SCU(pu_x); - if (!(ip_flags_L0 & 1) && !(ip_flags_L1 & 1)) { + if (!(im_flags_L0 & 1) && !(im_flags_L1 & 1)) { bipred_average_px_px_avx2(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); - } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { - bipred_average_im_im_avx2(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); + } else if ((im_flags_L0 & 1) && (im_flags_L1 & 1)) { + bipred_average_im_im_avx2(lcu->rec.y + pb_offset, im_L0->y, im_L1->y, pu_w, pu_h, LCU_WIDTH); } else { - kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; - kvz_pixel_im *src_im = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + kvz_pixel *src_px = (im_flags_L0 & 1) ? px_L1->y : px_L0->y; + kvz_pixel_im *src_im = (im_flags_L0 & 1) ? im_L0->y : im_L1->y; bipred_average_px_im_avx2(lcu->rec.y + pb_offset, src_px, src_im, pu_w, pu_h, LCU_WIDTH); } } @@ -1451,19 +1451,19 @@ static void bipred_average_avx2(lcu_t *const lcu, unsigned pb_w = pu_w / 2; unsigned pb_h = pu_h / 2; - if (!(ip_flags_L0 & 2) && !(ip_flags_L1 & 2)) { + if (!(im_flags_L0 & 2) && !(im_flags_L1 & 2)) { bipred_average_px_px_avx2(lcu->rec.u + pb_offset, px_L0->u, px_L1->u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_px_avx2(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); - } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { - bipred_average_im_im_avx2(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_im_im_avx2(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + } else if ((im_flags_L0 & 2) && (im_flags_L1 & 2)) { + bipred_average_im_im_avx2(lcu->rec.u + pb_offset, im_L0->u, im_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im_avx2(lcu->rec.v + pb_offset, im_L0->v, im_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { - kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; - kvz_pixel_im *src_im_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; - kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; - kvz_pixel_im *src_im_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + kvz_pixel *src_px_u = (im_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel_im *src_im_u = (im_flags_L0 & 2) ? im_L0->u : im_L1->u; + kvz_pixel *src_px_v = (im_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel_im *src_im_v = (im_flags_L0 & 2) ? im_L0->v : im_L1->v; bipred_average_px_im_avx2(lcu->rec.u + pb_offset, src_px_u, src_im_u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_im_avx2(lcu->rec.v + pb_offset, src_px_v, src_im_v, pb_w, pb_h, LCU_WIDTH_C); } diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index c0e76ce0..359e6d8e 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -569,8 +569,8 @@ static void bipred_average_px_px(kvz_pixel *dst, } static void bipred_average_im_im(kvz_pixel *dst, - kvz_pixel_im *ip_L0, - kvz_pixel_im *ip_L1, + kvz_pixel_im *im_L0, + kvz_pixel_im *im_L1, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -582,8 +582,8 @@ static void bipred_average_im_im(kvz_pixel *dst, { int y = i / pu_w; int x = i % pu_w; - int16_t sample_L0 = ip_L0[i]; - int16_t sample_L1 = ip_L1[i]; + int16_t sample_L0 = im_L0[i]; + int16_t sample_L1 = im_L1[i]; int32_t rounded = (sample_L0 + sample_L1 + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } @@ -613,14 +613,14 @@ static void bipred_average_px_im(kvz_pixel *dst, static void bipred_average_generic(lcu_t *const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_im_t *const ip_L0, - const yuv_im_t *const ip_L1, + const yuv_im_t *const im_L0, + const yuv_im_t *const im_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, const unsigned pu_h, - const unsigned ip_flags_L0, - const unsigned ip_flags_L1, + const unsigned im_flags_L0, + const unsigned im_flags_L1, const bool predict_luma, const bool predict_chroma) { @@ -628,15 +628,15 @@ static void bipred_average_generic(lcu_t *const lcu, if (predict_luma) { unsigned pb_offset = SUB_SCU(pu_y) * LCU_WIDTH + SUB_SCU(pu_x); - if (!(ip_flags_L0 & 1) && !(ip_flags_L1 & 1)) { + if (!(im_flags_L0 & 1) && !(im_flags_L1 & 1)) { bipred_average_px_px(lcu->rec.y + pb_offset, px_L0->y, px_L1->y, pu_w, pu_h, LCU_WIDTH); - } else if ((ip_flags_L0 & 1) && (ip_flags_L1 & 1)) { - bipred_average_im_im(lcu->rec.y + pb_offset, ip_L0->y, ip_L1->y, pu_w, pu_h, LCU_WIDTH); + } else if ((im_flags_L0 & 1) && (im_flags_L1 & 1)) { + bipred_average_im_im(lcu->rec.y + pb_offset, im_L0->y, im_L1->y, pu_w, pu_h, LCU_WIDTH); } else { - kvz_pixel *src_px = (ip_flags_L0 & 1) ? px_L1->y : px_L0->y; - kvz_pixel_im *src_im = (ip_flags_L0 & 1) ? ip_L0->y : ip_L1->y; + kvz_pixel *src_px = (im_flags_L0 & 1) ? px_L1->y : px_L0->y; + kvz_pixel_im *src_im = (im_flags_L0 & 1) ? im_L0->y : im_L1->y; bipred_average_px_im(lcu->rec.y + pb_offset, src_px, src_im, pu_w, pu_h, LCU_WIDTH); } } @@ -645,19 +645,19 @@ static void bipred_average_generic(lcu_t *const lcu, unsigned pb_w = pu_w / 2; unsigned pb_h = pu_h / 2; - if (!(ip_flags_L0 & 2) && !(ip_flags_L1 & 2)) { + if (!(im_flags_L0 & 2) && !(im_flags_L1 & 2)) { bipred_average_px_px(lcu->rec.u + pb_offset, px_L0->u, px_L1->u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_px(lcu->rec.v + pb_offset, px_L0->v, px_L1->v, pb_w, pb_h, LCU_WIDTH_C); - } else if ((ip_flags_L0 & 2) && (ip_flags_L1 & 2)) { - bipred_average_im_im(lcu->rec.u + pb_offset, ip_L0->u, ip_L1->u, pb_w, pb_h, LCU_WIDTH_C); - bipred_average_im_im(lcu->rec.v + pb_offset, ip_L0->v, ip_L1->v, pb_w, pb_h, LCU_WIDTH_C); + } else if ((im_flags_L0 & 2) && (im_flags_L1 & 2)) { + bipred_average_im_im(lcu->rec.u + pb_offset, im_L0->u, im_L1->u, pb_w, pb_h, LCU_WIDTH_C); + bipred_average_im_im(lcu->rec.v + pb_offset, im_L0->v, im_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { - kvz_pixel *src_px_u = (ip_flags_L0 & 2) ? px_L1->u : px_L0->u; - kvz_pixel_im *src_im_u = (ip_flags_L0 & 2) ? ip_L0->u : ip_L1->u; - kvz_pixel *src_px_v = (ip_flags_L0 & 2) ? px_L1->v : px_L0->v; - kvz_pixel_im *src_im_v = (ip_flags_L0 & 2) ? ip_L0->v : ip_L1->v; + kvz_pixel *src_px_u = (im_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel_im *src_im_u = (im_flags_L0 & 2) ? im_L0->u : im_L1->u; + kvz_pixel *src_px_v = (im_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel_im *src_im_v = (im_flags_L0 & 2) ? im_L0->v : im_L1->v; bipred_average_px_im(lcu->rec.u + pb_offset, src_px_u, src_im_u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_im(lcu->rec.v + pb_offset, src_px_v, src_im_v, pb_w, pb_h, LCU_WIDTH_C); } diff --git a/src/strategies/strategies-picture.h b/src/strategies/strategies-picture.h index e4aa4334..50c0f9ab 100644 --- a/src/strategies/strategies-picture.h +++ b/src/strategies/strategies-picture.h @@ -136,14 +136,14 @@ typedef uint32_t (hor_sad_func)(const kvz_pixel *pic_data, const kvz_pixel *ref_ typedef void (inter_recon_bipred_func)(lcu_t * const lcu, const yuv_t *const px_L0, const yuv_t *const px_L1, - const yuv_im_t *const ip_L0, - const yuv_im_t *const ip_L1, + const yuv_im_t *const im_L0, + const yuv_im_t *const im_L1, const unsigned pu_x, const unsigned pu_y, const unsigned pu_w, const unsigned pu_h, - const unsigned ip_flags_L0, - const unsigned ip_flags_L1, + const unsigned im_flags_L0, + const unsigned im_flags_L1, const bool predict_luma, const bool predict_chroma); From 40ca21d22102b6a6f3052ab8c6d533ee76a0b60b Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 01:04:14 +0200 Subject: [PATCH 25/30] Consistent naming part 3 --- src/strategies/avx2/picture-avx2.c | 36 ++++++++++++------------ src/strategies/generic/picture-generic.c | 4 +-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index b6cc2731..b2c10095 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -1177,7 +1177,7 @@ static void bipred_average_im_im_avx2(kvz_pixel *dst, static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_im *ip, + kvz_pixel_im *im, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1201,8 +1201,8 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i + 16])); sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); - __m256i sample_im_23_16bit = _mm256_loadu_si256((__m256i*)&ip[i + 16]); + __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&im[i]); + __m256i sample_im_23_16bit = _mm256_loadu_si256((__m256i*)&im[i + 16]); __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); @@ -1255,8 +1255,8 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(sample_px_23_8bit); sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); - __m256i sample_im_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&ip[i + 16])); + __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&im[i]); + __m256i sample_im_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im[i + 16])); __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); @@ -1304,7 +1304,7 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, __m128i sample_px_8bit = _mm_loadu_si128((__m128i*)&px[i]); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_16bit = _mm256_loadu_si256((__m256i*)&ip[i]); + __m256i sample_im_16bit = _mm256_loadu_si256((__m256i*)&im[i]); __m256i sample_px_im_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_im_16bit); __m256i sample_px_im_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_im_16bit); @@ -1339,7 +1339,7 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_px_16bit = _mm256_cvtepu8_epi16(sample_px_8bit); sample_px_16bit = _mm256_slli_epi16(sample_px_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_16bit = _mm256_maskload_epi64((const long long*)(&ip[i]), mask); + __m256i sample_im_16bit = _mm256_maskload_epi64((const long long*)(&im[i]), mask); __m256i sample_px_im_lo = _mm256_unpacklo_epi16(sample_px_16bit, sample_im_16bit); __m256i sample_px_im_hi = _mm256_unpackhi_epi16(sample_px_16bit, sample_im_16bit); @@ -1378,7 +1378,7 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, static void bipred_average_px_im_avx2(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_im *ip, + kvz_pixel_im *im, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -1386,16 +1386,16 @@ static void bipred_average_px_im_avx2(kvz_pixel *dst, // Use scalar code for yet unoptimized block sizes (4x4, 2x8) if (!(pu_w == 4 && pu_h == 4) && pu_w > 2) { switch (pu_w) { - case 4: bipred_average_px_im_template_avx2(dst, px, ip, 4, pu_h, dst_stride); break; - case 8: bipred_average_px_im_template_avx2(dst, px, ip, 8, pu_h, dst_stride); break; - case 16: bipred_average_px_im_template_avx2(dst, px, ip, 16, pu_h, dst_stride); break; - case 32: bipred_average_px_im_template_avx2(dst, px, ip, 32, pu_h, dst_stride); break; - case 64: bipred_average_px_im_template_avx2(dst, px, ip, 64, pu_h, dst_stride); break; + case 4: bipred_average_px_im_template_avx2(dst, px, im, 4, pu_h, dst_stride); break; + case 8: bipred_average_px_im_template_avx2(dst, px, im, 8, pu_h, dst_stride); break; + case 16: bipred_average_px_im_template_avx2(dst, px, im, 16, pu_h, dst_stride); break; + case 32: bipred_average_px_im_template_avx2(dst, px, im, 32, pu_h, dst_stride); break; + case 64: bipred_average_px_im_template_avx2(dst, px, im, 64, pu_h, dst_stride); break; - case 6: bipred_average_px_im_template_avx2(dst, px, ip, 6, pu_h, dst_stride); break; - case 12: bipred_average_px_im_template_avx2(dst, px, ip, 12, pu_h, dst_stride); break; - case 24: bipred_average_px_im_template_avx2(dst, px, ip, 24, pu_h, dst_stride); break; - case 48: bipred_average_px_im_template_avx2(dst, px, ip, 48, pu_h, dst_stride); break; + case 6: bipred_average_px_im_template_avx2(dst, px, im, 6, pu_h, dst_stride); break; + case 12: bipred_average_px_im_template_avx2(dst, px, im, 12, pu_h, dst_stride); break; + case 24: bipred_average_px_im_template_avx2(dst, px, im, 24, pu_h, dst_stride); break; + case 48: bipred_average_px_im_template_avx2(dst, px, im, 48, pu_h, dst_stride); break; default: assert(0 && "Unexpected block width."); break; @@ -1409,7 +1409,7 @@ static void bipred_average_px_im_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); - int16_t sample_im = ip[i]; + int16_t sample_im = im[i]; int32_t rounded = (sample_px + sample_im + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 359e6d8e..98a08d94 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -591,7 +591,7 @@ static void bipred_average_im_im(kvz_pixel *dst, static void bipred_average_px_im(kvz_pixel *dst, kvz_pixel *px, - kvz_pixel_im *ip, + kvz_pixel_im *im, unsigned pu_w, unsigned pu_h, unsigned dst_stride) @@ -604,7 +604,7 @@ static void bipred_average_px_im(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); - int16_t sample_im = ip[i]; + int16_t sample_im = im[i]; int32_t rounded = (sample_px + sample_im + offset) >> shift; dst[y * dst_stride + x] = kvz_fast_clip_32bit_to_pixel(rounded); } From fd20462202945b5ac77766a64ed5327d0431f596 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 02:01:57 +0200 Subject: [PATCH 26/30] Fix more newlines... --- src/strategies/generic/picture-generic.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/strategies/generic/picture-generic.c b/src/strategies/generic/picture-generic.c index 98a08d94..2428485f 100644 --- a/src/strategies/generic/picture-generic.c +++ b/src/strategies/generic/picture-generic.c @@ -557,9 +557,9 @@ static void bipred_average_px_px(kvz_pixel *dst, int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_L0 = px_L0[i] << (14 - KVZ_BIT_DEPTH); int16_t sample_L1 = px_L1[i] << (14 - KVZ_BIT_DEPTH); @@ -578,9 +578,9 @@ static void bipred_average_im_im(kvz_pixel *dst, int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_L0 = im_L0[i]; int16_t sample_L1 = im_L1[i]; @@ -599,9 +599,9 @@ static void bipred_average_px_im(kvz_pixel *dst, int32_t shift = 15 - KVZ_BIT_DEPTH; // TODO: defines int32_t offset = 1 << (shift - 1); - for (int i = 0; i < pu_w * pu_h; ++i) - { - int y = i / pu_w; + for (int i = 0; i < pu_w * pu_h; ++i) + { + int y = i / pu_w; int x = i % pu_w; int16_t sample_px = px[i] << (14 - KVZ_BIT_DEPTH); int16_t sample_im = im[i]; From 86b37a8e0282d8b49f7e4a8ad07f5882e2537db5 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 02:06:49 +0200 Subject: [PATCH 27/30] Minor formatting --- src/strategies/avx2/picture-avx2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index b2c10095..fbda7783 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -1460,9 +1460,9 @@ static void bipred_average_avx2(lcu_t *const lcu, bipred_average_im_im_avx2(lcu->rec.v + pb_offset, im_L0->v, im_L1->v, pb_w, pb_h, LCU_WIDTH_C); } else { - kvz_pixel *src_px_u = (im_flags_L0 & 2) ? px_L1->u : px_L0->u; + kvz_pixel *src_px_u = (im_flags_L0 & 2) ? px_L1->u : px_L0->u; kvz_pixel_im *src_im_u = (im_flags_L0 & 2) ? im_L0->u : im_L1->u; - kvz_pixel *src_px_v = (im_flags_L0 & 2) ? px_L1->v : px_L0->v; + kvz_pixel *src_px_v = (im_flags_L0 & 2) ? px_L1->v : px_L0->v; kvz_pixel_im *src_im_v = (im_flags_L0 & 2) ? im_L0->v : im_L1->v; bipred_average_px_im_avx2(lcu->rec.u + pb_offset, src_px_u, src_im_u, pb_w, pb_h, LCU_WIDTH_C); bipred_average_px_im_avx2(lcu->rec.v + pb_offset, src_px_v, src_im_v, pb_w, pb_h, LCU_WIDTH_C); From eb0f42aa965f120fb0db6e9e1ed55703de79218a Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 02:11:50 +0200 Subject: [PATCH 28/30] Update comment --- src/inter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inter.c b/src/inter.c index 8f15fd66..02ea1a95 100644 --- a/src/inter.c +++ b/src/inter.c @@ -366,8 +366,8 @@ static void inter_cp_with_ext_border(const kvz_pixel *ref_buf, int ref_stride, * \param width PU width * \param height PU height * \param mv_param motion vector - * \param lcu_px destination lcu - * \param lcu_im destination of high precision output, or NULL if not needed + * \param yuv_px destination buffer for pixel precision + * \param yuv_im destination buffer for high-precision, or NULL if not needed * \param predict_luma Enable or disable luma prediction for this call. * \param predict_chroma Enable or disable chroma prediction for this call. */ From 2bdfb3b536e3284aa9c42a88067780cd54b20e9a Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Sun, 21 Nov 2021 02:15:31 +0200 Subject: [PATCH 29/30] Rename variables to be less misleading --- src/strategies/avx2/picture-avx2.c | 216 ++++++++++++++--------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/src/strategies/avx2/picture-avx2.c b/src/strategies/avx2/picture-avx2.c index fbda7783..116982f3 100644 --- a/src/strategies/avx2/picture-avx2.c +++ b/src/strategies/avx2/picture-avx2.c @@ -968,34 +968,34 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); - __m256i sample_L0_23_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i + 16]); - __m256i sample_L1_23_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i + 16]); + __m256i sample_L0_a_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); + __m256i sample_L1_a_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); + __m256i sample_L0_b_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i + 16]); + __m256i sample_L1_b_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i + 16]); - __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_L1_a_lo = _mm256_unpacklo_epi16(sample_L0_a_16bit, sample_L1_a_16bit); + __m256i sample_L0_L1_a_hi = _mm256_unpackhi_epi16(sample_L0_a_16bit, sample_L1_a_16bit); + __m256i sample_L0_L1_b_lo = _mm256_unpacklo_epi16(sample_L0_b_16bit, sample_L1_b_16bit); + __m256i sample_L0_L1_b_hi = _mm256_unpackhi_epi16(sample_L0_b_16bit, sample_L1_b_16bit); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_a_lo = _mm256_madd_epi16(sample_L0_L1_a_lo, all_ones); + __m256i avg_a_hi = _mm256_madd_epi16(sample_L0_L1_a_hi, all_ones); + __m256i avg_b_lo = _mm256_madd_epi16(sample_L0_L1_b_lo, all_ones); + __m256i avg_b_hi = _mm256_madd_epi16(sample_L0_L1_b_hi, all_ones); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + avg_a_lo = _mm256_add_epi32(avg_a_lo, offset); + avg_a_hi = _mm256_add_epi32(avg_a_hi, offset); + avg_b_lo = _mm256_add_epi32(avg_b_lo, offset); + avg_b_hi = _mm256_add_epi32(avg_b_hi, offset); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + avg_a_lo = _mm256_srai_epi32(avg_a_lo, shift); + avg_a_hi = _mm256_srai_epi32(avg_a_hi, shift); + avg_b_lo = _mm256_srai_epi32(avg_b_lo, shift); + avg_b_hi = _mm256_srai_epi32(avg_b_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_a_lo, avg_a_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_b_lo, avg_b_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); @@ -1017,35 +1017,35 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int x = i % pu_w; // Last 64 bits of the 256 are not used to simplify the loop - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m256i sample_L0_01_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); - __m256i sample_L1_01_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); - __m256i sample_L0_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L0[i + 16])); - __m256i sample_L1_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L1[i + 16])); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i sample_L0_a_16bit = _mm256_loadu_si256((__m256i*)&im_L0[i]); + __m256i sample_L1_a_16bit = _mm256_loadu_si256((__m256i*)&im_L1[i]); + __m256i sample_L0_b_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L0[i + 16])); + __m256i sample_L1_b_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im_L1[i + 16])); - __m256i sample_L0_L1_01_lo = _mm256_unpacklo_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_01_hi = _mm256_unpackhi_epi16(sample_L0_01_16bit, sample_L1_01_16bit); - __m256i sample_L0_L1_23_lo = _mm256_unpacklo_epi16(sample_L0_23_16bit, sample_L1_23_16bit); - __m256i sample_L0_L1_23_hi = _mm256_unpackhi_epi16(sample_L0_23_16bit, sample_L1_23_16bit); + __m256i sample_L0_L1_a_lo = _mm256_unpacklo_epi16(sample_L0_a_16bit, sample_L1_a_16bit); + __m256i sample_L0_L1_a_hi = _mm256_unpackhi_epi16(sample_L0_a_16bit, sample_L1_a_16bit); + __m256i sample_L0_L1_b_lo = _mm256_unpacklo_epi16(sample_L0_b_16bit, sample_L1_b_16bit); + __m256i sample_L0_L1_b_hi = _mm256_unpackhi_epi16(sample_L0_b_16bit, sample_L1_b_16bit); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_L0_L1_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_L0_L1_23_hi, all_ones); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_a_lo = _mm256_madd_epi16(sample_L0_L1_a_lo, all_ones); + __m256i avg_a_hi = _mm256_madd_epi16(sample_L0_L1_a_hi, all_ones); + __m256i avg_b_lo = _mm256_madd_epi16(sample_L0_L1_b_lo, all_ones); + __m256i avg_b_hi = _mm256_madd_epi16(sample_L0_L1_b_hi, all_ones); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + avg_a_lo = _mm256_add_epi32(avg_a_lo, offset); + avg_a_hi = _mm256_add_epi32(avg_a_hi, offset); + avg_b_lo = _mm256_add_epi32(avg_b_lo, offset); + avg_b_hi = _mm256_add_epi32(avg_b_hi, offset); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + avg_a_lo = _mm256_srai_epi32(avg_a_lo, shift); + avg_a_hi = _mm256_srai_epi32(avg_a_hi, shift); + avg_b_lo = _mm256_srai_epi32(avg_b_lo, shift); + avg_b_hi = _mm256_srai_epi32(avg_b_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_a_lo, avg_a_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_b_lo, avg_b_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); @@ -1096,24 +1096,24 @@ static INLINE void bipred_average_im_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); __m256i sample_L0_16bit = _mm256_maskload_epi64((const long long*)(&im_L0[i]), mask); __m256i sample_L1_16bit = _mm256_maskload_epi64((const long long*)(&im_L1[i]), mask); __m256i sample_L0_L1_lo = _mm256_unpacklo_epi16(sample_L0_16bit, sample_L1_16bit); __m256i sample_L0_L1_hi = _mm256_unpackhi_epi16(sample_L0_16bit, sample_L1_16bit); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_a_lo = _mm256_madd_epi16(sample_L0_L1_lo, all_ones); + __m256i avg_a_hi = _mm256_madd_epi16(sample_L0_L1_hi, all_ones); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); + avg_a_lo = _mm256_add_epi32(avg_a_lo, offset); + avg_a_hi = _mm256_add_epi32(avg_a_hi, offset); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); + avg_a_lo = _mm256_srai_epi32(avg_a_lo, shift); + avg_a_hi = _mm256_srai_epi32(avg_a_hi, shift); - __m256i avg256 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); + __m256i avg256 = _mm256_packus_epi32(avg_a_lo, avg_a_hi); avg256 = _mm256_packus_epi16(avg256, avg256); avg256 = _mm256_permute4x64_epi64(avg256, _MM_SHUFFLE(3, 1, 2, 0)); __m128i avg = _mm256_castsi256_si128(avg256); @@ -1197,36 +1197,36 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, int y = i / pu_w; int x = i % pu_w; - __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i])); - __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i + 16])); - sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); - sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&im[i]); - __m256i sample_im_23_16bit = _mm256_loadu_si256((__m256i*)&im[i + 16]); + __m256i sample_px_a_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i])); + __m256i sample_px_b_16bit = _mm256_cvtepu8_epi16(_mm_loadu_si128((__m128i*)&px[i + 16])); + sample_px_a_16bit = _mm256_slli_epi16(sample_px_a_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_b_16bit = _mm256_slli_epi16(sample_px_b_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_im_a_16bit = _mm256_loadu_si256((__m256i*)&im[i]); + __m256i sample_im_b_16bit = _mm256_loadu_si256((__m256i*)&im[i + 16]); - __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); - __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); - __m256i sample_px_im_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_im_23_16bit); - __m256i sample_px_im_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_im_23_16bit); + __m256i sample_px_im_a_lo = _mm256_unpacklo_epi16(sample_px_a_16bit, sample_im_a_16bit); + __m256i sample_px_im_a_hi = _mm256_unpackhi_epi16(sample_px_a_16bit, sample_im_a_16bit); + __m256i sample_px_im_b_lo = _mm256_unpacklo_epi16(sample_px_b_16bit, sample_im_b_16bit); + __m256i sample_px_im_b_hi = _mm256_unpackhi_epi16(sample_px_b_16bit, sample_im_b_16bit); __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_px_im_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_px_im_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_px_im_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_px_im_23_hi, all_ones); + __m256i avg_a_lo = _mm256_madd_epi16(sample_px_im_a_lo, all_ones); + __m256i avg_a_hi = _mm256_madd_epi16(sample_px_im_a_hi, all_ones); + __m256i avg_b_lo = _mm256_madd_epi16(sample_px_im_b_lo, all_ones); + __m256i avg_b_hi = _mm256_madd_epi16(sample_px_im_b_hi, all_ones); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + avg_a_lo = _mm256_add_epi32(avg_a_lo, offset); + avg_a_hi = _mm256_add_epi32(avg_a_hi, offset); + avg_b_lo = _mm256_add_epi32(avg_b_lo, offset); + avg_b_hi = _mm256_add_epi32(avg_b_hi, offset); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + avg_a_lo = _mm256_srai_epi32(avg_a_lo, shift); + avg_a_hi = _mm256_srai_epi32(avg_a_hi, shift); + avg_b_lo = _mm256_srai_epi32(avg_b_lo, shift); + avg_b_hi = _mm256_srai_epi32(avg_b_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_a_lo, avg_a_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_b_lo, avg_b_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); @@ -1248,39 +1248,39 @@ static INLINE void bipred_average_px_im_template_avx2(kvz_pixel *dst, int x = i % pu_w; // Last 64 bits of the 256 / 32 bits of the 128 are not used to simplify the loop - __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); - __m128i sample_px_01_8bit = _mm_loadu_si128((__m128i*)&px[i]); - __m128i sample_px_23_8bit = _mm_loadl_epi64((__m128i*)&px[i + 16]); - __m256i sample_px_01_16bit = _mm256_cvtepu8_epi16(sample_px_01_8bit); - __m256i sample_px_23_16bit = _mm256_cvtepu8_epi16(sample_px_23_8bit); - sample_px_01_16bit = _mm256_slli_epi16(sample_px_01_16bit, 14 - KVZ_BIT_DEPTH); - sample_px_23_16bit = _mm256_slli_epi16(sample_px_23_16bit, 14 - KVZ_BIT_DEPTH); - __m256i sample_im_01_16bit = _mm256_loadu_si256((__m256i*)&im[i]); - __m256i sample_im_23_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im[i + 16])); + __m256i mask = _mm256_setr_epi64x(-1, -1, -1, 0); + __m128i sample_px_a_8bit = _mm_loadu_si128((__m128i*)&px[i]); + __m128i sample_px_b_8bit = _mm_loadl_epi64((__m128i*)&px[i + 16]); + __m256i sample_px_a_16bit = _mm256_cvtepu8_epi16(sample_px_a_8bit); + __m256i sample_px_b_16bit = _mm256_cvtepu8_epi16(sample_px_b_8bit); + sample_px_a_16bit = _mm256_slli_epi16(sample_px_a_16bit, 14 - KVZ_BIT_DEPTH); + sample_px_b_16bit = _mm256_slli_epi16(sample_px_b_16bit, 14 - KVZ_BIT_DEPTH); + __m256i sample_im_a_16bit = _mm256_loadu_si256((__m256i*)&im[i]); + __m256i sample_im_b_16bit = _mm256_castsi128_si256(_mm_loadu_si128((__m128i*)&im[i + 16])); - __m256i sample_px_im_01_lo = _mm256_unpacklo_epi16(sample_px_01_16bit, sample_im_01_16bit); - __m256i sample_px_im_01_hi = _mm256_unpackhi_epi16(sample_px_01_16bit, sample_im_01_16bit); - __m256i sample_px_im_23_lo = _mm256_unpacklo_epi16(sample_px_23_16bit, sample_im_23_16bit); - __m256i sample_px_im_23_hi = _mm256_unpackhi_epi16(sample_px_23_16bit, sample_im_23_16bit); + __m256i sample_px_im_a_lo = _mm256_unpacklo_epi16(sample_px_a_16bit, sample_im_a_16bit); + __m256i sample_px_im_a_hi = _mm256_unpackhi_epi16(sample_px_a_16bit, sample_im_a_16bit); + __m256i sample_px_im_b_lo = _mm256_unpacklo_epi16(sample_px_b_16bit, sample_im_b_16bit); + __m256i sample_px_im_b_hi = _mm256_unpackhi_epi16(sample_px_b_16bit, sample_im_b_16bit); - __m256i all_ones = _mm256_set1_epi16(1); - __m256i avg_01_lo = _mm256_madd_epi16(sample_px_im_01_lo, all_ones); - __m256i avg_01_hi = _mm256_madd_epi16(sample_px_im_01_hi, all_ones); - __m256i avg_23_lo = _mm256_madd_epi16(sample_px_im_23_lo, all_ones); - __m256i avg_23_hi = _mm256_madd_epi16(sample_px_im_23_hi, all_ones); + __m256i all_ones = _mm256_set1_epi16(1); + __m256i avg_a_lo = _mm256_madd_epi16(sample_px_im_a_lo, all_ones); + __m256i avg_a_hi = _mm256_madd_epi16(sample_px_im_a_hi, all_ones); + __m256i avg_b_lo = _mm256_madd_epi16(sample_px_im_b_lo, all_ones); + __m256i avg_b_hi = _mm256_madd_epi16(sample_px_im_b_hi, all_ones); - avg_01_lo = _mm256_add_epi32(avg_01_lo, offset); - avg_01_hi = _mm256_add_epi32(avg_01_hi, offset); - avg_23_lo = _mm256_add_epi32(avg_23_lo, offset); - avg_23_hi = _mm256_add_epi32(avg_23_hi, offset); + avg_a_lo = _mm256_add_epi32(avg_a_lo, offset); + avg_a_hi = _mm256_add_epi32(avg_a_hi, offset); + avg_b_lo = _mm256_add_epi32(avg_b_lo, offset); + avg_b_hi = _mm256_add_epi32(avg_b_hi, offset); - avg_01_lo = _mm256_srai_epi32(avg_01_lo, shift); - avg_01_hi = _mm256_srai_epi32(avg_01_hi, shift); - avg_23_lo = _mm256_srai_epi32(avg_23_lo, shift); - avg_23_hi = _mm256_srai_epi32(avg_23_hi, shift); + avg_a_lo = _mm256_srai_epi32(avg_a_lo, shift); + avg_a_hi = _mm256_srai_epi32(avg_a_hi, shift); + avg_b_lo = _mm256_srai_epi32(avg_b_lo, shift); + avg_b_hi = _mm256_srai_epi32(avg_b_hi, shift); - __m256i avg_01 = _mm256_packus_epi32(avg_01_lo, avg_01_hi); - __m256i avg_23 = _mm256_packus_epi32(avg_23_lo, avg_23_hi); + __m256i avg_01 = _mm256_packus_epi32(avg_a_lo, avg_a_hi); + __m256i avg_23 = _mm256_packus_epi32(avg_b_lo, avg_b_hi); __m256i avg0213 = _mm256_packus_epi16(avg_01, avg_23); __m256i avg = _mm256_permute4x64_epi64(avg0213, _MM_SHUFFLE(3, 1, 2, 0)); From 9e40f435cb3107a5be81827af26c92ad31e1c4dc Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Mon, 22 Nov 2021 17:44:00 +0200 Subject: [PATCH 30/30] Fix array sizes to prevent ASAN errors (large block interpolation). --- src/strategies/strategies-ipol.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/strategies/strategies-ipol.h b/src/strategies/strategies-ipol.h index 7e02e73a..3dd17c5b 100644 --- a/src/strategies/strategies-ipol.h +++ b/src/strategies/strategies-ipol.h @@ -43,15 +43,15 @@ #include "kvazaar.h" #include "search_inter.h" -// AVX2 implementation of horizontal filter reads and -// writes two rows for luma and four for chroma at a time. -// Extra vertical padding is added to prevent segfaults. -// Horizontal padding is not needed even if one extra byte -// is read because kvz_image_alloc adds enough padding. -#define KVZ_IPOL_MAX_INPUT_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * KVZ_EXT_BLOCK_W_LUMA) -#define KVZ_IPOL_MAX_INPUT_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * KVZ_EXT_BLOCK_W_CHROMA) -#define KVZ_IPOL_MAX_IM_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * LCU_WIDTH) -#define KVZ_IPOL_MAX_IM_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * LCU_WIDTH_C) + // AVX2 implementation of horizontal filter reads and + // writes two rows for luma and four for chroma at a time. + // Extra vertical padding is added to prevent segfaults. + // Needs one extra byte for input buffer to prevent ASAN + // error because AVX2 reads one extra byte in the end. +#define KVZ_IPOL_MAX_INPUT_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * KVZ_EXT_BLOCK_W_LUMA + 1) +#define KVZ_IPOL_MAX_INPUT_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * KVZ_EXT_BLOCK_W_CHROMA + 1) +#define KVZ_IPOL_MAX_IM_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * LCU_WIDTH) +#define KVZ_IPOL_MAX_IM_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * LCU_WIDTH_C) // On top of basic interpolation, FME needs one extra // column and row for ME (left and up). Adding the