mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
avcodec/videotoolbox: choose AYUV pixel format when ideal
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -1180,11 +1180,10 @@ static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx)
|
|||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context()
|
return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context()
|
||||||
|
|
||||||
|
depth = descriptor->comp[0].depth;
|
||||||
|
|
||||||
if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA)
|
if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA)
|
||||||
return AV_PIX_FMT_AYUV64;
|
return (depth > 8) ? AV_PIX_FMT_AYUV64 : AV_PIX_FMT_AYUV;
|
||||||
|
|
||||||
depth = descriptor->comp[0].depth;
|
|
||||||
|
|
||||||
#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
|
#if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE
|
||||||
if (depth > 10)
|
if (depth > 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user