From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0284C49A78 for ; Sat, 27 Apr 2024 16:42:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3660268D2AB; Sat, 27 Apr 2024 19:42:21 +0300 (EEST) Received: from out162-62-58-211.mail.qq.com (out162-62-58-211.mail.qq.com [162.62.58.211]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0BF868D293 for ; Sat, 27 Apr 2024 19:42:13 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1714236123; bh=vL62/Xt5+DRcPI/n9XgZ1QDGwz4rjIeOPsXf2gE68l0=; h=From:To:Cc:Subject:Date; b=O7Te1JpArw8anZYtfaSmBizdiOia4E9NgX08ljMdwnuHDwqjm0j9WJReo0ulIppao wu1/2fheJ7JIchaOw+oFcYVklJ74DQsE7ZY0oCb7WGOIoIWfPrhGpLIiaLHy3k2+tg fxjTstshi8HV6QHjYHtq2dvGETlP1oMav1IPmEfI= Received: from localhost.localdomain ([113.118.107.199]) by newxmesmtplogicsvrszc19-0.qq.com (NewEsmtp) with SMTP id A8200E2A; Sun, 28 Apr 2024 00:42:02 +0800 X-QQ-mid: xmsmtpt1714236122tzx67zfik Message-ID: X-QQ-XMAILINFO: MTDLVpTOglk40k70p5/ZZIQltgpCq5r0IlkCOaVlUQyno1bHwCHLqzWXtKENH3 DVcQ6NqpIOu0hSM9t1IYec8XPao+3e8+k593kwm6iPyJ74OC0f3AVs9ZnzfUrKzYn2hvlfdxGNew +kyXGi5O+1nhpXWbK+PSyzoM4SKq1YCSlPMOeH6nxl5ppgu1TVLv4MWL53JEVtu+Uyc7ERD933Pg vUjjvuKH0ws3n0oppBaLFbkqmXrCmHWJDYv/fzv/TC+PjDuTLJculqhc4TCzKifh8EF9+70ksAjz 8n0sJupm/ZC+EAgd8XdPMy52zYrN+0H5jJCIMzgypNEPoWlptmB8Ezd9mnbtGwTwDSTHc5zkc7KT q7jk+jtbxKG9JfiuhxAD/7sN3C+gEB2AeXryMqGZZX3tnolv9h1cwlvBWemJNbxtd2YbbhVHdRUb gf3BnOmnBmBGT33cZT3Zv7waSF/0W8Vy+GmzBOHTc4S4N5mDN9wlLQSprg250Uuvh6ltmYi1UE1x lim6UrCwRnpIKxkulNXYniBhIU/zZWodPF30rSS5Nt07qbUZK7BizvHT2k6CExyTJG9nZpV3yi2p jHMHROnsULFM54xfbinvBvmuIZWcB4/nSBpBGbAararEwcdHnhz0CRvUiBvPmXebyXfU0JyvfQP6 9DFhfPIqffAQwInG9/teH+6vcNyCoPWFTaTC0QPixyaBDIfZ00bWgZX0KPFQ1mcXZnhDvXf8JwR6 F93ld/JalMwq5wxbL0W4OJxGF74YKuIoUOooqMVvSFDqX0o90qO9Q+wbVrlawRLYqiuYbLhu5/yx XwrasXuWiZ5nVqbD2ahPTMgVzJym7rmFvhJp6YuAZzzClpaTj8+BerBCejwElj+NqMehyKw7aCsh P81zPtIFnTmjxaUcNLRn1vzYwSG/O49vB8jH6GJDeAWgnzinWKRtB+9phvV/Uz3SMfB5dHa04lNo b4hHYB/3kd2bv0eMZOE19ItYmLS8snl/nhx//AUD4= X-QQ-XMRINFO: NyFYKkN4Ny6FSmKK/uo/jdU= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 Apr 2024 00:41:50 +0800 X-OQ-MSGID: <20240427164159.82771-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH WIP 0/9] Refactor DNN X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Zhao Zhili Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Zhao Zhili During the refactor progress, I have found some serious issues, which is not resolved by the patchset: 1. Tensorflow backend is broken. I think it doesn't work since 2021 at least. For example, it destroy a thread and create a new thread for each frame, and it destroy an invalid thread at the first frame: pthread_join(async_module->thread_id, &status); if (status == DNN_ASYNC_FAIL) { av_log(ctx, AV_LOG_ERROR, "Unable to start inference as previous inference failed.\n"); return DNN_GENERIC_ERROR; } ret = pthread_create(&async_module->thread_id, NULL, async_thread_routine, async_module); 2. Openvino V1 doesn't compile. It doesn't compile and no one complains, I think it's a hint to just keep the code for V2. 3. Error handling. It's easy to crash with incorrect command line arguments. I don't have enough test case. Please share your test case and help on test. Zhao Zhili (9): avfilter/dnn: Refactor DNN parameter configuration system avfilter/dnn_backend_openvino: Fix free context at random place avfilter/dnn_backend_openvino: simplify memory allocation avfilter/dnn_backend_tf: Remove one level of indentation avfilter/dnn_backend_tf: Fix free context at random place avfilter/dnn_backend_tf: Simplify memory allocation avfilter/dnn_backend_torch: Simplify memory allocation avfilter/dnn: Remove a level of dereference avfilter/dnn: Use dnn_backend_info_list to search for dnn module libavfilter/dnn/dnn_backend_common.h | 13 +- libavfilter/dnn/dnn_backend_openvino.c | 210 ++++++++++--------------- libavfilter/dnn/dnn_backend_tf.c | 194 ++++++++++------------- libavfilter/dnn/dnn_backend_torch.cpp | 112 +++++-------- libavfilter/dnn/dnn_interface.c | 107 ++++++++++--- libavfilter/dnn_filter_common.c | 38 ++++- libavfilter/dnn_filter_common.h | 37 ++--- libavfilter/dnn_interface.h | 73 +++++++-- libavfilter/vf_derain.c | 5 +- libavfilter/vf_dnn_classify.c | 3 +- libavfilter/vf_dnn_detect.c | 3 +- libavfilter/vf_dnn_processing.c | 3 +- libavfilter/vf_sr.c | 5 +- 13 files changed, 428 insertions(+), 375 deletions(-) -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".