Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] WIP: CoreVideo: add support for kCVPixelFormatType_422YpCbCr8_yuvs (PR #20679)
@ 2025-10-09  6:20 timblechmann via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: timblechmann via ffmpeg-devel @ 2025-10-09  6:20 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: timblechmann

PR #20679 opened by timblechmann
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20679
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20679.patch

i'd appreciate a second pair of eyes on this patch: it tries to enable support for kCVPixelFormatType_422YpCbCr8_yuvs mapped to AV_PIX_FMT_YUYV422. it is an attempt to fix a bug in qtmultimedia when feeding video frames using kCVPixelFormatType_422YpCbCr8_yuvs into ffmpeg.

context:
https://bugreports.qt.io/browse/QTBUG-137436

any thoughts if this goes into the correct direction?


>From 7c01c559d47210bcc231d95ee62d5246218a8b15 Mon Sep 17 00:00:00 2001
From: Tim Blechmann <tim@klingt.org>
Date: Tue, 24 Jun 2025 12:27:05 +0800
Subject: [PATCH] CoreVideo: add support for kCVPixelFormatType_422YpCbCr8_yuvs

---
 configure                          | 1 +
 libavutil/hwcontext_videotoolbox.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/configure b/configure
index 7828381b5d..a323492b9b 100755
--- a/configure
+++ b/configure
@@ -2531,6 +2531,7 @@ TYPES_LIST="
     kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange
     kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange
     kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange
+    kCVPixelFormatType_422YpCbCr8_yuvs
     kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
     kCVImageBufferTransferFunction_ITU_R_2100_HLG
     kCVImageBufferTransferFunction_Linear
diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 102fa485e5..2764097413 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -82,6 +82,9 @@ static const struct {
 #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
     { kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange, false, AV_PIX_FMT_P416 },
 #endif
+#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR8_YUVS
+    { kCVPixelFormatType_422YpCbCr8_yuvs,               false, AV_PIX_FMT_YUYV422 },
+#endif
 };
 
 static const enum AVPixelFormat supported_formats[] = {
@@ -112,6 +115,9 @@ static const enum AVPixelFormat supported_formats[] = {
 #endif
 #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
     AV_PIX_FMT_P416,
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR8_YUVS
+    AV_PIX_FMT_YUYV422,
 #endif
     AV_PIX_FMT_BGRA,
 };
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-09  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-09  6:20 [FFmpeg-devel] [PATCH] WIP: CoreVideo: add support for kCVPixelFormatType_422YpCbCr8_yuvs (PR #20679) timblechmann via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git