{"id":4075,"url":"https://patchwork.libcamera.org/api/1.1/covers/4075/?format=json","web_url":"https://patchwork.libcamera.org/cover/4075/","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":"<20200618111236.26897-1-david.plowman@raspberrypi.com>","date":"2020-06-18T11:12:34","name":"[libcamera-devel,v2,0/2] Raspberry pi IPAs: update sensor exposure/gain when camera mode changes","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/1.1/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/4075/mbox/","series":[{"id":1014,"url":"https://patchwork.libcamera.org/api/1.1/series/1014/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1014","date":"2020-06-18T11:12:34","name":"Raspberry pi IPAs: update sensor exposure/gain when camera mode changes","version":2,"mbox":"https://patchwork.libcamera.org/series/1014/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/4075/comments/","headers":{"Return-Path":"<david.plowman@raspberrypi.com>","Received":["from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D4F3603C1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2020 13:12:53 +0200 (CEST)","by mail-wr1-x429.google.com with SMTP id p5so5590965wrw.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2020 04:12:53 -0700 (PDT)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\te10sm3103857wrn.11.2020.06.18.04.12.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2020 04:12:50 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Xzyw7u1l\"; 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=9mdhKA27ya4/BoHLdpagxaW25BUx492sYOkPUZ0yyPg=;\n\tb=Xzyw7u1lEA2WWQd6r0aDYUkoYkn+SV+mL1LLGXgXGRustg1+uhKH/wwLqCEGlM6hb5\n\t1j7kQXp7E2lREiS8QqEqFeVBc/qzY+lRJa8I7NFF/IRnCJd1Tv0EyMOYhzIsk3wsnAdD\n\tTAjv6FEEW11QmhVtrFZYBQTgjdnl87c4FhLI9qKmqpRWqJVg43jzMIbO4tB9GLokCO/y\n\tEmwWsXpILN51R3/rW7BnJOQCEPZMhUnP18G2uVi68pXof82nqV+KUcGDyJkaI+aYd/x6\n\tVUoQ8vpchUWxqUdjfDqguqfToOG5rNZhD2CzqBFXM6EgpTgZBQUcdDadv4yIi+z8qSOo\n\tUg1g==","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=9mdhKA27ya4/BoHLdpagxaW25BUx492sYOkPUZ0yyPg=;\n\tb=MmDucHqXH7hhTkIsIe8FOvv0R9T2yZa6gmi8662ZpZxPJDPmbWsWsNHwu1nbsNg8jC\n\tRQRh5byBP7LFiPNSRkj9jvz4Es6pj+g7o8MXDpds4AJjYJdNyhU1IM/QJShz9P67o7K5\n\tc0aymL1HE38mZNLLE8XeXHXlEqMoFcfAQxR9zGwg8D5nSRsKlh9H42/GGXHK00dEHu+n\n\ttvNXsZKzXOmaIcdsJ/aSj8nYUUbCVmHEaOZxAbTTMXhu8K0FxKzcY+Z/dBqtAPrT1BsD\n\tZ+x/Wb2uHpZbgI+Hmm+eiVhNY5fHc1PHiKebCuo/PRTnOKtV+3C8jVNmEMdRYxZGTgM3\n\tIiBQ==","X-Gm-Message-State":"AOAM5300zsI06ZP/O2S/WIEZLF4o3H5s4cCLv3SSeWWrEuDxWvqWQhqk\n\t1NWOxJ9A6LWUgqi5QYLg0mbGx1OLI+k=","X-Google-Smtp-Source":"ABdhPJyGL6dRam0WEWesnGpWSTY1pOxC9Tu5NV66pYKnfzvu3pVd4jhMvhvgNKUarTuUWXvzK2Y3YA==","X-Received":"by 2002:a5d:6987:: with SMTP id g7mr1411112wru.79.1592478772335; \n\tThu, 18 Jun 2020 04:12:52 -0700 (PDT)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 18 Jun 2020 12:12:34 +0100","Message-Id":"<20200618111236.26897-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 0/2] Raspberry pi IPAs: update sensor\n\texposure/gain when camera mode changes","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>","X-List-Received-Date":"Thu, 18 Jun 2020 11:12:53 -0000"},"content":"Hi\n\nHere's version 2 of this patch hopefully taking the review comments\ninto account. When a new sensor mode is selected, and the pipeline\nre-configured, the exposure/gain must be recalculated because:\n\n1. an application might select a new exposure profile from the camera\ntuning which divides up the exposure/gain differently, and\n\n2. the line timings may change, and the sensor driver stores exposure\nas a number of lines, meaning the time could change \"under our feet\"\nif we didn't recalculate the lines correctly.\n\nBest regards\nDavid\n\nDavid Plowman (2):\n  libcamera: raspberrypi: allow SwitchMode method to return camera\n    settings\n  libcamera: raspberrypi: recalculate camera exposure/gain when camera\n    mode changes\n\n src/ipa/raspberrypi/controller/algorithm.cpp  |  3 +-\n src/ipa/raspberrypi/controller/algorithm.hpp  |  2 +-\n src/ipa/raspberrypi/controller/controller.cpp |  4 +--\n src/ipa/raspberrypi/controller/controller.hpp |  2 +-\n src/ipa/raspberrypi/controller/rpi/agc.cpp    | 12 ++++++++\n src/ipa/raspberrypi/controller/rpi/agc.hpp    |  1 +\n src/ipa/raspberrypi/controller/rpi/alsc.cpp   |  4 ++-\n src/ipa/raspberrypi/controller/rpi/alsc.hpp   |  2 +-\n src/ipa/raspberrypi/controller/rpi/noise.cpp  |  4 ++-\n src/ipa/raspberrypi/controller/rpi/noise.hpp  |  2 +-\n .../raspberrypi/controller/rpi/sharpen.cpp    |  4 ++-\n .../raspberrypi/controller/rpi/sharpen.hpp    |  2 +-\n src/ipa/raspberrypi/raspberrypi.cpp           | 28 ++++++++++---------\n 13 files changed, 46 insertions(+), 24 deletions(-)"}