{"id":1912,"url":"https://patchwork.libcamera.org/api/1.1/patches/1912/?format=json","web_url":"https://patchwork.libcamera.org/patch/1912/","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":"<20190904120847.11934-3-jacopo@jmondi.org>","date":"2019-09-04T12:08:45","name":"[libcamera-devel,v3,2/4] android: camera_device: Use correct sizes for static metadata","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"21e53bc8ea55b81657992557bf71a043408e3c12","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1912/mbox/","series":[{"id":478,"url":"https://patchwork.libcamera.org/api/1.1/series/478/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=478","date":"2019-09-04T12:08:43","name":"android: Rework metadata tags","version":2,"mbox":"https://patchwork.libcamera.org/series/478/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1912/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1912/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7C90B60BB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Sep 2019 14:07:24 +0200 (CEST)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 23C3E20010;\n\tWed,  4 Sep 2019 12:07:22 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo@jmondi.org>, kamesan@google.com, jcliang@google.com,\n\tshik@google.com, wtlee@google.com,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Wed,  4 Sep 2019 14:08:45 +0200","Message-Id":"<20190904120847.11934-3-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.23.0","In-Reply-To":"<20190904120847.11934-1-jacopo@jmondi.org>","References":"<20190904120847.11934-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 2/4] android: camera_device: Use\n\tcorrect sizes for static metadata","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Wed, 04 Sep 2019 12:07:24 -0000"},"content":"Use more opportune sizes for the static metadata pack, and for the\ndynamic metadata sizes which where wrongly set to use the ones defined\nfor the static pack.\n\nAcked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 15f57a7fe731..dee60e3d2931 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -128,11 +128,11 @@ camera_metadata_t *CameraDevice::getStaticMetadata()\n \t * more.\n \t */\n \n-\t/* \\todo Use correct sizes */\n-\t#define STATIC_ENTRY_CAP 256\n-\t#define STATIC_DATA_CAP 6688\n-\tstaticMetadata_ = allocate_camera_metadata(STATIC_ENTRY_CAP,\n-\t\t\t\t\t\t   STATIC_DATA_CAP);\n+\t/*\n+\t * \\todo Keep this in sync with the actual number of entries.\n+\t * Currently: 46 entries, 390 bytes\n+\t */\n+\tstaticMetadata_ = allocate_camera_metadata(50, 500);\n \n \t/* Color correction static metadata. */\n \tstd::vector<uint8_t> aberrationModes = {\n@@ -966,11 +966,11 @@ camera_metadata_t *CameraDevice::getResultMetadata(int frame_number,\n {\n \tint ret;\n \n-\t/* \\todo Use correct sizes */\n-\t#define RESULT_ENTRY_CAP 256\n-\t#define RESULT_DATA_CAP 6688\n-\tcamera_metadata_t *resultMetadata =\n-\t\tallocate_camera_metadata(STATIC_ENTRY_CAP, STATIC_DATA_CAP);\n+\t/*\n+\t * \\todo Keep this in sync with the actual number of entries.\n+\t * Currently: 13 entries, 36 bytes\n+\t */\n+\tcamera_metadata_t *resultMetadata = allocate_camera_metadata(15, 50);\n \n \tconst uint8_t ae_state = ANDROID_CONTROL_AE_STATE_CONVERGED;\n \tret = add_camera_metadata_entry(resultMetadata, ANDROID_CONTROL_AE_STATE,\n","prefixes":["libcamera-devel","v3","2/4"]}