[FFmpeg-devel] [PATCH v3 4/4] avutil/hwcontext_qsv: map D3D11VA frames to QSV frames
Soft Works
softworkz at hotmail.com
Thu May 5 15:12:04 EEST 2022
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Tong
> Wu
> Sent: Thursday, May 5, 2022 12:53 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Tong Wu <tong1.wu at intel.com>
> Subject: [FFmpeg-devel] [PATCH v3 4/4] avutil/hwcontext_qsv: map
> D3D11VA frames to QSV frames
>
> Fixes:
> $ ffmpeg.exe -init_hw_device d3d11va=d3d11 -init_hw_device \
> qsv=qsv at d3d11 -s:v WxH -pix_fmt nv12 -i input.yuv -vf \
> "hwupload=extra_hw_frames=16,hwmap=derive_device=d3d11va,format=d3d11,
> \
> hwmap=derive_device=qsv,format=qsv" -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 27eedef5f8..30d3360d42 100644
> --- a/libavutil/hwcontext_qsv.c
> +++ b/libavutil/hwcontext_qsv.c
> @@ -1885,7 +1885,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;
> }
> --
I think this patch should be squashed together with patch 3/4 because
mapping is kind of broken between those two commits.
sw
More information about the ffmpeg-devel
mailing list