<div dir="ltr">ping<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 April 2013 22:46, kwisp <span dir="ltr"><<a href="mailto:kwispost@gmail.com" target="_blank">kwispost@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>There is h264 encoding example from libva source code. libva/test/v4l_h264/encode.<br></div>I build this code success, but get crash after run.<br>
<br>libva info: VA-API version 0.33.0<br>libva info: va_getDriverName() returns 0<br>
libva info: Trying to open /usr/local/lib/dri/emgd_drv_video.so<br>libva info: Found init function __vaDriverInit_0_32<br>Intel(R) Embedded Media and Graphics Driver 1.10 Build 2209<br>libva info: va_openDriver() returns 0<br>
Using: localhost:8888<br>video capture<br> VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)<br>pfmt: 0x56595559 YUV 4:2:2 (YUYV)<br> VIDIOC_ENUM_FRAMESIZES(0,0x1) 640x480 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(1,0x1) 160x120 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(2,0x1) 176x144 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(3,0x1) 320x176 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(4,0x1) 320x240 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(5,0x1) 432x240 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(6,0x1) 352x288 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(7,0x1) 544x288 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(8,0x1) 640x360 @ 1/30 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(9,0x1) 752x416 @ 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(10,0x1) 800x448 @ 1/24 1/20 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(11,0x1) 864x480 @ 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(12,0x1) 960x544 @ 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(13,0x1) 1024x576 @ 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(14,0x1) 800x600 @ 1/24 1/20 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(15,0x1) 1184x656 @ 1/15 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(16,0x1) 960x720 @ 1/15 1/10 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(17,0x1) 1280x720 @ 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(18,0x1) 1392x768 @ 1/10 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(19,0x1) 1504x832 @ 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(20,0x1) 1600x896 @ 2/15 1/5 <br>
VIDIOC_ENUM_FRAMESIZES(21,0x1) 1280x960 @ 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(22,0x1) 1280x1024 @ 2/15 1/5 <br> VIDIOC_ENUM_FRAMESIZES(23,0x1) 1600x1200 @ 1/5 <br> VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)<br>
pfmt: 0x47504a4d MJPEG<br> => don't list not supported format<br>video: 640x480; fourcc:0x56595559<br>video: 640x480; fourcc:0x56595559<br>INFO: 640x480@1/30<br>negotiated frame resolution: 640x480<br>create_encode_pipe:vaCreateContext(152) failed, exit<br>
<br clear="all"><div><div><div><div></div><div>I try to modify code in place where called vaCreateContext(...) file avenc.cpp<br></div><div></div><div>before my changes:<br>...<br>va_status = vaCreateContext(va_dpy, config_id, picture_width, picture_height, VA_PROGRESSIVE, 0, 0, &context_id);<br>
</div><div>...<br><br></div><div>after:<br><br>.... <br> va_status = vaCreateSurfaces(va_dpy, picture_width, picture_height, VA_RT_FORMAT_YUV420, SID_NUMBER, &surface_ids[0]);<br> va_status = vaCreateContext(va_dpy, config_id, picture_width, picture_height, VA_PROGRESSIVE, surface_ids, SID_NUMBER, &context_id);<br>
....<br></div><div><br></div><div>after that:<br>.....<br>negotiated frame resolution: 640x480<br>libva: libva version 0.32.0<br>libva: va_getDriverName() returns 0<br>libva: Trying to open /usr/lib/dri/emgd_drv_video.so<br>
Intel(R) Embedded Media and Graphics Driver 1.10 Build 2209<br>libva: va_openDriver() returns 0<br><br>Program received signal SIGSEGV, Segmentation fault.<br>0xb788d716 in ?? () from /usr/lib/dri/emgd_drv_video.so<br></div>
<div><br></div><div>Why this example of code do not work ?<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br>-- <br>-----------------------------------------<br>
σ υΧΑΦΕΞΙΕΝ, λΜΟήΛΟΧ χ.χ.<br>mailto: <a href="mailto:kwispost@gmail.com" target="_blank">kwispost@gmail.com</a>
</div></font></span></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------------------------------<br>σ υΧΑΦΕΞΙΕΝ, λΜΟήΛΟΧ χ.χ.<br>mailto: <a href="mailto:kwispost@gmail.com" target="_blank">kwispost@gmail.com</a>
</div>