Message ID | 20220429104505.1747-5-tong1.wu@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v2,1/5] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Tong > Wu > Sent: Friday, April 29, 2022 12:45 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Tong Wu <tong1.wu@intel.com> > Subject: [FFmpeg-devel] [PATCH v2 5/5] avutil/hwcontext_qsv: map > D3D11VA frames to QSV frames > > Fixes: > $ ffmpeg.exe -init_hw_device d3d11va=d3d11 -f lavfi -i > yuvtestsrc -vf > "format=nv12,hwupload=extra_hw_frames=16,hwmap=derive_device=qsv,forma > t=qsv > ,hwdownload,format=nv12" -f null - > > Signed-off-by: Tong Wu <tong1.wu@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; > } > -- LGTM. softworkz
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; }
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@intel.com> --- libavutil/hwcontext_qsv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)