From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 271A541D3F for ; Tue, 23 Aug 2022 20:41:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9AC3C68B8D9; Tue, 23 Aug 2022 23:41:12 +0300 (EEST) Received: from mx0b-0060ff01.pphosted.com (mx0b-0060ff01.pphosted.com [205.220.174.70]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9636668B49A for ; Tue, 23 Aug 2022 23:41:05 +0300 (EEST) Received: from pps.filterd (m0240443.ppops.net [127.0.0.1]) by mx0b-0060ff01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NKYoS6009316 for ; Tue, 23 Aug 2022 15:41:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mru.medical.canon; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=mru.medical.canon.01.04.2021; bh=cRlkP+9Hn/S/wKNAHwgUaLu+sNIaq3KvW8hL8bG6P4k=; b=j2lpM4yWh7IwcZNwdvafdalF0g5zIunpae3yoyUEQSyBeMNIao/kwdz+QOZziK98ly1j h+hhLKiIR4mv4IUuRDjESW3T3qM31Xid1d+OrsY6lsKjAsnsvmVbxXzde6rte3+67ZqB 0HgsuMDj21jDjJccpQnK908+n5TCtFygzM1CGCyUc22yXXlXIk5Uxjl0+SV3Lk70M5/s 3zmp9wR8zcnMk9BkC3g0cthuicy52JykpNoLMcD51LABjMAdNviSgsLQ3d0eSGTudth2 U94pEHtFTi4giflpx0yIx/zFyU7tfEJBbaxEZ5D3yyDfv5ywoh9KzFd57CvrE4sK8z/i 5A== Received: from chiexc3.tmriusa.com (dns1.vancepublishing.com [199.48.74.5] (may be forged)) by mx0b-0060ff01.pphosted.com (PPS) with ESMTPS id 3j4w3e048r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 Aug 2022 15:41:03 -0500 Received: from CHIEXC3.TMRIUSA.COM (172.16.2.234) by CHIEXC3.TMRIUSA.COM (172.16.2.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Tue, 23 Aug 2022 15:40:56 -0500 Received: from CHIEXC3.TMRIUSA.COM ([172.16.2.234]) by CHIEXC3.TMRIUSA.COM ([172.16.2.234]) with mapi id 15.02.1118.009; Tue, 23 Aug 2022 15:40:56 -0500 From: To: Thread-Topic: [PATCH] Allow exporting of RGB and BGR images to CUDA. Thread-Index: AdiTDPLP8QxaiQmES6622Aqz0u0eDAPkSh+wBSSeZ8A= Date: Tue, 23 Aug 2022 20:40:56 +0000 Message-ID: References: <52a392ec033c4aecb6387ae59aa6f16f@MRU.MEDICAL.CANON> In-Reply-To: <52a392ec033c4aecb6387ae59aa6f16f@MRU.MEDICAL.CANON> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.32.109] MIME-Version: 1.0 X-CrossPremisesHeadersFilteredBySendConnector: CHIEXC3.TMRIUSA.COM X-OrganizationHeadersPreserved: CHIEXC3.TMRIUSA.COM X-Proofpoint-GUID: K3zEu660ob3KROKBiPqdGbXcWB4i0aGr X-Proofpoint-ORIG-GUID: K3zEu660ob3KROKBiPqdGbXcWB4i0aGr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_07,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 impostorscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208230079 Subject: Re: [FFmpeg-devel] [PATCH] Allow exporting of RGB and BGR images to CUDA. 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > -----Original Message----- > From: ffmpeg-devel On Behalf Of > dpeeters@MRU.MEDICAL.CANON > Sent: Thursday, July 28, 2022 11:24 AM > To: ffmpeg-devel@ffmpeg.org > Subject: [EXTERNAL] Re: [FFmpeg-devel] [PATCH] Allow exporting of RGB > and BGR images to CUDA. > > > -----Original Message----- > > From: ffmpeg-devel On Behalf Of > > dpeeters@MRU.MEDICAL.CANON > > Sent: Friday, July 8, 2022 4:51 PM > > To: ffmpeg-devel@ffmpeg.org > > Subject: [EXTERNAL] [FFmpeg-devel] [PATCH] Allow exporting of RGB and > > BGR images to CUDA. > > > > Use the step size when calculating the number of channels to allow for > > more than two channels per plane. This allows the use of > > AV_PIX_FMT_0BGR32 when using av_hwframe_transfer_data to transfer > data > > from a Vulkan frame to a CUDA frame. > > > > Signed-off-by: David Peeters > > --- > > libavutil/hwcontext_vulkan.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/libavutil/hwcontext_vulkan.c > > b/libavutil/hwcontext_vulkan.c index 237caa4bc0..05e8fc5268 100644 > > --- a/libavutil/hwcontext_vulkan.c > > +++ b/libavutil/hwcontext_vulkan.c > > @@ -2992,6 +2992,8 @@ static int > > vulkan_export_to_cuda(AVHWFramesContext *hwfc, > > const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(hwfc- > > >sw_format); > > VulkanDevicePriv *p = ctx->internal->priv; > > FFVulkanFunctions *vk = &p->vkfn; > > + int max_pixsteps[4]; > > + int max_pixstep_comps[4]; > > > > AVHWFramesContext *cuda_fc = (AVHWFramesContext*)cuda_hwfc- > > >data; > > AVHWDeviceContext *cuda_cu = cuda_fc->device_ctx; @@ -3001,6 > > +3003,8 @@ static int vulkan_export_to_cuda(AVHWFramesContext > *hwfc, > > CUarray_format cufmt = desc->comp[0].depth > 8 ? > > CU_AD_FORMAT_UNSIGNED_INT16 : > > > > CU_AD_FORMAT_UNSIGNED_INT8; > > > > + av_image_fill_max_pixsteps(max_pixsteps, max_pixstep_comps, > > + desc); > > + > > dst_f = (AVVkFrame *)frame->data[0]; > > > > dst_int = dst_f->internal; > > @@ -3023,7 +3027,9 @@ static int > > vulkan_export_to_cuda(AVHWFramesContext *hwfc, > > .arrayDesc = { > > .Depth = 0, > > .Format = cufmt, > > - .NumChannels = 1 + ((planes == 2) && i), > > + .NumChannels = desc->comp[max_pixstep_comps[i]].depth > 8 > > + ? max_pixsteps[i] / 2 > > + : max_pixsteps[i], > > .Flags = 0, > > }, > > .numLevels = 1, > > -- > > 2.36.1 > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > > https://urldefense.com/v3/__https://ffmpeg.org/mailman/listinfo/ffmpeg > > - > > devel__;!!Ai2CFrZnFhI!6NGwn- > > Nv1AZn7qfPlMbwKHeDqU79spui_ApfLibprH2k3cVnA6ayxejFpL_xrg- > > 8adz1jY9btFkZrg33AWLLDsXfE_uWCpvx$ > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > Ping. > Are there any changes needed for this? > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://urldefense.com/v3/__https://ffmpeg.org/mailman/listinfo/ffmpeg- > devel__;!!Ai2CFrZnFhI!_8PN4GC6c0n28X6z7gL1O_2a6oaf- > cxdrbLpTmzsR4HvKg7EtCBTrFBiOUrsQrY_ptbzSzlpiVrLjzrCotNFYmkiQZn2BHW > _$ > > To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org > with subject "unsubscribe". Ping. _______________________________________________ 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".