1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/libavfilter/dnn
Andreas Rheinhardt 128e6df1cd dnn_backend_native_layer_avgpool: Fix invalid assignment, use av_assert
dnn_execute_layer_avg_pool() contains the following line:

assert(avgpool_params->padding_method = VALID);

This statement contains an assignment where obviously a comparison was
intended. Furthermore, *avgpool_params is const, so that the attempted
assignment leads to a compilation failure if asserts are enabled
(i.e. if DEBUG is defined which leads libavutil/internal.h to not define
NDEBUG). Moreover, the enumeration constant VALID actually has the value 0,
so that the assert would be triggered if a compiler compiles this with
asserts enabled. Finally, the statement uses assert() directly instead
of av_assert*().

All these errors have been fixed.

Thanks to ubitux for providing a FATE-box [1] where DEBUG is defined.

[1]: http://fate.ffmpeg.org/history.cgi?slot=x86_64-archlinux-gcc-ddebug

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-21 22:12:39 +08:00
..
dnn_backend_native_layer_avgpool.c dnn_backend_native_layer_avgpool: Fix invalid assignment, use av_assert 2020-08-21 22:12:39 +08:00
dnn_backend_native_layer_avgpool.h dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00
dnn_backend_native_layer_conv2d.c dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:22:30 +08:00
dnn_backend_native_layer_conv2d.h dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00
dnn_backend_native_layer_depth2space.c dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:22:30 +08:00
dnn_backend_native_layer_depth2space.h dnn_backend_native: check operand index 2020-06-17 13:42:52 +08:00
dnn_backend_native_layer_mathbinary.c dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:22:30 +08:00
dnn_backend_native_layer_mathbinary.h dnn_backend_native: check operand index 2020-06-17 13:42:52 +08:00
dnn_backend_native_layer_mathunary.c dnn_backend_native_layer_mathunary: add round support 2020-08-12 10:30:46 +08:00
dnn_backend_native_layer_mathunary.h dnn_backend_native_layer_mathunary: add round support 2020-08-12 10:30:46 +08:00
dnn_backend_native_layer_maximum.c dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:22:30 +08:00
dnn_backend_native_layer_maximum.h dnn_backend_native: check operand index 2020-06-17 13:42:52 +08:00
dnn_backend_native_layer_pad.c dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:22:30 +08:00
dnn_backend_native_layer_pad.h dnn_backend_native: check operand index 2020-06-17 13:42:52 +08:00
dnn_backend_native_layers.c dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00
dnn_backend_native_layers.h dnn_backend_native: check operand index 2020-06-17 13:42:52 +08:00
dnn_backend_native.c dnn/native: rename struct ConvolutionalNetwork to NativeModel 2020-08-21 10:39:00 +08:00
dnn_backend_native.h dnn/native: rename struct ConvolutionalNetwork to NativeModel 2020-08-21 10:39:00 +08:00
dnn_backend_openvino.c dnn: add backend options when load the model 2020-08-12 15:43:40 +08:00
dnn_backend_openvino.h dnn: add backend options when load the model 2020-08-12 15:43:40 +08:00
dnn_backend_tf.c dnn/native: rename struct ConvolutionalNetwork to NativeModel 2020-08-21 10:39:00 +08:00
dnn_backend_tf.h dnn: add backend options when load the model 2020-08-12 15:43:40 +08:00
dnn_interface.c dnn: add openvino as one of dnn backend 2020-07-02 09:36:34 +08:00
Makefile dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00