From patchwork Sat May 8 12:13: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: 27699 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp1359181iof; Sat, 8 May 2021 05:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPoX8gLdF4T2s1F9D13ya4f/v0Hx+rbLffPl58ghZUcto9/Qav+wK14QLSd6YzX76ACqdw X-Received: by 2002:aa7:c6ca:: with SMTP id b10mr3049764eds.221.1620476032472; Sat, 08 May 2021 05:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620476032; cv=none; d=google.com; s=arc-20160816; b=nG2mEVGW6XUpsR5FPlBnpk7mKl8RDEMZWhrc92Jx9NDBQow6fN9UWxhd9/dBx1rzB6 l4rY77RfUfJp0FOPk2c/3cXerVcRvAf1e5w6o7wgL1aDvZvvwd0YBSGyUBCFd5ZB9jp/ RQrOOqfxOnv+EoGGgZg9WS2vnn3U72gKL2pZozAeii+FE2kPkmeMeo6Z+788jul3F/mP TcatrjrYuLsmxB1E6RMMGlSMqxMiH4dlkFGchkpk2sC++sN5GRq9q7mpl54MYvDdZ11p NdR4/gl1zsiLbDwsIl8CJArLMGnKd/h9S3MrMI4AMty29ZgfSUEKkqRXt/rS8/mNnfbi y5Tg== 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=gHL/2aQjPhrT8hqgYNW1DiHAnouKD8tOtrofpaTNoLA=; b=HLXGlQleGAFncRTgTQNiczLQEc9/Oe7lYA3Fl+0U7lyjkVkXdWieRC/lY+wd/hsQw6 QFDuR9P5gEl+lPTmCOOGsDSiqBnlqUO2xRbZWwD0rlSqBCLtma+XevHneGTmYHHHWq/r rci8f1WFhRqtuG30iseaxF4xYkQxRlBAWqiTFKix99cJWyLuoViY4iGgCH9gQyVWSA9V orcCb0ZH5nVJu0jNAuSONSynBf4lK/7iyDRKLia5ONMaX7YIAOjMmvI7ScVf7aETJ/aC fnjk2r9MndDWBAtUGEIIR/YfoiL9VRyQWcPYwgbdOZ8uHukWtdn5xXPI59pegYrTlJoe n3SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=M135w8vW; 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 gn39si7190845ejc.405.2021.05.08.05.13.52; Sat, 08 May 2021 05:13:52 -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=M135w8vW; 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 73DCB6807C5; Sat, 8 May 2021 15:13:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6400C6802E6 for ; Sat, 8 May 2021 15:13:43 +0300 (EEST) Received: by mail-pg1-f173.google.com with SMTP id c21so9311351pgg.3 for ; Sat, 08 May 2021 05:13:43 -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:mime-version :content-transfer-encoding; bh=zmQq9OaUL1nQ8oRKCFAM6Symm+W49TBvkj8YehOoRwA=; b=M135w8vWQI56EG50pY1MAjtWUiyZ0uGpGCkUqjP5m0keJGyEb+T3FKjpdsU3hOJvlb 8e3/ai0joiFS8e4yoK1TJWMaNNF5/w8zUlWAyLRFKR0SRK2dFBOYdQHdOgcgvAItQBE2 76frmbTwzKfyiAdIHO4r1HNw6f3Qh7XmlTQ4goFE3e2KLe0CfhfwIjlX8hOyp6FB/kGe 166aVz7g9Or7Z/gN6EuJPpgJsmBpAa9M55+mkX1+tPSJU3vDqX73wrr2OkgdJI533RAu e3JxwxlKcv7NqtOuxroMvkiOv2Y0lstWPrqVuiA+ZrCxyvp6onPVf1UY1/mhpNL64EMG WegA== 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:mime-version :content-transfer-encoding; bh=zmQq9OaUL1nQ8oRKCFAM6Symm+W49TBvkj8YehOoRwA=; b=KmgCxH/nvOGYuu1SR0/VKN2MGRw7p2i22JU9A/lUMyH3lyI3zVlDWKGf3Iwg6wCgxw 6BhQoAAss2fl8tNAu9MecrjEAVtaPV9DT9CW56qK0uQawNtKWkaBCeIZIlQGcIRr9sJA zoOJSneEuqZdhsKT3ECGdyttebwMbUcWH6UglJ6Ctvywo/SI1fognwsQdz+j+G4evQtJ w3fAQ0lWWx2TJL6aznyedZJrEqmOsDJZqO1luxa24srMOKOwnTFpHAp8Yt+o7EJ1yga8 aGTFezAtqzFxjLEZhjGiYQXflNq/oo9EvfgauUuXj/xTM9N4pW9tgVAcOqMeSj9sSmZF H94g== X-Gm-Message-State: AOAM531jYf0f1PBbEBAmbjNHDsToeIsvNbvnMV3V76MdUwgce81oD8lQ zHUEuZn9amVhobr8upYkXyZfOQ1mq3y62A== X-Received: by 2002:a63:ba5b:: with SMTP id l27mr15444427pgu.343.1620476021579; Sat, 08 May 2021 05:13:41 -0700 (PDT) Received: from localhost.localdomain ([117.212.37.139]) by smtp.googlemail.com with ESMTPSA id v14sm3132384pgl.86.2021.05.08.05.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 05:13:41 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Sat, 8 May 2021 17:43:06 +0530 Message-Id: <20210508121307.13976-4-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: lraUknoMkTCD Add documentation for Depth to Space Layer Signed-off-by: Shubhanshu Saxena --- .../dnn_backend_native_layer_depth2space.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h index ef59394443..991f194e49 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h +++ b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h @@ -34,7 +34,35 @@ typedef struct DepthToSpaceParams{ int block_size; } DepthToSpaceParams; +/** + * @brief Load the Depth to Space Layer. + * + * It assigns the layer parameters to the block size + * hyperparameter 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 + * @param operands_num number of operands for the layer + * @return Size of DNN Layer + * @retval 0 if model file context contains invalid hyperparameters. + */ 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 input operands + * @param input_operand_indexes input operand indexes + * @param output_operand_index output operand index + * @param parameters layer parameters + * @param ctx pointer to Native model context + * @retval DNN_SUCCESS 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);