Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Tong Wu <wutong1208@outlook.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: "fei.w.wang@intel.com" <fei.w.wang@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: Derive bind flag from frame type if no valid surface
Date: Mon, 29 Jul 2024 15:27:10 +0000
Message-ID: <SY7P300MB08459F8292CFD385E19F6A8FC7B72@SY7P300MB0845.AUSP300.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20240723012702.1111362-1-fei.w.wang@intel.com>

>-----Original Message-----
>From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>fei.w.wang-at-intel.com@ffmpeg.org
>Sent: 2024年7月23日 9:27
>To: ffmpeg-devel@ffmpeg.org
>Cc: fei.w.wang@intel.com
>Subject: [FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: Derive bind flag from
>frame type if no valid surface
>
>From: Fei Wang <fei.w.wang@intel.com>
>
>Fix cmd:
>ffmpeg.exe -init_hw_device d3d11va=d3d -init_hw_device qsv=qsv@d3d \
>-filter_hw_device d3d -hwaccel qsv -hwaccel_output_format qsv      \
>-i in.h264 -vf "hwmap,format=d3d11,hwdownload,format=nv12" -y out.yuv
>
>Signed-off-by: Fei Wang <fei.w.wang@intel.com>
>---
> libavutil/hwcontext_qsv.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index
>7cec347478..09156275ec 100644
>--- a/libavutil/hwcontext_qsv.c
>+++ b/libavutil/hwcontext_qsv.c
>@@ -1549,8 +1549,11 @@ static int
>qsv_frames_derive_from(AVHWFramesContext *dst_ctx,
>                 dst_hwctx->texture_infos[i].texture = (ID3D11Texture2D*)pair->first;
>                 dst_hwctx->texture_infos[i].index = pair->second ==
>(mfxMemId)MFX_INFINITE ? (intptr_t)0 : (intptr_t)pair->second;
>             }
>-            ID3D11Texture2D_GetDesc(dst_hwctx->texture_infos[0].texture,
>&texDesc);
>-            dst_hwctx->BindFlags = texDesc.BindFlags;
>+            if (src_hwctx->nb_surfaces) {
>+                ID3D11Texture2D_GetDesc(dst_hwctx->texture_infos[0].texture,
>&texDesc);
>+                dst_hwctx->BindFlags = texDesc.BindFlags;
>+            } else
>+                dst_hwctx->BindFlags =
>+ qsv_get_d3d11va_bind_flags(src_hwctx->frame_type);
>         }
>         break;
> #endif
>--
>2.34.1
>

Tested. LGTM. Thanks.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2024-07-29 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  1:27 fei.w.wang-at-intel.com
2024-07-29 15:27 ` Tong Wu [this message]
2024-07-30  7:43   ` Xiang, Haihao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SY7P300MB08459F8292CFD385E19F6A8FC7B72@SY7P300MB0845.AUSP300.PROD.OUTLOOK.COM \
    --to=wutong1208@outlook.com \
    --cc=fei.w.wang@intel.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git