diff options
author | James Almer <jamrial@gmail.com> | 2024-10-06 15:00:33 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-10-12 11:21:14 -0300 |
commit | de923595fd1c3ad4f01c700c40ef8ccce133d6ad (patch) | |
tree | 45c77fbf6bf8e2c28780e5e60f8fdb3ab967282a | |
parent | d41e5b0fc7e1953414cbb9e56800aa724981b38f (diff) | |
download | ffmpeg-de923595fd1c3ad4f01c700c40ef8ccce133d6ad.tar.gz |
avcodec/videotoolbox: choose AYUV pixel format when ideal
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/videotoolbox.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 90c1fbfb10..a606c29ded 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -1180,11 +1180,10 @@ static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) if (!descriptor) return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context() + depth = descriptor->comp[0].depth; if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA) - return AV_PIX_FMT_AYUV64; - - depth = descriptor->comp[0].depth; + return (depth > 8) ? AV_PIX_FMT_AYUV64 : AV_PIX_FMT_AYUV; #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE if (depth > 10) |