Received: from eggs.gnu.org ([208.118.235.92]:41507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tt3zn-0002f5-Iy for qemu-devel@nongnu.org; Wed, 09 Jan 2013 17:19:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tt3zm-0000P6-Ae for qemu-devel@nongnu.org; Wed, 09 Jan 2013 17:19:39 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42344 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tt3zm-00005o-4F for qemu-devel@nongnu.org; Wed, 09 Jan 2013 17:19:38 -0500 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <8738ya6r3h.fsf@codemonkey.ws> Date: Wed, 9 Jan 2013 23:18:52 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <5650EBDE-4AAA-407A-829B-648E42B9DBB5@suse.de> References: <1357752469-17825-1-git-send-email-david.verbeiren@intel.com> <8738ya6r3h.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH] ui/vnc: VA API based H.264 encoding for VNC framebuffer updates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: David Verbeiren , qemu-devel@nongnu.org On 09.01.2013, at 21:25, Anthony Liguori wrote: > Hi, >=20 > David Verbeiren writes: [...] >=20 >> + >> + int frame_w =3D ds_get_width(vs->ds); >> + int frame_h =3D ds_get_height(vs->ds); >> + >> + /* first call for this frame: perform encoding */ >> + if ((frame.data =3D=3D NULL) || (frame.count !=3D = vs->vd->h264.frame_count)) { >> + >> + if (!vs->vd->h264.va_dpy || (vs->vd->h264.config =3D=3D = VA_INVALID_ID)) { >> + if (h264_encoder_init(&vs->vd->h264) !=3D 0) { >> + fprintf(stderr, "Failed to initialize VA H264 = encoder\n"); >> + return 0; >> + } >=20 > Since we really can't guarantee that libva will initialize okay, we = need > to more gracefully handle falling back to another encoding type. In fact, doesn't libavcodec / gstreamer support vaapi? If we could just = send our updates to a library and have that determine whether vaapi is = available or maybe fall back to software H.264 encoding, people without = vaapi compatible hardware (or software) could exploit this feature too. Though I'm not saying it's a prerequisite to merge this patch. As a = proof of concept, it's good enough to rely on vaapi directly. I just = think not doing so would open this to a broader range of users. And it = would get rid of a whole class of problems (hardware limitations on = concurrent users, X dependency, etc) Alex