[Libva] [PATCH] vainfo/va.h: add VAProfileCount in va.h.

Zhao, Halley halley.zhao at intel.com
Thu Jul 4 17:47:37 PDT 2013


I didn't notice vaMaxNumProfiles/vaQueryConfigProfiles before, they can be used instead.

Return back to gst-vaapi:
It is one issue reported by dlna client (they may not use gst playbin).
Anyway, in get_caps, we'd return real hw capability instead of gst-vaapi supported features.
The patch looks like attachment, I haven't update it according to vaMaxNumProfiles/vaQueryConfigProfiles yet.



> -----Original Message-----
> From: Gwenole Beauchesne [mailto:gb.devel at gmail.com]
> Sent: Thursday, July 04, 2013 1:19 AM
> To: Zhao, Halley
> Cc: libva at lists.freedesktop.org
> Subject: Re: [Libva] [PATCH] vainfo/va.h: add VAProfileCount in va.h.
> 
> Hi,
> 
> 2013/7/3 Zhao, Halley <halley.zhao at intel.com>:
> > This patch helps middleware (gst-vaapi for example) not over commit
> capability.
> 
> I don't understand this usage model. vaQueryConfigProfiles() will
> report the correct number of VA profiles returned in profile_list[]
> array. There is no risk of overcommit unless the API is mis-used or the
> VA driver not returning the right number of profiles. This used to be
> the case with a pretty ancient version of the PowerVR driver, but the
> Intel HD Graphics driver does not have this issue AFAIK.
> 
> > The scenario is:
> > Gst-vaapi supports mpeg4 and jpeg decoder, but Sandybridge hw doesn't
> really support that.
> > Some player may misuse vaapidecode.
> 
> What is the root cause of this issue please? Do you mean vaapidecode
> was auto-plugged in whereas the HW does not support that codec? This
> sounds like a bug though the current gstreamer-vaapi git and back to
> 0.5.3 actually does not exhibit this behaviour. i.e. SW decoding plug-
> in elements are plugged in if the underlying HW doesn't support
> acceleration for MPEG-4:2 or JPEG for example. Only tested with JPEG
> though.
> 
> Regards,
> Gwenole.
> 
> >> -----Original Message-----
> >> From: Zhao, Halley
> >> Sent: Wednesday, July 03, 2013 5:47 PM
> >> To: libva at lists.freedesktop.org
> >> Cc: Zhao, Halley
> >> Subject: [PATCH] vainfo/va.h: add VAProfileCount in va.h.
> >>
> >> it facilitate driver capability probing.
> >> ---
> >>  test/vainfo/vainfo.c |    2 +-
> >>  va/va.h              |    3 ++-
> >>  2 files changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/test/vainfo/vainfo.c b/test/vainfo/vainfo.c index
> >> 2578d30..1f35693 100644
> >> --- a/test/vainfo/vainfo.c
> >> +++ b/test/vainfo/vainfo.c
> >> @@ -111,7 +111,7 @@ int main(int argc, const char* argv[])
> >>    printf("%s: Driver version: %s\n", name, driver ? driver :
> >> "<unknown>");
> >>
> >>    printf("%s: Supported profile and entrypoints\n", name);
> >> -  for        (profile = VAProfileNone; profile <=
> >> VAProfileH264ConstrainedBaseline; profile++) {
> >> +  for        (profile = VAProfileNone; profile < VAProfileCount;
> >> profile++) {
> >>        char *profile_str;
> >>
> >>        va_status = vaQueryConfigEntrypoints(va_dpy, profile,
> >> entrypoints, diff --git a/va/va.h b/va/va.h index 0eceea7..b25a55b
> >> 100644
> >> --- a/va/va.h
> >> +++ b/va/va.h
> >> @@ -286,7 +286,8 @@ typedef enum
> >>      VAProfileVC1Advanced             = 10,
> >>      VAProfileH263Baseline            = 11,
> >>      VAProfileJPEGBaseline               = 12,
> >> -    VAProfileH264ConstrainedBaseline = 13
> >> +    VAProfileH264ConstrainedBaseline = 13,
> >> +    VAProfileCount              = 14
> >>  } VAProfile;
> >>
> >>  /*
> >> --
> >> 1.7.9.5
> >
> > _______________________________________________
> > Libva mailing list
> > Libva at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libva
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-calculate-decoder-caps-from-driver-capability.patch
Type: application/octet-stream
Size: 8183 bytes
Desc: 0001-calculate-decoder-caps-from-driver-capability.patch
URL: <http://lists.freedesktop.org/archives/libva/attachments/20130705/238420af/attachment.obj>


More information about the Libva mailing list