Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-20 Thread Sergey Lavrushkin
2018-08-18 23:20 GMT+03:00 Michael Niedermayer : > On Sat, Aug 18, 2018 at 02:10:21PM +0300, Sergey Lavrushkin wrote: > > 2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > > > > > On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > > > > On 8/14/201

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-18 Thread Sergey Lavrushkin
2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > > >>> > > >&

Re: [FFmpeg-devel] [PATCH 2/2] libavfilter: Removes stored DNN models. Adds support for native backend model file format in tf backend.

2018-08-17 Thread Sergey Lavrushkin
2018-08-17 17:46 GMT+03:00 Pedro Arthur : > Hi, > > You did not provided any pre trained model files, so anyone trying to > test it has to perform the whole training! > I'm attaching the models I generated, if anyone is interested in testing > it. > > When applying the filter with tf backend

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-17 Thread Sergey Lavrushkin
пт, 17 авг. 2018 г., 6:47 James Almer : > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > >>> > >>> Just use av_clipf instead of FFMIN/FFMAX. > >> > >> > >

Re: [FFmpeg-devel] [PATCH 6/7] libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.

2018-08-15 Thread Sergey Lavrushkin
2018-08-15 1:49 GMT+03:00 Marton Balint : > > On Tue, 14 Aug 2018, Pedro Arthur wrote: > > 2018-08-14 15:45 GMT-03:00 Rostislav Pehlivanov : >> >>> On Thu, 2 Aug 2018 at 20:00, Sergey Lavrushkin >>> wrote: >>> >>> This patch remove

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-13 Thread Sergey Lavrushkin
> > Just use av_clipf instead of FFMIN/FFMAX. Changed FFMIN/FFMAX to av_clip_uint16 and av_clip_uint8. From 210e497d76328947fdf424b169728fa728cc18f2 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 18:06:50 +0300 Subject: [PATCH 5/9] libswscale: Adds conversion

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Sergey Lavrushkin
2018-08-12 0:45 GMT+03:00 Michael Niedermayer : > On Sat, Aug 11, 2018 at 05:52:32PM +0300, Sergey Lavrushkin wrote: > > 2018-08-10 20:24 GMT+03:00 Michael Niedermayer : > > > > > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > > > > He

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Sergey Lavrushkin
2018-08-10 20:24 GMT+03:00 Michael Niedermayer : > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > > Here are updated patches with fixes. I updated conversion functions, so > > they should > > properly work with format for different endianness. &

Re: [FFmpeg-devel] [PATCH] Documentation for sr filter

2018-08-11 Thread Sergey Lavrushkin
Sorry, I accidentally sent previous patch, here is updated version. From 99afeefe4add5b932140388f48ec4111734aa593 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 17:24:00 +0300 Subject: [PATCH 9/9] doc/filters.texi: Adds documentation for sr filter. --- doc/filters.texi

Re: [FFmpeg-devel] [PATCH] Documentation for sr filter

2018-08-09 Thread Sergey Lavrushkin
2018-08-07 13:14 GMT+03:00 Moritz Barsnick : > On Tue, Aug 07, 2018 at 00:24:29 +0300, Sergey Lavrushkin wrote: > > +@table @option > > +@item model > > +Specify what super-resolution model to use. This option accepts the > following values: >^ nit: wh

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-09 Thread Sergey Lavrushkin
Here are updated patches with fixes. I updated conversion functions, so they should properly work with format for different endianness. 2018-08-08 1:47 GMT+03:00 Michael Niedermayer : > On Tue, Aug 07, 2018 at 12:17:58AM +0300, Sergey Lavrushkin wrote: > > I split patch to one for

Re: [FFmpeg-devel] [PATCH 6/7] libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.

2018-08-06 Thread Sergey Lavrushkin
Updated patch. 2018-08-02 21:52 GMT+03:00 Sergey Lavrushkin : > This patch removes conversions, declared inside the sr filter, and uses > libswscale inside > the filter to perform them for only Y channel of input. The sr filter > still has uint > formats as input, as it does

[FFmpeg-devel] [PATCH] Documentation for sr filter

2018-08-06 Thread Sergey Lavrushkin
From f076c4be5455331958b928fcea6b3dd8da287527 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 17:24:00 +0300 Subject: [PATCH 9/9] doc/filters.texi: Adds documentation for sr filter. --- doc/filters.texi | 60 1

Re: [FFmpeg-devel] [PATCH 7/7] libavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.

2018-08-06 Thread Sergey Lavrushkin
Updated patch. 2018-08-02 21:52 GMT+03:00 Sergey Lavrushkin : > --- > libavfilter/dnn_espcn.h | 3 ++- > libavfilter/dnn_srcnn.h | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/dnn_espcn.h b/libavfilter/dnn_espcn.h > index 9344aa90

Re: [FFmpeg-devel] [PATCH 5/7] libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

2018-08-06 Thread Sergey Lavrushkin
Updated patch. From 11186187d0b5a4725415a91947f38d5e166e024c Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Tue, 31 Jul 2018 18:40:24 +0300 Subject: [PATCH 6/9] libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf. --- libavfilter/dnn_backend_tf.c | 4 +++- 1 file changed, 3

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-06 Thread Sergey Lavrushkin
I split patch to one for libavutil and another for libswscale, also added LUT for unscaled conversion, added conversions for scaling and updated fate tests. From 8bcc10b49c41612b4d6549e64d90acf3f0b3fc6a Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 18:02:49 +0300 Subject

Re: [FFmpeg-devel] [PATCH 3/7] libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.

2018-08-06 Thread Sergey Lavrushkin
Made variables static. 2018-08-06 21:19 GMT+03:00 Pedro Arthur : > 2018-08-02 15:52 GMT-03:00 Sergey Lavrushkin : > > --- > > libavfilter/dnn_backend_tf.c | 64 ++ > +- > > libavfilter/dnn_espcn.h | 37 --

Re: [FFmpeg-devel] [PATCH 2/7] libavfilter: Code style fixes for pointers in DNN module and sr filter.

2018-08-06 Thread Sergey Lavrushkin
Updated patch. 2018-08-06 17:55 GMT+03:00 Pedro Arthur : > 2018-08-02 15:52 GMT-03:00 Sergey Lavrushkin : > > --- > > libavfilter/dnn_backend_native.c | 84 +++--- > > libavfilter/dnn_backend_native.h | 8 +-- > > libavfilter

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Sergey Lavrushkin
2018-08-04 0:11 GMT+03:00 Michael Niedermayer : > On Fri, Aug 03, 2018 at 10:33:00PM +0300, Sergey Lavrushkin wrote: > > 2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > > > > > On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > > > > Thi

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Sergey Lavrushkin
2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > > This patch adds two floating-point gray formats to use them in sr filter > for > > conversion with libswscale. I added conversion from uint gray to float &

[FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-02 Thread Sergey Lavrushkin
This patch adds two floating-point gray formats to use them in sr filter for conversion with libswscale. I added conversion from uint gray to float and backwards in swscale_unscaled.c, that is enough for sr filter. But for proper format addition, should I add anything else? ---

[FFmpeg-devel] [PATCH 2/7] libavfilter: Code style fixes for pointers in DNN module and sr filter.

2018-08-02 Thread Sergey Lavrushkin
--- libavfilter/dnn_backend_native.c | 84 +++--- libavfilter/dnn_backend_native.h | 8 +-- libavfilter/dnn_backend_tf.c | 108 +++ libavfilter/dnn_backend_tf.h | 8 +-- libavfilter/dnn_espcn.h | 6 +--

[FFmpeg-devel] [GSOC][PATCH 0/7] Improvements for sr filter and DNN module

2018-08-02 Thread Sergey Lavrushkin
Hello, These patches address several raised concerns regarding sr filter and DNN module. I included three patches, that I've already sent, but they still have not been reviewed properly. libavfilter: Adds on the fly generation of default DNN models for tensorflow backend instead of storing

[FFmpeg-devel] [PATCH 6/7] libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.

2018-08-02 Thread Sergey Lavrushkin
This patch removes conversions, declared inside the sr filter, and uses libswscale inside the filter to perform them for only Y channel of input. The sr filter still has uint formats as input, as it does not use chroma channels in models and these channels are upscaled using libswscale, float

[FFmpeg-devel] [PATCH 3/7] libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.

2018-08-02 Thread Sergey Lavrushkin
--- 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

[FFmpeg-devel] [PATCH 5/7] libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

2018-08-02 Thread Sergey Lavrushkin
--- libavfilter/dnn_backend_tf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c index 7a4ad72d27..662a2a3c6e 100644 --- a/libavfilter/dnn_backend_tf.c +++ b/libavfilter/dnn_backend_tf.c @@ -570,7 +570,9 @@ void

[FFmpeg-devel] [PATCH 7/7] libavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.

2018-08-02 Thread Sergey Lavrushkin
--- libavfilter/dnn_espcn.h | 3 ++- libavfilter/dnn_srcnn.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn_espcn.h b/libavfilter/dnn_espcn.h index 9344aa90fe..e0013fe1dd 100644 --- a/libavfilter/dnn_espcn.h +++ b/libavfilter/dnn_espcn.h @@ -20,7 +20,8 @@

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

2018-07-30 Thread Sergey Lavrushkin
2018-07-30 2:01 GMT+03:00 Michael Niedermayer : > On Sat, Jul 28, 2018 at 01:00:53PM +0300, Sergey Lavrushkin wrote: > > 2018-07-28 4:31 GMT+03:00 Michael Niedermayer : > > > > > On Fri, Jul 27, 2018 at 08:06:15PM +0300, Sergey Lavrushkin wrote: > > > > He

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

2018-07-28 Thread Sergey Lavrushkin
2018-07-28 4:31 GMT+03:00 Michael Niedermayer : > 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. Al

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-07 Thread Sergey Lavrushkin
2018-06-06 17:22 GMT+03:00 Pedro Arthur : > Hi, > > 2018-06-05 20:23 GMT-03:00 Sergey Lavrushkin : > > Here is the patch, that fixes described issues. > When I try to run (video input), when tf is not enabled in configure it > crashes. > > > $ffmpeg -i in.mp4 -v

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-05 Thread Sergey Lavrushkin
2018-06-05 17:20 GMT+03:00 James Almer : > On 6/3/2018 3:02 PM, Sergey Lavrushkin wrote: > > diff --git a/libavfilter/vf_srcnn.c b/libavfilter/vf_srcnn.c > > index d6efe9b478..5c5e26b33a 100644 > > --- a/libavfilter/vf_srcnn.c > > +++ b/libavfilter/vf_srcnn.c > >

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-03 Thread Sergey Lavrushkin
> > My concern is when we add more models, currently we have to store 2 > models, one for the "native" implementation and one for the TF > backend. > There is also the case were one wants to update the weights for a > model, it will be necessary to update both the native and TF data. > Having

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-03 Thread Sergey Lavrushkin
2018-06-03 19:57 GMT+03:00 Pedro Arthur : > 2018-05-31 12:01 GMT-03:00 Sergey Lavrushkin : > > Hello, > > > > This patch introduces TensorFlow backend for DNN inference module. > > This backend uses TensorFlow binary models and requires from model > > to have th

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-02 Thread Sergey Lavrushkin
2018-06-02 19:45 GMT+03:00 James Almer : > On 5/31/2018 12:01 PM, Sergey Lavrushkin wrote: > > diff --git a/Changelog b/Changelog > > index df2024fb59..a667fd045d 100644 > > --- a/Changelog > > +++ b/Changelog > > @@ -11,6 +11,7 @@ version : > > - support

Re: [FFmpeg-devel] [GSOC] [PATCH] TensorFlow backend introduction for DNN module

2018-06-01 Thread Sergey Lavrushkin
2018-06-01 6:09 GMT+03:00 Guo, Yejun : > Did you try to build ffmpeg with TENSORFLOW_BACKEND enabled, and run it > without TF library? This case is possible when an end user install > pre-built package on a machine without TF library. > > In function init, the logic is to fall back to cpu path

Re: [FFmpeg-devel] [GSOC] [PATCH] DNN module introduction and SRCNN filter update

2018-05-29 Thread Sergey Lavrushkin
2018-05-29 4:08 GMT+03:00 Pedro Arthur : > 2018-05-28 19:52 GMT-03:00 Sergey Lavrushkin : > > 2018-05-28 9:32 GMT+03:00 Guo, Yejun : > > > >> looks that no tensorflow dependency is introduced, a new model format is > >> created together with some

Re: [FFmpeg-devel] [GSOC] [PATCH] DNN module introduction and SRCNN filter update

2018-05-25 Thread Sergey Lavrushkin
2018-05-24 22:52 GMT+03:00 James Almer <jamr...@gmail.com>: > On 5/24/2018 4:24 PM, Sergey Lavrushkin wrote: > > Hello, > > > > This patch introduces DNN inference interface and simple native backend. > > For now implemented backend supports only convolutions wi

Re: [FFmpeg-devel] [GSOC] [PATCH] SRCNN filter

2018-05-07 Thread Sergey Lavrushkin
2018-05-07 17:41 GMT+03:00 Pedro Arthur : > 2018-05-07 0:30 GMT-03:00 Steven Liu : > > Hi Sergey, > > > > How should i test this filter? > > I tested it some days ago, the picture get worse from 2nd frame. > > input resolution

Re: [FFmpeg-devel] [GSOC] [PATCH] SRCNN filter

2018-03-28 Thread Sergey Lavrushkin
> [...] > > +#define OFFSET(x) offsetof(SRCNNContext, x) > > +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM > > +static const AVOption srcnn_options[] = { > > +{ "config_file", "path to configuration file with network > parameters", OFFSET(config_file_path),