From patchwork Mon Jan 15 02:34:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Tong1" X-Patchwork-Id: 45599 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:8199:b0:199:de12:6fa6 with SMTP id pd25csp1158499pzb; Sun, 14 Jan 2024 18:35:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFDvPQ16j7b8Chm/KtYYMlGTjo/N2jMCm56pFP54h9D1vaXr6SABvuxBPtYdjISYuh/RLu X-Received: by 2002:a17:906:55c1:b0:a28:de33:9e6a with SMTP id z1-20020a17090655c100b00a28de339e6amr2194994ejp.47.1705286151642; Sun, 14 Jan 2024 18:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705286151; cv=none; d=google.com; s=arc-20160816; b=I6BMm1aHTT6Y39d16GenziFRi1Fb3mFUwlVodZWH66FHrVpDXi8DTg4Ke3wADgST28 cVImrM/KkNOkOhJeTSI8V97YbYuBqNw0rGD/3XS6zg9R0j8R2Tfy2UdO9Ul8Hti/nM+k r6PJloaEEc366ydWXa4dsg9l8dLyF1Qtkpv76ITHG5X4X8q5kHZjRy7oBSR7IOq0AniH U7JFHdr6p0L1H7NhQ9xQrxy6pTEqD5b5bQD+dMgEmzbDryszRSF57iZMwm57YM7MJ4FM YbkSi5SEq16MG92CRle5mJwrtiPZwuCOLELNtsbmfh8Q/zoMFl5iJm5lWzgMneR4DztQ uxxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=1xMf7LKvB2QZX+P9wF/0Q/SL9KXndLCqrDRYRNz/80w=; fh=CX/m9qTuMDwrotqtm4RkAOJT6yXlKL2vcfWDitFPXZs=; b=t9nKAcnIzzAfh2VNxDSy9UN1m0nNYrEQUecD5KCNmRypWCxCTYGpSnHVQQSfB5Tpji frvh0CtJI3+9ZLVO+E+UUANMtBlUsngvlXzbpDqRbmXUJ9TT8JVemJ1F5ZLKmzIdU8xa h7aZpH8V3y5nrI0x8jSFvkJQFCbRoQ3vKbpaVksqXpERwWXktJ2KQBYtxNmuXG4ekLoy n3A3OF1OssYWxKnRpa2ED0696vKDlo/en5pVzbfipAZZdjhdcYbPxgIyytKuw7Oyaz13 QZUaAJj18aL9+GS7o1hg8ruTiaNX/gn+jF5XYR4vdrAIWmoVAfyqfpclHN8hpJ+OHmsC t4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ULhtdlDl; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q4-20020a1709066b0400b00a29efb615c5si3382702ejr.613.2024.01.14.18.35.51; Sun, 14 Jan 2024 18:35:51 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ULhtdlDl; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BC8E168CE3D; Mon, 15 Jan 2024 04:35:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9419968C733 for ; Mon, 15 Jan 2024 04:35:39 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705286144; x=1736822144; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=12lwHcnBa0W5zNrFQ5/zvE/qXWfhPCx2Pj42/g5Dhoc=; b=ULhtdlDlppV1hS3KbeBCVxClo9B8lVNJ8aD6ErREiRd3oseVJbEd0knR FgKZ5QAR1+hebrB0mIIduKgNyq3wociVubcqdU8c+wmT4AIuYXse8dtZN QQnya+v33YiQT1EM07bYs3n+J7ekrBMEFYk7dFtMVD0BWb/1sayUIHy/i 0AeHP6bnTqFxBRbMrapvG8M2OwYmzJEPXWlEGN7wkjH1Ws+pUZ+SsxQ7g rUOrgD2p5ZeUqZEqnLcZdvAijqaPyA04jKnm/2BWoxRhvUFFT0+mg0Wqw NCG8VUPhiJTmY/8uDH360rCbwkVUWcw1cYRYskkIkoq1RTC/y7tNPh//E Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="398386133" X-IronPort-AV: E=Sophos;i="6.04,195,1695711600"; d="scan'208";a="398386133" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 18:35:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="776595197" X-IronPort-AV: E=Sophos;i="6.04,195,1695711600"; d="scan'208";a="776595197" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.66]) by orsmga007.jf.intel.com with ESMTP; 14 Jan 2024 18:35:33 -0800 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jan 2024 10:34:39 +0800 Message-ID: <20240115023440.795-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] lavc/d3d12va: remove unused variables X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Tong Wu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2iKv67Cv0INa From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/d3d12va_av1.c | 18 +++++------------- libavcodec/d3d12va_decode.c | 9 ++------- libavcodec/d3d12va_h264.c | 4 ---- libavcodec/d3d12va_hevc.c | 5 ----- libavcodec/d3d12va_vc1.c | 3 --- libavcodec/d3d12va_vp9.c | 4 ---- 6 files changed, 7 insertions(+), 36 deletions(-) diff --git a/libavcodec/d3d12va_av1.c b/libavcodec/d3d12va_av1.c index 6a3543353f..5f96f7da04 100644 --- a/libavcodec/d3d12va_av1.c +++ b/libavcodec/d3d12va_av1.c @@ -108,11 +108,8 @@ static int d3d12va_av1_decode_slice(AVCodecContext *avctx, static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; - const AV1DecContext *h = avctx->priv_data; - AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private; + const AV1DecContext *h = avctx->priv_data; + AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private; uint8_t *mapped_data; D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args = &input_args->FrameArguments[input_args->NumFrameArguments++]; @@ -142,7 +139,6 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx) { int ret; const AV1DecContext *h = avctx->priv_data; - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private; if (ctx_pic->tiles <= 0 || ctx_pic->bitstream_size <= 0) @@ -156,10 +152,8 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx) static int d3d12va_av1_decode_init(AVCodecContext *avctx) { - const AV1DecContext *h = avctx->priv_data; - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx); - AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private; + D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); + D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx); DXVA_PicParams_AV1 pp; int ret; @@ -186,9 +180,7 @@ static int d3d12va_av1_decode_init(AVCodecContext *avctx) static int d3d12va_av1_decode_uninit(AVCodecContext *avctx) { - const AV1DecContext *h = avctx->priv_data; - D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx); - AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private; + D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx); if (ctx->bitstream_buffer) av_freep(&ctx->bitstream_buffer); diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c index c5c599675e..ae2f577e25 100644 --- a/libavcodec/d3d12va_decode.c +++ b/libavcodec/d3d12va_decode.c @@ -265,8 +265,7 @@ fail: int ff_d3d12va_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) { - AVHWFramesContext *frames_ctx = (AVHWFramesContext *)hw_frames_ctx->data; - AVHWDeviceContext *device_ctx = frames_ctx->device_ctx; + AVHWFramesContext *frames_ctx = (AVHWFramesContext *)hw_frames_ctx->data; frames_ctx->format = AV_PIX_FMT_D3D12; frames_ctx->sw_format = avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 ? AV_PIX_FMT_P010 : AV_PIX_FMT_NV12; @@ -407,9 +406,7 @@ int ff_d3d12va_decode_uninit(AVCodecContext *avctx) static inline int d3d12va_update_reference_frames_state(AVCodecContext *avctx, D3D12_RESOURCE_BARRIER *barriers, ID3D12Resource *current_resource, int state_before, int state_end) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; + D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); int num_barrier = 0; for (int i = 0; i < ctx->max_num_ref; i++) { @@ -436,8 +433,6 @@ int ff_d3d12va_common_end_frame(AVCodecContext *avctx, AVFrame *frame, { int ret; D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; ID3D12Resource *buffer = NULL; ID3D12CommandAllocator *command_allocator = NULL; AVD3D12VAFrame *f = (AVD3D12VAFrame *)frame->data[0]; diff --git a/libavcodec/d3d12va_h264.c b/libavcodec/d3d12va_h264.c index 24e1c523fa..e89c90995c 100644 --- a/libavcodec/d3d12va_h264.c +++ b/libavcodec/d3d12va_h264.c @@ -104,10 +104,6 @@ static int d3d12va_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffe #define START_CODE_SIZE 3 static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; - const H264Context *h = avctx->priv_data; const H264Picture *current_picture = h->cur_pic_ptr; H264DecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private; diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c index 7e0c295a2d..a6a3b802f9 100644 --- a/libavcodec/d3d12va_hevc.c +++ b/libavcodec/d3d12va_hevc.c @@ -98,10 +98,6 @@ static int d3d12va_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffe #define START_CODE_SIZE 3 static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; - const HEVCContext *h = avctx->priv_data; const HEVCFrame *current_picture = h->ref; HEVCDecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private; @@ -166,7 +162,6 @@ static int d3d12va_hevc_end_frame(AVCodecContext *avctx) static int d3d12va_hevc_decode_init(AVCodecContext *avctx) { - HEVCContext *h = avctx->priv_data; D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); DXVA_PicParams_HEVC pp; diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c index 3d15abd1f1..b39b03ab45 100644 --- a/libavcodec/d3d12va_vc1.c +++ b/libavcodec/d3d12va_vc1.c @@ -95,9 +95,6 @@ static int d3d12va_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; const VC1Context *v = avctx->priv_data; const MpegEncContext *s = &v->s; D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; diff --git a/libavcodec/d3d12va_vp9.c b/libavcodec/d3d12va_vp9.c index d6dfc905d9..5a1cb0187d 100644 --- a/libavcodec/d3d12va_vp9.c +++ b/libavcodec/d3d12va_vp9.c @@ -85,10 +85,6 @@ static int d3d12va_vp9_decode_slice(AVCodecContext *avctx, const uint8_t *buffer static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { - D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx); - AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx; - const VP9SharedContext *h = avctx->priv_data; VP9DecodePictureContext *ctx_pic = h->frames[CUR_FRAME].hwaccel_picture_private; From patchwork Mon Jan 15 02:34:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Tong1" X-Patchwork-Id: 45600 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:8199:b0:199:de12:6fa6 with SMTP id pd25csp1158570pzb; Sun, 14 Jan 2024 18:36:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKosS/2uwWsw5jR1y8VEGViv2zn+YWEKDKm+HaL71LAIUA79KMMHXhjKl3tfJze1VRmFrn X-Received: by 2002:a05:6512:39d5:b0:50e:a219:e05d with SMTP id k21-20020a05651239d500b0050ea219e05dmr2736630lfu.12.1705286163461; Sun, 14 Jan 2024 18:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705286163; cv=none; d=google.com; s=arc-20160816; b=WSafxtQ0ZX5aojCpHZCIZE/1Utf+d1zPd+1nJVtfhTFinkLo0NEJOLz2aNmLl2IM/2 7VSC/UayeUElB/s/1Frv+lWblBeDrPJENscPLdMrpFPoisjUOHHVEIB1yZ1X+B0ZTkkI Y0l2shJVSdi+tbFnzKUnJvK12mKqaOlX5YSfYvOdc/e0UlCDaA02EveeZrGvxwgymIwt 35R7HhUIIEFT3h/f7qgxFKMJh3bL9l3FK/xccdQcLdr7dxv/Ld9p6v+hg6cbo+pQU7qT 33KiULiuSw70AYGuliHlCJVMLLvfEXJ+c4eIL4Tr4jsB3Jsp//MBks9Q2m+z0968E0Ls yUuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=nZgiLylvWK6z7oNOyiY47swyB08BVlIcz955ubZJMH0=; fh=CX/m9qTuMDwrotqtm4RkAOJT6yXlKL2vcfWDitFPXZs=; b=e5bKFXwE1y1OT6AoogLTVPR6uFEpSea7ig1lXYG6ayLMi+R1i15pw4uaSYXPFA4aHQ ADfBXhvEiDe2X9UvUMgafWcsGsWiNqScKOlDVrE/Ont+jqUCNXHejmibWS7n3gn3EpEg lEk1L5WCJSYBmCZvUQe+0oCgW/1Jb/FJ86zlwNskGHkVkb04XcV4vuCm3JP6oq35wPC+ kNsebl6pUBI6Oks2fso3M6cu9wvYdFftBLVS6Si0cATOcvhWFF91SUWlKTfkaZI1jYOQ cQlIv42JQBSLwKnim+9DCcTEMKcUP8OTQ4LqU1x4G+qozQ+kgXfhFowKC/3Bne/SzwZO SOwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=JCSdS40T; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w4-20020a170906130400b00a2c56489136si3359076ejb.951.2024.01.14.18.36.03; Sun, 14 Jan 2024 18:36:03 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=JCSdS40T; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EF43A68CEF0; Mon, 15 Jan 2024 04:35:52 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 990A968CD6D for ; Mon, 15 Jan 2024 04:35:45 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705286150; x=1736822150; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aawnD4QS5AtplNvcMWQzeIyEdYh7Z+OWEcXaPr51RNI=; b=JCSdS40TgRVVpFwdooidjX7BGXNm/lH1TtZHW9MZfIYp55BDUYxJ9Aao e9Npm+f6XoMf3slB0QS4JF4C2FzG94PxeRhf0DSpLC+VUvY1NB2Kxk0BQ iqD2Xj3yG9ps4paPnr+QJhAsaK5tSqvVLLMypJ3slUmWeew7Xcvv4Kiyt WI9dbLl8jDUBXTUSapCPNcPtp0aSXa6OGV4X+3kJJTzqZgrJhoAh6uF7B AzDF1FPXdHpVjRnwP1313Wh0HYJrjvoNAEXk6mbaBrc/Aolhf3mMbK1oQ 73kPlOIinBHZKibT9ng5XYcWfPhi5arjbOiWYP7jsaCgEmlZFR0IESxlc Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="398386136" X-IronPort-AV: E=Sophos;i="6.04,195,1695711600"; d="scan'208";a="398386136" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 18:35:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="776595206" X-IronPort-AV: E=Sophos;i="6.04,195,1695711600"; d="scan'208";a="776595206" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.66]) by orsmga007.jf.intel.com with ESMTP; 14 Jan 2024 18:35:34 -0800 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jan 2024 10:34:40 +0800 Message-ID: <20240115023440.795-2-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 In-Reply-To: <20240115023440.795-1-tong1.wu@intel.com> References: <20240115023440.795-1-tong1.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2] d3d12va_av1|h264|hevc|vc1|vp9: input void** for ID3D12Resource_Map X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Tong Wu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: dFPnFHHusHBY From: Tong Wu Fixes -Wincompatible-pointer-types warnings. Signed-off-by: Tong Wu --- 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))) {