[Mesa-dev] [PATCH v2 2/2] egl/android: Use gralloc::lock_ycbcr for resolving YUV formats (v2)

Tomasz Figa tfiga at chromium.org
Mon Nov 21 14:05:25 UTC 2016


On Mon, Nov 21, 2016 at 10:39 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 21 November 2016 at 06:50, Tomasz Figa <tfiga at chromium.org> wrote:
>> On Thu, Nov 10, 2016 at 5:48 PM, Tapani Pälli <tapani.palli at intel.com> wrote:
>>>
>>>
>>> On 11/10/2016 09:55 AM, Tomasz Figa wrote:
>>>>
>>>> There is an interface that can be used to query YUV buffers for their
>>>> internal format. Specifically, if gralloc:lock_ycbcr() is given no SW
>>>> usage flags, it's supposed to return plane offsets instead of pointers.
>>>> Let's use this interface to implement support for YUV formats in Android
>>>> EGL backend.
>>>
>>>
>>> IMO lock_ycbcr() is not very intuitive API (read: is horrible) to query
>>> surface information, would be nice to have something generic along the lines
>>> of 'resolve_format' or 'query_format' but I don't know how feasible it would
>>> be to push for such new interface ..
>>
>> Yeah, I agree that it's not very intuitive, however it does its job
>> pretty well without making Android depend on some DRM-specific stuff
>> (which I personally don't have anything against...). Since I'm only a
>> ChromeOS mortal, I can't really tell what we could do about it,
>> though. In any case, any change would only affect further Android
>> versions, so we still need to support the old API for current ones.
>>
>>>
>>> both of these patches look good to me;
>>> Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
>>>
>>
>> Anyway, I think we can commit this for the time being, so:
>>
> Rob H, Chih-Wei please check that your gbm_gralloc/drm_gralloc have
> the [simple implementation [1] of] gralloc:lock_ycbcr. Without it YUV
> be fun.

Technically we don't have to require it for HAL_PIXEL_FORMAT_YV12, but
to avoid hardcoding implementation-specific stride and offset
alignments I decided to just use lock_ycbcr for it as well.

>
>> Gentle ping. :)
>>
> The RGB888 patch and this series is in master.
>
> Thanks for the reminder!

Thanks! I got a bit more time to work on upstreaming the remaining
bits recently and with these two matters sorted out I can proceed with
remaining ones. Stay tuned. :)

Best regards,
Tomasz


More information about the mesa-dev mailing list