[FFmpeg-cvslog] avcodec/d3d12va_hevc: enable allow_profile_mismatch flag for d3d12va msp profile

Tong Wu git at videolan.org
Thu Dec 21 10:17:14 EET 2023


ffmpeg | branch: master | Tong Wu <tong1.wu-at-intel.com at ffmpeg.org> | Tue Dec  5 14:46:51 2023 +0800| [6d5fbea2895b3cabd9edf7059a19f9b799e0e2a2] | committer: Haihao Xiang

avcodec/d3d12va_hevc: enable allow_profile_mismatch flag for d3d12va msp profile

Same as d3d11va, this flag enables main still picture profile for
d3d12va. User should add this flag when decoding main still picture
profile.

Signed-off-by: Tong Wu <tong1.wu at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d5fbea2895b3cabd9edf7059a19f9b799e0e2a2
---

 libavcodec/d3d12va_hevc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c
index 6537e46065..7e0c295a2d 100644
--- a/libavcodec/d3d12va_hevc.c
+++ b/libavcodec/d3d12va_hevc.c
@@ -176,8 +176,13 @@ static int d3d12va_hevc_decode_init(AVCodecContext *avctx)
         break;
 
     case FF_PROFILE_HEVC_MAIN_STILL_PICTURE:
-        av_log(avctx, AV_LOG_ERROR, "D3D12 doesn't support PROFILE_HEVC_MAIN_STILL_PICTURE!\n");
-        return AVERROR(EINVAL);
+        if (avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH) {
+            ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN;
+            break;
+        } else {
+            av_log(avctx, AV_LOG_ERROR, "D3D12 doesn't support PROFILE_HEVC_MAIN_STILL_PICTURE!\n");
+            return AVERROR(EINVAL);
+        }
 
     case FF_PROFILE_HEVC_MAIN:
     default:



More information about the ffmpeg-cvslog mailing list