From patchwork Fri May 14 07:11:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27767 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp211152iof; Fri, 14 May 2021 00:24:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwybI0AY/oty5JdEG1LO5kAVnzHfL/Gx9+ZKdh9RSTza+VZqtX2dpvpBCTDp7iFIseMS8eH X-Received: by 2002:a17:906:e281:: with SMTP id gg1mr47105948ejb.463.1620977039880; Fri, 14 May 2021 00:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620977039; cv=none; d=google.com; s=arc-20160816; b=z1qCx1NAGlp2Vn8GOQ1y+p3+MPymGY+sNppsWxpcvW+06i/CbGTYvVSGswa9oIXyFO YlxvHxarxR7FFUKEiHZDVmb3h7euOvPhS5afc8yr2xvbyPUjKhliKnP5rvdzzrWg2NHm XX4icLW/rlmuS7cqvR9OrRna2BpTNAaMkqzFSCzAwe0r37ok8qLpMEQD4gmpv+ayUgUT F0OsU3j83sVrfNeeAp3loxYMt0dKl+ldD++YdAU3wZ32h3/B3tCBmfxTSruv5LiNKgRp vxBr4wV/TfxMh9HfqGo9AG1JqbVZ0K2VyBDYT36iYmi/Fjvpx/vq485Y1uJZGmxl/r/K tqKg== 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=uP0h8FArgYJzgMzBqEjBQgvR+k5YA/P7oHNbvv9mGEI=; b=dRR5VA1O+10BcZnEked45Venvxk/vRzJ4U7yH0QH9xDTKaKTg9JwZ0Y5CjeHsbsMHK 3Ao/kqrR5/ZA/9Pjl3U7V6xU6/YtfyJji5e1S/P3it9o4pPmmFUiz4aXI9oyL9Uz22YZ fxS/3SiyWyKlmrqgWl1PGOLDcA6XldRKcufdbvl/r6QphblQgd4GteGifEXCejCvvM0O 9B8NeFSV6U/6qGb4vfGIqGvSHpw79wFeWXpQr+sUBq3kJYH6FNs4a0i+lOc5oH7dhI3u GdF+2aTMeQv/Nk1tNTNIrac5NhlONCuqqGzhXaSEjNrhMSsgU/HtpKYr+Imp4X7SS6dr 1DHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=XsjAjopD; 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 bk20si5193468ejb.185.2021.05.14.00.23.59; Fri, 14 May 2021 00:23:59 -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=XsjAjopD; 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 E14D468812C; Fri, 14 May 2021 10:23:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3184B680C8C for ; Fri, 14 May 2021 10:23:51 +0300 (EEST) Received: by mail-pj1-f45.google.com with SMTP id b9-20020a17090a9909b029015cf9effaeaso1239368pjp.5 for ; Fri, 14 May 2021 00:23:51 -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=esZe/lqeUIhI9ZjyMx36MEK20jkGoOvrDiCGVKWC5Ak=; b=XsjAjopDpE8ZkCqhgnlAsQs4DmKaTovodLOw+TNTzuYQbMarLGZ06+jAAMcB6387BM KlmIQbup79EqNZLVRuQvayXqjahBgRItMw4h4YGKXiC/56Z9XDmC4FvbuRS75t1YDHBU DZ434/RHmqpN5rFgq0oAFcIdvLvkvVUoJIQtvQIMJv/WpyfquBlRPVcztgX86BdfeYeM wypwNmh87N2Ij6FDxjWDVg+lkfp6AHUXxIbw2jwGz31Kz2KJp2UUuS/BUxg6LnDwtHDR 9giODJDDMNjSYBjMFshLDJ8ubsQUGv/tQqfTf/Rxi75jJXh4Xa5RzV33eHnbN5cZFEoi LBlg== 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=esZe/lqeUIhI9ZjyMx36MEK20jkGoOvrDiCGVKWC5Ak=; b=bQwT6593FERiaxAdGzEAwBR/LzdJ1VYl4izR3b6Ywg6qj55jq4I1DK2QZS8MM66dPS As4AlPzdG8R3h5RsdqYl4wEdImWlJpXLOl0lCyhr6JVTCm0jlGGSN8NdHMw1hfNlpIA+ xEfCPocGtYheK6P40b574qZLFBKBp8Ck/9XNNyPz16/xDLNEtaViMTgWOU5KsP1TuLK7 pbxgs6zf+cpLfSs4l4lY3MbfipxSulHTYlYOW36ErbMZNVY49MX/G1QwOrxghSsaaM4X mG0DVWJQcUjabBUxV7eqC8wlaufxccIkkCT70HeFRvGVEibrgX1596qVVS8XT7niDxtE 7C6A== X-Gm-Message-State: AOAM5314kRNWRRQ5CNxc8kWqTRK7txaDuuxfJRCwE16zN4j2QnNOoCGW r97pjzYxzx/Kq5s4WbSN7qaEV1NgIeJB/A== X-Received: by 2002:a62:7c45:0:b029:27f:f30e:f0df with SMTP id x66-20020a627c450000b029027ff30ef0dfmr45177343pfc.49.1620976523682; Fri, 14 May 2021 00:15:23 -0700 (PDT) Received: from localhost.localdomain ([117.208.72.147]) by smtp.googlemail.com with ESMTPSA id p14sm4261627pjh.27.2021.05.14.00.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 00:15:23 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 May 2021 12:41:02 +0530 Message-Id: <20210514071104.23670-1-shubhanshu.e01@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V5 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: v6yRf3JbVRxN 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..446f48f608 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 out of memory or an error occurs + */ 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 convolution 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 Fri May 14 07:11:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27768 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp225038iof; Fri, 14 May 2021 00:42:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcLH6gG9M0ZRehAW2GOu4AQXvtf3HCJruG4VHJl6uwcnAU7wvTFc+Wa6KLddQ805e6XKZL X-Received: by 2002:a05:6402:254a:: with SMTP id l10mr55121521edb.145.1620978126814; Fri, 14 May 2021 00:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620978126; cv=none; d=google.com; s=arc-20160816; b=uT/DdShgwCj3Sw538ZAntPbIzF5fa0UrfXLX1o2a/rkizzuTdrgxmRgdeDQGic3syw B2Gg9AmjBFSJNWItjevR6GD7+uftoaqHhWo34Da11pkbUhfD6emZvyumR0jysNrVJ/Wc qN+pTIu9K8Zvc07m82rc1552/YhcUFnLd3Cb/gx2MjosyNTQom3EoDWmWwDKxIaEGEe8 rKBzvFD28NEezLH8bxD4s8Hbw62aphogS/0axuEJ0QAJGi8LZSG5L8HPRUXBzhSGaq4c t9mO15iIKPfs/d0ECBv5el6OOgevd/OH71oGB8A5//TtWz3DWovWJP5BK/eVMqVNgmDi 7aEw== 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=DXs7S3CboZWGmjQysixlKbM+IUljcOGZXTc58wO6FTM=; b=sHr3wv/JxfB7q0lgv/MQlb7juejBlitADqwTntF5/lus2bvLbzJPw3IirjlnyiPvTF 0Rfh2+Y70KQOCyB+9Wz7JxAga9vW1uyuQPWCSwNr1OkitpBqCXQKLrjVUzglTGDD7hhj AVhuknR8+jiXok1O5jvuvnr2K63Fvia/0PfK2ER3wB0uKQnX/Wi1oFevsf09Kpk/y786 iXGRkmBw0gHePuoJqzIFBObv8I8r6QNmQcxk8xAc8IQfoLNKdq/22nFzecTBNkvTxeNe rrRA8NYJv8XrLDvVM32sDlM9TOG+tkbqLU2QnqVNBrSb/3sBuYsLhLHAag4hNLks4uWF QpcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=GDqgUTuh; 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 d23si1169084edp.175.2021.05.14.00.42.06; Fri, 14 May 2021 00:42:06 -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=GDqgUTuh; 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 40109680396; Fri, 14 May 2021 10:42:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B4B56808DA for ; Fri, 14 May 2021 10:41:56 +0300 (EEST) Received: by mail-oi1-f174.google.com with SMTP id v22so22855926oic.2 for ; Fri, 14 May 2021 00:41:56 -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=cvIoGy0dspQLpqmIRS/PJ2+KXIxeQ1+DwNsIQYCG/iM=; b=GDqgUTuh4ty4qT1kU3Z/uBiMphVKDdSNTsweS//bK8aBvUoFWhSJWHrzBrsISLPRXD Kaim47hfD7n0PL4GlrhSpa7MK39FqrRzh2V+HcAADoNfH6bKjyg0VaNtCKJJ48hzJYQ3 bbd8sNdlUL0a0sFH3EDxrQtOa07gvRNqERbulSY22Ovmwvpna4FOiBKr8eiDo78uocRQ cSoSGYPU5mBb3PxrS7KCYzU/MwJ7iULxzMYFqKz7N1dTj/eKiTRUoO678DNn98F0z8Sk LP/PfNuzp691BrDOrTfRbS/c+OteVC2gQQAuK79R+e8nTP+fWE3M/6KldSkUxDpS5vCO Dh7A== 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=cvIoGy0dspQLpqmIRS/PJ2+KXIxeQ1+DwNsIQYCG/iM=; b=Bpx6xgkpxhRqPjMcsG1zPd29y0mWfdOpjvJ3yEdUS9hmh1c35oJb+aqH4GGOx+7P/E DuzsYGVS2kWhhbJ5bPtSC1RDOGr7v5HoOhxXK2FkDZFOuFePSkQUFr1lRedE9WNXvZZT 9jVqWm6ugcEbapWhfqY5WTjGTFB0jqGqztM8YpW8eH0w4cIC/2QmNlHIjKu4HeO5cMWK 9MdCU/ucixCAHhbtNVovWY4FHicGDaIDHiUqUI0sqqq6OtDfVGXHis8PH0ydYg6bK0ZA qQzl9819MTpP2aEZvmL160sUj/F7hCeBdjRG9zLRZkKlnu5WAdqK5kHessNTgWxNfZ9z x2MQ== X-Gm-Message-State: AOAM530mfl5X/q7rZ1zB4ZG6J6XCXo+md1DRG+6wMY//01EP2er/6wtl OP2v2vImEjIaBwGzTtx6bVmwnfIrioernA== X-Received: by 2002:a17:90b:3b92:: with SMTP id pc18mr39671661pjb.218.1620976560362; Fri, 14 May 2021 00:16:00 -0700 (PDT) Received: from localhost.localdomain ([117.208.72.147]) by smtp.googlemail.com with ESMTPSA id p14sm4261627pjh.27.2021.05.14.00.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 00:16:00 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 May 2021 12:41:04 +0530 Message-Id: <20210514071104.23670-2-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 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: 0mKQcn2m8+k0 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..0488b03cc3 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 dense 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_dense(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx); #endif 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); From patchwork Fri May 14 07:11:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhanshu Saxena X-Patchwork-Id: 27766 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp206949iof; Fri, 14 May 2021 00:17:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbl4bt7uPdJf5fVpzteTFm6Ke2W0QXwqOD1qUH2tHS7ZYL59x8tdd4W+I+iqXh+FhNwuw5 X-Received: by 2002:a17:906:46d1:: with SMTP id k17mr3468047ejs.77.1620976671669; Fri, 14 May 2021 00:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620976671; cv=none; d=google.com; s=arc-20160816; b=EJ+SJh7DBaH8OwwoiXw/sEdN3o5L3RlfbS4BB9NcOEYUXeKiru9vtw6xO6BvAJNsRs OXt9/U7M+S5QduapumTIa8cMrl289EKa2C4WStW60/2j9jXk7QLLiX0GAw4Wezx6JkTv OYNV9n6mhA4OxjZ5dMKBkT8wRfY+V1kEfh9L2mrN0moXl3FTYX/oqoCA4UqFTnEi6RsP bZYBLZKjvNHICk3gh0xhpyIFT8c7l60lLQrXR+x9bzSt0yjbbvz89rdcJleBP/0/oKWY 4vtSZJMxsDuOof7B0qC2LRi8zpfoOt6Xh5fL25Gv553HavE24Gg0xAC8Dr7JGSxvd+4y ee0Q== 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=c9PIEVRAt6xY6aFidi2dlyAluSX+KsJ0iR62388RLj8=; b=Mr2nL9UTOqfcUDGC/KoEc/eTON1oHN9852QWo8nt+FOWtUNra4M3WLnAPV7Xdigyu3 sBN2OFMfB1LEfC603uQNg/p4vWCBHb2fkkuUZMkPaX0pLLUE2oI0gwovBFQWjsYCuOc+ 7vHV1halxPhPkk4Dc0CxHgAqTqfsHUirac3SapKUnWiXYch+IO/JcOyFxOemNwXu5JPo jzNeHvc6BAfhvAERlEfml4FlxdAA3kDA+Pvb0kHr0itDExzoTPFjOS0nimCKTIR/jYtb ppU4QYbnpzfh7FuF4Pd9i+Gwv6LtlynCHchY93e9lBhm99tq5SqxAtjLb6Kz5q8oL5rY 0k1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=rKCiVNmk; 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 b11si4781681edj.174.2021.05.14.00.17.51; Fri, 14 May 2021 00:17:51 -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=rKCiVNmk; 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 4E75F688128; Fri, 14 May 2021 10:17:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7DC38687FD9 for ; Fri, 14 May 2021 10:17:47 +0300 (EEST) Received: by mail-pl1-f181.google.com with SMTP id z18so12192643plg.8 for ; Fri, 14 May 2021 00:17:47 -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=Krg+TzG+uYKY5oL9of6D+z6steCAVmxKrDjhwcbvdz0=; b=rKCiVNmkV4io874izf2WbLNbBO8HjrmBBtahuWrIYnLndz25jBllMDiFvYLvDSTo33 Owi0hFVvYf30qzQqQSakrGRBtgjLUr6BREwihrDyT1HAyP/RquD4NXxEd6YHX4vC3Iy9 4TxFc669khMqjNcI6W1/tOTC54P30o7pPYCeXdNIEmHvWB7qsvmPU6TU98gVRAY6sILI HvKNa11d7UHkLkvvFcOAlC6X3G6lG+ZsvkgRaC14iNjPFMRyva8+cHk3LEposaSxk+X9 UjOM/smM+gier/na+l37kbYakLqUL5fGa2oWIWoAV8NcD17If9kYUapDBcbA0i5RiY7i QmpA== 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=Krg+TzG+uYKY5oL9of6D+z6steCAVmxKrDjhwcbvdz0=; b=bZqH+iE3SNBHtWzS0Qn4u7fclVwOiP4k7fUK38mXypvMdcex3+ok97HrtA1+gKkvkY 7KDq4xUE8kqdMkQgN2rQKCDdgzjTa6hROUoNqg3CKmsEO67iEaCtMhn/OSKYzYO700wY Mh2BK271bxjmxWk/TFgW6yDiC+EsHjphL8EW9M7mAZ9amspHZ+xUxxMmxv4FV2VH2yOG JI5ThkKaZ2qelZV+26irkIYp9LiMQZeBIk3Y8sz9ONxafpScKbR6u3A2HbAAeZ7IO6fK vj7ftcJJt/I14EH1jsIN1XHYZUk/bVEyfTwdDYzewYDPYpoHQKdLI7v5r6jkIBL1DIkq rrrQ== X-Gm-Message-State: AOAM5338/dOkET2O1xJHVzYBQ03ExgSLSXDPR88iqrFVyy5TG54Jq+em ahi9ex/g/C1SR/ZinQkl6Pq6PTTudNFHiQ== X-Received: by 2002:a17:902:104:b029:ec:9fa6:c08 with SMTP id 4-20020a1709020104b02900ec9fa60c08mr44740562plb.10.1620976664715; Fri, 14 May 2021 00:17:44 -0700 (PDT) Received: from localhost.localdomain ([117.208.72.147]) by smtp.googlemail.com with ESMTPSA id p14sm4261627pjh.27.2021.05.14.00.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 00:17:44 -0700 (PDT) From: Shubhanshu Saxena To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 May 2021 12:41:08 +0530 Message-Id: <20210514071104.23670-4-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 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: T6lF9ITrzEus 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..ed79947896 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 unary math 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_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx);