From patchwork Fri May 14 07:11:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27765 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp206588iof; Fri, 14 May 2021 00:17:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ2vu3yOqVad/LguMIMoi9VAPNXd2b82FirYy3gkIdRfma7lZp8+YSyD4g4XPhukEdar/k X-Received: by 2002:a05:6402:341:: with SMTP id r1mr54365839edw.113.1620976642601; Fri, 14 May 2021 00:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620976642; cv=none; d=google.com; s=arc-20160816; b=IGGCSq9ICJ6vJjIXnG3SWCZn17uGk9kN13Y3Aijj4B3XSN24ZborlzNymq2O81EYij GL0MhruTczQyOgkQM0xgdNulmP3qJaL69c7b5xtZ/9dkObl6uJo0J9X3SPQXyRF7lNBF PLQ6DfAsr5XBuTZqEQQfY1bbxYh+RPTM1VA8xagusu3y0KaP5cFjhKwndnVwrSLZDuQ9 Jqx9sogVaZb7rlm213svdZz6lWGJqVfvVfRC8oKYg/y/sO53Ikon5Ufx7FZRg/ByXCdP qNLJWodeDtnY4dy9DaHAFgNm+EiShd3s/5xMI5z74NmYxhRblAHN/+F8OMCkIVdz7cBM e+kQ== 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=jeKvpql+h3bpf9kHFMIGqu0IPNg2alM4QQqMKEaJuJs=; b=qJjYYEkbn4f8T92eWpd9PO1weKbbqgkrVft/1J1hzRyoMuZYlP1+QV10H8ABE6f6od YXaqP6u8RM2Z01RHJIfdFStWU0NDnctKCfgJraC8UKTPRtChfgzq0IdGV/7JH5DBJ3fl 8iWk2oJhISp84j03n2R0dS6pNom/UyiLCY1PjqcKJiOnn57dxA4wxhfYKuBImfTUvTZ8 I6LYKTR6a3AwVW3DpKMYxkS3axjoCgaSUYTh7xEQqyK74ej9KwkcaJPoG9IWixiF1UaE xRxRVtSyHuwPKpSTfTJJU8CzHMujNMyYyET1JxTb2vg6MDiGI+ybPVJpfoic8VBpNxlX jmXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=eAoIF5aE; 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 du20si6087866ejc.324.2021.05.14.00.17.21; Fri, 14 May 2021 00:17:22 -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=eAoIF5aE; 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 20CB26880B0; Fri, 14 May 2021 10:17:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 527FA680B18 for ; Fri, 14 May 2021 10:17:11 +0300 (EEST) Received: by mail-pj1-f44.google.com with SMTP id ep16-20020a17090ae650b029015d00f578a8so1205092pjb.2 for ; Fri, 14 May 2021 00:17:11 -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=Zie6VwS8ngdHi/47cyNd5gibAnkVfyyzLo7uZSpZ5u8=; b=eAoIF5aEaBIiY0qLVoyTSbnW/VjsDYGD/wHtMUny1ZSKoWQ7VNfSpDbUvDyyTFDl8H +Rm37PoJqSTR4tUpYZru5Ty8pPYBv+O2QyKnIoVHTDkiaN6SzjuwaC83pzvUurnX0NYk ueAe25ic6/9u8XEMnkws1sDhK/ODGa2nX3sgs0vjPHk1uIn0C4H9aX8KKhuE7w3bSK2j VVEG9WWSIIPOSAZqSkSB8o/6WchNuMGmIz+lu4fETBN8XoTgbiBC4UQ8gLqa6ft7SUIJ tE0eYHUAZ50WSnm/RtrfualYD2ITzAn8sHZwgXyZLS5jDV+YsFUYVYPXDl272wLy/i7/ tIQw== 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=Zie6VwS8ngdHi/47cyNd5gibAnkVfyyzLo7uZSpZ5u8=; b=pdgynuAy8k/W7M10kNiwDxiknUisclW4MC1TUb0mmgC9IuNaBelr3QPiXrR+sJtlAk JWa1dpDOverg6iNEGaoLQdeLk/DtwshMTP81cyWxduchHsEtFOtvPVoXWdAvcvkXN2Lw +3ORUrDYTE2lY2grE0eTM5/UXihV25F+mlGjFUYtitkpMPQqONjrOBTXstKYDvAY9Lwc uE1VyRgNKc8dtWgzxbYzicI4Pbvk7I1ELGUDW1wBhjyKUyZqayCDMvsM4ugWaheARNXE mA42vSW2zbLnAAP79FR5hneL2lfNpPFgFQHVjXq+3tPBqWvj5U+1LzxPVUB3D/76KceA o5+g== X-Gm-Message-State: AOAM533NGHGSvZN2U5kxedp+YVSUpgKFb4512ygccDdEkAaDrwUYNPpI pFx08Q/q4qz/aL+HI6e6R/MNE9ooa1cqNQ== X-Received: by 2002:a17:90a:dc82:: with SMTP id j2mr611906pjv.138.1620976629388; Fri, 14 May 2021 00:17:09 -0700 (PDT) Received: from localhost.localdomain ([117.208.72.147]) by smtp.googlemail.com with ESMTPSA id p14sm4261627pjh.27.2021.05.14.00.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 00:17:09 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 May 2021 12:41:06 +0530 Message-Id: <20210514071104.23670-3-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210514071104.23670-1-shubhanshu.e01@gmail.com> References: <20210514071104.23670-1-shubhanshu.e01@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V5 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: w+UQrFO5KLMM 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..2792a33ebe 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 depth to space layer 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);