[weston] gl-renderer: add support of WL_SHM_FORMAT_YUV420
Vincent ABRIOU
vincent.abriou at st.com
Thu Aug 4 16:03:38 UTC 2016
Hi Daniel,
On 08/04/2016 04:32 PM, Daniel Stone wrote:
> Hi Vincent,
>
> On 4 August 2016 at 14:35, Vincent Abriou <vincent.abriou at st.com> wrote:
>> This patch allow weston to accept WL_SHM_FORMAT_YUV420 buffers.
>>
>> In a gstreamer pipeline, the support of the WL_SHM_FORMAT_YUV420 by
>> weston avoid pixel conversion between software decoders and waylandsink.
>> Indeed, software decoders output I420 (YUV420 planar) that willYou
>> match with WL_SHM_FORMAT_YUV420.
>
> Thanks for the patch. It would be nice if wl_shm used the same FourCC
> codes as wl_drm though, i.e. this would be I420 rather than YUV420.
>
I use the WL_SHM_FORMAT_YUV420 defined in Wayland protocol. It is always
a mental gymnastics to understand the match. But I don't know how to
change it except by changing the wayland protocol it self.
> You could save yourself some pain by unconditionally initialising
> hsub/vsub/offset rather than in every format code though, and also
I will propose a new patch to simplify this.
> perhaps just flatten hsub/vsub into a single field, given that I don't
> expect we'd support asymmetric subsampling through SHM any time soon.
When I wrote the code, I was thinking about NV12. The 2nd plane UV size
should be width * (height/2). It is less a component subsampling
parameters than a plane width and height divider.
Vincent.
>
> You should also trim the 'Change-Id' line from your patch, as we don't
> use Gerrit upstream.
>
> Aside from that, looks good to me.
>
> Cheers,
> Daniel
>
More information about the wayland-devel
mailing list