diff mbox

[FFmpeg-devel,GSOC] On the fly generation of default DNN models and code style fixes

Message ID CAAeE=qph+GUigiWMDG7OLkPHCw10ZPz9StQbdOmajZ0=dKTwbQ@mail.gmail.com
State New
Headers show

Commit Message

Sergey Lavrushkin July 28, 2018, 10 a.m. UTC
2018-07-28 4:31 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:

> On Fri, Jul 27, 2018 at 08:06:15PM +0300, Sergey Lavrushkin wrote:
> > Hello,
> >
> > The first patch provides on the fly generation of default DNN models,
> > that eliminates data duplication for model weights. Also, files with
> > internal weights
> > were replaced with automatically generated one for models I trained.
> > Scripts for training and generating these files can be found here:
> > https://github.com/HighVoltageRocknRoll/sr
> > Later, I will add a description to this repo on how to use it and
> benchmark
> > results for trained models.
> >
> > The second patch fixes some code style issues for pointers in DNN module
> > and sr filter. Are there any other code style fixes I should make for
> this
> > code?
>
>
> It seems the code with these patches produces some warnings:
>
> In file included from libavfilter/dnn_backend_native.c:27:0:
> libavfilter/dnn_srcnn.h:2113:21: warning: ‘srcnn_consts’ defined but not
> used [-Wunused-variable]
>  static const float *srcnn_consts[] = {
>                      ^
> libavfilter/dnn_srcnn.h:2122:24: warning: ‘srcnn_consts_dims’ defined but
> not used [-Wunused-variable]
>  static const long int *srcnn_consts_dims[] = {
>                         ^
> libavfilter/dnn_srcnn.h:2142:20: warning: ‘srcnn_activations’ defined but
> not used [-Wunused-variable]
>  static const char *srcnn_activations[] = {
>                     ^
> In file included from libavfilter/dnn_backend_native.c:28:0:
> libavfilter/dnn_espcn.h:5401:21: warning: ‘espcn_consts’ defined but not
> used [-Wunused-variable]
>  static const float *espcn_consts[] = {
>                      ^
> libavfilter/dnn_espcn.h:5410:24: warning: ‘espcn_consts_dims’ defined but
> not used [-Wunused-variable]
>  static const long int *espcn_consts_dims[] = {
>                         ^
> libavfilter/dnn_espcn.h:5432:20: warning: ‘espcn_activations’ defined but
> not used [-Wunused-variable]
>  static const char *espcn_activations[] = {
>                     ^
>

Here is the patch, that fixes these warnings.

Comments

Michael Niedermayer July 29, 2018, 11:01 p.m. UTC | #1
On Sat, Jul 28, 2018 at 01:00:53PM +0300, Sergey Lavrushkin wrote:
> 2018-07-28 4:31 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:
> 
> > On Fri, Jul 27, 2018 at 08:06:15PM +0300, Sergey Lavrushkin wrote:
> > > Hello,
> > >
> > > The first patch provides on the fly generation of default DNN models,
> > > that eliminates data duplication for model weights. Also, files with
> > > internal weights
> > > were replaced with automatically generated one for models I trained.
> > > Scripts for training and generating these files can be found here:
> > > https://github.com/HighVoltageRocknRoll/sr
> > > Later, I will add a description to this repo on how to use it and
> > benchmark
> > > results for trained models.
> > >
> > > The second patch fixes some code style issues for pointers in DNN module
> > > and sr filter. Are there any other code style fixes I should make for
> > this
> > > code?
> >
> >
> > It seems the code with these patches produces some warnings:
> >
> > In file included from libavfilter/dnn_backend_native.c:27:0:
> > libavfilter/dnn_srcnn.h:2113:21: warning: ‘srcnn_consts’ defined but not
> > used [-Wunused-variable]
> >  static const float *srcnn_consts[] = {
> >                      ^
> > libavfilter/dnn_srcnn.h:2122:24: warning: ‘srcnn_consts_dims’ defined but
> > not used [-Wunused-variable]
> >  static const long int *srcnn_consts_dims[] = {
> >                         ^
> > libavfilter/dnn_srcnn.h:2142:20: warning: ‘srcnn_activations’ defined but
> > not used [-Wunused-variable]
> >  static const char *srcnn_activations[] = {
> >                     ^
> > In file included from libavfilter/dnn_backend_native.c:28:0:
> > libavfilter/dnn_espcn.h:5401:21: warning: ‘espcn_consts’ defined but not
> > used [-Wunused-variable]
> >  static const float *espcn_consts[] = {
> >                      ^
> > libavfilter/dnn_espcn.h:5410:24: warning: ‘espcn_consts_dims’ defined but
> > not used [-Wunused-variable]
> >  static const long int *espcn_consts_dims[] = {
> >                         ^
> > libavfilter/dnn_espcn.h:5432:20: warning: ‘espcn_activations’ defined but
> > not used [-Wunused-variable]
> >  static const char *espcn_activations[] = {
> >                     ^
> >
> 
> Here is the patch, that fixes these warnings.

>  dnn_backend_tf.c |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  dnn_espcn.h      |   37 -------------------------------
>  dnn_srcnn.h      |   35 ------------------------------
>  3 files changed, 63 insertions(+), 73 deletions(-)
> 1faef51b86165326a4693c07a203113e2c85f7fb  0003-libavfilter-Fixes-warnings-for-unused-variables-in-d.patch
> From 37cd7bdf2610e1c3e89210a49e8f5f3832726281 Mon Sep 17 00:00:00 2001
> From: Sergey Lavrushkin <dualfal@gmail.com>
> Date: Sat, 28 Jul 2018 12:55:02 +0300
> Subject: [PATCH 3/3] libavfilter: Fixes warnings for unused variables in
>  dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.
> 
> ---
>  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
> +    };

not important at all but, why do you remove "static" from these ?

[...]
Sergey Lavrushkin July 30, 2018, 4:59 p.m. UTC | #2
2018-07-30 2:01 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:

> On Sat, Jul 28, 2018 at 01:00:53PM +0300, Sergey Lavrushkin wrote:
> > 2018-07-28 4:31 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:
> >
> > > On Fri, Jul 27, 2018 at 08:06:15PM +0300, Sergey Lavrushkin wrote:
> > > > Hello,
> > > >
> > > > The first patch provides on the fly generation of default DNN models,
> > > > that eliminates data duplication for model weights. Also, files with
> > > > internal weights
> > > > were replaced with automatically generated one for models I trained.
> > > > Scripts for training and generating these files can be found here:
> > > > https://github.com/HighVoltageRocknRoll/sr
> > > > Later, I will add a description to this repo on how to use it and
> > > benchmark
> > > > results for trained models.
> > > >
> > > > The second patch fixes some code style issues for pointers in DNN
> module
> > > > and sr filter. Are there any other code style fixes I should make for
> > > this
> > > > code?
> > >
> > >
> > > It seems the code with these patches produces some warnings:
> > >
> > > In file included from libavfilter/dnn_backend_native.c:27:0:
> > > libavfilter/dnn_srcnn.h:2113:21: warning: ‘srcnn_consts’ defined but
> not
> > > used [-Wunused-variable]
> > >  static const float *srcnn_consts[] = {
> > >                      ^
> > > libavfilter/dnn_srcnn.h:2122:24: warning: ‘srcnn_consts_dims’ defined
> but
> > > not used [-Wunused-variable]
> > >  static const long int *srcnn_consts_dims[] = {
> > >                         ^
> > > libavfilter/dnn_srcnn.h:2142:20: warning: ‘srcnn_activations’ defined
> but
> > > not used [-Wunused-variable]
> > >  static const char *srcnn_activations[] = {
> > >                     ^
> > > In file included from libavfilter/dnn_backend_native.c:28:0:
> > > libavfilter/dnn_espcn.h:5401:21: warning: ‘espcn_consts’ defined but
> not
> > > used [-Wunused-variable]
> > >  static const float *espcn_consts[] = {
> > >                      ^
> > > libavfilter/dnn_espcn.h:5410:24: warning: ‘espcn_consts_dims’ defined
> but
> > > not used [-Wunused-variable]
> > >  static const long int *espcn_consts_dims[] = {
> > >                         ^
> > > libavfilter/dnn_espcn.h:5432:20: warning: ‘espcn_activations’ defined
> but
> > > not used [-Wunused-variable]
> > >  static const char *espcn_activations[] = {
> > >                     ^
> > >
> >
> > Here is the patch, that fixes these warnings.
>
> >  dnn_backend_tf.c |   64 ++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++-
> >  dnn_espcn.h      |   37 -------------------------------
> >  dnn_srcnn.h      |   35 ------------------------------
> >  3 files changed, 63 insertions(+), 73 deletions(-)
> > 1faef51b86165326a4693c07a203113e2c85f7fb  0003-libavfilter-Fixes-
> warnings-for-unused-variables-in-d.patch
> > From 37cd7bdf2610e1c3e89210a49e8f5f3832726281 Mon Sep 17 00:00:00 2001
> > From: Sergey Lavrushkin <dualfal@gmail.com>
> > Date: Sat, 28 Jul 2018 12:55:02 +0300
> > Subject: [PATCH 3/3] libavfilter: Fixes warnings for unused variables in
> >  dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.
> >
> > ---
> >  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
> > +    };
>
> not important at all but, why do you remove "static" from these ?
>

I moved it to the function where it is only used, and thought it should not
be static in it.
Are there some reasons to declare these consts static?
Michael Niedermayer July 30, 2018, 10:40 p.m. UTC | #3
On Mon, Jul 30, 2018 at 07:59:00PM +0300, Sergey Lavrushkin wrote:
> 2018-07-30 2:01 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:
> 
> > On Sat, Jul 28, 2018 at 01:00:53PM +0300, Sergey Lavrushkin wrote:
> > > 2018-07-28 4:31 GMT+03:00 Michael Niedermayer <michael@niedermayer.cc>:
> > >
> > > > On Fri, Jul 27, 2018 at 08:06:15PM +0300, Sergey Lavrushkin wrote:
> > > > > Hello,
> > > > >
> > > > > The first patch provides on the fly generation of default DNN models,
> > > > > that eliminates data duplication for model weights. Also, files with
> > > > > internal weights
> > > > > were replaced with automatically generated one for models I trained.
> > > > > Scripts for training and generating these files can be found here:
> > > > > https://github.com/HighVoltageRocknRoll/sr
> > > > > Later, I will add a description to this repo on how to use it and
> > > > benchmark
> > > > > results for trained models.
> > > > >
> > > > > The second patch fixes some code style issues for pointers in DNN
> > module
> > > > > and sr filter. Are there any other code style fixes I should make for
> > > > this
> > > > > code?
> > > >
> > > >
> > > > It seems the code with these patches produces some warnings:
> > > >
> > > > In file included from libavfilter/dnn_backend_native.c:27:0:
> > > > libavfilter/dnn_srcnn.h:2113:21: warning: ‘srcnn_consts’ defined but
> > not
> > > > used [-Wunused-variable]
> > > >  static const float *srcnn_consts[] = {
> > > >                      ^
> > > > libavfilter/dnn_srcnn.h:2122:24: warning: ‘srcnn_consts_dims’ defined
> > but
> > > > not used [-Wunused-variable]
> > > >  static const long int *srcnn_consts_dims[] = {
> > > >                         ^
> > > > libavfilter/dnn_srcnn.h:2142:20: warning: ‘srcnn_activations’ defined
> > but
> > > > not used [-Wunused-variable]
> > > >  static const char *srcnn_activations[] = {
> > > >                     ^
> > > > In file included from libavfilter/dnn_backend_native.c:28:0:
> > > > libavfilter/dnn_espcn.h:5401:21: warning: ‘espcn_consts’ defined but
> > not
> > > > used [-Wunused-variable]
> > > >  static const float *espcn_consts[] = {
> > > >                      ^
> > > > libavfilter/dnn_espcn.h:5410:24: warning: ‘espcn_consts_dims’ defined
> > but
> > > > not used [-Wunused-variable]
> > > >  static const long int *espcn_consts_dims[] = {
> > > >                         ^
> > > > libavfilter/dnn_espcn.h:5432:20: warning: ‘espcn_activations’ defined
> > but
> > > > not used [-Wunused-variable]
> > > >  static const char *espcn_activations[] = {
> > > >                     ^
> > > >
> > >
> > > Here is the patch, that fixes these warnings.
> >
> > >  dnn_backend_tf.c |   64 ++++++++++++++++++++++++++++++
> > ++++++++++++++++++++++++-
> > >  dnn_espcn.h      |   37 -------------------------------
> > >  dnn_srcnn.h      |   35 ------------------------------
> > >  3 files changed, 63 insertions(+), 73 deletions(-)
> > > 1faef51b86165326a4693c07a203113e2c85f7fb  0003-libavfilter-Fixes-
> > warnings-for-unused-variables-in-d.patch
> > > From 37cd7bdf2610e1c3e89210a49e8f5f3832726281 Mon Sep 17 00:00:00 2001
> > > From: Sergey Lavrushkin <dualfal@gmail.com>
> > > Date: Sat, 28 Jul 2018 12:55:02 +0300
> > > Subject: [PATCH 3/3] libavfilter: Fixes warnings for unused variables in
> > >  dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.
> > >
> > > ---
> > >  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
> > > +    };
> >
> > not important at all but, why do you remove "static" from these ?
> >
> 
> I moved it to the function where it is only used, and thought it should not
> be static in it.
> Are there some reasons to declare these consts static?

local arrays might be initialized every time the function executes.
while this probably doesnt matter speedwise here, and the compiler
might optimize it out (gcc here does not), it feels a bit "incorrect"

[...]
diff mbox

Patch

From 37cd7bdf2610e1c3e89210a49e8f5f3832726281 Mon Sep 17 00:00:00 2001
From: Sergey Lavrushkin <dualfal@gmail.com>
Date: Sat, 28 Jul 2018 12:55:02 +0300
Subject: [PATCH 3/3] libavfilter: Fixes warnings for unused variables in
 dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.

---
 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
-- 
2.14.1