From patchwork Thu May 13 07:04:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27735 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp115671iof; Thu, 13 May 2021 00:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH1QUrr32+xPwb9L8d2mDroC+WFbWYFpq1KJDLgH6t3b43QsO39x7V82p9J6b3wIr3X9o9 X-Received: by 2002:a17:906:5495:: with SMTP id r21mr41964345ejo.471.1620889541623; Thu, 13 May 2021 00:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620889541; cv=none; d=google.com; s=arc-20160816; b=ZrkQ1hEvho/zFFhFz9FmWWfAPrN7vPUBuA1SilOQ9b4QBvalqEHgEt42RXTkxR2tHY t81BWrh+5vxcBPdh+35Y/fH0j6m5JT8k9LXk89pupG5OYuOCzBCZkNoO+ApmWbh/r0Tu DBmDPCXNbQQ+w6NEC8tKMa8PcYtaMSvgZJ3mH9nXTHszl890NxTHQd1MPjqApbFJdCZs HjzLmo55LEiEcFRR0FitlZgOQsyJo6z7pV5twORudbk7i04wUV9SAx73+WkiJ+XjixDp mjv7qrFeH9rl6Hx+W2sR5IIQ1TTBrBO6fAIBvjqE3qy6qjja/QF/xaYpFzxum9t01GZm aB0g== 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=kjmIKsaRH2VaJxhRvfxhILTs6NDDPXocOJrAk+o3ecU=; b=wTZhzY6eEdk5K0kvXJk0iSSi2Dr876dfRguo4tEgsMA4T2q0TpalHDha3YilmlPl7R OGYuaY9iz1+NdGQdBo3kDxbgU4Uxh9sfQ5jpTzHjZOyvqnR+yZbnRwpMcupRBNUoBVKm qShC5JZigii/w7AXEPEWKuB+hooxLIDFYzHT2ao4H1u7/RcelaRmadiu0nKJ64nKsU7Z yt0wGeyS1Cfnsj5gEQOtUgnGB7Qex9SaHUkr1MJfcfuhBwQ6PamiveMbkujauGXcOVub QrW7UzjcnXzv2vG+rDDSO6bsbhxTHmPkZnkHo9/TxNV4dgr2QCZboBgWDEIi+2LnSwt0 6cRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DbCRSrJ0; 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 s24si2155219edc.594.2021.05.13.00.05.40; Thu, 13 May 2021 00:05:41 -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=DbCRSrJ0; 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 A2107680BD2; Thu, 13 May 2021 10:05:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B67468083B for ; Thu, 13 May 2021 10:05:29 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id h16so8109615pfk.0 for ; Thu, 13 May 2021 00:05:29 -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=sMYAjj225SM0w3XywmPdtZBg/+SDppKwQG0q+6pa49Y=; b=DbCRSrJ0QAicMsOOFVIeuq8piw3wTb2Bq4D5h814BXxSQ64epeemV2EsGwXDDzuaGB /hcTmOf6Qc9pfXnR2gl4ubmjvnNIsv8WPiSuo/dDhWC9h16kUKonSpOtYwCHU8CbWjGb afLgUOZqJ4LUKurWnZ+hymfudyhzBkfFQKYWTHkwwQuORE7NyJ6I+9ij15s3IiQwCHrb WYnTKPQVBs7VqefIrKilJmGLa3YzXuMH9CdGnOh+4Zqpk/CS4cGE+aI1EndEAyazxAhv Y9BfEZI67CAuD5kUen5SjvlUsDT902ajMr6T3vnt5QvpuumMcoe/m7BLtAuANYH5SGO/ j9Hg== 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=sMYAjj225SM0w3XywmPdtZBg/+SDppKwQG0q+6pa49Y=; b=k91MJgROvZsh8al3JF4YdQCzgC2bHBj374O9alNxCVCHCf6k9kR27TwwyvN2NiUd3l e6UBTf3Xa8+8km4NmdnovguKTwL6t2+yBik/iPCSd33Z4zar74e9Ft1zWv7/gd/HL38L Q7OqunfMk9QxxBfPfoDeVy7BLUKzeJkz+L2TNlbkSd1H30c+dDOczCJNZacTkLpFce07 34mOLemUJovRuRsWOr69Rs1TJi39Be3D+m0557uQRdgbbGNyNNUZ9xOXKFVnLR5r3KnA sg47aalbkOckhALIq/TjP6CgJzrxyndtoLyzPFeHktQS6ulpx9UEBpn9s5CiRPD8imsC GUsw== X-Gm-Message-State: AOAM53223ooBJNh5UINutvhs70A8D34luuPlpXlw6QhcEY6kelxBWH+8 7W9v9xVk/nK62AOQJ6sZaK5o97twfBNivQ== X-Received: by 2002:a17:90a:eb0f:: with SMTP id j15mr1807355pjz.149.1620889527479; Thu, 13 May 2021 00:05:27 -0700 (PDT) Received: from Pavilion-x360.bbrouter ([103.157.220.58]) by smtp.googlemail.com with ESMTPSA id g84sm1408116pfb.198.2021.05.13.00.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:05:26 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 12:34:19 +0530 Message-Id: <20210513070423.14234-1-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V4 1/5] lavfi/dnn_backend_native_layer_avgpool.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: 9PcHk16BacsY Add documentation for Average Pool Layer Signed-off-by: Shubhanshu Saxena --- .../dnn/dnn_backend_native_layer_avgpool.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_avgpool.h b/libavfilter/dnn/dnn_backend_native_layer_avgpool.h index 75d9eb187b..d8972487de 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_avgpool.h +++ b/libavfilter/dnn/dnn_backend_native_layer_avgpool.h @@ -33,7 +33,35 @@ typedef struct AvgPoolParams{ DNNPaddingParam padding_method; } AvgPoolParams; +/** + * @brief Load Average Pooling Layer. + * + * It assigns the Average Pooling layer with AvgPoolParams + * 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 out of memory or an error occurs + */ int ff_dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +/** + * @brief Execute the Average Pooling Layer. + * Padding in channel dimensions is currently not supported. + * + * @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_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx); From patchwork Thu May 13 07:04:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27734 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp116181iof; Thu, 13 May 2021 00:06:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjSSq2Kzht6y0+giPbGw+IRI8WEkXtMdWfhMQi/VJnMR+NZX4dQAc/HmwJJQFbvJHlS82b X-Received: by 2002:a05:6402:1c07:: with SMTP id ck7mr48818804edb.149.1620889585111; Thu, 13 May 2021 00:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620889585; cv=none; d=google.com; s=arc-20160816; b=ORSE/0O6ZHMOjfaP2SoBsjZyc7NcYyDIINIO9HZRs1TmlBAt8UWaYJ4HB7VgukO0kq iWH4G2SkkpoCxqtitBLzkMN6p+JulYshhgJO2ewpMm8pRZ3rouGNW5gvXAJOisfm7bp+ QuW8is8W2pMbXhIMitPNy0mzVt7wrGum2aqzIlcco765OjDF3tdGjkZEAIq7hi3d8dUC 1anFwAqF39sv+4jSeUtpA0QQ73B98MG4v5zwxnLrXOPA9tfGc27ioBFvzYoKxOt9GjlT /dswyaOiMJhGngsRcs5qWCa+243iGIeN8muBVuV5ClM6BfiXP7riue6tq7CUs2rcubjf V7XQ== 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=KqP8AalpGh/fXwKl1QvIF+BasZsGNZtY4mNd2w/qWJk=; b=e8m90aBRomaPIaSltzPapZR+fEaxptbdNt3VuxWbxJ6O48lYiNHziwOA7r9NtJpawK Vc3SqjAbpj4ncpW6dVayrytbxVYMInXrFPJ0vvMNtHyh8/eZJojfwhUX9yf/kH9Mut7Q PWNlfl2xDPeqB/ls8FaUBUj/xcczXnWuylMaXW8+0P8zhSpfzUZGH/i4W0DA66yJy9lu AhjdgQTLKhLXZJ2ssauEkr0ZVFafo0PINehl8kLRe/iwM+iGW23YOpgs7flPQDmkNZpR RlZhsS4rHOZXV5mXqxAbHRyi2eZ9X6omw+OjiYxHXzh9dvXheO88GhxwXIDvmyh1nlVc 0OLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=D95jVgUo; 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 f7si2170216edj.448.2021.05.13.00.06.24; Thu, 13 May 2021 00:06:25 -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=D95jVgUo; 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 CEB0E680C21; Thu, 13 May 2021 10:06:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABC02680515 for ; Thu, 13 May 2021 10:06:20 +0300 (EEST) Received: by mail-pf1-f169.google.com with SMTP id c17so20886757pfn.6 for ; Thu, 13 May 2021 00:06:20 -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=FsoqQ2RapJDDDK3cxlkBhNQWI3cbm2iXrD5+wwxUFSE=; b=D95jVgUoLc0LKlNjDoBC3/Kav312KuJl1PnyJrJK3E6xcs+0BL6n+/PThZVtq7qa2h qElvJk7jwhiO0lAzARqO1Uo5hlTnmTT1scRFvdGyAmx+rmZT8gqOyMrLSklX8rgAfNop arQZUQ1n4mIspy18fGxVfjgth106QtBTL0dQRtSMmJQq2JFvB3c7nmgTHmK3rzSoAzg7 kSk3LyreFLRHifi4HCRuM8EllpRYBL7qxqOuSOJ8UET29tCa80lA5rN18D7KiezFM6kg qFAqWhPWAYTcz/Top6Bm+m1q4O345yn2JHOgF0rHf261bG8KHMF/wqFgOelJq3QZKtx/ tOXw== 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=FsoqQ2RapJDDDK3cxlkBhNQWI3cbm2iXrD5+wwxUFSE=; b=J6wZpvkJzfbTAvuQfsG3He5obs3i1fLivZ35kcu9m7DysjJg7v6XLX6PqVyFcxf2p9 y8zSy9lKiuQwLHHMhHk88iS2slP4eW6IFqNObjPT8PDYkBjLa+VP5/6FW7aiY6fnMydE LIltW1wXH/sPyLZIOTNPpC5pewjdw8gKSUse7wvvBoT+rWrVgu7qL3EoMcu6UNV6tW9J tApF9uAxDi4FLHy3m0oktZxd0RuCqXb2d30lKVHyXgWrLOVeuswDpPhrSQDG0XhEIU/u HmcwDzQUqc7u35wxLNLfelkLb8ud7+lDf3hMbcx0k9UcLZ82ETe9vcPNhZ2MQjGmkp7i BOFQ== X-Gm-Message-State: AOAM533J8V/dzzBgFf4SzAIhSc7pkAz4LCNFvM6dXnrhUeflHbqcHL3Z zvJlxFuGAzvnuRlott16D8BTdchje7vWMQ== X-Received: by 2002:aa7:9252:0:b029:2ae:bde3:621f with SMTP id 18-20020aa792520000b02902aebde3621fmr28936333pfp.18.1620889578609; Thu, 13 May 2021 00:06:18 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:06:18 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 12:34:20 +0530 Message-Id: <20210513070423.14234-2-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 2/5] lavfi/dnn_backend_native_layer_conv2d.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: 2WHkFBCQQG0y Add documentation for 2D Convolution Layer Signed-off-by: Shubhanshu Saxena --- .../dnn/dnn_backend_native_layer_conv2d.h | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h index 03ca795c61..f951f8d80e 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h @@ -34,7 +34,34 @@ typedef struct ConvolutionalParams{ float *biases; } ConvolutionalParams; +/** + * @brief Load the 2D Convolution Layer. + * + * It assigns the 2D convolution layer with ConvolutionalParams + * 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_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +/** + * @brief Execute the 2D Convolution Layer. + * + * @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_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx); #endif From patchwork Thu May 13 07:04:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27732 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp116392iof; Thu, 13 May 2021 00:06:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdYvZY2Ew1lSSAtUkq1JPtVyGtloNtZ6msSv9k5CSF303QkcS+4rwsMsoM7q8KxAY3uwTQ X-Received: by 2002:aa7:cd0c:: with SMTP id b12mr48110807edw.236.1620889604496; Thu, 13 May 2021 00:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620889604; cv=none; d=google.com; s=arc-20160816; b=Fh2nkCjXTqht59RL5l4pNRLEdWlCeO7kfay5FZOQCOwapGnIsFM3JEJEi2vC3Pxi/K 8nrU6x6SISqGStIc43e6L7SqWsPIaW/zjAVUzLBUp2JogzWG6JKaW0zi6dNTly6ufKsU +iv7segHrItAngn0HYMTNALkcDrKbQx6HqCS5KxNdfuY62pcy2gvQaE/odllSz3WBW3C Rj8elOVZMq5zl8K77/hF6LFZ8WWv/YhKNkf2DMtTvzbeWxxeXekn9pukWNgKNFVUp1py Iwab/xRNXwSm0/0x3KwMNq5CJsNjxtvLEMIgm0TNOtJU4XkdrRF7aR8yFopt9sjyG7bA r8vg== 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=AFTBHYb5wR5vDfsZjAz6c2Zm8fsAuTZrzHUzt6CwOvg=; b=K2TPYq6UM4PtXIxibWh2uM6s2axWv+GmhTH8Cz6wdadfTMmPAxbqYaXDqk0e0reOG4 dpYPfBCmjQiYmiCckXAr/gOrKDMdDiNbglEpy6E+6tQgc/j8DVSdBkNrHJCfobOdaKh2 cV+dkLJq9MGZEGo8JW3BnqQsuM2xreSqHme+VHvlKp9jGs3eSs8EsacRaF4jGrAZNGJs 36JPJYEyiNTyo17CNzOpriZsu6vMQ/5N+Bj/3BHg44garDpU1DWzlMtOJG8lybj/U4Np CEobuhieGqzjUGtesEqsTyToPzBUC+Tt81/t1iyVr7vKlvRgm1wREdMkESc47PhsZ4RS x9uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=unzCavCv; 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 w18si2285501ejv.279.2021.05.13.00.06.44; Thu, 13 May 2021 00:06:44 -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=unzCavCv; 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 324B1680C6C; Thu, 13 May 2021 10:06:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19585680B18 for ; Thu, 13 May 2021 10:06:26 +0300 (EEST) Received: by mail-pf1-f178.google.com with SMTP id d16so140967pfn.12 for ; Thu, 13 May 2021 00:06:26 -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=X/cHgge4TLaSed89nAv3OSrHL9jq1d2BUauGXRI4wt0=; b=unzCavCvEAEKEWB39h5fK/DvU+EYlSxo0FtMpxSGiyX/JQh2/PWKl94MER1LZU3TLv /yHDfu7hyWD8utX5paaICb/F1XW3YMLzEpvczJCKs31bK4AFtk6T8Z+KNvQD6fBJnEPv Vbk17KWrDR0pkgBpl2mMylwGT8Ic+j73pBDBIs6pNPVrjiMHTqLSnUClDHxZr4mZzDjB 7G7n3LJTF4nmHLEpSLXO/OqLAo26Byx4PgVyhlPJ42SJHQzULAYYMrO93njQES9t2cuZ fyxrqLND6Ak01SzXvTLtbofEv9uAxkNTSbG/uSB4k6O4N+/PJl7gu/k6Jb3RPtliPN7S UQZg== 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=X/cHgge4TLaSed89nAv3OSrHL9jq1d2BUauGXRI4wt0=; b=BI60J5dsrWN1ZXCzzYC19WkmW+UuwAHW1YSCKjpnH0kAk1RMowmaHubvTtrmXSBSHa kAXjp337IVQ5TQ3nd53E48nklND94/t/tcdSzzXKgxcvKa70tiIvfv+T0+pu+VOs/YBE vG/4IxSRt5stZW9Mou66KXcVxS4RcT43CU/R9kjDyXu4poIbqdxebLwhvyzxk0TmIotR WoY8Y2Up14h+FHHvdoIxKFkk9U6/E0P/WCYsEshtkJ3ohvgdlvNkwmuuY+mxqJGN22D/ FPinW0JVEqRXLqnwaI7qOfOGlfoV8unwL0AZ0GHJNbeW6P4GdLVwgaJhyxniqdHsBmHG sSXg== X-Gm-Message-State: AOAM533XwMjjakJDNLtVVkpDakQjoYeZ4DF5niOw741gRBBsnXHR//eB prbMQpKBFZDSpjTSBKIMhvLX5IwoD30lRA== X-Received: by 2002:a17:90a:2903:: with SMTP id g3mr3167156pjd.221.1620889584414; Thu, 13 May 2021 00:06:24 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:06:24 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 12:34:21 +0530 Message-Id: <20210513070423.14234-3-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 3/5] lavfi/dnn_backend_native_layer_dense.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: UXgx/kX/S2gn Add documentation for Dense Layer Signed-off-by: Shubhanshu Saxena --- .../dnn/dnn_backend_native_layer_dense.h | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_dense.h b/libavfilter/dnn/dnn_backend_native_layer_dense.h index 86248856ae..e590863e95 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_dense.h +++ b/libavfilter/dnn/dnn_backend_native_layer_dense.h @@ -31,7 +31,34 @@ typedef struct DenseParams{ float *biases; } DenseParams; +/** + * @brief Load the Densely-Connected Layer. + * + * It assigns the densely connected layer with DenseParams + * 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 out of memory or an error occurs + */ int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +/** + * @brief Execute the Densely-Connected Layer. + * + * @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_dense(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx); #endif 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); From patchwork Thu May 13 07:04:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27733 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp116302iof; Thu, 13 May 2021 00:06:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPQit6TwJOGjbtPkzZnG8lVWYFJuqXLoxZRE6hlrHNnWtzioOHKKKWercm3Pw3J09VpErc X-Received: by 2002:a17:906:364d:: with SMTP id r13mr43112403ejb.250.1620889595176; Thu, 13 May 2021 00:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620889595; cv=none; d=google.com; s=arc-20160816; b=Q+WgEOcJkOaWQ+aHWSt36sB3xr4SSyDzC0Xb1U0l62wIi5t4e70dwEpmipUwz9znZs CmmXEQuKh/KmemJzSnAZznCM4zZ8Er8Q5yavbtYMaayQdu4VolPX+lxkL/VRgb3MOByo 22ovDeoWf9/FC19AyNymEjeOIRC8DLMPpPC8hCYREN+vdlZdrnP8zBbhP2ZBVdw4cEo6 wnoVW/TCxRdCP6qURTDCuqLmHpalkxlwRamJ6n2kZvx0lutY0nWNQIVl7TalpOMEcwBU Xdo/46EdsNfrLtnlwokws8m240yO8fQBzK2SXVKTIIWr7ZC6cWZGJdahPA4MCXrG8G74 Y9zg== 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=wmtOI2X8xRwReoOkttUQ+R1hB07JH3r1C2EtK2xYVOo=; b=arGV5g7GwqPtLH+sak98OtaMJszaaHbx7iUyV8tH0lqNPxZ+P+LZMtLgyvlkpgIcCF S4wjQfJeDZ1bjoCG9wmyLXpnAZA9Rw8Lx5wolqNohkL4TqRpoQRfObN6SuyCHngNbK+g dkIV3hhxcztzbopGOd0MmYpY0T8LnfTuzkdyFpl9JjeZOhF5Zfq2I1XY/BObJPNXLgcf nyrQKBt3Zbg7CtNUFIRGsxfXc5iv5escJ4H76NSmxoExNZExHgfuWKhDc/jZwxdjXaE1 VazIrRidPMmumhs1Vz83pfv25LfXO1T86nK3wTY5MUYHl2ApLasnIFCIlrdfmChxPDfp 85Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Fk2+yIiF; 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 l20si2131710eja.660.2021.05.13.00.06.34; Thu, 13 May 2021 00:06:35 -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=Fk2+yIiF; 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 D236D680CC5; Thu, 13 May 2021 10:06:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5AA0D680BD2 for ; Thu, 13 May 2021 10:06:30 +0300 (EEST) Received: by mail-pf1-f169.google.com with SMTP id d16so141124pfn.12 for ; Thu, 13 May 2021 00:06:30 -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=bac5SVfA1AwS/xydb8QwRfHsJ4gBkRGmntAF+Dv73CM=; b=Fk2+yIiFbPLATZfeiOjGM7UZ7ar01YtQG9gAiLc3R1gWNnCr02PcSw8nInIgWfFNhj OLdcRJoJPGu7YkMPP9IKKQxxosyA/6EcgUR+EcNyvx9YBxYJ9bT3PwmI8VVjbO/PXwxQ bDYnY8zrTESRxCE5X6M9doUw1JmPNmCaltmKHXglZ2ENsmRKKQJoSC19Uyrw5RLmKCWw WG1+1MtF+HGb7/D/azWgp6tTQypx67R4LFHSF+Vv1Ks8qIuLIBPelv8BmPPx0v4t2OZJ 2hptIfZoiXOhT5oXAbmi6aoaFNIVjFr41eUodQEsenlHwwps1FA80jDseufbxtHINNWJ ssQw== 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=bac5SVfA1AwS/xydb8QwRfHsJ4gBkRGmntAF+Dv73CM=; b=H6jLEgwpDhwcLT3UCSck97CY49/9L91Ie4bjMDg1xsM36ffH3lt0yXYL2AyrHYE05/ wlW/chsHupChWQ5+1BIgC+UMwilMBc7PL3gqaHCVkSZyKAiFWxWO8lQVxI9VFTQs/YLp dpbjBuq8wq7m/TjUv1XbmbROnc+95liYFEnERs3dQXWwjoOA6Pu4I8NCIY3pmuioq5I+ 3Ztrrw5bZo+orGZsrWbJM1Rt6BvMiurwT/020PjiZ3cezrF37AFCJTakbJpPbubmmyZn Ab5dVhyOMqWwZsbHFOewIxVRz9gV4LUACD8neUw+JCj5nPaPVXTUf6N2LxcOJfmppLEK 6XXg== X-Gm-Message-State: AOAM533cLvYlwFcg95G0M/FxYVXhWpkrT9C40Bk5loEgLfi4daAiC7sJ +yTrmgFiinbAAlFF+WGftE+GlzkOAILjig== X-Received: by 2002:a65:4382:: with SMTP id m2mr39936888pgp.354.1620889588677; Thu, 13 May 2021 00:06:28 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:06:28 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 May 2021 12:34:23 +0530 Message-Id: <20210513070423.14234-5-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 5/5] lavfi/dnn_backend_native_layer_mathunary.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: TwOb5JyPAV7o Add documentation for Unary Math Layer Signed-off-by: Shubhanshu Saxena --- .../dnn/dnn_backend_native_layer_mathunary.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h index 151a73200a..87f99d7d67 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h +++ b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h @@ -54,7 +54,37 @@ typedef struct DnnLayerMathUnaryParams{ DNNMathUnaryOperation un_op; } DnnLayerMathUnaryParams; +/** + * @brief Load the Unary Math Layer. + * + * It assigns the unary math layer with DnnLayerMathUnaryParams + * 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 out of memory or an error occurs + */ int ff_dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +/** + * @brief Execute the Unary Math Layer. + * + * It applies the unary operator parsed while + * loading to the given input operands. + * + * @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_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx);