Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4014120imu; Mon, 12 Nov 2018 04:29:28 -0800 (PST) X-Google-Smtp-Source: AJdET5cwFUSDKTc+2veIPBoaQpTvoYYpeURm3I2Pr8OdHmzqhdJJ2/XWuv1i+9Id9ysZUg/S/YZd X-Received: by 2002:a62:3501:: with SMTP id c1-v6mr692587pfa.173.1542025768442; Mon, 12 Nov 2018 04:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542025768; cv=none; d=google.com; s=arc-20160816; b=znRskKfxkiTUiR/XQADjrTE8QGqLRCsPDD9mcvD55X2ZUswTvaaXdM5ToUCCMFu2Kf PApR6cjxIlqPInyuKLFNMoosJIwi6y5HnFhXDHDlmMnpQZwqTqs0BFaY6PMgpvx28nxD aBCtoIotfwYGFSj37cUke6bnzXRtVG30f11hWYnzwsNh8NPFkHUI5BJhc4kzn7dHFXlE ONCTVwhuZ7fCbChzsj7UVv9oNT91urr0Vw6EC4ABPwyOJsNxvdqwR6/Ap9JQYrbP6vqs G0xr8aP5cXRmyc6b/ZusrVhT5ehUAMv3Lku5YXBcJuvM2xAoD3TZrRQ7jpl7Nxg4kgDr 2JLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=JQXN4uT/zOm4FKa7x9tk0m7XnRHRwKm5gqDaXQ67OcY=; b=wXuZm2z+cOgLpxp9UYAQJJh9Cl2kr7U2ilBJvUj2/HAZCkSsBJ0v85hEUm5LjVzBlc DJKr1/71L3UOs/ZJrQ7E/CsaCA/00NDKCdEmoYaAQTpaLa/ebfAIYS1MODjAwTqVjOlo C5zw1sdrKiMOeVnOoWNkuYW5FX5o97GyQ/jRON8bB+p1XPBN1SDu3DschzJlwM7loTT8 L10FaACdWn1qc/Gp1+lROpXEZjEQoBcjW2iKEp3LrGQFe+3XDGI7svWLeQ3rpIwLa6GH zR0Uy0QDaCvgh4uJTdHWNPN9lMHPbG90aBgmtDVOoDTuBsPwWjXQO5kml671Wixjbnoi OA3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZWidSFSf; 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 x12-v6si17656388pfn.111.2018.11.12.04.29.12; Mon, 12 Nov 2018 04:29:28 -0800 (PST) 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=ZWidSFSf; 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 S1729606AbeKLWVb (ORCPT + 99 others); Mon, 12 Nov 2018 17:21:31 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54222 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729396AbeKLWVa (ORCPT ); Mon, 12 Nov 2018 17:21:30 -0500 Received: by mail-wm1-f67.google.com with SMTP id f10-v6so8288790wme.3 for ; Mon, 12 Nov 2018 04:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JQXN4uT/zOm4FKa7x9tk0m7XnRHRwKm5gqDaXQ67OcY=; b=ZWidSFSfZyIPG0Ywf8hJdO/QbGaGovSWwZIc68Lmr98flxopyrFHsWq9NwA52F1UwC nuNRpjDw+0yRmB42RV6ZuEEUQgkED6X3LMchUjogpb5lE8xioqk5NC/krx18m4ztIGQi 5Q/BFoyFt2dgoGrnQGiM2TVhB0tdZzSNCpcD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JQXN4uT/zOm4FKa7x9tk0m7XnRHRwKm5gqDaXQ67OcY=; b=jWf2nZgcPfVSyxD87ejhMOU5jYVcnrLl5/XqC/R9COPcRfpFZUyO/vIcA1NAgFgxwg +QlmZdxr8L/0fN9jbPVsfv/cIN8hEKJaT4boi2CioIfIl5P8Yx2TxA/xo4B2Hs2ok0bL VQMRGqgh9Y3z+I1wO4FGacLaIKT1EVNhWyrHn84OmBkFZmxAf1VgIi3rQuQuWmWCq93t zmtKpJeBn5McNxvQ0knJirw6aGQo7PeCb0sIgsiFm3XWefI2DqlyQx8I91XYixoV6ZF/ 40ofyieWk4yWw81C2W8STUJRznXkoD8G0tVeaRtCR2uYztXI+vmZbsFCKyfK/fI1FVdO TG1g== X-Gm-Message-State: AGRZ1gKKu3d/ZZD0xbpSDyIxEs3jRj8bEAAV+FiXlCBM+14miHiDTxYg 7uMutFk6sEQSDwRMpV475X5cH8daZ/U= X-Received: by 2002:a1c:8604:: with SMTP id i4-v6mr7839777wmd.23.1542025704916; Mon, 12 Nov 2018 04:28:24 -0800 (PST) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id 197-v6sm9757129wmh.44.2018.11.12.04.28.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 04:28:24 -0800 (PST) Subject: Re: [PATCH] media: venus: amend buffer size for bitstream plane To: Malathi Gottam , 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 References: <1539071530-1441-1-git-send-email-mgottam@codeaurora.org> From: Stanimir Varbanov Message-ID: <48f90d4d-8ae3-65ae-2096-eebf047c1c0c@linaro.org> Date: Mon, 12 Nov 2018 14:28:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1539071530-1441-1-git-send-email-mgottam@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Malathi, Thanks for the patch! On 10/9/18 10:52 AM, Malathi Gottam wrote: > 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 > --- > 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; Could you drop this division by 2 only for lower resolutions and also only for the encoder session? I do not want to waste memory if it is not absolutely needed. -- regards, Stan