From: Sarah Gershuni <sarah556726@gmail.com>
To: linux-media@vger.kernel.org
Cc: hverkuil+cisco@kernel.org, Sarah Gershuni <sarah556726@gmail.com>
Subject: [PATCH v4l-utils v2 0/2] fix expected buffer length calculation
Date: Thu, 26 Mar 2026 15:45:01 +0200 [thread overview]
Message-ID: <20260326134503.10323-1-sarah556726@gmail.com> (raw)
v2:
In this updated version:
- Restore single-buffer calculation using bytesperline
Replace the multi-planar v4l2_fwht_find_pixfmt-based logic with the
original single-buffer model, using bytesperline instead of assuming
stride == width.
- Keep plane_bytesperline as added in v1
The plane_bytesperline array and its initialization in
g_fmt_setup_trace are unchanged from v1.
- Link to v1: https://lore.kernel.org/all/20260316132223.7337-1-sarah556726@gmail.com/
v1:
The current implementation assumes that stride equals image width,
which leads to incorrect buffer size calculations when padding is present.
This series fixes the issue by introducing stride-aware handling.
The previous version computed buffer sizes using per-plane
bytesperline values and v4l2_fwht_find_pixfmt, iterating over all planes.
Patch 1 introduces plane_bytesperline to store per-plane stride.
Patch 2 uses it to compute the expected buffer length.
Thanks,
Sarah
Signed-off-by: Sarah Gershuni <sarah556726@gmail.com>
---
Sarah Gershuni (2):
add plane_bytesperline to trace_context
use bytesperline for expected buffer length calculation
utils/v4l2-tracer/trace-helper.cpp | 22 ++++++++++++++--------
utils/v4l2-tracer/trace.h | 1 +
2 files changed, 15 insertions(+), 8 deletions(-)
--
2.43.0
next reply other threads:[~2026-03-26 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 13:45 Sarah Gershuni [this message]
2026-03-26 13:45 ` [PATCH v4l-utils v2 1/2] add plane_bytesperline to trace_context Sarah Gershuni
2026-03-26 13:45 ` [PATCH v4l-utils v2 2/2] use bytesperline for expected buffer length calculation Sarah Gershuni
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=20260326134503.10323-1-sarah556726@gmail.com \
--to=sarah556726@gmail.com \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-media@vger.kernel.org \
/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