From: Andrew Davis <afd@ti.com>
To: "jackson.lee" <jackson.lee@chipsnmedia.com>, <mchehab@kernel.org>,
<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<nas.chung@chipsnmedia.com>
Cc: <lafley.kim@chipsnmedia.com>, <b-brnich@ti.com>
Subject: Re: [RESEND PATCH v0 4/5] wave5: Use the bitstream buffer size from host.
Date: Wed, 31 Jan 2024 11:36:50 -0600 [thread overview]
Message-ID: <7bc035db-607a-48db-b497-4bc29d0a805c@ti.com> (raw)
In-Reply-To: <20240131013046.15687-5-jackson.lee@chipsnmedia.com>
On 1/30/24 7:30 PM, jackson.lee wrote:
> In V4L2 spec, Host can set the bitstream buffer size.
> Allow the larger size between default size and input size.
>
> Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
> ---
> drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> index ff73d69de41c..19018ace41b6 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> @@ -11,6 +11,10 @@
> #define VPU_ENC_DEV_NAME "C&M Wave5 VPU encoder"
> #define VPU_ENC_DRV_NAME "wave5-enc"
>
> +#define DEFAULT_SRC_SIZE(width, height) ({ \
> + (width) * (height) / 8 * 3; \
These "\" are tabbed out way to far, and not to the same amount..
Why have this in {;} brackets?
Why multiple lines?
Just:
#define DEFAULT_SRC_SIZE(width, height) ((width) * (height) / 8 * 3)
Andrew
> +})
> +
> static const struct vpu_format enc_fmt_list[FMT_TYPES][MAX_FMTS] = {
> [VPU_FMT_TYPE_CODEC] = {
> {
> @@ -193,7 +197,8 @@ static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned
> pix_mp->width = width;
> pix_mp->height = height;
> pix_mp->plane_fmt[0].bytesperline = 0;
> - pix_mp->plane_fmt[0].sizeimage = width * height / 8 * 3;
> + pix_mp->plane_fmt[0].sizeimage = max(DEFAULT_SRC_SIZE(width, height),
> + pix_mp->plane_fmt[0].sizeimage);
> break;
> }
> }
next prev parent reply other threads:[~2024-01-31 17:37 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 1:30 [RESEND PATCH v0 0/5] wave5 codec driver jackson.lee
2024-01-31 1:30 ` [RESEND PATCH v0 1/5] wave5 : Support yuv422 input format for encoder jackson.lee
2024-02-07 17:55 ` Nicolas Dufresne
2024-02-08 9:42 ` Sebastian Fricke
2024-02-16 6:48 ` jackson.lee
2024-01-31 1:30 ` [RESEND PATCH v0 2/5] wave5: Support to prepend sps/pps to IDR frame jackson.lee
2024-02-07 18:00 ` Nicolas Dufresne
2024-02-08 10:01 ` Sebastian Fricke
2024-02-16 7:12 ` jackson.lee
2024-01-31 1:30 ` [RESEND PATCH v0 3/5] wave5 : Support runtime suspend/resume jackson.lee
2024-02-07 18:29 ` Nicolas Dufresne
2024-02-19 4:04 ` jackson.lee
2024-02-19 21:20 ` Nicolas Dufresne
2024-02-20 5:12 ` jackson.lee
2024-02-20 19:06 ` Nicolas Dufresne
2024-02-21 2:27 ` jackson.lee
2024-02-21 15:26 ` Nicolas Dufresne
2024-02-22 1:36 ` jackson.lee
2024-02-22 3:57 ` jackson.lee
2024-02-22 20:55 ` Nicolas Dufresne
2024-02-23 1:06 ` jackson.lee
2024-02-23 15:16 ` Nicolas Dufresne
2024-02-23 18:05 ` Nicolas Dufresne
2024-02-23 18:09 ` Nicolas Dufresne
2024-02-26 0:56 ` jackson.lee
2024-02-26 1:33 ` jackson.lee
2024-03-04 14:12 ` Nicolas Dufresne
2024-03-05 0:54 ` jackson.lee
2024-02-22 20:42 ` Nicolas Dufresne
2024-01-31 1:30 ` [RESEND PATCH v0 4/5] wave5: Use the bitstream buffer size from host jackson.lee
2024-01-31 17:36 ` Andrew Davis [this message]
2024-02-02 1:55 ` jackson.lee
2024-01-31 1:30 ` [RESEND PATCH v0 5/5] wave5 : Fixed the wrong buffer size formula jackson.lee
2024-02-07 18:31 ` Nicolas Dufresne
2024-02-08 10:36 ` [RESEND PATCH v0 0/5] wave5 codec driver Sebastian Fricke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7bc035db-607a-48db-b497-4bc29d0a805c@ti.com \
--to=afd@ti.com \
--cc=b-brnich@ti.com \
--cc=jackson.lee@chipsnmedia.com \
--cc=lafley.kim@chipsnmedia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®