{"id":8909,"url":"https://patchwork.libcamera.org/api/covers/8909/?format=json","web_url":"https://patchwork.libcamera.org/cover/8909/","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":"<20200721220126.202065-1-kieran.bingham@ideasonboard.com>","date":"2020-07-21T22:01:20","name":"[libcamera-devel,RFC,0/6] android: jpeg / software streams","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/8909/mbox/","series":[{"id":1125,"url":"https://patchwork.libcamera.org/api/series/1125/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1125","date":"2020-07-21T22:01:20","name":"android: jpeg / software streams","version":1,"mbox":"https://patchwork.libcamera.org/series/1125/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/8909/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 543A3C2E68\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2020 22:01:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4788F60923;\n\tWed, 22 Jul 2020 00:01:33 +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 4978060491\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Jul 2020 00:01:31 +0200 (CEST)","from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A42BD51A;\n\tWed, 22 Jul 2020 00:01:30 +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=\"t8AoyMpO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1595368890;\n\tbh=fr753PagWGrk1/ofTGu8Yrj5ZTpzWxpVg1F03B3kzcE=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=t8AoyMpO6oxShhAJGc6dp6hnz02J+i2eKxz+ccrh6WGspMl4myfb1T83ypqBfLWQp\n\tX9wdHtPTk5K7CHGtvh4VkfINHMPjiLTWGZsrP7pKPBZ91+JmBrcbCDFtDtorwJ4Alq\n\tM4/3X4aEBIUSi0XjkM0WH7aDWzDAqmMRqbsX0aOc=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 21 Jul 2020 23:01:20 +0100","Message-Id":"<20200721220126.202065-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [RFC PATCH 0/6] android: jpeg / software streams","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"These patches are posted just for discussion points, they are most\ncertainly unfinished, and in a state of flux, but plumbing multiple\nstreams or software streams is becoming a blocker to others, and so to\nis the lack of being able to run the Camera application.\n\nWith these patches, at least the camera application can run, albeit not\nsuccessfully write out a captured image yet.\n\nThe compression of the image is successfull, and has been tested by\ndirectly writing the compressed data to temporary files.\n\n\nAt least the following is known to still warrant more work:\n\n - JPEG compression should use the raw interfaces to reduce conversions\n   I hope to work on this next, but I have been keen to get the plumbing\n   working, so performance improvements can happen after.\n\n - Error handling from libjpeg needs improving, and a custom error\n   handler implementing.\n\n - I was going to strip out the non NV12 conversion functions, for rfc,\n   but they're not actually that big. But they should be replaced by the\n   raw interface where possible.\n\n - Added software streams likely need a validation cycle to determine\n   what can be achieved by the libcamera streams.\n\n - Ideally the JPEG_MAX_SIZE should come from libjpeg, but that's a bit\n   chicken and egg, as the JPEG_MAX_SIZE is a static property before we\n   have knowledge of what stream size we will encode.\n\n - There's debug prints everywhere ;-)\n\n - It would be nice to not have to duplicate the PixelFormat information\n   tables.\n\n - The JPEG compressor isn't actaully destructed yet, and I think there\n   will be benefit to more refactoring of the CameraStream class and\n   perhaps moving code to the CameraStream to handle actual frame\n   processing.\n\n - The JPEG compression should be moved to happen in it's own thread to\n   prevent blocking of any other processing.\n\nKieran Bingham (6):\n  android: Introduce JPEG compression\n  android: camera_device: Report configuration changes from validate()\n  android: camera_device: Add ANDROID_JPEG_MAX_SIZE\n  android: camera_device: Support MJPEG stream construction\n  [HACK]: android: camera_device: Define JPEG size and quality\n  android: camera_device: Provide a MappedCamera3Buffer\n\n src/android/camera_device.cpp        | 169 +++++++++++++++-\n src/android/camera_device.h          |   8 +\n src/android/jpeg/compressor.h        |  28 +++\n src/android/jpeg/compressor_jpeg.cpp | 279 +++++++++++++++++++++++++++\n src/android/jpeg/compressor_jpeg.h   |  44 +++++\n src/android/meson.build              |   1 +\n src/libcamera/meson.build            |   2 +\n 7 files changed, 522 insertions(+), 9 deletions(-)\n create mode 100644 src/android/jpeg/compressor.h\n create mode 100644 src/android/jpeg/compressor_jpeg.cpp\n create mode 100644 src/android/jpeg/compressor_jpeg.h"}