{"id":9263,"url":"https://patchwork.libcamera.org/api/covers/9263/?format=json","web_url":"https://patchwork.libcamera.org/cover/9263/","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":"<20200806163639.12971-1-david.plowman@raspberrypi.com>","date":"2020-08-06T16:36:34","name":"[libcamera-devel,v2,0/5] Transform implementation","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/9263/mbox/","series":[{"id":1208,"url":"https://patchwork.libcamera.org/api/series/1208/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1208","date":"2020-08-06T16:36:34","name":"Transform implementation","version":2,"mbox":"https://patchwork.libcamera.org/series/1208/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/9263/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 C8DAABD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Aug 2020 16:36:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5107560554;\n\tThu,  6 Aug 2020 18:36:50 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E28DB60392\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Aug 2020 18:36:48 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id k20so10284072wmi.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 06 Aug 2020 09:36:48 -0700 (PDT)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\te5sm7405076wrc.37.2020.08.06.09.36.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 06 Aug 2020 09:36:47 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"kfyfL8e8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=CR+8heI5r1zNsCykKV0Ttlx1bYDxcbVcYu91v9xkH+0=;\n\tb=kfyfL8e8ISy7/RCp1y2o5mWo1D5zKH8DofV/cAiw826K+TDr5bJuH40TFadwExISb8\n\t5s7nc2sXpxwDMJf/sYLumduF7Z/+tkYoGUs9306AxejBslmJMQjzOyQr6G42t/u2M1Bu\n\t0m0WoDqoYryF10apZ+c2k1kZe/kFEv+RNItSpO8CZut+KAg1KvmztFUOnRDNczELhL6k\n\tPZO1bMVwR27zQPFWVCzaPsLAi6rx3x34l9Ul6SKHFmCLClnEBHPXsuVufUd7A5cpZoS9\n\tAAYecAS5lLCQFnS7inbLO2bkP7PQjArQC6j/Ivn/eSRS8ldxHvXPzOp6iQuR3bPve1i7\n\tpGWg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=CR+8heI5r1zNsCykKV0Ttlx1bYDxcbVcYu91v9xkH+0=;\n\tb=lbR7W5O2sxHKvsT7Z34Fnn22skVEn/LHtXBP3R7WC+cOKfVOf8fMmuIOqTUP5ID/vf\n\tMM6tkjRmhkjBrVe36+tWOG3oHJxtHHd9I9812orJ6wdKsMI/QDDP96U/Mcoqj9YLpST4\n\t5UEW7W6/yRc+A2I8oYwm2QO+cVVOtMRi1JbWHB1AhpQY+cJwS58gnKkeqNaLo6nlltde\n\t7j6mMbUMAtY06vfcDddB59ffghtZM1aUYqVrAzDD8M8xrcz/IF1OTDDONHJTsMNr12xE\n\tNp25MfEGlyZfwnhJPrMbK+pa4KOdh8o0G4+lHZtPRv/IuAydEURsDv8q1M3xp9LpPRjo\n\tZo+Q==","X-Gm-Message-State":"AOAM530rb40laqlpVdUnUHGgBcLtNvy+7vTxGkED7b5QRz1+cFypldAQ\n\tiBS6gSumcvKp6pn7tySmECammOnYFW9T8w==","X-Google-Smtp-Source":"ABdhPJxRzujE6+ENplwYbxEfplljtmWqWEWBJGttR4s5g1lRHvhwkh3fYMg0JwKvRgoxZhJLHtfaZA==","X-Received":"by 2002:a7b:cf29:: with SMTP id m9mr8621006wmg.88.1596731808161; \n\tThu, 06 Aug 2020 09:36:48 -0700 (PDT)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  6 Aug 2020 17:36:34 +0100","Message-Id":"<20200806163639.12971-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 0/5] Transform implementation","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":"Hi everyone\n\nHere's a second version of the 2d transform implementation (still for\ndiscussion only). It follows the same principles as the previous\nversion, but the ALSC issues that I ran into are no longer part of\nthis set (indeed they have already been merged).\n\nThere are now 5 patches. I'll add the relevant documentation once we\ncan feel confident there won't be too much more churn. That leaves:\n\n1. The first merely adds the Transform enum. I to-ed and fro-ed a bit\nhere, and decided, after doing it both ways, that wrapping a class\nround the enum didn't add a whole lot, and just left me with more\nquestions and more boilerplate. Anyway, see what you think...\n\n2. The second patch adds the Transform enum to the\nCameraConfiguration. I've also amended all the pipeline handlers\n(including the Raspberry Pi one) simply to coerce it to the Identity\nif it wasn't, marking the configuration as \"adjusted\".\n\n3. This patch updates the Raspberry Pi pipeline handler to allow all\nnon-transposing transforms, and to set the flip bits in the sensor.\n\n4. Here I just plumb the Transform through to the Raspberry Pi IPA\nwhere it gets put into the CameraMode structure. This bothered me\nfirst time round, but on reflection I think it's pragmatic to treat it\nlike that from the point of view of the IPAs.\n\n5. This updates the ALSC algorithm to transform the calibrated tables\ncorrectly. Note that we regenerate the tables from scratch if the\ntransform changes.\n\nBest regards\nDavid\n\nDavid Plowman (5):\n  libcamera: Add Transform enum to represet 2d plane transforms.\n  libcamera: Add user Transform to CameraConfiguration\n  libcamera: raspberrypi: Set camera flips correctly from user transform\n  libcamera: raspberrypi: Plumb user transform through to IPA\n  libcamera: ipa: raspberrypi: ALSC: Handle user transform\n\n include/libcamera/camera.h                    |  3 +\n include/libcamera/meson.build                 |  1 +\n include/libcamera/transform.h                 | 58 +++++++++++++\n src/ipa/raspberrypi/controller/camera_mode.h  |  4 +\n src/ipa/raspberrypi/controller/rpi/alsc.cpp   | 13 ++-\n src/ipa/raspberrypi/raspberrypi.cpp           | 48 ++++++-----\n src/libcamera/camera.cpp                      |  2 +-\n src/libcamera/meson.build                     |  1 +\n src/libcamera/pipeline/ipu3/ipu3.cpp          |  5 ++\n .../pipeline/raspberrypi/raspberrypi.cpp      | 26 +++++-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  5 ++\n src/libcamera/pipeline/simple/simple.cpp      |  5 ++\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  5 ++\n src/libcamera/pipeline/vimc/vimc.cpp          |  5 ++\n src/libcamera/transform.cpp                   | 83 +++++++++++++++++++\n 15 files changed, 238 insertions(+), 26 deletions(-)\n create mode 100644 include/libcamera/transform.h\n create mode 100644 src/libcamera/transform.cpp"}