Subject: [bug#78502] [PATCH 1/3] gnu: Add libyuv.

From: Andrew Wong <[email-masked]>
Date: Mon, 19 May 2025 20:45:09 -0400

* gnu/packages/image.scm (libyuv): New variable.

Change-Id: If7f5be6bcf88cf2d11e8d3c911f492f1ab8fd2d0
---
 gnu/packages/image.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 3a894a0d9a..bedaf2212c 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2925,3 +2925,30 @@ (define-public libsixel
 want to view a SIXEL image file, all you have to do is @command{cat} it to
 your terminal.")
     (license license:expat)))
+
+(define-public libyuv
+  (package
+    (name "libyuv")
+    (version "2021.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+	     (url "https://chromium.googlesource.com/libyuv/libyuv")
+	     (commit "4620f1705822fd6ab99939f43ce63099bd3d9ae0")))
+       (sha256
+	(base32 "17vdm2g5qvrby7xa3agiqwh7ips33dxg6sw18s3q2xkfil4xw3mm"))))
+    (build-system cmake-build-system)
+    (arguments (list #:tests? #f))
+    (home-page "https://chromium.googlesource.com/libyuv/libyuv/")
+    (synopsis "YUV scaling and conversion functionality")
+    (description "libyuv is an open source project that includes YUV scaling and
+conversion functionality. It can:
+@itemize
+@item Scale YUV to prepare content for compression, with point, bilinear or box
+filter.
+@item Convert to YUV from webcam formats for compression.
+@item Convert to RGB formats for rendering/effects.
+@item Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
+@end itemize")
+    (license license:expat)))
-- 
2.49.0