summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolbox.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-11-13 14:21:23 -0600
committerrcombs <rcombs@rcombs.me>2021-11-28 16:40:58 -0600
commit350eb59f8c25372067b7e338b45cce97fe892e4f (patch)
tree84964395b7d708b069ea93f74ffcb37f3c8800ac /libavcodec/videotoolbox.c
parenta41a2efc85f8c88caec10040ee437562f9d0b947 (diff)
videotoolbox: add alpha support
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 5f08488a6b..542fe9316a 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -1075,6 +1075,9 @@ static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx)
int depth = descriptor->comp[0].depth;
+ if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA)
+ return AV_PIX_FMT_AYUV64;
+
#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
if (depth > 10)
return descriptor->log2_chroma_w == 0 ? AV_PIX_FMT_P416 : AV_PIX_FMT_P216;