[FFmpeg-devel] [PATCH V3 2/2] dnn/native: add log error message

Guo, Yejun yejun.guo at intel.com
Fri Aug 21 13:58:15 EEST 2020



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Ting Fu
> Sent: 2020年8月21日 11:47
> To: ffmpeg-devel at ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH V3 2/2] dnn/native: add log error message
> 
> Signed-off-by: Ting Fu <ting.fu at intel.com>
> ---
> V3:
>     1. modify log_ctx of NativeModel to non-pointer
>     2. modify log_ctx of NativeModel to ctx
>     3. delete empty line
> 
>  libavfilter/dnn/dnn_backend_native.c          | 67 ++++++++++++++-----
>  libavfilter/dnn/dnn_backend_native.h          |  5 ++
>  .../dnn/dnn_backend_native_layer_avgpool.c    | 10 ++-
>  .../dnn/dnn_backend_native_layer_avgpool.h    |  2 +-
>  .../dnn/dnn_backend_native_layer_conv2d.c     | 10 ++-
>  .../dnn/dnn_backend_native_layer_conv2d.h     |  2 +-
>  .../dnn_backend_native_layer_depth2space.c    | 10 ++-
>  .../dnn_backend_native_layer_depth2space.h    |  2 +-
>  .../dnn/dnn_backend_native_layer_mathbinary.c | 11 ++-
>  .../dnn/dnn_backend_native_layer_mathbinary.h |  2 +-
>  .../dnn/dnn_backend_native_layer_mathunary.c  | 11 ++-
>  .../dnn/dnn_backend_native_layer_mathunary.h  |  2 +-
>  .../dnn/dnn_backend_native_layer_maximum.c    | 10 ++-
>  .../dnn/dnn_backend_native_layer_maximum.h    |  2 +-
>  .../dnn/dnn_backend_native_layer_pad.c        | 10 ++-
>  .../dnn/dnn_backend_native_layer_pad.h        |  2 +-
>  libavfilter/dnn/dnn_backend_native_layers.h   |  2 +-
>  tests/dnn/dnn-layer-avgpool-test.c            |  4 +-
>  tests/dnn/dnn-layer-conv2d-test.c             |  4 +-
>  tests/dnn/dnn-layer-depth2space-test.c        |  2 +-
>  tests/dnn/dnn-layer-mathbinary-test.c         |  6 +-
>  tests/dnn/dnn-layer-mathunary-test.c          |  2 +-
>  tests/dnn/dnn-layer-maximum-test.c            |  2 +-
>  tests/dnn/dnn-layer-pad-test.c                |  6 +-
>  24 files changed, 130 insertions(+), 56 deletions(-)
> 
> diff --git a/libavfilter/dnn/dnn_backend_native.c
> b/libavfilter/dnn/dnn_backend_native.c
> index 0be9c0b53c..b7de27c709 100644
> --- a/libavfilter/dnn/dnn_backend_native.c
> +++ b/libavfilter/dnn/dnn_backend_native.c
> @@ -28,15 +28,26 @@
>  #include "dnn_backend_native_layer_conv2d.h"
>  #include "dnn_backend_native_layers.h"
> 
> +static const AVClass dnn_native_class = {
> +    .class_name = "dnn_native",
> +    .item_name  = av_default_item_name,
> +    .option     = NULL,
> +    .version    = LIBAVUTIL_VERSION_INT,
> +    .category   = AV_CLASS_CATEGORY_FILTER,
> +};
> +
>  static DNNReturnType get_input_native(void *model, DNNData *input, const
> char *input_name)
>  {
>      NativeModel *native_model = (NativeModel *)model;
> +    NetworkContext *ctx = &native_model->ctx;

as a unify name, we'd better use NativeContext, instead of NetworkContext.



More information about the ffmpeg-devel mailing list