From patchwork Sat Sep 19 15:24:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Jun X-Patchwork-Id: 22482 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 4F1054483C7 for ; Sat, 19 Sep 2020 18:24:50 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D0A968B6F7; Sat, 19 Sep 2020 18:24:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtp181.sjtu.edu.cn (smtp181.sjtu.edu.cn [202.120.2.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8167868B6C5 for ; Sat, 19 Sep 2020 18:24:43 +0300 (EEST) Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp181.sjtu.edu.cn (Postfix) with ESMTPS id 531801008CBC2 for ; Sat, 19 Sep 2020 23:24:36 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 4A1CC227A4F4F; Sat, 19 Sep 2020 23:24:36 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LJSodM6aOqlX; Sat, 19 Sep 2020 23:24:36 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.39.204]) (Authenticated sender: xujunzz@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id 63F2E227A4F4B; Sat, 19 Sep 2020 23:24:34 +0800 (CST) From: xujunzz@sjtu.edu.cn To: ffmpeg-devel@ffmpeg.org Date: Sat, 19 Sep 2020 23:24:25 +0800 Message-Id: <20200919152424.8042-1-xujunzz@sjtu.edu.cn> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: xujunzz@sjtu.edu.cn Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Xu Jun 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.After patch, fate test succeed in my windows mingw 64-bit. Signed-off-by: Xu Jun --- 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]);