Open Bug 2056029 Opened 15 days ago Updated 8 days ago

Buffers with padding (stride bigger than width*bpp) are not supported (breaking negotiation with libcamera in some cases)

Categories

(Core :: WebRTC, task)

task

Tracking

()

ASSIGNED

People

(Reporter: rmader, Assigned: rmader)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

From https://gitlab.freedesktop.org/pipewire/pipewire/-/work_items/5285: sometimes buffer allocations fail if the buffer stride chosen by the PW camera plugin - notably libcamera when using the softISP with GPU backend - includes padding. Camera backends sometimes require padding, so this is hard to fix on the PW/libcamera side - let's just add support padded buffers. We can do so by either doing a copy - line-by-line - or using some existing utilities for that.

Edit: the relevant code is around here: https://searchfox.org/firefox-main/rev/7f94689f2c228a96f6c271e30880e72778b7ab15/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc#355-383

A very simple ad-hoc implementation for now.

See https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/105605 for an experimental build for postmarketOS.

The latest push seems to work pretty well - but requires a change to libyuv, on top of libwebrtc. Upstreaming will thus take some effort.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: