From patchwork Wed Apr 10 15:21:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 162028 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp6333548jan; Wed, 10 Apr 2019 08:21:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyl3RXH/mH2H/MhpI2JFB5EFR17CWYiIjh/VEWUaYFhRrrS1GYS9YT2wq4uTZzrrc1jyM/b X-Received: by 2002:a17:902:a706:: with SMTP id w6mr44838788plq.91.1554909714459; Wed, 10 Apr 2019 08:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554909714; cv=none; d=google.com; s=arc-20160816; b=Y9JOGm4q5yqC5q+Nyi1D7IgvApOIOgN62xg/DjNXZuFyUZtM5ySIFr71kV9f8WR9dD 9WN6A0x8xjV8SMK4sZDQWvNUrz4PjxGvSLqvwlQ1z/+nNYBSjcuHnQi9EoS2nQpnKTL9 QnYKqctZMmGCox7bcb5HrGWscZc8EpOzHrqvEl1tlhMf0GI6XVyPK/JjDSF3itv7tYdK xy8wpKxLL4tv9sU7jjp1j40oKE4O6J1oKl4aOXLoBTZRjdde7D3Drs3TEd6AkCkURTjs JWLkfkefEaN0QecRWw7DLhw2+W6dNS8xJlbQCBufDU1FWQYsG/+H7Paf89QftC+WNHu7 /TbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=AqX3A4MUaXSULlKElxwofe4FLxfbNpQxFe7Pr95S+64=; b=o4f7hYEMN/2RcnG6XrhgGqrvmlEDHeyLDMZNSfdk1EkBp3LajjWZIw5ZtgBUhDum+Z MN34mutTfkn4G7qME94zBXV313EYhkchDlQ14cJOzK3kdWzmy2M446n+cS3awhIiqIEq inQf/FLObDbLZJXOCK9Br5bhvwuwg+4qnG/te37hUeZdVM8n4SV0YAUzFx5H2PU37Nuh Fa0J1TC/737XDIWeFbWtvJzCjqznIR9VBap/YWYw05O6PNg4NenerKKMdHXS3/jiEdTQ MYnxGSGvKih1ekge2w+ct2mlFduyrTZA6TNBJWw5S4ux/wjkFdmYIPcMNaBocDGabO6p oZaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xmGYe7kp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci5si27030501plb.145.2019.04.10.08.21.53; Wed, 10 Apr 2019 08:21:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xmGYe7kp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729137AbfDJPVw (ORCPT + 31 others); Wed, 10 Apr 2019 11:21:52 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42980 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbfDJPVv (ORCPT ); Wed, 10 Apr 2019 11:21:51 -0400 Received: by mail-wr1-f68.google.com with SMTP id g3so3423734wrx.9 for ; Wed, 10 Apr 2019 08:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AqX3A4MUaXSULlKElxwofe4FLxfbNpQxFe7Pr95S+64=; b=xmGYe7kpRXsDcJnxwx2CdmqmrXMoN51RH4t9VLu3foGGAE4yT1IKvwpW88f6f5NTLO JbptK5SBXzd40pG/UTrfrca3BWiMnK0lueR9PM25K4pTs+VOb6PlGxtybq77HOngSZdb XFp4vBhDWdfbKaGVERRB/sFi1CpH34UZXAPxIUne909bURp0Yp6X+3XrdunSkcm9r1U7 SdyT4JEWDT2s6EcBVcGtLR5c3n4aSkiFTXd5xMXCl3Z0kIMztC0D21C47Rc0yWxcfK3r H5wBXz0sC/dDcZz8lxZhUud6hPiyLMSzDYW67o4N9SEQBW/RhzrNdtE5ESzwgq0t4ut4 FOog== 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; bh=AqX3A4MUaXSULlKElxwofe4FLxfbNpQxFe7Pr95S+64=; b=iHk9skAjvju7uqGlbuayZ+rNTma1lYlQ3UmYHroEkcaCe5/I+DrRv9eqKYdMQeVWAk X7ts7ZLi2HEKQA0ZzsdAqtI3V5Ty9EDSglGQk3jU6MVo7mVAzPuJqLXqP0Be6dp45oxl N4zqu3iajfizok+9pFvHd+ON23FfrQIzwKR8vXLZO5Z45eMek6S/uvGgno5aCp2p31Wo s5ZE7gDoVwMpBBNK/VyjKxHf+6U8qVkFEPQleaZhhEOJ8pzmaTv02nlkZ41DOKVZwJpW XFSpaNSBqm3D4susK4vItQ2TikCGm5jKPUDLvuVexr1piaTzDmYRtDJ8rFm16ZuPPZ0V XOoQ== X-Gm-Message-State: APjAAAVDwPisK3kF7fSQpGAWLYYGOmDs3Qr9Y0nfFBqSiEuO4U1q2gs3 2rOCJMqUoyzR6NV0xVz91ptZPA== X-Received: by 2002:a5d:69c1:: with SMTP id s1mr27671947wrw.245.1554909710195; Wed, 10 Apr 2019 08:21:50 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id s1sm27045644wrt.43.2019.04.10.08.21.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 08:21:49 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH] media/doc: Allow sizeimage to be set by v4l clients Date: Wed, 10 Apr 2019 18:21:28 +0300 Message-Id: <20190410152128.9811-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage field description to allow v4l clients to set bigger image size in case of variable length compressed data. Signed-off-by: Stanimir Varbanov --- Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst | 6 +++++- Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst b/Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst index 5688c816e334..a5cdc4537012 100644 --- a/Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst +++ b/Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst @@ -31,7 +31,11 @@ describing all planes of that format. * - __u32 - ``sizeimage`` - - Maximum size in bytes required for image data in this plane. + - Maximum size in bytes required for image data in this plane, + set by the driver. When the image consists of variable length + compressed data this is the number of bytes required by the + codec to support the worst-case compression scenario. Clients + are allowed to set the sizeimage field, but drivers may modify it. * - __u32 - ``bytesperline`` - Distance in bytes between the leftmost pixels in two adjacent diff --git a/Documentation/media/uapi/v4l/pixfmt-v4l2.rst b/Documentation/media/uapi/v4l/pixfmt-v4l2.rst index 71eebfc6d853..70e08c58febc 100644 --- a/Documentation/media/uapi/v4l/pixfmt-v4l2.rst +++ b/Documentation/media/uapi/v4l/pixfmt-v4l2.rst @@ -89,7 +89,9 @@ Single-planar format structure - Size in bytes of the buffer to hold a complete image, set by the driver. Usually this is ``bytesperline`` times ``height``. When the image consists of variable length compressed data this is the - maximum number of bytes required to hold an image. + number of bytes required by the codec to support the worst-case + compression scenario. Clients are allowed to set the sizeimage + field, but drivers may modify it. * - __u32 - ``colorspace`` - Image colorspace, from enum :c:type:`v4l2_colorspace`.