On Fri, 2014-03-28 at 05:21 -0600, Nik Orlov wrote:
> It is possible to do multipass h.264 encoding with VAAPI, like with x.264, 
> when it is saves stats log?

Will you please describe why you care multipass h264 encoding by using
hardware acceleration?  Can the encoded bit-stream based on VAAPI meet
with you requirement?(For example: speed, bit ratecontrol, quality and
so on).

thanks
    Yakui

> 
> 28.03.2014, 05:22, "Zhao Yakui" <[email protected]>:
> > On Thu, 2014-03-27 at 10:46 -0600, Nik Orlov wrote:
> >
> >>  Hello! Thanks!
> >>
> >>  As I see, libva can use X11 or direct DRM, and it can`t use DRM when 
> >> system has running X11. Am I right?
> >>  I will have research (google) about relations between dri and drm.
> >
> > Hi, Nik
> >
> >     What Matt said is right. The libva can work with X11 or DRM.
> > The h264encode example can show you how to use it without X11.
> > Even when X11 is already started, the h264encode still can use the DRM
> > to encode. The following code can be used to run the encoding with DRM.
> > (It is found in the file of libva/test/common/va_display_drm.c)
> > {
> >     VADisplay va_dpy;
> >     drm_fd = open("/dev/dri/card0", O_RDWR);
> >     if (drm_fd < 0) {
> >         fprintf(stderr, "error: can't open DRM connection!\n");
> >         return NULL;
> >     }
> >     va_dpy = vaGetDisplayDRM(drm_fd);
> > }
> >
> > Thanks.
> >    Yakui
> >
> >>  27.03.2014, 20:01, "Matt Pekar" <[email protected]>:
> >>>  I'm not sure of the exact relationship between dri and drm (maybe dri 
> >>> became drm?), but you can use it/them to run libva without X.
> >>>
> >>>  In our code, we first attempt to initialize libva with X11 (for desktop 
> >>> development), then a secondary attempt is made to initialize through DRM 
> >>> (which is how our program runs in production).
> >>>
> >>>  The tricky part is that DRM requires some elevated permissions, and we 
> >>> made some changes to the va_drm_auth.c file to accommodate that better 
> >>> for us.
> >>>
> >>>  The code is something along these lines:
> >>>
> >>>  VADisplay va_display;
> >>>
> >>>  printf("attempting to connect through X");
> >>>  Display* x11_display = XOpenDisplay(":0.0");
> >>>  if(x11_display != NULL)
> >>>  {
> >>>  printf("connected through X");
> >>>  va_display = vaGetDisplay(x11_display);
> >>>  return;
> >>>  }
> >>>
> >>>  printf("attempting to connect through drm");
> >>>  int drm_fd = open("/dev/dri/card0", O_RDWR);
> >>>  if (element->drm_fd > 0)
> >>>  {
> >>>  printf("connected through drm on /dev/dri/card0");
> >>>
> >>>  va_display = vaGetDisplayDRM(element->drm_fd);
> >>>
> >>>  return;
> >>>  }
> >>>
> >>>  //error
> >>>
> >>>  On Thu, Mar 27, 2014 at 8:32 AM, Nik Orlov <[email protected]> wrote:
> >>>>  Hello!
> >>>>
> >>>>  As I have read here (http://www.freedesktop.org/wiki/Software/vaapi/)
> >>>>
> >>>>  The current video decode/encode interface is window system independent, 
> >>>> so that potentially it can be used with graphics sub-systems other than 
> >>>> X. In a nutshell it is basically a scheme to pass various types of data 
> >>>> buffers from the application to the GPU for decoding or encoding. 
> >>>> Feedback on the API is greatly welcomed, as this is intended to be a 
> >>>> community collaborative effort.
> >>>>
> >>>>  So, there is some way to setup debian or ubuntu without Xorg to use 
> >>>> libva.
> >>>>  Maybe someone show me right way? At the moment I don`t know 
> >>>> infrustructure of libva.
> >>>>
> >>>>  There is schem from wiki 
> >>>> (http://en.wikipedia.org/wiki/Video_Acceleration_API) 
> >>>> http://en.wikipedia.org/wiki/File:Vaapi_illustration.svg
> >>>>  I don`t understand VA Hardware Driver needs to use all DRILib, DRMLib 
> >>>> and direct access to hardware OR it can use one of them?
> >>>>
> >>>>  According to sources of h264encoding test from libva-1.1.1 it uses some 
> >>>> functions with display
> >>>>
> >>>>      va_dpy = va_open_display();
> >>>>      va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
> >>>>      CHECK_VASTATUS(va_status, "vaInitialize");
> >>>>
> >>>>  It seems I still Xorg to use this features, or there is another way?
> >>>>
> >>>>  --
> >>>>  Ник Орлов mailto:[email protected]
> >>>>  _______________________________________________
> >>>>  Libva mailing list
> >>>>  [email protected]
> >>>>  http://lists.freedesktop.org/mailman/listinfo/libva
> 


_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to