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

James Almer jamrial at gmail.com
Thu May 24 22:52:30 EEST 2018


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 with relu activation
> function, that are sufficient for simple convolutional networks,
> particularly SRCNN.
> SRCNN filter was updated using implemented DNN inference interface and
> native backend.
> 
> 
> adds_dnn_srcnn.patch
> 
> 
> From 60247d3deca3c822da0ef8d7390cda08db958830 Mon Sep 17 00:00:00 2001
> From: Sergey Lavrushkin <dualfal at gmail.com>
> Date: Thu, 24 May 2018 22:05:54 +0300
> Subject: [PATCH] Adds dnn inference module for simple convolutional networks.
>  Reimplements srcnn filter based on it.
> 
> ---
>  Changelog                      |   2 +
>  libavfilter/vf_srcnn.c         | 300 +++------------
>  libavfilter/vf_srcnn.h         | 855 -----------------------------------------
>  libavutil/Makefile             |   3 +
>  libavutil/dnn_backend_native.c | 382 ++++++++++++++++++
>  libavutil/dnn_backend_native.h |  40 ++
>  libavutil/dnn_interface.c      |  48 +++
>  libavutil/dnn_interface.h      |  64 +++
>  libavutil/dnn_srcnn.h          | 854 ++++++++++++++++++++++++++++++++++++++++
>  9 files changed, 1455 insertions(+), 1093 deletions(-)
>  delete mode 100644 libavfilter/vf_srcnn.h
>  create mode 100644 libavutil/dnn_backend_native.c
>  create mode 100644 libavutil/dnn_backend_native.h
>  create mode 100644 libavutil/dnn_interface.c
>  create mode 100644 libavutil/dnn_interface.h
>  create mode 100644 libavutil/dnn_srcnn.h

With this change you're trying to use libavformat API from libavutil,
which is not ok as the latter must not depend on the former at all. So
if anything, this belongs in libavformat.

That aside, you're using the ff_ prefix on an installed header, which is
unusable from outside the library that contains the symbol, and the
structs are not using the AV* namespace either.
Does this need to be public API to begin with? If it's only going to be
used by one or more filters, then it might as well remain as an internal
module in libavfilter.

And you need to indent and prettify the tables a bit.


More information about the ffmpeg-devel mailing list