{"id":18082,"url":"https://patchwork.libcamera.org/api/1.1/covers/18082/?format=json","web_url":"https://patchwork.libcamera.org/cover/18082/","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":"<20230103113313.5423-1-david.plowman@raspberrypi.com>","date":"2023-01-03T11:33:11","name":"[libcamera-devel,v2,0/2] Fix colour spaces on Raspberry Pi","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/18082/mbox/","series":[{"id":3698,"url":"https://patchwork.libcamera.org/api/1.1/series/3698/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3698","date":"2023-01-03T11:33:11","name":"Fix colour spaces on Raspberry Pi","version":2,"mbox":"https://patchwork.libcamera.org/series/3698/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18082/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 6D659C322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Jan 2023 11:33:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E9948625E2;\n\tTue,  3 Jan 2023 12:33:18 +0100 (CET)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1323061F0F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Jan 2023 12:33:17 +0100 (CET)","by mail-wm1-x329.google.com with SMTP id\n\tp1-20020a05600c1d8100b003d8c9b191e0so22847387wms.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 03 Jan 2023 03:33:17 -0800 (PST)","from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\th10-20020a5d4fca000000b00281eab50380sm24325767wrw.117.2023.01.03.03.33.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 03 Jan 2023 03:33:16 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1672745598;\n\tbh=+8UWCMaeZqIN4x0+69ttf4oxG+ZZqAjR7GthkkHxa+Y=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=jDCkf5guTZrV/lT+e71/+1IlnY8j1ybkjhsXtYge+51QHoZK+GLgSmrnfpIMUkUfh\n\tx5pFtGinBfXBnBBT9p5jcvamISdiUdg0AF1Rgo1Xny0YdEJ9xnZALvkVfqauz7Fl1r\n\tFqhl3wnWJvc3y1wvYrCga1c0lrmbxfIn3neCuS5/anHAcVVQqjNw8xFfNmVjb1fkvh\n\tPn7zIe2S1ZZmCTwiHGmJPX4Hj7POmuayiWloHz9HMBXJQHnlYJ1XGg2ZF+4A/dRpAL\n\tkXQEREY4UCtQjhckVtPhOpPGcnan3RM8nqbD6jladsEEep5NSO7Y5QB9GOZy7uSNPY\n\tDqEXcXJojv75A==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=dAEXDEqR8P/0noTEFm+AaIqvm0q6iUjHdzt3CYurMM4=;\n\tb=MSJmRRI+xVzVLB2wJs9K1FPm8oNa0Kmi+6tOeids7L5RmPaDeZZkgw5TaATWAS++Nr\n\tNgNDodYepot6U91IeijJWH6NBjX/sxuFO1gR2C18F6cKfhK1k2gm2E2lw4G/7HKKKoLd\n\t48rlqfRnc6GpfOO5q3v9Rs75MljHKcfcavrLn4pw6FtXSX8zOpJiEvBrF/lIKLFaJu9u\n\tDDn7UflnC4Op1XlLamaI3Xh25Z2IYDmH4GeeHucVIzOwUwnFORSVYWV8nBOKtYZMxlf7\n\t7ccmrohCiD3sytqaU7CnYwRnPxQEECpGBBlsYtLqUKqV25SouFXJ74+2iK09dvDGIh2X\n\tOhdQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"MSJmRRI+\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=dAEXDEqR8P/0noTEFm+AaIqvm0q6iUjHdzt3CYurMM4=;\n\tb=26OnERSVJigi1blENhmi48hPqIQ6gnl3MQrH0JQb38J/GnpX5TUt6AAIWw8B0/Bcz+\n\tgLsnu9Xvao6SF5qVCpCiW8b3UJGTx5Wa6gp6sF48OP1WQ3FAWpeu6qBZhtT/U/s0Wbf5\n\taWsJZgV5B8H9gRrI5JdFcQ4xOxUmM4kSO6ttXOeuVpeMcO0MPRTt/wJQ0GnUq9NAEQOJ\n\thnikqyR2sMC2lUd64OtRi1aHEQ1zXA8tIg3TaW8+WIKUTXN8Ua7BM3QIZA0RmBQszr1Z\n\t43jihv+hISSquqng4h08bnmTDjLjPRJleaX5lWb3gZwEB9F2t2Xv3sBKwpEfYcs+5sp3\n\tZCZw==","X-Gm-Message-State":"AFqh2krIkxBpXf1+Mj8Kw3Xoz1LUU0xYTRMp3HfYWn2yPScZw27UCEui\n\tUwf8stnsfuChGsNe0lvvZ/7FDB3oK0kR4qEm","X-Google-Smtp-Source":"AMrXdXvrr8CR1ybI5G9U42jrchJpcIXmsQev73/2B9kBBIzMmWKOZP6a+TWI18RFmhGUMnZJbw49hg==","X-Received":"by 2002:a05:600c:687:b0:3cf:e7c8:494 with SMTP id\n\ta7-20020a05600c068700b003cfe7c80494mr31121776wmn.29.1672745596450; \n\tTue, 03 Jan 2023 03:33:16 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue,  3 Jan 2023 11:33:11 +0000","Message-Id":"<20230103113313.5423-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.30.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 0/2] Fix colour spaces on Raspberry Pi","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>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi everyone\n\nThis is an alternative (and I think better, in many respects) version\nof my previous attempt to fix the broken colour spaces on the\nRaspberry Pi. I've side-stepped the issue of what to do about the base\nclass version of validateColorSpaces and implemented a specific\nversion for the Pi instead.\n\nThere are just 2 commits now:\n\nThe first commit is the same as before, I've fixed the \"obvious\" bug\nin CameraConfiguration::validateColorSpaces because it is just wrong.\n\nThe other adjustments to that method (the 2nd patch in the previous\nversion) have been dropped. The Pi is going to use a custom version\n(the remaining patch described below), so it's really up to the rkisp1\nwhether this function is still useful, or should be changed.\n\nI'm unconvinced that the idea of \"sharing a colour space\" makes much\nsense seeing as you can no longer do it when you have both YUV and RGB\nstreams, so the whole thing seems more trouble that it's\nworth. Arguably, this flag and the associated functionality should\nperhaps be removed? I'd be interested to hear opinions on that.\n\nThe final patch here implements a custom validateColorSpaces for the\nPi. Creating a custom method makes it easier to understand the\nconstraints we have and how I want this to work. We still have to be a\nbit careful to pass the right values to the device, and to interpret\ncorrectly what gets returned, depending on whether it was a YUV or RGB\nstream.\n\nHope that makes sense!\n\nThanks\nDavid\n\n\nDavid Plowman (2):\n  libcamera: camera: fix validateColorSpaces to choose the correct\n    \"main\" colour space\n  pipeline: raspberrypi: Fix handling of colour spaces\n\n src/libcamera/camera.cpp                      |  6 +-\n .../pipeline/raspberrypi/raspberrypi.cpp      | 99 ++++++++++++++++++-\n 2 files changed, 102 insertions(+), 3 deletions(-)"}