<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - YUV I420 SHM broken with GStreamer/Weston"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103063#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - YUV I420 SHM broken with GStreamer/Weston"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103063">bug 103063</a>
from <span class="vcard"><a class="email" href="mailto:daniel@fooishbar.org" title="Daniel Stone <daniel@fooishbar.org>"> <span class="fn">Daniel Stone</span></a>
</span></b>
<pre>First, it would be interesting to validate how GStreamer is rendering the
buffer. It should be laid out, in order:
Y plane: offset == 0, stride == (width * 1), i.e. 1bpp, size == (stride *
height), i.e. full height
U plane: offset == size[Y], stride == (width/2 * 1), i.e. 1bpp but half width,
size == (stride * height/2), i.e. half height
V plane: offset == offset[U] + size[U], stride == (width/2 * 1), size ==
(stride * height/2), i.e. half width/height
If GStreamer is rendering correctly, this comes in to Weston at
libweston/gl-renderer.c's gl_renderer_attach_shm(). In the YUV420 case (aka
GStreamer's I420), this sets up the textures as described above. It then
uploads the content in gl_renderer_flush_damage(), where it uploads according
to the parameters set in attach_shm.
It looks from a quick inspection of the code that this is done correctly (i.e.
dividing by hsub/vsub to halve the dimensions of the U/V planes), but it would
be good to validate the parameters passed to glTex(Sub)Image2D() for the
upload, after validating GStreamer's buffer layout.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>