From b4ced845d80ea502886f6aa884bcad02de8c530e Mon Sep 17 00:00:00 2001 From: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Date: Wed, 11 Nov 2026 21:41:26 +1100 Subject: [PATCH] aurora-camera-denoise: update to 4a2d2402, encoder temporal filter by default The temporal filter now runs by default on the video encoder's motion-compensated filter (AVE MCTF), the hardware macOS uses, when the kernel has its device and the scaler's lossless form (camera-denoise#9, #10). Its output is bit-exact with macOS VideoToolbox, and on the MacBook Neo it takes 4% of one core at 30 fps where the NEON filter takes 39%. Kernels without the device keep the CPU filter. The package now ships cdn-backend-ave.so in its backend directory. The update also brings the opt-in camera effects controls (camera-denoise#2, #3, #4, #6). camera-denoise#8 is in the pinned commit, so its patch goes. Co-Authored-By: Claude Opus 5.5 --- ...1-systemd-skip-root-and-system-users.patch | 76 ------------------- .../aurora-camera-denoise.spec | 17 ++++- sources.json | 8 +- tests/test_specs.py | 20 ++--- 4 files changed, 28 insertions(+), 93 deletions(-) delete mode 100644 packages/aurora-camera-denoise/0001-systemd-skip-root-and-system-users.patch diff --git a/packages/aurora-camera-denoise/0001-systemd-skip-root-and-system-users.patch b/packages/aurora-camera-denoise/0001-systemd-skip-root-and-system-users.patch deleted file mode 100644 index c701ea55..00000000 --- a/packages/aurora-camera-denoise/0001-systemd-skip-root-and-system-users.patch +++ /dev/null @@ -1,76 +0,0 @@ -Subject: [PATCH] systemd: skip root and system users, limit restarts - -Backport of aurora-silicon/camera-denoise#8 onto the pinned source. - -diff --git a/data/aurora-camera-denoise.service.in b/data/aurora-camera-denoise.service.in -index 5d8a2af..ee0f31c 100644 ---- a/data/aurora-camera-denoise.service.in -+++ b/data/aurora-camera-denoise.service.in -@@ -3,12 +3,19 @@ Description=Camera denoise filter for built-in cameras - Documentation=https://github.com/aurora-silicon/camera-denoise - After=pipewire.service wireplumber.service - Requires=pipewire.service -+# Only desktop users run a camera session. root's and system users' (greeter) -+# user managers have no PipeWire session to join. -+ConditionUser=!root -+ConditionUser=!@system -+# A PipeWire that is down stays down: give up after 5 tries in a minute. -+StartLimitIntervalSec=60 -+StartLimitBurst=5 - - [Service] - ExecStart=@bindir@/aurora-camera-denoise - ExecReload=/bin/kill -HUP $MAINPID - Restart=on-failure --RestartSec=2 -+RestartSec=5 - - [Install] - WantedBy=pipewire.service -diff --git a/meson.build b/meson.build -index 6540814..7525cb8 100644 ---- a/meson.build -+++ b/meson.build -@@ -92,10 +92,11 @@ if unitdir == '' - get_option('prefix') / 'lib' / 'systemd' / 'user' - endif - if pipewire.found() -- configure_file(input : 'data/aurora-camera-denoise.service.in', -+ user_unit = configure_file(input : 'data/aurora-camera-denoise.service.in', - output : 'aurora-camera-denoise.service', - configuration : {'bindir' : get_option('prefix') / get_option('bindir')}, - install_dir : unitdir) -+ test('user-unit', find_program('sh'), args : [files('tests/check-unit.sh'), user_unit]) - endif - - test('cpu', executable('test_cpu', 'tests/test_cpu.c', dependencies : core_dep)) -diff --git a/tests/check-unit.sh b/tests/check-unit.sh -new file mode 100755 -index 0000000..532486c ---- /dev/null -+++ b/tests/check-unit.sh -@@ -0,0 +1,24 @@ -+#!/bin/sh -+# SPDX-License-Identifier: MIT -+# The user unit must skip root and system users (greeter) and must not -+# restart forever when PipeWire is down. -+set -eu -+unit=$1 -+grep -qx 'ConditionUser=!root' "$unit" -+grep -qx 'ConditionUser=!@system' "$unit" -+grep -qx 'Restart=on-failure' "$unit" -+interval=$(sed -n 's/^StartLimitIntervalSec=//p' "$unit") -+burst=$(sed -n 's/^StartLimitBurst=//p' "$unit") -+delay=$(sed -n 's/^RestartSec=//p' "$unit") -+[ -n "$interval" ] && [ -n "$burst" ] && [ -n "$delay" ] -+# The burst must be reachable inside the interval, or the limit never trips. -+[ $((burst * delay)) -lt "$interval" ] -+# Both settings belong to [Unit]; systemd ignores StartLimit* in [Service]. -+awk '/^\[/{s=$0} /^StartLimit/{if (s != "[Unit]") exit 1}' "$unit" -+awk '/^\[/{s=$0} /^ConditionUser/{if (s != "[Unit]") exit 1}' "$unit" -+if command -v systemd-analyze >/dev/null 2>&1; then -+ out=$(systemd-analyze --user verify "$unit" 2>&1 || true) -+ if printf '%s\n' "$out" | grep -E 'Unknown (key|section)|Failed to parse|bad-setting'; then -+ exit 1 -+ fi -+fi diff --git a/packages/aurora-camera-denoise/aurora-camera-denoise.spec b/packages/aurora-camera-denoise/aurora-camera-denoise.spec index ce51962a..dbf682c3 100644 --- a/packages/aurora-camera-denoise/aurora-camera-denoise.spec +++ b/packages/aurora-camera-denoise/aurora-camera-denoise.spec @@ -1,14 +1,12 @@ -%global commit 456c567527d6bbba27d0aaeec1199032e0ec88c3 +%global commit 4a2d2402d991837b95ea19f89bdd6965d8622ae4 Name: aurora-camera-denoise Version: 0.1.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Noise filter for the built-in camera on Apple silicon License: MIT URL: https://github.com/aurora-silicon/camera-denoise Source0: https://github.com/aurora-silicon/camera-denoise/archive/%{commit}/%{name}-%{commit}.tar.gz Source1: 80-aurora-camera-denoise.preset -# camera-denoise#8: no unit for root/system users, bounded restarts -Patch0: 0001-systemd-skip-root-and-system-users.patch ExclusiveArch: aarch64 BuildRequires: gcc meson ninja-build pkgconf-pkg-config systemd-rpm-macros BuildRequires: pkgconfig(libpipewire-0.3) >= 1.0 @@ -57,10 +55,21 @@ install -Dm644 %{SOURCE1} %{buildroot}%{_userpresetdir}/80-aurora-camera-denoise %{_bindir}/aurora-camera-denoise-metrics %{_datadir}/aurora-camera-denoise/ %dir %{_libdir}/aurora-camera-denoise +%{_libdir}/aurora-camera-denoise/cdn-backend-ave.so %{_userunitdir}/aurora-camera-denoise.service %{_userpresetdir}/80-aurora-camera-denoise.preset %changelog +* Wed Nov 11 2026 Aurora Silicon - 0.1.0-7 +- Update to 4a2d2402d991. The temporal filter now runs by default on the + video encoder's motion-compensated filter, the hardware macOS uses, when + the kernel has its device and the scaler's lossless form (camera-denoise#9, + #10). Its output matches macOS, and on the MacBook Neo it takes 4% of one + core at 30 fps where the CPU filter takes 39%. Other kernels keep the CPU + filter. The plugin is cdn-backend-ave.so. +- Also brings opt-in camera effects controls (camera-denoise#2, #3, #4, #6). +- camera-denoise#8 is upstream now; drop its patch. + * Tue Nov 10 2026 Aurora Silicon - 0.1.0-6 - The user service no longer runs in root's or the greeter's user manager, where it failed every 2 s without a PipeWire session, and it stops after diff --git a/sources.json b/sources.json index 48af98d4..c93c8437 100644 --- a/sources.json +++ b/sources.json @@ -234,11 +234,11 @@ }, "aurora-camera-denoise": { "repository": "https://github.com/aurora-silicon/camera-denoise", - "commit": "456c567527d6bbba27d0aaeec1199032e0ec88c3", + "commit": "4a2d2402d991837b95ea19f89bdd6965d8622ae4", "version": "0.1.0", - "source_url": "https://codeload.github.com/aurora-silicon/camera-denoise/tar.gz/456c567527d6bbba27d0aaeec1199032e0ec88c3", - "archive_root": "camera-denoise-456c567527d6bbba27d0aaeec1199032e0ec88c3", - "sha256": "14e5dd45487b260ac6abffcfbe0a787df76bfe21c72bad68f20fb8400f548f3a" + "source_url": "https://codeload.github.com/aurora-silicon/camera-denoise/tar.gz/4a2d2402d991837b95ea19f89bdd6965d8622ae4", + "archive_root": "camera-denoise-4a2d2402d991837b95ea19f89bdd6965d8622ae4", + "sha256": "e8fcff64e1c02dab6313ef38091238ea8ff2978e4a42f7e0eaa3e367a42a2d0c" }, "aurora-kbd-light": { "repository": "https://github.com/aurora-silicon/kbd-light", diff --git a/tests/test_specs.py b/tests/test_specs.py index a7a52ec3..3a780dd8 100644 --- a/tests/test_specs.py +++ b/tests/test_specs.py @@ -828,14 +828,16 @@ def test_secure_enclave_ssh_provider_gives_the_sep_key_group_the_node(self): pins = json.loads((ROOT / 'sources.json').read_text()) self.assertIn(pins['aurora-sep-sk']['commit'], text) def test_camera_denoise_user_unit_skips_root_and_system_users(self): - d = ROOT / 'packages/aurora-camera-denoise' - spec = (d / 'aurora-camera-denoise.spec').read_text() - patch = re.search(r'^Patch\d*:\s+(\S+)', spec, re.M).group(1) - text = (d / patch).read_text() - for line in ('+ConditionUser=!root', '+ConditionUser=!@system', - '+StartLimitIntervalSec=60', '+StartLimitBurst=5', '+RestartSec=5'): - self.assertIn(line + '\n', text) - self.assertIn('%autosetup -p1 ', spec) - # %check runs the unit test the patch adds. + # camera-denoise#8 (ConditionUser, start limits) is in the pinned + # commit and %check runs its unit test (tests/check-unit.sh). + spec = (ROOT / 'packages/aurora-camera-denoise/aurora-camera-denoise.spec').read_text() + pins = json.loads((ROOT / 'sources.json').read_text()) + self.assertIn(pins['aurora-camera-denoise']['commit'], spec) + self.assertNotEqual(pins['aurora-camera-denoise']['commit'], + '456c567527d6bbba27d0aaeec1199032e0ec88c3') self.assertIn('%meson_test', spec.split('%check', 1)[1].split('%install', 1)[0]) + def test_camera_denoise_ships_the_encoder_filter_plugin(self): + spec = (ROOT / 'packages/aurora-camera-denoise/aurora-camera-denoise.spec').read_text() + files = spec.split('%files', 1)[1].split('%changelog', 1)[0] + self.assertIn('%{_libdir}/aurora-camera-denoise/cdn-backend-ave.so', files) if __name__ == '__main__': unittest.main()