From cfb465566c58ab7995ced6ea20fea3bdbe59f618c9cbe77f958ca64fae085c22 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 2 Jun 2021 07:18:57 +0000 Subject: [PATCH 1/4] Fix service for cargo vendor creation OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/rav1e?expand=0&rev=29 --- README.suse-maint | 25 +++++++++++++++++++++++++ _service | 2 +- cargo_config | 5 +++++ vendor.tar.xz | 4 ++-- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 README.suse-maint create mode 100644 cargo_config diff --git a/README.suse-maint b/README.suse-maint new file mode 100644 index 0000000..80abe77 --- /dev/null +++ b/README.suse-maint @@ -0,0 +1,25 @@ +# How to update the rav1e package + +## Prerequisites: +You need the download_files and cargo_vendor obs services installed: + zypper in obs-service-download_files obs-service-cargo_vendor + +## Updating to a new version from upstream + +Edit the spec file and update the version variable. + +Download the new source file by running: + osc service ra download_files + +Uncompress the rav1e-%{version}.tar.gz file: + tar xf rav1e-*.tar.gz + +This will create a rav1e-%{version} directory + +Edit the _service file and set the srcdir param +to the extracted directory. + +Run the cargo_vendor service with: + osc service disabledrun + +Update the changelog file with the upstream release notes. diff --git a/_service b/_service index 7a6861f..c444f09 100644 --- a/_service +++ b/_service @@ -1,5 +1,5 @@ - rav1e + rav1e-0.4.1 diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..6fb4ff4 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" \ No newline at end of file diff --git a/vendor.tar.xz b/vendor.tar.xz index 883577d..2f0b7e6 100644 --- a/vendor.tar.xz +++ b/vendor.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5ffd22b5b37f8e89ae1c1a6d295de86265f671fd7955b8994b0a1bf30f05665 -size 15054112 +oid sha256:cc962cdae054eea09f102ecae6d34e8a14e4daac5dc76a0923bc1024c2fce1ff +size 15053860 From 283919181dfe4980c2fd721888c82f8d6ff45ffaae0b402f5317fd15bffe6351 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 2 Jun 2021 07:19:55 +0000 Subject: [PATCH 2/4] Fix service for cargo vendor creation OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/rav1e?expand=0&rev=30 --- rav1e.changes | 5 +++++ rav1e.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/rav1e.changes b/rav1e.changes index 6d7e920..989d191 100644 --- a/rav1e.changes +++ b/rav1e.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 2 07:19:00 UTC 2021 - Andreas Schneider + +- Fix service for cargo vendor creation + ------------------------------------------------------------------- Wed Apr 7 21:40:52 UTC 2021 - Dirk Müller diff --git a/rav1e.spec b/rav1e.spec index 1cc4b54..54396c4 100644 --- a/rav1e.spec +++ b/rav1e.spec @@ -28,6 +28,7 @@ URL: https://github.com/xiph/rav1e # Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz Source1: vendor.tar.xz +Source98: README.suse-maint Source99: baselibs.conf # BuildRequires: cargo-c From eaf8ddf9dc656d91639c932f85fcd6bf920700db341f42b1c5beb71206df30f9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 9 Jul 2021 06:13:59 +0000 Subject: [PATCH 3/4] Fixed squared artefacts on image when converting to AVIF OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/rav1e?expand=0&rev=31 --- ...646d70fba8e265d436103a73520eb7adec8c.patch | 42 +++++++++++++++++++ rav1e.changes | 6 +++ rav1e.spec | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 f553646d70fba8e265d436103a73520eb7adec8c.patch diff --git a/f553646d70fba8e265d436103a73520eb7adec8c.patch b/f553646d70fba8e265d436103a73520eb7adec8c.patch new file mode 100644 index 0000000..06c5479 --- /dev/null +++ b/f553646d70fba8e265d436103a73520eb7adec8c.patch @@ -0,0 +1,42 @@ +From f553646d70fba8e265d436103a73520eb7adec8c Mon Sep 17 00:00:00 2001 +From: David Michael Barr +Date: Thu, 8 Jul 2021 13:39:59 +0900 +Subject: [PATCH] Initialise residual when less than the transform width is + visible + +The input stride for forward transforms did not match the output +stride of residual computation in this case. Extend the residual +stride to the transform width and zero the non-visible portion. +Fixes #2662. Fixes #2757. +--- + src/encoder.rs | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/encoder.rs b/src/encoder.rs +index 564d78d7e..1ccf8c831 100644 +--- a/src/encoder.rs ++++ b/src/encoder.rs +@@ -1209,12 +1209,20 @@ pub fn encode_tx_block( + residual, + &ts.input_tile.planes[p].subregion(area), + &rec.subregion(area), +- visible_tx_w, ++ tx_size.width(), + visible_tx_h, + ); ++ if visible_tx_w < tx_size.width() { ++ for row in residual.chunks_mut(tx_size.width()).take(visible_tx_h) { ++ for a in &mut row[visible_tx_w..] { ++ *a = 0; ++ } ++ } ++ } + } +- let visible_area = visible_tx_w * visible_tx_h; +- for a in residual[visible_area..].iter_mut() { ++ let initialized_area = ++ if visible_tx_w == 0 { 0 } else { tx_size.width() * visible_tx_h }; ++ for a in residual[initialized_area..].iter_mut() { + *a = 0; + } + diff --git a/rav1e.changes b/rav1e.changes index 989d191..0d4c481 100644 --- a/rav1e.changes +++ b/rav1e.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 9 06:11:11 UTC 2021 - Andreas Schneider + +- Fixed squared artefacts on image when converting to AVIF + * Added f553646d70fba8e265d436103a73520eb7adec8c.patch + ------------------------------------------------------------------- Wed Jun 2 07:19:00 UTC 2021 - Andreas Schneider diff --git a/rav1e.spec b/rav1e.spec index 54396c4..6a56378 100644 --- a/rav1e.spec +++ b/rav1e.spec @@ -31,6 +31,9 @@ Source1: vendor.tar.xz Source98: README.suse-maint Source99: baselibs.conf # +# Fix squared artefacts on image when converting to AVIF +Patch0: https://github.com/xiph/rav1e/commit/f553646d70fba8e265d436103a73520eb7adec8c.patch +# BuildRequires: cargo-c BuildRequires: nasm BuildRequires: rust-packaging From 1736ace1f2df150d8f434cace172ff01cde585a8463501c733a042df9d9b290e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 9 Jul 2021 12:13:57 +0000 Subject: [PATCH 4/4] Fix cargo stuff OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/rav1e?expand=0&rev=32 --- rav1e.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rav1e.spec b/rav1e.spec index 6a56378..d9dc71c 100644 --- a/rav1e.spec +++ b/rav1e.spec @@ -28,12 +28,14 @@ URL: https://github.com/xiph/rav1e # Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz Source1: vendor.tar.xz +Source2: cargo_config Source98: README.suse-maint Source99: baselibs.conf # # Fix squared artefacts on image when converting to AVIF Patch0: https://github.com/xiph/rav1e/commit/f553646d70fba8e265d436103a73520eb7adec8c.patch # +BuildRequires: cargo BuildRequires: cargo-c BuildRequires: nasm BuildRequires: rust-packaging @@ -93,8 +95,6 @@ directory = './vendor' rustc = "%{__rustc}" rustdoc = "%{__rustdoc}" rustflags = %{__global_rustflags_toml} -[install] -root = '%{buildroot}%{_prefix}' [term] verbose = true EOF @@ -105,21 +105,22 @@ sed -i 's/"rav1e_js", //' Cargo.toml %build export RUSTFLAGS=%{rustflags} -%{cargo_build} -CFLAGS="%{optflags}" %{__cargo} cbuild +cargo build --offline --release +CFLAGS="%{optflags}" cargo cbuild %install export RUSTFLAGS=%{rustflags} -%{cargo_install} +cargo install --offline --root=%{buildroot}%{_prefix} --path . rm -rf %{buildroot}%{_datadir}/cargo -%{__cargo} cinstall \ +cargo cinstall \ --destdir=%{buildroot} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --includedir=%{_includedir} \ --pkgconfigdir=%{_libdir}/pkgconfig rm -f %{buildroot}%{_libdir}/librav1e.a +rm -f %{buildroot}%{_prefix}/.crates* %post -n librav1e0 -p /sbin/ldconfig %postun -n librav1e0 -p /sbin/ldconfig