From patchwork Tue Oct 9 07:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malathi Gottam X-Patchwork-Id: 10632097 X-Patchwork-Delegate: agross@codeaurora.org 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 2E6C2112B for ; Tue, 9 Oct 2018 07:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24E5A28B4B for ; Tue, 9 Oct 2018 07:58:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1964528B4F; Tue, 9 Oct 2018 07:58:33 +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=-7.9 required=2.0 tests=BAYES_00,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 CB42928B4B for ; Tue, 9 Oct 2018 07:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbeJIPOL (ORCPT ); Tue, 9 Oct 2018 11:14:11 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:62860 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeJIPOL (ORCPT ); Tue, 9 Oct 2018 11:14:11 -0400 X-IronPort-AV: E=Sophos;i="5.54,359,1534789800"; d="scan'208";a="240326" Received: from ironmsg03-blr.qualcomm.com ([10.86.208.132]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 09 Oct 2018 13:22:14 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,9040"; a="1605177" Received: from mgottam-linux.qualcomm.com ([10.204.66.66]) by ironmsg03-blr.qualcomm.com with ESMTP; 09 Oct 2018 13:22:12 +0530 Received: by mgottam-linux.qualcomm.com (Postfix, from userid 2305155) id A70682E3B; Tue, 9 Oct 2018 13:22:11 +0530 (IST) From: Malathi Gottam To: stanimir.varbanov@linaro.org, hverkuil@xs4all.nl, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, acourbot@chromium.org, vgarodia@codeaurora.org, mgottam@codeaurora.org Subject: [PATCH] media: venus: amend buffer size for bitstream plane Date: Tue, 9 Oct 2018 13:22:10 +0530 Message-Id: <1539071530-1441-1-git-send-email-mgottam@codeaurora.org> X-Mailer: git-send-email 1.9.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 For lower resolutions, incase of encoder, the compressed frame size is more than half of the corresponding input YUV. Keep the size as same as YUV considering worst case. Signed-off-by: Malathi Gottam Tested-by: Alexandre Courbot --- drivers/media/platform/qcom/venus/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 2679adb..05c5423 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -649,7 +649,7 @@ u32 venus_helper_get_framesz(u32 v4l2_fmt, u32 width, u32 height) } if (compressed) { - sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2 / 2; + sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2; return ALIGN(sz, SZ_4K); }