From patchwork Wed May 12 18:44:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27726 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp5287890iof; Wed, 12 May 2021 11:54:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7q4oyBZSD9FJrLMbFarGKJcbvRMrUXTdg9fA87L8ph59p6MVSKnQV2wu45dNEq2nNzN8S X-Received: by 2002:a17:907:2cc2:: with SMTP id hg2mr37296956ejc.62.1620845671625; Wed, 12 May 2021 11:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620845671; cv=none; d=google.com; s=arc-20160816; b=GP9fUL+s3r6n5bQmJOkBq3UMeBdPWl93d8FOsIt4f72w+agYmLCNQSnXiCc/yugDHX slBUjqc0LfoPVTrO3VhX4V0inN+jswdPupPdDEnBVr6eOcvXKdv2fnIiCehUE6KQFfZP +W24BjJXkTz7X9yoBN6u+ek94EQcCh/LNrSuhTqODvSaSb51MI+iPaIloQFh2bDp3VV9 pu4iBP2o969+np8tkFMkdfTGKq/3QUgRxFHVfXdY+LBtO281JSfowBgZg8W+L9DCV6ol etba2Yf0biuTQzBapiJ5fh88xd9OfxFdBYvl7cOyMLEUV3OXEoA0JxUgK7Z+4ZHYAyOi GF3w== 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=Jk6TveDbb4XEwblJgeXjkzk19SHJALfRXT4sLZflauw=; b=xikj3RFKUMqlJv7jsT++LRf+KjC+FLJ8SGHb0MnJ3sXJjj2QCZvgmzL4JicopoYuM5 6l+PzCedOC1rtc95JkET5TpJcxa42xJHVI+5eAQE3O1DTEe+Yi801gAvzgtL+R1S2Bl/ qx2bDXW+TMmSIPXS94VYdzJfK/FLq28yxERLZRCEbetQz5LDCol1YUJSB1XT4mwj6J8d V3xZeMB4EpG4maQ7v3AUJ9WqggSa+IzgxaW5U1jWyxs15qJgIdimh+iiApUljkvkYaTR jauJDlbYY2umWQJKLbhglWBfbjsqHHFRgiockLhsU/ulEPuuPkk6jgQSqUxJXRUXAfto RhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=UyAGCjoV; 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 k18si729270ejq.681.2021.05.12.11.54.31; Wed, 12 May 2021 11:54:31 -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=UyAGCjoV; 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 C6A29680B24; Wed, 12 May 2021 21:54:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D75F6804B8 for ; Wed, 12 May 2021 21:54:22 +0300 (EEST) Received: by mail-oi1-f182.google.com with SMTP id c3so23134221oic.8 for ; Wed, 12 May 2021 11:54:22 -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=9fiZ8h+rLok1DuBuHx80NvyB2JKtWS51JILb/tz/PRc=; b=UyAGCjoVd7oAeRbMXkx+JCAUQH3NIcZZoXXoX5IObteeytrE033CNdais8H43fu+Dn 3XiqXp6+NBzDrpcZyG+zRKlIoDlHfUYU/euUOAKFA027YIJn6BsnO4B4d2E8sYEK3aUA aWZJr4sTC/iMEhJ0UYvZyZu9uwGIy2eWqy2bMG0LnxPnkmbmcnxnv/Jg+bUhEy2SyMks t6ZBUbnd0E1QdJ/47F9fXmiKsBBw9SilVJ1XoxoSf/GFbEyV/Z16wCGVKoCrmleTU/V5 LcRlJhAWPSkBoUXkyglgxCxsPOcvLBB/KEBKePiWemPnWwmsPV9Zqw8kyNG/XZG2pUO2 RFEQ== 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=9fiZ8h+rLok1DuBuHx80NvyB2JKtWS51JILb/tz/PRc=; b=DHbjVrUnJ+aTq0nizwr7duaeZcC4Y16CCMShL0lxf+TMyWTcVZqxsqaaGzRhQTiA67 iSaGh5eIXvn4zrU7WB7z7hHlcE0t6u0T3jpvw6D+IUXWUhQLTNNCc0KTNZ8oDsXatRu7 feyHOf3gEdHlYYo2fjuX886hPqen/mtO9HFL+Yp8IjnmjbJB+CY3U6DzIv1mdmDpDBLg bJBm0YYpfaPOiA9j3+Ij50ekAqHErROWFVLKyiLPhzxz9n5I0zn+OqsPsSHhpKAyfaL4 GKb3bWL86Id5Czn+8zOa6/Es9FM4Nch6Rp4wc4hKte0787izgCOhYEg5skFeGs/eVdro o65Q== X-Gm-Message-State: AOAM5312v1aE3gawu6eFKqMg5n2KKaZ1S8rTiA9+5XXSobfJ+iG9tvQU To4tfzszHy9deqpzAtNcvO73q6NOL9462Q== X-Received: by 2002:a17:90a:c08c:: with SMTP id o12mr27743595pjs.108.1620845179467; Wed, 12 May 2021 11:46:19 -0700 (PDT) Received: from Pavilion-x360.bbrouter ([103.133.123.78]) by smtp.googlemail.com with ESMTPSA id js6sm4866120pjb.0.2021.05.12.11.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 11:46:19 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 00:14:42 +0530 Message-Id: <20210512184439.30591-4-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210512184439.30591-1-shubhanshu.e01@gmail.com> References: <20210512184439.30591-1-shubhanshu.e01@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/5 v2] 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: DqDZxOsxdVNk 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..664b386197 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 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 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);