From patchwork Sat Apr 4 21:57:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 3403 Return-Path: Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 64F29600F4 for ; Sat, 4 Apr 2020 23:57:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="StVUsjPR"; dkim-atps=neutral Received: by mail-lj1-x231.google.com with SMTP id i20so10636697ljn.6 for ; Sat, 04 Apr 2020 14:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=WY/pFY1XXsNqhTeWSyyCUJO2LqFG40yk8+qx6DrY4u4=; b=StVUsjPRxYrc7kvuBb6uGJpc8ciYlffymR+UQi8gGxv4QEdkcOL8cN3YiqT4cETXqg fUc/doeVNt2c7+gMzm//ORDcYdc/mCh5rGw9nLUzzhYG8jcgGO1Lt1iPi08jm7hhqRg8 0NKOVDFzxInDkbDB6LO75pjZ14xCKqqbrTFd5AHIUAtcR56DFm+2re7GQ7jE1VFuFc+5 fv+Zsqz/OctMAUKjdFzWq690CUkPklVzatJhrylKv9CjbNhmTjj3mE01fvesL1iNQhlv 5VvKt0zu8MQp5UAsMnDFMr+vXfbFmvjw3O+XTwfrkdcazud7GIJeB4uQ5W19iRquYi2G IPeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=WY/pFY1XXsNqhTeWSyyCUJO2LqFG40yk8+qx6DrY4u4=; b=f8uCEeFbuhQlupZ6ZiIxsHPWiZvblfuiW6mgfDWD75hJwinUeCy5WGeetVFswgBknr I5bBiIysk9Uk6rtqTsabkZPevODuKsgc5OVZQJQRHE5Rl9ychdjhAtKDr83DfZd5cZLo JlzbpnYrL23jLWcF4sqDkJKevKmAAP4bodhLNxFOdnQoPVSVWPFOYjCWPe5iYoOn5IRC OrdJPq/TaeKlf83wSnsc/NWiCLHsCcO5ERDiSHarq7sibeHGGMNp3KVcbJjI9mJeXcED 3FM5yfLbDMzZhPiqIuw/MPaYIlr556uIMrtEbQEhlLirDShY+jWabHfCJNqSXO5yPqKu oe1A== X-Gm-Message-State: AGi0PuZvonFflqetj/HhoaxQiyOezk28xakDQ0qiHFnbVK5j5Dgg5UsX VPq9jmY7egQ4pLerUqCr78vweD5dRkw= X-Google-Smtp-Source: APiQypL35QJxGbfFrHdwxU64OS9tB5VwFww9sbWg8c9CUc3l/IZE25Fdus4XnB/vIhzf4VqrvvELAg== X-Received: by 2002:a05:651c:1132:: with SMTP id e18mr8252048ljo.149.1586037462240; Sat, 04 Apr 2020 14:57:42 -0700 (PDT) Received: from localhost.localdomain (37-144-159-139.broadband.corbina.ru. [37.144.159.139]) by smtp.googlemail.com with ESMTPSA id h16sm7299627ljl.73.2020.04.04.14.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 14:57:41 -0700 (PDT) From: Andrey Konovalov To: libcamera-devel@lists.libcamera.org Date: Sun, 5 Apr 2020 00:57:29 +0300 Message-Id: <20200404215730.16194-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [RFC 0/1] libcamera: V4L2VideoDevice::to[V4L2]PixelFormat(): add Bayer formats 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: , X-List-Received-Date: Sat, 04 Apr 2020 21:57:43 -0000 Hi, This patch adds support for 8-bit, 10-bit, and 10-bit packed raw Bayer formats in toPixelFormat() and toV4L2PixelFormat() methods of V4L2VideoDevice class. I currently use this change for working with the simple pipeline. 12-bit and 14-bit raw Bayer formats should be added too (plan to add them in the next version of the patch). And this can be done the same way as it is done here for the 8-bit and 10-bit ones. But this would make the switch statements even more longer, so I am not sure if we should try making them more compact. Hence the RFC. Thanks, Andrey