{"id":14075,"url":"https://patchwork.libcamera.org/api/1.1/covers/14075/?format=json","web_url":"https://patchwork.libcamera.org/cover/14075/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211011073505.243864-1-umang.jain@ideasonboard.com>","date":"2021-10-11T07:34:58","name":"[libcamera-devel,v4,0/7] Async Post Processor","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/1.1/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/14075/mbox/","series":[{"id":2611,"url":"https://patchwork.libcamera.org/api/1.1/series/2611/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2611","date":"2021-10-11T07:34:58","name":"Async Post Processor","version":4,"mbox":"https://patchwork.libcamera.org/series/2611/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/14075/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E4927C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Oct 2021 07:35:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FC5768F4D;\n\tMon, 11 Oct 2021 09:35:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 28F1D60502\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Oct 2021 09:35:13 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.251.226.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF9D12BD;\n\tMon, 11 Oct 2021 09:35:11 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"q/63JdDE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633937712;\n\tbh=JUPiWMZ4iM3R7z+0CVb92N+9IMT8luCr1360FWAb8R8=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=q/63JdDEc+CjbqE/4uyPj2jGlkiXtIv3FRk3xZPns5AvRGWGcwWkWoWxlpSWdCY6j\n\tA5sW35PSMUahw2dgIaadcjUZiiKsjfjookhJqOtRM2gKpFw8ONcRzvQqDM+vlqrwWW\n\tYL1UgMHhNlFL3/pY34sGeWdcXIuXu5oT+KxwWYs8=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 11 Oct 2021 13:04:58 +0530","Message-Id":"<20211011073505.243864-1-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 0/7] Async Post Processor","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This series now entirely focuses on making the post-processor run\nasync. The std::map=>queue rework of Camera3RequestDescriptor has\nbeen reworked separately and already merged in master:\nhttps://patchwork.libcamera.org/project/libcamera/list/?series=2586&state=*\n\nThe v4 brings new design decisions from v3. Specifically:\n- We have a Post Processor request queue\n- The queue processes post-processor's requsts in FIFO manner\n- The queue is specifically maintained separately so that it can be\n  purged on demand (think of flush()) rather than using thread's\n  message-queue + ::invokeMethod() path, as we can't have any control\n  over thread's queue from outside\n- Handle flush / stop scenarios\n\n\nPatch 1-4 brings up groundwork to make post-processor async.\nPatch 5 introduces a thread worker class and a post-processing queue.\nPatch 5 is the one where the post-processing starts happening\nasynchronously.\n\nPatch 6 fixes a small window of race on descriptor's status setting\n\nPatch 7 is geared towards understanding and handling stop()/flush()\ncases of the camera.\n\nTesting:\n- Series is functional and works as expected\n\n- CTS is regressed quite a bit. This will remain blocker for the merge\n  Many \"Multiple calls to OpenDevice()\" fails the tests (~46-64 on\n  average). I will be continuing to work towards fixing CTS complicance.\n\nLaurent Pinchart (1):\n  android: camera_device: Protect descriptor status_ with lock\n\nUmang Jain (6):\n  camera_device: Remove private scope of Camera3RequestDescriptor\n  android: camera_stream: Plumb process() with Camera3RequestDescriptor\n  android: Notify post processing completion via a signal\n  android: camera_stream: Drop return value for process()\n  android: post_processor: Make post processing async\n  android: camera_device: Synchronise completion and cleanup of requests\n\n src/android/camera_device.cpp            | 136 +++++++++++++++--------\n src/android/camera_device.h              |  65 ++++++-----\n src/android/camera_stream.cpp            | 126 ++++++++++++++++++---\n src/android/camera_stream.h              |  48 +++++++-\n src/android/jpeg/post_processor_jpeg.cpp |  17 +--\n src/android/jpeg/post_processor_jpeg.h   |   7 +-\n src/android/post_processor.h             |  18 ++-\n src/android/yuv/post_processor_yuv.cpp   |  23 ++--\n src/android/yuv/post_processor_yuv.h     |   7 +-\n 9 files changed, 323 insertions(+), 124 deletions(-)"}