mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/videotoolbox: choose AYUV pixel format when ideal
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
d41e5b0fc7
commit
de923595fd
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue