b040974398
zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
plane, but wl_shm only takes a single pitch parameter; the pitch for
secondary planes must be inferred.
Multi-plane sub-sampled textures have partial width/height, e.g.
YUV420/I420 has a full-size Y plane, followed by a half-width/height U
plane, and a half-width/height V plane.
GStreamer's waylandsink - the only user of wl_shm YUV formats - expects
the implementation to follow the example of Xv and implicitly divide the
pitch for secondary planes by the subsampling factor. gl-renderer was
not doing this, and instead just using the (larger) stride provided by
the client for all planes in the buffer.
Fix gl-renderer to divide pitch by the subsampling factor when uploading
from subsampled SHM buffers into GL textures, also dividing co-ordinates
when doing offset partial uploads.
Tested with:
$ gst-launch-1.0 videotestsrc ! waylandsink
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Tested-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
Acked-by: Vincent ABRIOU <vincent.abriou@st.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Fixes:
|
||
---|---|---|
.. | ||
animation.c | ||
bindings.c | ||
clipboard.c | ||
compositor-drm.c | ||
compositor-drm.h | ||
compositor-fbdev.c | ||
compositor-fbdev.h | ||
compositor-headless.c | ||
compositor-headless.h | ||
compositor-rdp.c | ||
compositor-rdp.h | ||
compositor-wayland.c | ||
compositor-wayland.h | ||
compositor-x11.c | ||
compositor-x11.h | ||
compositor.c | ||
compositor.h | ||
data-device.c | ||
dbus.c | ||
dbus.h | ||
gl-renderer.c | ||
gl-renderer.h | ||
input.c | ||
launcher-direct.c | ||
launcher-impl.h | ||
launcher-logind.c | ||
launcher-util.c | ||
launcher-util.h | ||
launcher-weston-launch.c | ||
libbacklight.c | ||
libbacklight.h | ||
libinput-device.c | ||
libinput-device.h | ||
libinput-seat.c | ||
libinput-seat.h | ||
libweston-uninstalled.pc.in | ||
libweston.pc.in | ||
linux-dmabuf.c | ||
linux-dmabuf.h | ||
log.c | ||
noop-renderer.c | ||
pixel-formats.c | ||
pixel-formats.h | ||
pixman-renderer.c | ||
pixman-renderer.h | ||
plugin-registry.c | ||
plugin-registry.h | ||
screenshooter.c | ||
spring-tool.c | ||
timeline-object.h | ||
timeline.c | ||
timeline.h | ||
vaapi-recorder.c | ||
vaapi-recorder.h | ||
version.h.in | ||
vertex-clipping.c | ||
vertex-clipping.h | ||
weston-launch.c | ||
weston-launch.h | ||
weston-sync-file.h | ||
windowed-output-api.h | ||
zoom.c |