[FFmpeg-devel] [PATCH V4 1/2] dnn_backend_native_layer_mathbinary: change to function pointer

Guo, Yejun yejun.guo at intel.com
Sun Aug 23 12:46:05 EEST 2020



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Mingyu
> Yin
> Sent: 2020年8月21日 21:22
> To: ffmpeg-devel at ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH V4 1/2] dnn_backend_native_layer_mathbinary:
> change to function pointer
> 
> Signed-off-by: Mingyu Yin <mingyu.yin at intel.com>
> ---
>  .../dnn/dnn_backend_native_layer_mathbinary.c | 140 +++++++++---------
>  1 file changed, 73 insertions(+), 67 deletions(-)
> 
> diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
> b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
> index dd42c329a9..4373f82543 100644
> --- a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
> +++ b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
> @@ -27,6 +27,74 @@
>  #include "libavutil/avassert.h"
>  #include "dnn_backend_native_layer_mathbinary.h"
> 
> +typedef float (*FunType)(const float src0, float src1);

const is not needed.

> +FunType pfun;
> +

there's build warning for the following unused variable with this patch.

see in function dnn_execute_layer_math_binary:
    int dims_count;
    const float *src;
    float *dst;



More information about the ffmpeg-devel mailing list