[Mesa-dev] vlVaQueryImageFormats and vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities also return unsupported formats
deathsimple at vodafone.de
Mon Aug 24 06:42:21 PDT 2015
On 24.08.2015 15:34, Julien Isorce wrote:
> 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
> _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:
> But vaapi intel driver provides it:
> So is vaQuerySurfaceAttributes the best option to retrieve this NV12 ?
> If yes I can try to make a patch that implements
Well, badly designed interface would I say, but that's already well known :)
Fully implementing vlVaQuerySurfaceAttributes indeed sounds like the
right solution to me.
> On 21 August 2015 at 18:31, Christian König <deathsimple at vodafone.de
> <mailto: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 <mailto:julien.isorce at gmail.com>> wrote:
> What is the purpose of checking PIPE_VIDEO_PROFILE_UNKNOWN :
> 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.
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> <mailto:mesa-dev at lists.freedesktop.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev