From: tong1.wu-at-intel.com@ffmpeg.org
To: ffmpeg-devel@ffmpeg.org
Cc: Tong Wu <tong1.wu@intel.com>
Subject: [FFmpeg-devel] [PATCH v2 2/2] d3d12va_av1|h264|hevc|vc1|vp9: input void** for ID3D12Resource_Map
Date: Mon, 15 Jan 2024 10:34:40 +0800
Message-ID: <20240115023440.795-2-tong1.wu@intel.com> (raw)
In-Reply-To: <20240115023440.795-1-tong1.wu@intel.com>
From: Tong Wu <tong1.wu@intel.com>
Fixes -Wincompatible-pointer-types warnings.
Signed-off-by: Tong Wu <tong1.wu@intel.com>
---
libavcodec/d3d12va_av1.c | 2 +-
libavcodec/d3d12va_h264.c | 2 +-
libavcodec/d3d12va_hevc.c | 2 +-
libavcodec/d3d12va_vc1.c | 2 +-
libavcodec/d3d12va_vp9.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/d3d12va_av1.c b/libavcodec/d3d12va_av1.c
index 5f96f7da04..05cebc3148 100644
--- a/libavcodec/d3d12va_av1.c
+++ b/libavcodec/d3d12va_av1.c
@@ -110,7 +110,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
{
const AV1DecContext *h = avctx->priv_data;
AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private;
- uint8_t *mapped_data;
+ void *mapped_data;
D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args = &input_args->FrameArguments[input_args->NumFrameArguments++];
args->Type = D3D12_VIDEO_DECODE_ARGUMENT_TYPE_SLICE_CONTROL;
diff --git a/libavcodec/d3d12va_h264.c b/libavcodec/d3d12va_h264.c
index e89c90995c..b2fe2955c8 100644
--- a/libavcodec/d3d12va_h264.c
+++ b/libavcodec/d3d12va_h264.c
@@ -113,7 +113,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
DXVA_Slice_H264_Short *slice;
D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args;
- if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, &mapped_data))) {
+ if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, (void **)&mapped_data))) {
av_log(avctx, AV_LOG_ERROR, "Failed to map D3D12 Buffer resource!\n");
return AVERROR(EINVAL);
}
diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c
index a6a3b802f9..ca345c845f 100644
--- a/libavcodec/d3d12va_hevc.c
+++ b/libavcodec/d3d12va_hevc.c
@@ -107,7 +107,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
DXVA_Slice_HEVC_Short *slice;
D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args;
- if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, &mapped_data))) {
+ if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, (void **)&mapped_data))) {
av_log(avctx, AV_LOG_ERROR, "Failed to map D3D12 Buffer resource!\n");
return AVERROR(EINVAL);
}
diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c
index b39b03ab45..8d8834b1cc 100644
--- a/libavcodec/d3d12va_vc1.c
+++ b/libavcodec/d3d12va_vc1.c
@@ -105,7 +105,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
static const uint8_t start_code[] = { 0, 0, 1, 0x0d };
- if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, &mapped_data))) {
+ if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, (void **)&mapped_data))) {
av_log(avctx, AV_LOG_ERROR, "Failed to map D3D12 Buffer resource!\n");
return AVERROR(EINVAL);
}
diff --git a/libavcodec/d3d12va_vp9.c b/libavcodec/d3d12va_vp9.c
index 5a1cb0187d..8c54c97f5b 100644
--- a/libavcodec/d3d12va_vp9.c
+++ b/libavcodec/d3d12va_vp9.c
@@ -88,7 +88,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
const VP9SharedContext *h = avctx->priv_data;
VP9DecodePictureContext *ctx_pic = h->frames[CUR_FRAME].hwaccel_picture_private;
- uint8_t *mapped_data;
+ void *mapped_data;
D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args;
if (FAILED(ID3D12Resource_Map(buffer, 0, NULL, &mapped_data))) {
--
2.41.0.windows.1
_______________________________________________
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".
next prev parent reply other threads:[~2024-01-15 2:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 2:34 [FFmpeg-devel] [PATCH v2 1/2] lavc/d3d12va: remove unused variables tong1.wu-at-intel.com
2024-01-15 2:34 ` tong1.wu-at-intel.com [this message]
2024-01-17 6:22 ` Xiang, Haihao
2024-01-24 7:13 ` 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=20240115023440.795-2-tong1.wu@intel.com \
--to=tong1.wu-at-intel.com@ffmpeg.org \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=tong1.wu@intel.com \
/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