Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: timblechmann via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: timblechmann <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] WIP: CoreVideo: add support for kCVPixelFormatType_422YpCbCr8_yuvs (PR #20679)
Date: Thu, 09 Oct 2025 06:20:35 -0000
Message-ID: <175999083573.65.3595513735076076737@bf249f23a2c8> (raw)

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

                 reply	other threads:[~2025-10-09  6:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175999083573.65.3595513735076076737@bf249f23a2c8 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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