[Mesa-dev] vlVaQueryImageFormats and vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities also return unsupported formats

Julien Isorce julien.isorce at gmail.com
Mon Aug 24 06:34:32 PDT 2015


Hi,

Thx for your answers.

Actually I also realized that "vaQueryImageFormats" is maybe more related
to what formats "vaCreateImage" supports.
And actually in mesa, vlVaCreateImage can create image for all formats
NV12, YV12, YUYV, UYVY, BGRA.

So what I am looking for is a way to retrieve what format is supported for
the output surface, not for a VAImage.
Also I noticed that mesa can only convert from nv12 -> yv12.
So even if an application creates one of these 5 image format, only nv12
and yv12 will be accepted to get the content of the surface, see
vlVaGetImage impl.

vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile,
VAEntrypoint entrypoint, VAConfigAttrib *attrib_list, int num_attribs)
sounded good but only returns VA_RT_FORMAT_YUV420 which can be I420, NV12,
YV12 ... Well I can use what VaCreateImage output to pick one of the YUV420
formats but what if I want to avoid any conversion by just using exact same
format of the surface.

And finally there is vaQuerySurfaceAttributes:
http://cgit.freedesktop.org/libva/tree/va/va.h#n837 to retrieve
VASurfaceAttribPixelFormat:
http://cgit.freedesktop.org/libva/tree/va/va.h#n724

*But it seems mesa st/va does not implement it*. (neither vaapi 's
vdpau-driver: http://cgit.freedesktop.org/vaapi/vdpau-driver/)
There is a fallback http://cgit.freedesktop.org/libva/tree/va/va.c#n765 if
the backend does not provide it but just append all image formats:
http://cgit.freedesktop.org/libva/tree/va/va.c#n828
But vaapi intel driver provides it:
http://cgit.freedesktop.org/vaapi/intel-driver/tree/src/i965_drv_video.c#n4825

So is vaQuerySurfaceAttributes the best option to retrieve this NV12 ? If
yes I can try to make a patch that implements vlVaQuerySurfaceAttributes.

Thx
Julien


On 21 August 2015 at 18:31, Christian K├Ânig <deathsimple at vodafone.de> wrote:

> On 21.08.2015 18:30, Ilia Mirkin wrote:
>
>> On Fri, Aug 21, 2015 at 12:22 PM, Julien Isorce <julien.isorce at gmail.com>
>> wrote:
>>
>>> What is the purpose of checking PIPE_VIDEO_PROFILE_UNKNOWN :
>>>
>>> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nouveau_vp3_video.c#n486
>>> and
>>>
>>> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_video.c#n323
>>> ?
>>>
>> The st calls nouveau_vp3_screen_video_supported with UNKNOWN at some
>> point (see src/gallium/state_trackers/vdpau). Basically VDPAU can do a
>> lot of things. One of them is video decoding, for which only NV12 is
>> supported. But it also supports other things, for which the st
>> supports the various other formats. No idea if that's useful, but at
>> least that's the idea.
>>
> Yes, exactly.
>
> Querying with unknown is for checking if we can create video buffers with
> that format in general.
>
> Querying with a specific profile/entrypoint is for checking if we can
> create video buffers and decode into them.
>
> Regards,
> Christian.
>
>
>>    -ilia
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150824/72cb9dc8/attachment.html>


More information about the mesa-dev mailing list