{"id":9415,"url":"https://patchwork.libcamera.org/api/covers/9415/?format=json","web_url":"https://patchwork.libcamera.org/cover/9415/","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":"<20200828144110.17303-1-david.plowman@raspberrypi.com>","date":"2020-08-28T14:41:03","name":"[libcamera-devel,v4,0/7] 2D transforms","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/9415/mbox/","series":[{"id":1250,"url":"https://patchwork.libcamera.org/api/series/1250/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1250","date":"2020-08-28T14:41:03","name":"2D transforms","version":4,"mbox":"https://patchwork.libcamera.org/series/1250/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/9415/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 13B9DBF019\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Aug 2020 14:41:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 41AC16291C;\n\tFri, 28 Aug 2020 16:41:18 +0200 (CEST)","from mail-wr1-x442.google.com (mail-wr1-x442.google.com\n\t[IPv6:2a00:1450:4864:20::442])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 874D16037B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Aug 2020 16:41:16 +0200 (CEST)","by mail-wr1-x442.google.com with SMTP id c15so1515566wrs.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Aug 2020 07:41:16 -0700 (PDT)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\ts12sm2493724wmj.26.2020.08.28.07.41.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 Aug 2020 07:41:15 -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=\"KgYP6zQK\"; 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=WP9Pv/1l5mgNWqBSqrwpflCBzl/5vyglt1zKaWtoxQE=;\n\tb=KgYP6zQKcJQ7NMpSKXh/yoP1gl7IcRcxIF6c60hoZOwjZ4zu/y7K4mPBzhAIPJx7ks\n\tRWxDm8z6aqSsEO39eJr3vPSfXdw7lSz7O5C2A0k2Nhs+Idb3jiuZp3VVvlufVQj9dsWL\n\trOj0yMYb50U5wRBD57Fu6JGN9H9+lggJ6bXkhPwb619ADuoRxLE+84VSYBDPDglfLq/z\n\tVA7eSFoD8UKNqkJ2FiuDbHwLethNp4fs1OTf3iH3OSDEDyiN0/BcujaErfNTpaibpXVC\n\tQ7owWrTESMZM+R7F7ZnsQnqDU7svHhDaoK/Xy1zUkzy2ZQs9tU20MSVYKeW3CFv2D4Xh\n\tZI9g==","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=WP9Pv/1l5mgNWqBSqrwpflCBzl/5vyglt1zKaWtoxQE=;\n\tb=NZ4i/xumoI35724KHFbb/QKcm6Wh+HdgbWR/KvsHSkkT6zEKlB6GD0wpsy1hwxtgMB\n\tEZX6faECcr3mSR2HBfpvkyI46X8ycOnBIpVgZihH72aL0p65aI8X4PWXGzPEsF09lmeS\n\tU4+T2nYjmu2ZkwraRoN9EaCMkISHcZd24tSIkPh+Rs+/3dNBtGSFfZ0QdgF/0/z7KInt\n\tPy/jSUwlr7gJfmnSkwaeocZJCqZRI+qCjaCkK7fnDtM42zAQJnwjgOUdEaxtF+Efg+dN\n\tKOZQfNnh0bzobpxs+ctLGT2g+9tuEoPWt3+TIPC3yqyGUBDvTrQ9+hQMjXtGCTaxWAwJ\n\t4jWw==","X-Gm-Message-State":"AOAM533KA4vKlB/DlyUFBGZ/iiGs7mKa4uq9YGuk3z3XsNAjru2B37/y\n\tfgmCMBC4YcjAFWyk9HO1uZWrTySHg+BYqQ==","X-Google-Smtp-Source":"ABdhPJyZqwiMw+o8LPgqU5lUa1yvBiCWXmuiRsZy9T5qi8wL1zii5UgrX8lBXFvtKVS+e7eIPpdqZA==","X-Received":"by 2002:adf:ba52:: with SMTP id t18mr1837141wrg.26.1598625675725;\n\tFri, 28 Aug 2020 07:41:15 -0700 (PDT)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 28 Aug 2020 15:41:03 +0100","Message-Id":"<20200828144110.17303-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v4 0/7] 2D transforms","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 the latest version of 2D transforms. It's practically identical\nto the previous version, except for the (mostly documentation)\nimprovements that were suggested, and the following points noted\nbelow.\n\nFirstly, there are 2 new commits at the start of this set. The first\nof these reverts the commit 1e8c91b65695449c5246d17ba7dc439c8058b781\nthat Kieran kindly pushed for us yesterday. Unfortunately that patch,\nwhilst fine when Naush originally authored it, made it impossible to\nimplement user-supplied transforms. Had it not been lurking in a\nrather forgotten state for so long I might have woken up to its\nproblems sooner, so apologies for that. Anyway, I'm not quite sure if\nyou have any conventions for exactly how to revert a patch.\n\nThe second of these new patches moves the change made by the now\nreverted patch into the validate() method. This is early enough to fix\nthe original bug (which was that raw streams were advertising an\nincorrect Bayer format), but co-exists happily with the transform\ncode. (Would these two be better squished together?)\n\nBeyond that the only issues to bring up are in what is now the fifth\ncommit of this series (third in the previous version). These relate to\nthat email I sent a few days back. Specifically:\n\n* I assume the intention is, when no user-supplied transform is given,\n  that we give out images that are corrected for any camera\n  rotation. That is, the image, when viewed without any supplementary\n  manipulations, should look like the world did when the picture was\n  taken. Is this correct?\n\n* So if a camera advertises itself as having a 90 degree rotation, do\n  I need to perform a 90 degree clockwise rotation to the image to\n  correct it, or counter-clockwise? I read the documentation on the\n  rotation property but must confess I was left a little hazy! (The\n  consequence would be that the rotation angle may need negating.)\n\n* I've added a comment to say why I only flip the transpose bit when\n  the combined transform is one we don't support. It makes life easier\n  for the application because it either gets the transform it\n  requested, or it only has to do a simple transpose. All the other\n  possible transforms an application might worry about having to do\n  just can't happen. Does that make sense?\n\nI think that's everything!\n\nThanks and best regards\nDavid\n\nDavid Plowman (7):\n  libcamera: pipeline: raspberrypi: Revert \"Set sensor default\n    orientation before configure()\"\n  libcamera: pipeline: raspberrypi: Set sensor orientation during\n    validate\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                 |  73 ++++\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                      |  16 +-\n src/libcamera/meson.build                     |   1 +\n src/libcamera/pipeline/ipu3/ipu3.cpp          |   5 +\n .../pipeline/raspberrypi/raspberrypi.cpp      |  60 +++-\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                   | 312 ++++++++++++++++++\n 15 files changed, 522 insertions(+), 34 deletions(-)\n create mode 100644 include/libcamera/transform.h\n create mode 100644 src/libcamera/transform.cpp"}