From patchwork Thu Aug 2 18:52:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Lavrushkin X-Patchwork-Id: 9873 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp2401239jad; Thu, 2 Aug 2018 12:00:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc/NGhzRLSK0kYf2GunDAfekqsz5BSgXP50j6lmSvSeVh9agNyRtg0YfKb9cyz8SzW0+NZB X-Received: by 2002:adf:aa0b:: with SMTP id p11-v6mr445007wrd.220.1533236436346; Thu, 02 Aug 2018 12:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533236436; cv=none; d=google.com; s=arc-20160816; b=dpfl1vjM4lELr29E6VWhQpxYQaoyzcfq5MRUucSaPoegpY4u1g2Ho6rc8XAHn9G5nD AJKKP9n+cRsXgyJ1S1aki8RP5yiL7dFbomff0lM8tlVu05LasKAYwkbT4t2LoEnEXHdv pg5p90q78JC6s5/K6st1BLWJ73b1/YNltOxwU0wFZRyVzUtrbIiQgYh2SZi/6OT0v0pU GMLhymfxeoqM+oLNFwDpMIor7Hu/pRp4qCtLJdYUkU2w+5MCk3X29O77a+WO/1qYMPuv yKx+yX8to0I3ISPGiwmB/E25pV8P4f8Lwzn8rMxD0gwfSR1VGH5a8lhR7h8/iHGLn76+ hNJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=bOFJOfFKOCsytnPLRMW7M7nLcjS1ZQjxVBBKah73BsI=; b=O7mumuCa+u+LbvY53HIN7kGMYAPXVXgM7TCjyqxK9jAjQoQTkmLq6sP2QWsw2fJXXM 6ADWedmxmNdpMJUo+uxteiQ5CwLzSzC9wDQRGP7zxt/AvihslBpnIngGFzsdAX7WyPWe WDNdE9NjM9Yyz2dspXI8EWgJgZtIbstVX6f0Ho410UzES559nUUhkjv9WpK6hppZc0dL tK5Z6XmXZb21K//p2anXGGWMtELbSl4yKSNSxZfclMNO6Xa+G5s9bMc269eFWfcGQixq OcFdR1NxbEL4wAhxvSNxKeutZ69pszDBcMwu7JOndb0mWijxGarlZVOxlnabE205mai7 v26Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=FCYcn41N; 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 68-v6si2149415wra.134.2018.08.02.12.00.35; Thu, 02 Aug 2018 12:00:36 -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=FCYcn41N; 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 BEF7C68A3E8; Thu, 2 Aug 2018 22:00:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9180A6882FE for ; Thu, 2 Aug 2018 22:00:10 +0300 (EEST) Received: by mail-lj1-f177.google.com with SMTP id f1-v6so2814221ljc.9 for ; Thu, 02 Aug 2018 12:00: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:in-reply-to:references; bh=A/KYF60nWDddEgAQA5EuTXmlZoLXrleFlyKDbS9D0VU=; b=FCYcn41N1byPPc00IkAX7/gH56DK6RmPTZ8ax8Z2wAhQMWKYpBuKqsnIDpsDNqrDa1 MWg600O2tVoJ6P/oCjZ4vy2s/tiqa0pA1WGz3LmvAEx+7jFyh1w4Fkzg0yh/hIHVH3kg MJcnyBEGZr94o33GLvjnybJg9gaKJ25cCKJvz0HzGxz0mwyEq1k0w3gU5X8d381G1/I2 lCh/4lIDf4xhbWZUDjJGdi6gnd0OM07PY9AJT5ffIGndvch1YB+KAsUVxbwZYI0gY3Ab KM/OVPrrf0K2DFK+hVnKhHpW3WUvZqsHd4sGnEYAdY+KN3xcpKq3ebt6PpFZ4q8AfLuz NB8A== 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; bh=A/KYF60nWDddEgAQA5EuTXmlZoLXrleFlyKDbS9D0VU=; b=fOZTVkZyF+P/Lmn0DdICMbs45N4vT4MZATjZ6z/SHZ+kidcx3/D6JVZ2W/SBAREWm1 K2qYeRZwnF4hUdDNhXnvZm537subz2CJ2UAu0YBwNPYTgFwd0TQ//LNqhpZwhjWGIUTR 81gHaQR8ZF7CJnEFMV0bp10rVDYeGOIsFuVKqxWU+FNn/lX3MUmb85Ax1Mm/R4w2WkWN TmRbA8o5hAGZdRLqvAId7iHTr7SrkP6mFdhgnZFY9+Ebm+gmlglJi4rmnlrxSrQNi0Oq n/prqlVbVixtfd7P7pL731RQj16HIjBnQgK1WZiXIsDQhRpIKjGhHaDa9RKEEzT9kBhr Wetg== X-Gm-Message-State: AOUpUlEmRg9F0xhPxWRo36rVQoK13mPPm22n1GoivwB6h3zy/F2eLHfU F2UHGhqZuyt8mzs8uTrp37bdipoo X-Received: by 2002:a2e:8147:: with SMTP id t7-v6mr3260404ljg.32.1533236063289; Thu, 02 Aug 2018 11:54:23 -0700 (PDT) Received: from localhost.localdomain (nat-1-27.msu.umos.ru. [85.89.127.27]) by smtp.gmail.com with ESMTPSA id h4-v6sm410377lfj.69.2018.08.02.11.54.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 11:54:22 -0700 (PDT) From: Sergey Lavrushkin To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 Aug 2018 21:52:44 +0300 Message-Id: <20180802185248.18168-4-dualfal@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180802185248.18168-1-dualfal@gmail.com> References: <20180802185248.18168-1-dualfal@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/7] libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Sergey Lavrushkin MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/dnn_backend_tf.c | 64 +++++++++++++++++++++++++++++++++++++++++++- libavfilter/dnn_espcn.h | 37 ------------------------- libavfilter/dnn_srcnn.h | 35 ------------------------ 3 files changed, 63 insertions(+), 73 deletions(-) diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c index 6307c794a5..7a4ad72d27 100644 --- a/libavfilter/dnn_backend_tf.c +++ b/libavfilter/dnn_backend_tf.c @@ -374,9 +374,71 @@ DNNModel *ff_dnn_load_default_model_tf(DNNDefaultModel model_type) TFModel *tf_model = NULL; TF_OperationDescription *op_desc; TF_Operation *op; - TF_Operation *const_ops_buffer[6]; TF_Output input; int64_t input_shape[] = {1, -1, -1, 1}; + const char tanh[] = "Tanh"; + const char sigmoid[] = "Sigmoid"; + const char relu[] = "Relu"; + + const float *srcnn_consts[] = { + srcnn_conv1_kernel, + srcnn_conv1_bias, + srcnn_conv2_kernel, + srcnn_conv2_bias, + srcnn_conv3_kernel, + srcnn_conv3_bias + }; + const long int *srcnn_consts_dims[] = { + srcnn_conv1_kernel_dims, + srcnn_conv1_bias_dims, + srcnn_conv2_kernel_dims, + srcnn_conv2_bias_dims, + srcnn_conv3_kernel_dims, + srcnn_conv3_bias_dims + }; + const int srcnn_consts_dims_len[] = { + 4, + 1, + 4, + 1, + 4, + 1 + }; + const char *srcnn_activations[] = { + relu, + relu, + relu + }; + + const float *espcn_consts[] = { + espcn_conv1_kernel, + espcn_conv1_bias, + espcn_conv2_kernel, + espcn_conv2_bias, + espcn_conv3_kernel, + espcn_conv3_bias + }; + const long int *espcn_consts_dims[] = { + espcn_conv1_kernel_dims, + espcn_conv1_bias_dims, + espcn_conv2_kernel_dims, + espcn_conv2_bias_dims, + espcn_conv3_kernel_dims, + espcn_conv3_bias_dims + }; + const int espcn_consts_dims_len[] = { + 4, + 1, + 4, + 1, + 4, + 1 + }; + const char *espcn_activations[] = { + tanh, + tanh, + sigmoid + }; input.index = 0; diff --git a/libavfilter/dnn_espcn.h b/libavfilter/dnn_espcn.h index a0dd61cd0d..9344aa90fe 100644 --- a/libavfilter/dnn_espcn.h +++ b/libavfilter/dnn_espcn.h @@ -5398,41 +5398,4 @@ static const long int espcn_conv3_bias_dims[] = { 4 }; -static const float *espcn_consts[] = { - espcn_conv1_kernel, - espcn_conv1_bias, - espcn_conv2_kernel, - espcn_conv2_bias, - espcn_conv3_kernel, - espcn_conv3_bias -}; - -static const long int *espcn_consts_dims[] = { - espcn_conv1_kernel_dims, - espcn_conv1_bias_dims, - espcn_conv2_kernel_dims, - espcn_conv2_bias_dims, - espcn_conv3_kernel_dims, - espcn_conv3_bias_dims -}; - -static const int espcn_consts_dims_len[] = { - 4, - 1, - 4, - 1, - 4, - 1 -}; - -static const char espcn_tanh[] = "Tanh"; - -static const char espcn_sigmoid[] = "Sigmoid"; - -static const char *espcn_activations[] = { - espcn_tanh, - espcn_tanh, - espcn_sigmoid -}; - #endif diff --git a/libavfilter/dnn_srcnn.h b/libavfilter/dnn_srcnn.h index 26143654b8..4f5332ce18 100644 --- a/libavfilter/dnn_srcnn.h +++ b/libavfilter/dnn_srcnn.h @@ -2110,39 +2110,4 @@ static const long int srcnn_conv3_bias_dims[] = { 1 }; -static const float *srcnn_consts[] = { - srcnn_conv1_kernel, - srcnn_conv1_bias, - srcnn_conv2_kernel, - srcnn_conv2_bias, - srcnn_conv3_kernel, - srcnn_conv3_bias -}; - -static const long int *srcnn_consts_dims[] = { - srcnn_conv1_kernel_dims, - srcnn_conv1_bias_dims, - srcnn_conv2_kernel_dims, - srcnn_conv2_bias_dims, - srcnn_conv3_kernel_dims, - srcnn_conv3_bias_dims -}; - -static const int srcnn_consts_dims_len[] = { - 4, - 1, - 4, - 1, - 4, - 1 -}; - -static const char srcnn_relu[] = "Relu"; - -static const char *srcnn_activations[] = { - srcnn_relu, - srcnn_relu, - srcnn_relu -}; - #endif