Skip to content

v4l2-tracer: fix expected frame length calculation

Sarah Gershuni linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2add plane_bytesperline to trace_contextutils/v4l2-tracer/trace-helper.cpp utils/v4l2-tracer/trace.h+14 -20 replies
2/2Fix expected length calculation using bytesperlineutils/v4l2-tracer/trace-helper.cpp+1 -61 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v4l-utils 0/2] v4l2-tracer: fix expected frame length calculation

This series fixes the expected frame length calculation in v4l2-tracer within the get_expected_length_trace() function.
The current implementation assumes that the stride is always equal to the real width, which can lead to incorrect expected buffer sizes when bytesperline includes padding. Update the calculation to use bytesperline as provided by the driver instead of width-based assumptions.

Sarah Gershuni (2):
add plane_bytesperline to trace_context
use bytesperline for better expected buffer length calculation

 utils/v4l2-tracer/trace-helper.cpp | 22 ++++++++++++++--------
 utils/v4l2-tracer/trace.h          |  1 +
 2 files changed, 15 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0