Accepting request 905264 from multimedia:libs
- Fixed squared artefacts on image when converting to AVIF * Added f553646d70fba8e265d436103a73520eb7adec8c.patch - Fix service for cargo vendor creation OBS-URL: https://build.opensuse.org/request/show/905264 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rav1e?expand=0&rev=9
This commit is contained in:
commit
770bc68433
25
README.suse-maint
Normal file
25
README.suse-maint
Normal file
@ -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.
|
2
_service
2
_service
@ -1,5 +1,5 @@
|
||||
<services>
|
||||
<service name="cargo_vendor" mode="disabled">
|
||||
<param name="srcdir">rav1e</param>
|
||||
<param name="srcdir">rav1e-0.4.1</param>
|
||||
</service>
|
||||
</services>
|
||||
|
5
cargo_config
Normal file
5
cargo_config
Normal file
@ -0,0 +1,5 @@
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
42
f553646d70fba8e265d436103a73520eb7adec8c.patch
Normal file
42
f553646d70fba8e265d436103a73520eb7adec8c.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From f553646d70fba8e265d436103a73520eb7adec8c Mon Sep 17 00:00:00 2001
|
||||
From: David Michael Barr <b@rr-dav.id.au>
|
||||
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<T: Pixel, W: Writer>(
|
||||
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;
|
||||
}
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 9 06:11:11 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Fixed squared artefacts on image when converting to AVIF
|
||||
* Added f553646d70fba8e265d436103a73520eb7adec8c.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 2 07:19:00 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Fix service for cargo vendor creation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 7 21:40:52 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
17
rav1e.spec
17
rav1e.spec
@ -28,8 +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
|
||||
@ -89,8 +95,6 @@ directory = './vendor'
|
||||
rustc = "%{__rustc}"
|
||||
rustdoc = "%{__rustdoc}"
|
||||
rustflags = %{__global_rustflags_toml}
|
||||
[install]
|
||||
root = '%{buildroot}%{_prefix}'
|
||||
[term]
|
||||
verbose = true
|
||||
EOF
|
||||
@ -101,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
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5ffd22b5b37f8e89ae1c1a6d295de86265f671fd7955b8994b0a1bf30f05665
|
||||
size 15054112
|
||||
oid sha256:cc962cdae054eea09f102ecae6d34e8a14e4daac5dc76a0923bc1024c2fce1ff
|
||||
size 15053860
|
||||
|
Loading…
Reference in New Issue
Block a user