From patchwork Thu May 13 07:04:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27736 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp116489iof; Thu, 13 May 2021 00:06:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2NWOFL7GNqC4eZMH/D9tEV4bHoXPdC6r4jMlqGKYgnOZ8Ai26qJGI6/rKORKcLoKpqTc0 X-Received: by 2002:a50:ee85:: with SMTP id f5mr49183662edr.8.1620889614191; Thu, 13 May 2021 00:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620889614; cv=none; d=google.com; s=arc-20160816; b=EyWKR021wZYWrsyU413y5j7Hdx3UjmvbcU1bmuLYAL3a7AqaOt23AHZDZEmicmHu+M wBdtMQSb0OMH11Q8EO3lUrTnx3tQYl/eNg0ExkSuXaoROBO10yJ/UQ5CRGl9H774wbqi neLcJD4I8v/afNX16IvM+AnjFB7Qm79sBTonnmhU0FOQdIt/mrCzLs136DgX/FtXRPnE HhSYt6/V7IKckLFHhn+xFU0NmeTv7h0nvGehX5EBEgn/HrxqNaSny/Nq0h1nTPrIUWpq xbg7UCS+EW6p1prBB0nBXbCglo8Ry7tBzFdMc+zjqA/9BZTK4hbOvi3m5hCpAyJeYNr8 BrsA== 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=52WCjmqDt+UyZUgjYPIBLyf5LthEa24byTHfoeH233Y=; b=xezNh/+GUcgeQ1fhC5cZVorO4zydtBePjlcKWG7R8raTp8pOt59HT1mVw/70uMaPh2 LKXGtiVG1ASsvd4PidIHbTRaD8M7n69kD+E5Cjr5YMsIMpkfvUgWhkAjfY37Te3YNxWZ lqMQdjf6Lj04ejC8RJWTszXWVja+GPqTOShDOEe1iEmylEkrfXSoCcSyZoA2p+wbeX4C jVkj+KYZIPIaCRprM4Uqw7yCr+8IsMha9VLqWjZArB+2Z3yGsRccP1DG0Zc2kpb3SAG8 NmizHTeRVntEn9v1UkZG3zc+PJKGeBGpoaLSOqzr2Djqin0UkJ0II6bfgTId4gOsf0bz MmeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=efkADdVM; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w27si2057812edi.434.2021.05.13.00.06.53; Thu, 13 May 2021 00:06:54 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=efkADdVM; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1C282687F13; Thu, 13 May 2021 10:06:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3348680B18 for ; Thu, 13 May 2021 10:06:28 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id c17so20887074pfn.6 for ; Thu, 13 May 2021 00:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qpHwc2hTib348VzVFDPgabFQDet/Nowkp6wsK5UPLmI=; b=efkADdVMYTW19DhflsdkXvZ2vmXdpS8EApZNXFKl3uXnrhzJR9S8O/7B7NITfH4BE+ 9ppiFnlqy9omuulun2AigzPsOqrhjoXzSKhl++cYNAbWLFvqqmbdGelzJcWfj9F5L4EX PteVJQ+bX51ayxJx/a+tGnzETotS/o95CW7JcZdFF9uuUAw9HiVJ2QFtcmlaWbCuRxD5 03H88QE5+k85ELvz3cAwXebiaLPqw8AWoKu+SVlEQh724PL+UtV34OYd3mpPIhBieTLe lAAsqIEme/imm6tHu3EQZjJOmozV6fAK2Bnu1lCU0mfBh9AB/VyzA8xZT0ChsRVMEuDV Am+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qpHwc2hTib348VzVFDPgabFQDet/Nowkp6wsK5UPLmI=; b=E2sUI3dzXkT+f9JMA4D+w5sPTsd37Pj/CM9CKKvxOj5ffmTxjdGfybN66x1G1CawMC JTxEcYWjKNa7qENvgQSGQe3ADgPcmVkM4nGUJ0wU6YWa5Kxt2/+2vnQhWwfI7FjLJWrn MB/dSarQCl8EnOED6hnrq7VfARfdFJNylGFPtLFVGeRnaFV/SoQ6ggweqy2S8Bg/LupK 4q+HyOPUOqGayVZSEJVhq++fa130AYdPhehVpsgtUPXV3bY9PF1phqZCaKUEVwH97U0V IQIRKNTPZVMJ7Ed8uCxPokC+GaUR7of+DWMab8rBsLWSCx8fWFQkgbGaOk4RbODyBQ52 mEig== X-Gm-Message-State: AOAM5302X5vr4OFdl+AOzn9DU4OJndGwb8R5Zfn+J15zkQmbvW72LwJd sCi4yITmlIgbIZJ/eAAQdDXkD9/VHO3zQA== X-Received: by 2002:a17:90a:ba07:: with SMTP id s7mr2087087pjr.129.1620889586549; Thu, 13 May 2021 00:06:26 -0700 (PDT) Received: from Pavilion-x360.bbrouter ([103.157.220.58]) by smtp.googlemail.com with ESMTPSA id g84sm1408116pfb.198.2021.05.13.00.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:06:26 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 12:34:22 +0530 Message-Id: <20210513070423.14234-4-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210513070423.14234-1-shubhanshu.e01@gmail.com> References: <20210513070423.14234-1-shubhanshu.e01@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V4 4/5] lavfi/dnn_backend_native_layer_depth2space.h: Documentation 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: Shubhanshu Saxena Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: NLt/kwXSHIgr Add documentation for Depth to Space Layer Signed-off-by: Shubhanshu Saxena --- .../dnn_backend_native_layer_depth2space.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h index ef59394443..686606b96d 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h +++ b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h @@ -34,7 +34,37 @@ typedef struct DepthToSpaceParams{ int block_size; } DepthToSpaceParams; +/** + * @brief Load the Depth to Space Layer. + * + * It assigns the depth to space layer with DepthToSpaceParams + * after parsing from the model file context. + * + * @param layer pointer to the DNN layer instance + * @param model_file_context pointer to model file context + * @param file_size model file size to check if data is read + * correctly from the model file + * @param operands_num operand count of the whole model to + * check if data is read correctly from the model file + * @return number of bytes read from the model file + * @retval 0 if an error occurs or out of memory + */ int ff_dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +/** + * @brief Execute the Depth to Space Layer. + * + * It rearranges the input data from depth into spatial + * form by applying Depth to Space transformation. + * + * @param operands all operands for the model + * @param input_operand_indexes input operand indexes for this layer + * @param output_operand_index output operand index for this layer + * @param parameters average pooling parameters + * @param ctx pointer to Native model context for logging + * @retval 0 if the execution succeeds + * @retval DNN_ERROR if the execution fails + */ int ff_dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx);