hevc: offer DXVA2 for 10bit 420
authorAnton Khirnov <anton@khirnov.net>
Wed, 29 Jun 2016 07:33:57 +0000 (09:33 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 15 Jul 2016 13:35:44 +0000 (15:35 +0200)
libavcodec/hevc.c

index 177cf93..5e1b3a0 100644 (file)
@@ -397,10 +397,13 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps)
 
     export_stream_params(s->avctx, &s->ps, sps);
 
-    if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) {
+    if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P ||
+        sps->pix_fmt == AV_PIX_FMT_YUV420P10) {
 #if CONFIG_HEVC_DXVA2_HWACCEL
         *fmt++ = AV_PIX_FMT_DXVA2_VLD;
 #endif
+    }
+    if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) {
 #if CONFIG_HEVC_D3D11VA_HWACCEL
         *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
 #endif