Message ID | 20200919152424.8042-1-xujunzz@sjtu.edu.cn |
---|---|
State | Accepted |
Commit | a39fcbdffbcb8192332810d0a9217144560bef9f |
Headers | show |
Series | [FFmpeg-devel] dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode. | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > xujunzz@sjtu.edu.cn > Sent: 2020年9月19日 23:24 > To: ffmpeg-devel@ffmpeg.org > Cc: xujunzz@sjtu.edu.cn > Subject: [FFmpeg-devel] [PATCH] dnn_backend_native_layer_conv2d.c: fix bug > of loop boundary in single thread mode. > > From: Xu Jun <xujunzz@sjtu.edu.cn> > > Before patch, fate test for dnn may fail in some Windows environment while > succeed in my Linux. The bug was caused by a wrong loop boundary. > Win10 and Linux seems to have different explaination for that. The bug is not caused by system difference, so will remove this line and push soon. After patch, fate > test succeed in my windows mingw 64-bit. > > Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn> > --- > libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > index 2aaa4162df..0fb968a1fc 100644 > --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > @@ -245,7 +245,7 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, > const int32_t *input_operand_ #else > thread_param[0] = av_malloc(sizeof(**thread_param)); > thread_param[0]->thread_common_param = &thread_common_param; > - thread_param[0]->thread_start = 0; > + thread_param[0]->thread_start = pad_size; > thread_param[0]->thread_end = height - pad_size; > dnn_execute_layer_conv2d_thread((void *)thread_param[0]); > av_free(thread_param[0]); > --
diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c index 2aaa4162df..0fb968a1fc 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c @@ -245,7 +245,7 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_ #else thread_param[0] = av_malloc(sizeof(**thread_param)); thread_param[0]->thread_common_param = &thread_common_param; - thread_param[0]->thread_start = 0; + thread_param[0]->thread_start = pad_size; thread_param[0]->thread_end = height - pad_size; dnn_execute_layer_conv2d_thread((void *)thread_param[0]); av_free(thread_param[0]);