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: 10894201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EB65139A for ; Wed, 10 Apr 2019 15:21:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35AFA28BDF for ; Wed, 10 Apr 2019 15:21:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33DD828BF5; Wed, 10 Apr 2019 15:21:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C914928BFB for ; Wed, 10 Apr 2019 15:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbfDJPVw (ORCPT ); Wed, 10 Apr 2019 11:21:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33003 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726924AbfDJPVw (ORCPT ); Wed, 10 Apr 2019 11:21:52 -0400 Received: by mail-wr1-f65.google.com with SMTP id q1so3495704wrp.0 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=dghm7kNi9pnC10ZBMIEl0BU3gZi6LQR5fwXCOgRk7zZ0DfLGNgo7EoPybqVChyREcg fufmd2mVOUWG4dDbs+xYhbIpjOSN31OHyzIIqjn17u7RJTojg+MIdtChb3/yJFDN/Fvh rZt0LaQyDuiYrXW8FVHwAB/ilY5PEUxx+1sYQxAVuo0117M0s3ixPzmbwUtwcX0BXRen ugEsOwuee6fNDModDCAgUXYm1La/EQMIIA4FZVU91DO6PKb15Sa1Iiqe1lfIm+KHqwrY 3d4gRuaugNjYsWcf/pIWucB1RSRqGBO2uSTyH2SjI/KIDdC9NhSnsNNdVsebgU9yXUEu ZlyA== X-Gm-Message-State: APjAAAUDMrINk+yx4+Pjo3pWB4fSTyIyTPQIF+LBs+ePal5rh6lvLh79 h6oS6a8czOtpWQA6iQMeFfQZuxMFYAc= X-Google-Smtp-Source: APXvYqwoq7aym4F3FLIxJoPCp+XqYntyhMymgqLaoK0ACljf63ZNnmqSN6SrgwmJ8McXxVa/gwzDgQ== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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`.