[FFmpeg-devel] [PATCH V3 1/2] dnn/native: unify error return to DNN_ERROR
Guo, Yejun
yejun.guo at intel.com
Fri Aug 21 13:57:19 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 1/2] dnn/native: unify error return to
> DNN_ERROR
>
> Unify all error return as DNN_ERROR, in order to cease model executing
> when return error in ff_dnn_execute_model_native layer_func.pf_exec
>
> Signed-off-by: Ting Fu <ting.fu at intel.com>
> ---
> libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 2 +-
> libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 4 ++--
> libavfilter/dnn/dnn_backend_native_layer_depth2space.c | 4 ++--
> libavfilter/dnn/dnn_backend_native_layer_mathbinary.c | 2 +-
> libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 2 +-
> libavfilter/dnn/dnn_backend_native_layer_pad.c | 4 ++--
> 6 files changed, 9 insertions(+), 9 deletions(-)
>
we'd better move the following change to patch 1/2 from patch 2/2, so this patch is complete.
- layer_funcs[layer_type].pf_exec(native_model->operands,
- native_model->layers[layer].input_operand_indexes,
- native_model->layers[layer].output_operand_index,
- native_model->layers[layer].params);
+ if (layer_funcs[layer_type].pf_exec(native_model->operands,
+ native_model->layers[layer].input_operand_indexes,
+ native_model->layers[layer].output_operand_index,
+ native_model->layers[layer].params) == DNN_ERROR) {
+ return DNN_ERROR;
+ }
More information about the ffmpeg-devel
mailing list