{"id":8552,"url":"https://patchwork.libcamera.org/api/covers/8552/?format=json","web_url":"https://patchwork.libcamera.org/cover/8552/","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":"<20200702105337.31161-1-david.plowman@raspberrypi.com>","date":"2020-07-02T10:53:35","name":"[libcamera-devel,0/2] Digital zoom 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/8552/mbox/","series":[{"id":1072,"url":"https://patchwork.libcamera.org/api/series/1072/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1072","date":"2020-07-02T10:53:35","name":"Digital zoom implementation","version":1,"mbox":"https://patchwork.libcamera.org/series/1072/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/8552/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 11F1BBE905\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Jul 2020 10:53:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9929660C56;\n\tThu,  2 Jul 2020 12:53:42 +0200 (CEST)","from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C74B1603B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  2 Jul 2020 12:53:40 +0200 (CEST)","by mail-wr1-x42a.google.com with SMTP id f18so19543992wrs.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 02 Jul 2020 03:53:40 -0700 (PDT)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tp25sm9768444wmg.39.2020.07.02.03.53.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 02 Jul 2020 03:53:39 -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=\"UZ30JaAX\"; 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=YRRr53AknftWtT7iWm58eE/jwbqmSe9EYHbX4tM0zWE=;\n\tb=UZ30JaAX16cgZdymZSp6S2SkmegKXdRWgRUILrnAIS9RtEEJvyDaHthrGGDouRGhQE\n\toEQkgRx85u2cgTsBFEUnO0/D/x58apLGz5AW5CTBt7Q/gXqTj6Mg4vY+VNTO9fPdHlNE\n\tNxN394BY+J/gcc8uBia/RNCOI1OeuXW595QNd7XAUnbHnJ5vusOZ7WrM9q4MObk2dOOn\n\t1pDpgb3DmjC78m9Lrfcq5F3vplGZHKmP7Iwrx2CHj3rxm45UASQ4L4r+aK/nT9HfeLq1\n\tcrnxCtcyzchTcGUERT6EOU0csntS9XKSWHE9HNoB40ogQvvgTM25FeTZYihV+gxM1PGJ\n\thhsw==","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=YRRr53AknftWtT7iWm58eE/jwbqmSe9EYHbX4tM0zWE=;\n\tb=PHnlmuwJWQ2Zt8cPXkZSw2MGRqgq1sAMRUQ+h3QIF5ycT6VDu55W8JrILfyGCy+VhQ\n\tJDZyAC9S80SfvSINknjq1LAyDloUVVU4FJhLAmNVZsSfbtHEkXJA9e0ZbVYmp4Oy7NgX\n\tVAKPcaLOlRK5fLiDT0HULfyrxUjAtoWWdglNHUr24+5l1jenBUo6l6n+8NTHd3gv0ysB\n\tBQ3+7iB0Yujct1UaXPuWQ1z3FiNgXOHafY0vT/Ncwn8ZCaV7YR3AP+KhNhxYVntO3Rci\n\tfjWeFDvLqS8ArLCuqMIFaEm8RP867LKMACa815kKPpozSV3bxTwE8mcq3QABHdxJayaj\n\tLRSw==","X-Gm-Message-State":"AOAM530m7hTmL0IHevkciKkJwaV/nqXy3ugRvBFrEedF98MKx9h6o1Db\n\tnTgTYobHwdwMKBEO2s7pMkVHWKZ9GtQ=","X-Google-Smtp-Source":"ABdhPJxP+zC0Dl4zPM+3ifChAyu0QTuBSYxuITWygn/2xb+v8ISUppQknaV5RTxgcHkDuu9PcaMqWw==","X-Received":"by 2002:adf:8104:: with SMTP id 4mr31508169wrm.18.1593687220125; \n\tThu, 02 Jul 2020 03:53:40 -0700 (PDT)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  2 Jul 2020 11:53:35 +0100","Message-Id":"<20200702105337.31161-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 0/2] Digital zoom 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\nThis patch set implements digital zoom. I don't think it's ready for\nprime time yet but it seemed to me to be a good way to move the\ndiscussion beyond the somewhat theoretical stage and towards something\na bit more practical.\n\nIt follows the path of my previous emails, and consists of two patches.\n\nThe first is the general infrastructure one and adds the DigitalZoom\ncontrol. I ummed and erred for a while over what to call it, but I\nthink \"digital zoom\" really does describe it best. I think most people\nare familiar with the idea of picking just part of an image and\nzooming it back up to the size of the unzoomed output.\n\nNext, I also add a function to get the \"sensorCrop\". Again,\nterminology is perhaps an issue here, but it gets you those pixel\ndimensions from the sensor, adjusted for output aspect ratio, within\nwhich you can then zoom. As far as I can see, it's only the pipeline\nhandler that actually calculates this, and it depends on both the\ncamera mode and the output size, so this seemed a reasonable way to\nget these numbers back to an application.\n\nThe second patch implements this for the Raspberry Pi. Mostly controls\nget sent to the IPAs and handled there, but this one needs to be\nintercepted and actioned by the pipeline handler. Additionally, we\nmake the pipeline handler responsible for updating the return values\n(the \"digital zoom\" actually used) in the metadata.\n\nAnyway, I hope this all makes sense. As I said, I think there's some\nfurther discussion to be had before we take this further, so I look\nforward to some feedback!\n\nThanks and best regards\nDavid\n\nDavid Plowman (2):\n  libcamera: Implement digital zoom\n  libcamera: raspberrypi: Implement digital zoom\n\n include/libcamera/camera.h                    |  2 +\n include/libcamera/internal/pipeline_handler.h |  4 ++\n include/libcamera/ipa/raspberrypi.h           |  1 +\n src/ipa/raspberrypi/raspberrypi.cpp           | 10 ++++\n src/libcamera/camera.cpp                      | 26 ++++++++\n src/libcamera/control_ids.yaml                | 10 ++++\n .../pipeline/raspberrypi/raspberrypi.cpp      | 59 +++++++++++++++++++\n 7 files changed, 112 insertions(+)"}