diff mbox series

[FFmpeg-devel,09/15] lavc/hevcdec: support all color formats in videotoolbox hwaccel

Message ID 20211113210916.49167-9-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
---
 libavcodec/hevcdec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 246ffd7d80..f47e360935 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -401,6 +401,10 @@  static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
                      CONFIG_HEVC_VDPAU_HWACCEL)
     enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
 
+#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
+        *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
+#endif
+
     switch (sps->pix_fmt) {
     case AV_PIX_FMT_YUV420P:
     case AV_PIX_FMT_YUVJ420P:
@@ -419,9 +423,6 @@  static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
 #endif
 #if CONFIG_HEVC_NVDEC_HWACCEL
         *fmt++ = AV_PIX_FMT_CUDA;
-#endif
-#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
-        *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
 #endif
         break;
     case AV_PIX_FMT_YUV420P10:
@@ -435,9 +436,6 @@  static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
 #if CONFIG_HEVC_VAAPI_HWACCEL
         *fmt++ = AV_PIX_FMT_VAAPI;
 #endif
-#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
-        *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
-#endif
 #if CONFIG_HEVC_VDPAU_HWACCEL
         *fmt++ = AV_PIX_FMT_VDPAU;
 #endif