Hi,

Em sex, 4 de out de 2019 às 09:59, Guo, Yejun <yejun....@intel.com>
escreveu:

>
>
> > -----Original Message-----
> > From: Guo, Yejun
> > Sent: Tuesday, September 24, 2019 1:34 PM
> > To: ffmpeg-devel@ffmpeg.org
> > Cc: Guo, Yejun <yejun....@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....@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.

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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to