[FFmpeg-devel] [PATCH V2 2/2] avfilter/dnn: unify the layer execution function in native mode
Guo, Yejun
yejun.guo at intel.com
Tue Oct 8 10:32:21 EEST 2019
> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> Pedro Arthur
> Sent: Saturday, October 05, 2019 12:09 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V2 2/2] avfilter/dnn: unify the layer
> execution function in native mode
>
> Hi,
>
> Em sex, 4 de out de 2019 às 09:59, Guo, Yejun <yejun.guo at intel.com>
> escreveu:
>
> >
> >
> > > -----Original Message-----
> > > From: Guo, Yejun
> > > Sent: Tuesday, September 24, 2019 1:34 PM
> > > To: ffmpeg-devel at ffmpeg.org
> > > Cc: Guo, Yejun <yejun.guo at intel.com>
> > > Subject: [PATCH V2 2/2] avfilter/dnn: unify the layer execution function
> > in native
> > > mode
> > >
> > > with this change, the code will be simpler when more layers supported.
> > >
> > > Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
> > > ---
> > > libavfilter/dnn/dnn_backend_native.c | 38
> > > ++++++++--------------
> > > libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 4 ++-
> > > libavfilter/dnn/dnn_backend_native_layer_conv2d.h | 3 +-
> > > .../dnn/dnn_backend_native_layer_depth2space.c | 5 ++-
> > > .../dnn/dnn_backend_native_layer_depth2space.h | 3 +-
> > > libavfilter/dnn/dnn_backend_native_layer_maximum.c | 4 ++-
> > > libavfilter/dnn/dnn_backend_native_layer_maximum.h | 3 +-
> > > libavfilter/dnn/dnn_backend_native_layer_pad.c | 5 +--
> > > libavfilter/dnn/dnn_backend_native_layer_pad.h | 4 +--
> > > libavfilter/dnn/dnn_backend_native_layers.hxx | 4 +++
> >
> I don't think this naming pattern is used in the code base (at least I
> could not find anything similar).
> Also I think the code would be much more clean without using macros, for
> example just define an array containing the function pointers and index it
> using the enum type.
thanks, I'll change to function pointers and also change the execute function names.
>
> rest looks good.
>
> > > tests/dnn/dnn-layer-conv2d-test.c | 4 +--
> > > tests/dnn/dnn-layer-depth2space-test.c | 4 ++-
> > > tests/dnn/dnn-layer-maximum-test.c | 2 +-
> > > tests/dnn/dnn-layer-pad-test.c | 6 ++--
> > > 14 files changed, 48 insertions(+), 41 deletions(-)
> > > create mode 100644 libavfilter/dnn/dnn_backend_native_layers.hxx
> > >
> >
> > this patch set ask for review, thanks.
> >
> > I'll add another patch to unify the layer load function after the holiday.
> >
> > I might have several students help me to support more native layers in c
> > code,
> > so they can just focus on his own separate dnn_backend_layer_xxx.h/c files.
> >
> >
> > btw, my other patches for vf_dnn_rgb_processing is still in
> > https://github.com/guoyejun/ffmpeg/tree/dnn0927
More information about the ffmpeg-devel
mailing list