{"id":13798,"url":"https://patchwork.libcamera.org/api/covers/13798/?format=json","web_url":"https://patchwork.libcamera.org/cover/13798/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210910070638.467294-1-umang.jain@ideasonboard.com>","date":"2021-09-10T07:06:29","name":"[libcamera-devel,v2,0/9] Async Post Processor","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/13798/mbox/","series":[{"id":2513,"url":"https://patchwork.libcamera.org/api/series/2513/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2513","date":"2021-09-10T07:06:29","name":"Async Post Processor","version":2,"mbox":"https://patchwork.libcamera.org/series/2513/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/13798/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 A91E7BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 07:06:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F3DB16916E;\n\tFri, 10 Sep 2021 09:06:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D747169169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 09:06:46 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.251.226.149])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F989883;\n\tFri, 10 Sep 2021 09:06:45 +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=\"dc18XwQA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631257606;\n\tbh=9Db2plMs1VCD/58aMbRXzQKZMXAuEjm7ddEl41UfoJ0=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=dc18XwQANBtNSjESFtJwfGc1D9Ueq9xqEZpI0S132LfjLPsAiar47H7NSDs/R+se0\n\thEMVKngQCzVSeOYTuhjb4pgLrOMATSjuRvdr4tAzscArxho0slZq1VeuJ5W6aqvJp0\n\t4aE+E3y/O24oU/Xy2lynoAOhwiKWV6cNCqP52jWY=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 10 Sep 2021 12:36:29 +0530","Message-Id":"<20210910070638.467294-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 v2 0/9] 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 aims to enable async post-processing of streams\nin the HAL layer.\n\nPatch [1-5]/9 introduces basic plumbing preparation to run\npost-processing async. The idea here is to send enough information\nfor the post-processor and retrieve it back(via signal mechanism)\nto complete capture results and sending it back to framework.\n\nPatch 6/9 adds a queue.\nWhen a request requires post-processing it is first added to a queue.\nBefore queueing, a lot of context information is saved in form of\nCamera3RequestDescriptor struct. The struct is then pushed to the queue.\nWhen the post-processing is completed,\nCameraDevice::streamProcessingComplete() is called and the status of\ncorresponding Camera3RequestDescriptor is updated(failed/succeeded).\n\nAfter that sendQueuedCaptureResults() inspects the queue to check if\nany capture results are ready to be sent to the framework. If yes, it\nshall send it and de-queue it from the queue.\n\nPatch 7/9 is a simple move of buffer mapping from CameraStream to\nCameraDevice.\n\nPatch 8/9 adds a worker class and a thread. The worker will be used to\nPostProcessor::process() in that thread.\n\nPatch 9/9 is a really a RFC which temporarily address one of \\todo\nin 8/9.\n\n--\nChanges in v2:\n - Move Camera3RequestDescriptor struct out of CameraDevice private(2/9)\n - Pass Camera3RequestDescriptor pointer as a context to PostProcessor\n   class and emit it back via processComplete signal.\n - RFC patch (needs some discussion)\n---\n\nUmang Jain (9):\n  android: camera_stream: Pass FrameBuffer pointer instead of reference\n  camera_device: Remove private scope of Camera3RequestDescriptor\n  android: post_processor: Plumb down the process() with context\n  android: post_processor: Notify post processing completion status\n  android: camera_stream: Query post-processing status\n  android: camera_device: Add a queue for sending capture results\n  android: camera_device: Move buffer mapping for post processing\n  android: camera_stream: Run post-processor in a separate thread\n  RFC: Stop PostProcessor when camera is stopped\n\n src/android/camera_device.cpp            | 146 +++++++++++++++++++++--\n src/android/camera_device.h              |  56 ++++++---\n src/android/camera_stream.cpp            |  47 +++++---\n src/android/camera_stream.h              |  57 ++++++++-\n src/android/jpeg/encoder.h               |   2 +-\n src/android/jpeg/encoder_libjpeg.cpp     |   4 +-\n src/android/jpeg/encoder_libjpeg.h       |   2 +-\n src/android/jpeg/post_processor_jpeg.cpp |  14 ++-\n src/android/jpeg/post_processor_jpeg.h   |   7 +-\n src/android/jpeg/thumbnailer.cpp         |   4 +-\n src/android/jpeg/thumbnailer.h           |   2 +-\n src/android/post_processor.h             |  15 ++-\n src/android/yuv/post_processor_yuv.cpp   |  25 ++--\n src/android/yuv/post_processor_yuv.h     |   7 +-\n 14 files changed, 314 insertions(+), 74 deletions(-)"}