about summary refs log tree commit diff
path: root/users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-07-28T16·58-0400
committerclbot <clbot@tvl.fyi>2024-08-01T10·06+0000
commit756539a59687f9abc9fef5fce50b5590c35a242f (patch)
tree06bd57732c359bb5b366b225043b59c6dd2f2ad9 /users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch
parentbdf82698592acc3f27fa7a9aa612ea1ad7970437 (diff)
chore(3p/sources): Bump channels & overlays (2024-07-28) r/8435
* Treewide: re-run depotfmt

* //third_party/nixpkgs:html5validator: build with Python 3.11,
  dependency openstackdocstheme doesn't support 3.12

* //users/sterni/machines/ingeborg: adapt to poorly handled fcgiwrap
  module API change: https://github.com/NixOS/nixpkgs/pull/318599

* //tvix/*-go: regenerate protobuf files

* //third_party/nixpkgs:treefmt: Remove patch for merged pull request

* //users/flokli/ipu6-softisp: rebase, drop upstreamed kernel patches

Change-Id: Ie4e0df007c287e8cd6207683a9a25838aa5bd39a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11971
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Diffstat (limited to 'users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch')
-rw-r--r--users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch b/users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch
new file mode 100644
index 000000000000..f250617bd3ad
--- /dev/null
+++ b/users/flokli/ipu6-softisp/libcamera/0003-libcamera-debayer_cpu-Make-the-minimum-size-1280x720.patch
@@ -0,0 +1,42 @@
+From 06add438e4fc53faca6e016bd582df0e7ac5a271 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 24 Jan 2024 20:44:29 +0100
+Subject: [PATCH 3/3] libcamera: debayer_cpu: Make the minimum size 1280x720
+
+pipewire + firefox default to what looks like 640x480 if we export
+the entire supported cropping range. Hardcode 720p as minsize for now.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ src/libcamera/software_isp/debayer_cpu.cpp | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
+index 10ea29b1..a354138b 100644
+--- a/src/libcamera/software_isp/debayer_cpu.cpp
++++ b/src/libcamera/software_isp/debayer_cpu.cpp
+@@ -805,10 +805,17 @@ SizeRange DebayerCpu::sizes(PixelFormat inputFormat, const Size &inputSize)
+ 		return {};
+ 	}
+ 
+-	return SizeRange(Size(patternSize.width, patternSize.height),
+-			 Size((inputSize.width - 2 * patternSize.width) & ~(patternSize.width - 1),
+-			      (inputSize.height - 2 * borderHeight) & ~(patternSize.height - 1)),
+-			 patternSize.width, patternSize.height);
++	/*
++	 * pipewire + firefox default to what looks like 640x480
++	 * if we export the entire supported cropping range.
++	 * Hardcode 720p as minsize for now. Minsize should be
++	 * Size(patternSize.width, patternSize.height)
++	 */
++	unsigned int w = (inputSize.width - 2 * patternSize.width) & ~(patternSize.width - 1);
++	unsigned int h = (inputSize.height - 2 * patternSize.height) & ~(patternSize.height - 1);
++	return SizeRange(Size(std::min(w, 1280u), std::min(h, 720u)),
++	                 Size(w, h),
++	                 patternSize.width, patternSize.height);
+ }
+ 
+ } /* namespace libcamera */
+-- 
+2.45.2
+