From patchwork Thu Jul 30 11:11:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9078 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 37A73BD878 for ; Thu, 30 Jul 2020 11:11:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 766826185C; Thu, 30 Jul 2020 13:11:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Y3+amo7s"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 42D15605B2 for ; Thu, 30 Jul 2020 13:11:40 +0200 (CEST) Received: by mail-wr1-x436.google.com with SMTP id f1so23945792wro.2 for ; Thu, 30 Jul 2020 04:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4RuG19fv8lTEF+VP7d5J+vetxo7SLFfqfWlyL2Fudt8=; b=Y3+amo7sIMRyYX+SCdEuzs5Tj5+pEkMMviuBI9buvXNtu8fzzWFhLDvLzkp7snv9aW L6wDWOk+NOWpsHTaYO8MwNZn8IYDO4Pwt9NaKJFAwWSubIFVkN8/ag9OswmWvrVUcqWc CYYCR2Oohn/jnSwFBrTrzrcOfomiDVvL2x/kwHiLaioKAuEw0nltXFZAEiySu/32HEdP GGS3eVPynRcDdRoiZFU3h9JqjJAzto4vGfnGLGSFBfvueTYMyz6CFClgFWJgWUzD6d6j Q2JI3RowJ5/NNUAFgbcihPA2rUH8Qd7/xoLmNdUDrqSdvYB5IJorhY7iUVg3orhnnMpU iVVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4RuG19fv8lTEF+VP7d5J+vetxo7SLFfqfWlyL2Fudt8=; b=EIGWTHeL5bRv12i92AKPM80h5UI3oZ5uLZlPOX9HBUwrbUfzGQnxHiiJ6OhUQBOPqK PwYnuXHde9hHzQB5eEOc+PWYxZJxMmNWODsao6GZSz/LpRlb+zHh5LlXkzEMnCtmPuPE c8xbm03NIshfHEI3WFW2RLiMKAGulUgopmSQdKBTLzi1V3dYWF8512gaNex/kQ2iDzFn 6OZrvsLlsUDprbMpcCfEombmNtlN22HCzfCwcSFIbharmfWJopGP0S3ZmYrAIqx85hGX gb54lCNTc0DlOZQWQv3vfNm49VZfEko5jfC/inrIyKbD2rpsx08dbPTcvjA97qKrcfH0 pEyw== X-Gm-Message-State: AOAM530v/9q+JnhBhgGHryW/sXi8+IX7BRe+wDxUmpqNNKqdKJarpKes P94L9DOFbR3g7teS+h1sx7oP6DQH5tECTQ== X-Google-Smtp-Source: ABdhPJwitz0lrQLSz1M7q00GB598t0xDfQjrmyZJl2KJs+GBAkTe0FrFBmWdA2LrAR5Gk2qDMZYNyA== X-Received: by 2002:adf:d08d:: with SMTP id y13mr35722498wrh.313.1596107499599; Thu, 30 Jul 2020 04:11:39 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id l10sm9526651wru.3.2020.07.30.04.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 04:11:39 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 30 Jul 2020 12:11:31 +0100 Message-Id: <20200730111134.641-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Raspberry Pi ALSC improvements X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi While working on something else (namely transforms), I noticed a bug in our ALSC algorithm, as well as a couple of other perhaps overdue improvements. As was pointed out, better to get these out of the way first and come back to transforms later! There are 3 patches, the first being trivial. * The second patch resamples the luminance correction table, which previously we weren't doing. This could have caused artifacts if any camera modes were cropping heavily from the sensor. * The final patch improves switching between modes that crop very differently from one another, effectively causing the algorithm to start over and generate new initial tables (though without the adaptive algorithm). Hope that makes sense! Thanks and best regards David David Plowman (3): libcamera: ipa: raspberrypi: ALSC: Camera mode does not need to be atomic libcamera: ipa: raspberrypi: ALSC: Resample luminance table libcamera: ipa: raspberrypi: ALSC: Improve behaviour when camera mode changes src/ipa/raspberrypi/controller/rpi/alsc.cpp | 89 ++++++++++++++------- src/ipa/raspberrypi/controller/rpi/alsc.hpp | 5 +- 2 files changed, 64 insertions(+), 30 deletions(-)