[FFmpeg-devel] [PATCH v2 5/5] avutil/hwcontext_qsv: map D3D11VA frames to QSV frames
Tong Wu
tong1.wu at intel.com
Fri Apr 29 13:45:05 EEST 2022
Fixes:
$ ffmpeg.exe -init_hw_device d3d11va=d3d11 -f lavfi -i
yuvtestsrc -vf
"format=nv12,hwupload=extra_hw_frames=16,hwmap=derive_device=qsv,format=qsv
,hwdownload,format=nv12" -f null -
Signed-off-by: Tong Wu <tong1.wu at intel.com>
---
libavutil/hwcontext_qsv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 6bc920ef59..1bdffee4a4 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -1363,7 +1363,8 @@ static int qsv_map_to(AVHWFramesContext *dst_ctx,
{
mfxHDLPair *pair = (mfxHDLPair*)hwctx->surfaces[i].Data.MemId;
if (pair->first == src->data[0]
- && pair->second == src->data[1]) {
+ && (pair->second == src->data[1]
+ || (pair->second == (mfxMemId)MFX_INFINITE && src->data[1] == (uint8_t *)0))) {
index = i;
break;
}
--
2.35.1
More information about the ffmpeg-devel
mailing list