[{"id":27688,"web_url":"https://patchwork.libcamera.org/comment/27688/","msgid":"<cd087f6c482c9a9462edf35113d6901d26dff860.camel@ndufresne.ca>","date":"2023-08-22T19:19:59","subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Document stride\n\twill be 0 for compressed formats","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mardi 22 août 2023 à 18:49 +0530, Umang Jain via libcamera-devel a écrit :\n> For compressed formats, v4l2_pix_format.bytesperline value will be zero\n> and is documented similarly in the kernel. Since we set the stride to\n> v4l2_pix_format.bytesperline, document the case where it is expected\n> to be zero (i.e. if the format is compressed).\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n\n> ---\n>  src/libcamera/stream.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index 272222b7..f3e00ead 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -311,7 +311,8 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n>   * The stride value reports the number of bytes between the beginning of\n>   * successive lines in an image buffer for this stream. The value is\n>   * valid after successfully validating the configuration with a call to\n> - * CameraConfiguration::validate().\n> + * CameraConfiguration::validate(). For compressed formats (such as MJPEG),\n> + * this value will be zero.\n>   */\n>  \n>  /**","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 5D46CBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Aug 2023 19:20:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 72D26627E0;\n\tTue, 22 Aug 2023 21:20:03 +0200 (CEST)","from mail-oi1-x229.google.com (mail-oi1-x229.google.com\n\t[IPv6:2607:f8b0:4864:20::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 588A66055E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Aug 2023 21:20:01 +0200 (CEST)","by mail-oi1-x229.google.com with SMTP id\n\t5614622812f47-3a412653335so3610891b6e.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Aug 2023 12:20:01 -0700 (PDT)","from nicolas-tpx395.localdomain ([2606:6d00:15:bae9::7a9])\n\tby smtp.gmail.com with ESMTPSA id\n\ti8-20020a37c208000000b0076da0a9ea32sm2263116qkm.1.2023.08.22.12.19.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Aug 2023 12:19:59 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1692732003;\n\tbh=sUm6cA48vg5zGyKTNUiuDyWNPnazv1NlRlxJAPtAAE4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=DxPW07FQPl5iCwrEKSmAJNGNnCwl61QLex6O9IfY+JAVdWtNPbHzOOeiOZqrcz/1D\n\toL+ajYjxsqrDzRjSFI0eWOuf6tyks4p6Qwx0yf6D+6elg7VTGAKYlg+t5D/xjd3oZC\n\tccm6vZRaFYHtIzGOcVFa/Mf7O6CFZy5HOzkrYD/HfLJ90MCnwmPiy4nlCyMERYew68\n\tQGBZToW64TocCvK613EUy7V1g3xJIuVdL/cFJbHhO33k0x3PwrIdJKo1OmjrvmAXrg\n\txxYMat/GeoAuP31U2luJkRkuHplf40j7iUGyChxpqelsZJFg++bEKqX8ErvlslxjgC\n\tFUyUm7m1Mr8OQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20221208.gappssmtp.com; s=20221208; t=1692732000;\n\tx=1693336800; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=ilCQzRZomch8lMzKDXNs6OuFryfHjbFIg8hKFf8nSjw=;\n\tb=5P7KAHWepq9gr+mg1h5eIfTHA2RHO7GFOL2aQUcsN//Pz2QbxhBWI2/TEtvte+PBq6\n\to6HKoFzxxR3BxFoes1gWblW8Gc7t74V+gYSEvAViHf4mW6jgyJUatUS0h865IymkATE1\n\tNqvdnsOYSvBphLteA78b4sKxI8MyHxQJD6tmRKuPzaWE0Mgp5s5BzT/OQa/gt8ni/ndv\n\tnK7A8O7AgDH/+RNM8d3GY6mfK6kTUNF7l6yWHu1VN3UeYcGe2MBizu4TVx2KGhn+nOSl\n\tsIsXKfz5x2iVWKViwyN0wIlZ4XtPochIjwm5eDNqBLxohl3ikuTwM079yUriVaQd++B5\n\tl79g=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ndufresne-ca.20221208.gappssmtp.com\n\theader.i=@ndufresne-ca.20221208.gappssmtp.com header.b=\"5P7KAHWe\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1692732000; x=1693336800;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=ilCQzRZomch8lMzKDXNs6OuFryfHjbFIg8hKFf8nSjw=;\n\tb=jxnhRda+bBR/FHyHn0cHKLB14WHk3Y6dLg8K75B5VEEX3JOk9IgTS+8Ne40tmbMLRh\n\t8QhSQwpbBWhiyNRYesjOqQuVJ3AEIe1mtUzWWx3RfY6svwAFk+ALXDzjWMsATiLjyk6x\n\tbGps/MUEHE8ASw/larA/rCMo/WcaUIsfIGhKFm+JGXrY2jn5jSQmZ9K73dLewf7YUk0J\n\tm1NkCavSK/AXW+PEnIwVXpyjHb17W3OIiwu7up2tXY8hULEpiD1xbnQYK1QR9JlR/OW4\n\tNH0ISVHWAUdsJbeZ16I2eejA/NefeCSB/AOJGiHSfpulshINh/zUnfjgeCCNVFoZbK4U\n\tQLSA==","X-Gm-Message-State":"AOJu0YwqOyRe1axhOu84VrSxr1m1EfQsMfeSzaoGoqubTea1jS0NZI8Q\n\tnWfHBlzB1o2FP8VuyNusD9eW4Q==","X-Google-Smtp-Source":"AGHT+IE7f9Eb4TLh1cOyioOO/s/4i6iBp8GK0y2Y+q3lbg6Y81oTdkjdkvn3qNFZTgBwpO5SGbfaWg==","X-Received":"by 2002:a05:6808:bd6:b0:3a4:225d:8135 with SMTP id\n\to22-20020a0568080bd600b003a4225d8135mr15657476oik.31.1692732000017; \n\tTue, 22 Aug 2023 12:20:00 -0700 (PDT)","Message-ID":"<cd087f6c482c9a9462edf35113d6901d26dff860.camel@ndufresne.ca>","To":"Umang Jain <umang.jain@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 22 Aug 2023 15:19:59 -0400","In-Reply-To":"<20230822131934.151781-1-umang.jain@ideasonboard.com>","References":"<20230822131934.151781-1-umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.48.4 (3.48.4-1.fc38) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Document stride\n\twill be 0 for compressed formats","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":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27698,"web_url":"https://patchwork.libcamera.org/comment/27698/","msgid":"<169323504270.133283.17411544113940813640@ping.linuxembedded.co.uk>","date":"2023-08-28T15:04:02","subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Document stride\n\twill be 0 for compressed formats","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Umang Jain via libcamera-devel (2023-08-22 14:19:34)\n> For compressed formats, v4l2_pix_format.bytesperline value will be zero\n> and is documented similarly in the kernel. Since we set the stride to\n> v4l2_pix_format.bytesperline, document the case where it is expected\n> to be zero (i.e. if the format is compressed).\n\nSounds reasonable to me.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/libcamera/stream.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index 272222b7..f3e00ead 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -311,7 +311,8 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n>   * The stride value reports the number of bytes between the beginning of\n>   * successive lines in an image buffer for this stream. The value is\n>   * valid after successfully validating the configuration with a call to\n> - * CameraConfiguration::validate().\n> + * CameraConfiguration::validate(). For compressed formats (such as MJPEG),\n> + * this value will be zero.\n>   */\n>  \n>  /**\n> -- \n> 2.40.1\n>","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 46CA6BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Aug 2023 15:04:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 72885627E0;\n\tMon, 28 Aug 2023 17:04:07 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1570560375\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Aug 2023 17:04:06 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BEDF16CA;\n\tMon, 28 Aug 2023 17:02:44 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1693235047;\n\tbh=S7xuAkhu7s0kCOFCNnbS6h9Z5TZgGOb0YCdituOXPKY=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Hnxh84nxpNgLfMDkr2o+pzcZvAz9lWSIyFbjj1yAqKd+W/k/shvLEsnN4SbHPW51N\n\tlTqCr2PBSouoM3EyVURIwYD3fCBwwCprJy0xMMW1bsG1X48SxdsQrj8tjR7wMQccL1\n\tYzWi783qTttwlFJ5yO3TrC7MxhBW7gEIFtkYprldkILe6sEv3crEGL4yHBa4LjTn8n\n\tcfyH3Bzzu8+e9yM03SpYblQrjbLYmXzEBOB8/2/YRUsrWq2JkSeUYtnu7DAosgkeiw\n\tOF3BQzVhLBj8QP8VmdNjLxbeTS13C+E1oiYLTkK8L9C0whGQebLn+20gDAQNyP/97U\n\tOAXBlCvVuA53A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1693234964;\n\tbh=S7xuAkhu7s0kCOFCNnbS6h9Z5TZgGOb0YCdituOXPKY=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=X3TvgIRkVlDUI+GZLFSRO0sz/b8FAkNSpeRuKHIhBb603lvBjN3HRRsbdVy7Ro43T\n\tLt4MzX2LogarFvTPUhoM+H8iKeYLiNGpuhA/2gySh53QX2/5mI+KB9ayGWIB+4fGNi\n\tCCkL5QPySRzvDSrvx1b5AVd4n2Yx1MDhrVBYDmIg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"X3TvgIRk\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230822131934.151781-1-umang.jain@ideasonboard.com>","References":"<20230822131934.151781-1-umang.jain@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 28 Aug 2023 16:04:02 +0100","Message-ID":"<169323504270.133283.17411544113940813640@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Document stride\n\twill be 0 for compressed formats","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]