diff mbox series

[FFmpeg-devel,04/15] ffmpeg_videotoolbox: support 4:2:2/4:4:4 formats

Message ID 20211113210916.49167-4-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel,01/15] lavu/pixfmt: add high-bit-depth semi-planar 4:2:2/4:4:4 formats
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

rcombs Nov. 13, 2021, 9:09 p.m. UTC
---
 fftools/ffmpeg_videotoolbox.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_videotoolbox.c b/fftools/ffmpeg_videotoolbox.c
index 4ba8618539..6c89fb48d1 100644
--- a/fftools/ffmpeg_videotoolbox.c
+++ b/fftools/ffmpeg_videotoolbox.c
@@ -65,6 +65,28 @@  static int videotoolbox_retrieve_data(AVCodecContext *s, AVFrame *frame)
 #if HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE
     case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange:
     case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_P010; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR8BIPLANARVIDEORANGE
+    case kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange:
+    case kCVPixelFormatType_422YpCbCr8BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_NV16; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR10BIPLANARVIDEORANGE
+    case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
+    case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_NV20; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR16BIPLANARVIDEORANGE
+    case kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange: vt->tmp_frame->format = AV_PIX_FMT_P216; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR8BIPLANARVIDEORANGE
+    case kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange:
+    case kCVPixelFormatType_444YpCbCr8BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_NV24; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR10BIPLANARVIDEORANGE
+    case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
+    case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_P410; break;
+#endif
+#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
+    case kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange: vt->tmp_frame->format = AV_PIX_FMT_P416; break;
 #endif
     default:
         av_log(NULL, AV_LOG_ERROR,