Skip to content

v4l2: Fix support for left and top padding

In the current implementation, we support for most pixel format left and top padding by changing the offset in the video meta. Though, to align driver bytesused to the offset, we recalculate the offset, which removed the modification we did before.

Instead, save the plane size, and truncate the driver reported bytesused to the expected size, which ensures that the offsets still match. This should also fix issues were the buffer size ended up bigger then the pool size due to driver introduced padding.

This change fixes CONFWIN_A_Sony_1 HEVC conformance test for capable V4L2 drivers. This conformance test have 2 pixel padding all around, so would normally require cropping. It possible that this change fixes !4527 (closed) differently by accident. @jwrdegoede if you happen to have time to comment back, it would be nice.

Merge request reports