diff --git a/temp/libcamera/0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch b/temp/libcamera/0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch index e7a4f5682..cbf47428f 100644 --- a/temp/libcamera/0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch +++ b/temp/libcamera/0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch @@ -1,4 +1,4 @@ -From 91b13b6c3b596775a80cdb661259fbd90b4189b2 Mon Sep 17 00:00:00 2001 +From ccbfcbaf782fc66fe4600902fb51f043f44bf105 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 1 May 2024 18:12:02 +0200 Subject: [PATCH 1/3] libcamera: simple: Enable softISP for the Pinephone @@ -17,7 +17,7 @@ Signed-off-by: Robert Mader 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index 4a0b9f58d..8a3bc14fa 100644 +index c6fe12d65..89b86f59c 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -264,7 +264,7 @@ static const SimplePipelineInfo supportedDevices[] = { @@ -30,5 +30,5 @@ index 4a0b9f58d..8a3bc14fa 100644 bool isRaw(const StreamConfiguration &cfg) -- -2.52.0 +2.54.0 diff --git a/temp/libcamera/0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch b/temp/libcamera/0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch index 3b1e85620..ca8f2b1a3 100644 --- a/temp/libcamera/0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch +++ b/temp/libcamera/0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch @@ -1,4 +1,4 @@ -From b7695ae18562170ea2e8955f72844cc287724a06 Mon Sep 17 00:00:00 2001 +From 00e2f3ed19756080d709bd86d46c3c27ec8cea80 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 6 May 2024 21:21:57 +0200 Subject: [PATCH 2/3] libcamera: simple: Skip hwISP formats if swISP is active @@ -15,7 +15,7 @@ Signed-off-by: Robert Mader 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index 8a3bc14fa..5dec1bd11 100644 +index 89b86f59c..1daee387e 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -745,9 +745,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size) @@ -30,5 +30,5 @@ index 8a3bc14fa..5dec1bd11 100644 } else { config.outputFormats = { pixelFormat }; -- -2.52.0 +2.54.0 diff --git a/temp/libcamera/0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch b/temp/libcamera/0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch index e0db6db06..07975ced7 100644 --- a/temp/libcamera/0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch +++ b/temp/libcamera/0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch @@ -1,4 +1,4 @@ -From d8405610c1830f71ffd0ca09a3c18509fc4a8892 Mon Sep 17 00:00:00 2001 +From 08b9cc8401e57b05cd8b73e1dd1d7bf0691a048b Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 19 Dec 2025 20:31:16 +0100 Subject: [PATCH 3/3] RFC: egl: Implement DMABuf import for input buffers @@ -31,19 +31,19 @@ Signed-off-by: Robert Mader 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h -index 8a2d96d7a..32e9cecdd 100644 +index 0ad2320b1..bb97b0c7c 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h -@@ -102,7 +102,7 @@ public: +@@ -101,7 +101,7 @@ public: int initEGLContext(); - int createInputDMABufTexture2D(eGLImage &eglImage, int fd); + int createInputDMABufTexture2D(eGLImage &eglImage, int fd, GLint format, uint32_t width, uint32_t height); int createOutputDMABufTexture2D(eGLImage &eglImage, int fd); - void destroyDMABufTexture(eGLImage &eglImage); void createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data); -@@ -135,7 +135,7 @@ private: + +@@ -133,7 +133,7 @@ private: unsigned int shaderDataLen, Span shaderEnv); @@ -53,7 +53,7 @@ index 8a2d96d7a..32e9cecdd 100644 PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp -index 5b9bbf410..3a90cf54b 100644 +index f65929470..febfd4bba 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -19,6 +19,7 @@ @@ -74,16 +74,14 @@ index 5b9bbf410..3a90cf54b 100644 * \param[in] output If true, create framebuffer for render target * * Internal implementation for creating DMA-BUF textures. Creates an EGL -@@ -110,7 +114,7 @@ void eGL::syncOutput() +@@ -110,15 +114,15 @@ void eGL::syncOutput() * * \return 0 on success, or -ENODEV on failure */ -int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) +int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, uint32_t drm_format, uint32_t width, uint32_t height, bool output) { - int ret = 0; - -@@ -118,9 +122,9 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) + ASSERT(tid_ == Thread::currentId()); // clang-format off EGLint image_attrs[] = { @@ -96,16 +94,16 @@ index 5b9bbf410..3a90cf54b 100644 EGL_DMA_BUF_PLANE0_FD_EXT, fd, EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, EGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)eglImage.stride_, -@@ -135,7 +139,7 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) - NULL, image_attrs); +@@ -133,7 +137,7 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) + NULL, image_attrs); - if (eglImage.image_ == EGL_NO_IMAGE_KHR) { + if (image == EGL_NO_IMAGE_KHR) { - LOG(eGL, Error) << "eglCreateImageKHR fail"; + LOG(eGL, Debug) << "eglCreateImageKHR fail"; - ret = -ENODEV; - goto done; + return -ENODEV; } -@@ -176,6 +180,9 @@ done: + +@@ -172,6 +176,9 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) * \brief Create an input DMA-BUF backed texture * \param[in,out] eglImage EGL image to associate with the DMA-BUF * \param[in] fd DMA-BUF file descriptor @@ -115,7 +113,7 @@ index 5b9bbf410..3a90cf54b 100644 * * Creates an EGL image from a DMA-BUF file descriptor and binds it to * a 2D texture for use as an input texture in shaders. The texture is -@@ -183,11 +190,25 @@ done: +@@ -179,11 +186,25 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output) * * \return 0 on success, or -ENODEV on failure */ @@ -143,7 +141,7 @@ index 5b9bbf410..3a90cf54b 100644 } /** -@@ -206,7 +227,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd) +@@ -202,7 +223,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd) { ASSERT(tid_ == Thread::currentId()); @@ -153,15 +151,15 @@ index 5b9bbf410..3a90cf54b 100644 /** diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp -index 4d0caa6ef..5e7812a13 100644 +index 8f0c229fd..f4fc2a6f9 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp -@@ -506,13 +506,22 @@ void DebayerEGL::setShaderVariableValues(DebayerParams ¶ms) +@@ -495,13 +495,22 @@ void DebayerEGL::setShaderVariableValues(const DebayerParams ¶ms) return; } --int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams ¶ms) -+int DebayerEGL::debayerGPU(FrameBuffer *input, int out_fd, DebayerParams ¶ms) +-int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams ¶ms) ++int DebayerEGL::debayerGPU(FrameBuffer *input, int out_fd, const DebayerParams ¶ms) { /* eGL context switch */ egl_.makeCurrent(); @@ -181,7 +179,7 @@ index 4d0caa6ef..5e7812a13 100644 /* Generate the output render framebuffer as render to texture */ egl_.createOutputDMABufTexture2D(*eglImageBayerOut_, out_fd); -@@ -547,13 +556,7 @@ void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output +@@ -536,13 +545,7 @@ void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output metadata.sequence = input->metadata().sequence; metadata.timestamp = input->metadata().timestamp; @@ -197,18 +195,18 @@ index 4d0caa6ef..5e7812a13 100644 goto error; } diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h -index cfbaf8e9d..19aa7d0ea 100644 +index fcd281f4c..5a1e4dfe3 100644 --- a/src/libcamera/software_isp/debayer_egl.h +++ b/src/libcamera/software_isp/debayer_egl.h -@@ -74,7 +74,7 @@ private: +@@ -66,7 +66,7 @@ private: + int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat); int getShaderVariableLocations(); - void setShaderVariableValues(DebayerParams ¶ms); - void configureTexture(GLuint &texture); -- int debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams ¶ms); -+ int debayerGPU(FrameBuffer *input, int out_fd, DebayerParams ¶ms); + void setShaderVariableValues(const DebayerParams ¶ms); +- int debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams ¶ms); ++ int debayerGPU(FrameBuffer *input, int out_fd, const DebayerParams ¶ms); /* Shader program identifiers */ GLuint vertexShaderId_ = 0; -- -2.52.0 +2.54.0 diff --git a/temp/libcamera/APKBUILD b/temp/libcamera/APKBUILD index 1b1f4252a..0bee68d07 100644 --- a/temp/libcamera/APKBUILD +++ b/temp/libcamera/APKBUILD @@ -1,9 +1,9 @@ # Forked from Alpine for temporary downstream patches maintainer="Robert Mader " pkgname=libcamera -_pkgver=0.7.0 +_pkgver=0.7.1 pkgver=9999$_pkgver -pkgrel=1 +pkgrel=0 pkgdesc="Linux camera framework" url="https://libcamera.org/" arch="all" @@ -16,7 +16,7 @@ makedepends=" glib-dev gnutls-dev graphviz - gst-plugins-bad-dev + gst-plugins-base-dev gtest-dev libevent-dev libpisp-dev @@ -170,10 +170,10 @@ py3() { } sha512sums=" -3d34792d3fd6a75a84150921b66875e4f8c5b8771e1218618fb58bee32d76b9e2b23226ef7ec850cdcd41b5bdd08ab41f61d4d69fca619a488c5ac0f1dcb283b libcamera-v0.7.0.tar.gz -e94ba31d69cad9ca9f9d895a253e849ac79b73bafea58987c078f9144049896138f61f3ea63a4c00de44e5a480622aed0bebe1b062d6c52757ce5f62f3a642f3 0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch -1850f847a5a8597b78c5bf2cd88e9012531634ac7141925edf52f49fbca8c3b432a1e8d4270971741adbca150ed9928a86f86cdcb6f4ed04f5488ab21002074d 0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch -4ba352092bc5ed0b982efe854a7a079c363497b54b5ef5693975bd2c4d1ca0c134fb3278b60d9d77f5a87039ba2b165b5786497b7e1d74343580f2ecdc0a7049 0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch +0e886021a3bbd668184b581248b9d89a8e909360a7f138237a2c03b41b477cb255bd6daf4932fdebf86c3410b4deccc4c5db93264ed0c6c9969076cdbae8a77b libcamera-v0.7.1.tar.gz +aa24b1caab3d0e6bca413ff149aafa5233ba8141c2585b1b55c655759dd663612091222135ec5add402e60bf53d58c307f3f3127385efaa11b6cef866e03906e 0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch +cd1559a70dabe8711bb2cc1a8c6dca114e9f5b83088000935845ad90e5d109e2b215f0810f709f5bf00dd76be76e937bad4db49a1c6662135ec1704809a9a62b 0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch +6bca235e430e7392f68c94742d1bc1cd19cffe12ac03c8890ffa27b756972df67f5a408f4c806149a6b4f52827881a73d14d7f6a00bab9d4692f5eb9b06478a5 0003-RFC-egl-Implement-DMABuf-import-for-input-buffers.patch 22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop 2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f hi846.yaml 2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f imx355.yaml