From bogus@does.not.exist.com Wed Dec 2 15:13:03 2009 From: bogus@does.not.exist.com () Date: Wed, 02 Dec 2009 23:13:03 -0000 Subject: No subject Message-ID:
"The GLX specification does not allow binding the same GLX context in multiple threads at the same time. This is a requirement for both Cairo's and GStreamer's threading model. An extension was proposed = and initial code developed to support this requirement in the same way as Apple's GL does by default. Windows does not support this and would require potentially expensive fallback code."

-->The o= ther solution would be to use OpenGL context sharing. But it requires to ha= ve this:

(from http://gstreamer.freedesktop.org/wiki/Vi= deoHackfest/Notes)
"Eric: One thing I'd like is if two neighboring elements could determine whether they are running in the same thread"
I already asked gstreamer developers in the past to add support for this = but this is not an easy task and only useful for opengl right now.
The result would be to remove this :
(from http://gstreamer= .freedesktop.org/wiki/VideoHackfest/Notes)
"So what gst-plugins= -gl does is to proxy all OpenGL communication through a single= thread associated with the context"

For example in the pipeline:
videotestsrc ! glupload ! glfilterA ! q= ueue ! glfilterB ! glimagesink
It would have one opengl context for glu= pload ! glfilterA since their chain func is running in the same thread (if = the user does not manually push buffer itself form an other thread, I do no= t know all the possible case but we could ensure that they are running in t= he same thread).
This opengl context would be shared with the opengl context used by glfilte= rB ! glimagesink
Moreover, thoses 2 opengl contexst (shared together) co= uld work at the same time (they would work on different textures at the same time)

A= nd so no need the overhead due to the gl thread is avoid, (and the property= "each opengl context is made current only one time" is kept. Not= e that this property is already true in the current gst-plugins-gl implemen= tation)

I have already demonstrated the validity of using OpenGL context sharin= g in the implementation of the glmixer base class.
The glmosaic element = (which will be renamed to glmixercube) is a glmixer. (availaible in gst-plu= gins-gl/git)
For example in the following pipeline:

videotestsrc ! glupload ! glf= ilterA ! queue ! glmixer name=3Dm ! glfilterC ! glimagesink
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 glupload ! glfilterB ! queue = ! .m

There are 3 opengl contexts shared together. (there is a glthre= ad per opengl context)
One used by glupload ! glfilterA, one other for glupload ! glfilterB, and a= last one used by glmixer=A0 ! glfilterC ! glimagesink

Finally, if w= e would have the following support:
"Eric: One thing I'd like = is if two neighboring elements could determine whether they ar= e running in the same thread"
We could avoid the use of the a thread per opengl context.
Moreover it w= ould not need what you suggested:

"The GLX specif= ication does not allow binding the same GLX context in multiple threads at the same time"

Well, internally, mayb= e the mecanism/result is exactly the same:
I mean, maybe binding the sam= e GLX context in multiple threads at the same time is equivalent to have several opengl cont= exts shared together and each one used in only one thread (a gstreamer stre= aming thread).
If this is really equivalent (at least for our use) maybe= it would be more portable to use the context sharing solution, because the= feature is already there.

Actually I think using opengl context sharing is more efficient because= several context can be used at the same time. (not possible with the same = context in multiple-thread. Well it depends on the implementation that you = are going to do)

I could help in the future about that:
(from http://gstreamer.freedesktop.org/wiki/VideoHackfes= t/Conclusions)
"Actions:
    Get review of cairo-gl/gst-plugins-cairo code from gst-plugins-gl developer= s
  • Port gst-plugins-gl elements to use Cairo early to ensure required feat= ures are available"

Sincerely
Julien Isorce


2009/11/24 Benjamin Otte <otte at gnome.org>

Hi,

As you may be aware, we held a video hackfest last week in Barcelona.
Developers met to discuss how best to improve GPU support for video
applications. See http://gstreamer.freedesktop.org/wiki/VideoHackfes= t
for more details. In particular, you might be interested in the notes
some people took while the hackfest was going on. These can be found
at http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes

What follows is the results we arrived at after the hackfest. They are
taken from
http://gstreamer.freedesktop.org/wiki/VideoHa= ckfest/Conclusions
but certainly deserve wide circulation. We're interested in any
comments (or questions) you might have about them, so please don't
heistate to reply.

If you do reply, please make sure to reduce the recipient list appropriatel= y.

Cheers,
Benjamin,

on behalf of all hackfest paticipants.


=3D=3D YUV in pixman =3D=3D
It has been a goal for a while to make video a first-class citizen in
the image stack. A concrete API proposal on how to integrate video
into pixman was reached and reviewed.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfe= st/YCbCr_Formats
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/pixm= an
Actions:
=A0* GStreamer developers to provide a specification of important YUV forma= ts
=A0* Write implementation

=3D=3D YUV in Cairo =3D=3D
To make it easy for applications to use these different formats, the
Cairo API needs to be extended to allow them. A proposal does exist
and has been reviewed, details need to be finalized.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo=
Actions:
=A0* Finalize proposal
=A0* Write implementation

=3D=3D locking in Cairo =3D=3D
GStreamer takes a lot of freedom in deciding which threads to schedule
elements in. Most hardware backends however require proper
serialization of commands. The current gst-plugins-cairo and
gst-plugins-gl code provide different, but ugly ways to achieve this.
Cairo's internal thread safety guarantees match these requirements
very well. But the different Cairo backends don't always keep these
guarantees. Interaction with these locking mechanisms from outside
applications is not possible yet either.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo=
Actions:
=A0* Improve Cairo backend implementations, in particular X11 and GL
=A0* Expose Cairo's locking API to allow interaction with it
=A0* Write testcases to squash bugs

=3D=3D locking in Mesa =3D=3D
The GLX specification does not allow binding the same GLX context in
multiple threads at the same time. This is a requirement for both
Cairo's and GStreamer's threading model. An extension was proposed = and
initial code developed to support this requirement in the same way as
Apple's GL does by default. Windows does not support this and would
require potentially expensive fallback code.
Links:
=A0* http://people.freedesktop.org/~anholt/MES= A_multithread_makecurrent.spec
Actions:
=A0* Get review for suggested extension and include it in future Mesa relea= ses
=A0* Make Windows developers investigate the situation

=3D=3D switch GStreamer to Cairo as default video transport model =3D=3D The current approach to handling video in GStreamer is very outdated.
It does not allow hw-accelerated buffers nor does it provide a unified
API to modify video buffers, which leads to fragmentation and
duplication. It was agreed that using Cairo to provide an abstraction
as a drawing API and abstraction over different backends was a good
idea.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes=
=A0* http://cgit.freedesktop.org/~company/gst-plugins-cairo=
Actions:
=A0* Rework gst-plugins-cairo to match improvements listed in previous poin= ts
=A0* Get more review on API and to avoid regressions
=A0* Merge into gst-plugins-base
=A0* Switch plugins gradually to use new Cairo code

=3D=3D gst-plugins-gl =3D=3D
The general consensus was that gst-plugins-gl is a hack. It was
necessary in the past to get things to work, but is not a good way
forward. However, the functionality or performance provided by the
current elements needs to continue working. Developers shared the
opinion that gst-plugins-cairo with cairo-gl surfaces is the best way
to achieve this.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes=
Actions:
=A0* Get review of cairo-gl/gst-plugins-cairo code from gst-plugins-gl deve= lopers
=A0* Port gst-plugins-gl elements to use Cairo early to ensure required
features are available

=3D=3D XRenderPutImage =3D=3D
Currently there is no way to upload video data to the X server for
later use. The XV extension is not sufficient for anything more
complicated than a simple video player.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo=
Actions:
=A0* Figure out the best way to move YUV data into hw-accelerated Cairo
surfaces (GL vs X)
=A0* Possibly draft an extension to XRender to handle this in the no-GL cas= e

=3D=3D JIT in Pixman =3D=3D
ORC was investigated as a potential JIT for pixman. A lot of talk has
happened, but no clear conclusions were reached. The idea to share a
JIT with Mesa's GLSL stack was also brought up.
Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes=
Actions:
=A0* Continue investigating JIT options
=A0* Prototype ORC integration into Pixman

=3D=3D Video decoding Acceleration =3D=3D
Hardware video decoding is a feature that everybody is very excited
about and wants to integrate into GStreamer as soon as possible. But
developers feel that the current APIs available - the focus was on
VAAPI and VDPAU - to do hardware acceleration fail to integrate well.
No developer managed to create even demo-quality integration with
gst-plugins-cairo, even though quite a few tried. In particular, both
VDPAU and VAAPI...

... do not integrate with existing frameworks
Both libraries fail to use (or allow easy conversion to) existing
objects (GEM handles, GL textures, ...) but only provide access to an
encapsulation. This makes it hard for a flexible framework like
GStreamer to make use of its features without limiting itself.

... do not have a clear scope
In particular VDPAU advertises itself as a video playback framework
using hardware acceleration. Unfortunately, they both limit themselves
to only the formats and functionalities supported by the hardware and
see fullscreen video playback as the single usecase. This needlessly
complicates integration with existing frameworks

... provide a very complicated API
For decoding video, an API like provided by libtheora, libmpeg2 or
even ffmpeg is very simple and allows easy integration with both the
demuxing =A0and the postprocessing/display side. VAAPI and VDPAU require complex setups and preprocessing of the data to work properly.

... overlap with GL functionality
It was felt that a lot of processing features provided by these
libraries are equally well available using shaders in GL or by
providing GL extensions. It was unclear why it is necessary to use a
separate way to do this.

Links:
=A0* http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes=
=A0* htt= p://gstreamer.freedesktop.org/wiki/VideoHackfest?action=3DAttachFile&do= =3Dview&target=3DVAinGST.pdf
Actions:
=A0* Get in contact with developers of the APIs
=A0* Encourage revision of public
=A0* Work closer together in integrating the provided functionality into GS= treamer

=3D Timeline =3D
The end goal of all of this is to get the code into users' hands
quickly, but allow a smooth and non-disrupting upgrade. Desired dates
have been put forth to achieve this:
=A0* End of January: release new versions of Cairo and Pixman that
contain the new APIs reuired by GStreamer
=A0* End of March: X server and Mesa releases are due - make sure the
required Mesa extension is part of this. Ideally XrenderPutImage would
be included, too.
=A0* April/May, after next Fedora/Ubuntu releases: Merge Cairo support
into gst-plugins-base and start porting elements to it. Encourage
application developers (browser, Flash players) to make use of the new
APIs
=A0* October: another Fedora/Ubuntu release that switches all users to
the new APIs

---------------------------------------------------------------------------= ---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day=
trial. Simplify your report design, integration and deployment - and focus = on
what you do best, core application coding. Discover what's new with
Crystal Reports now. =A0http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
= gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-deve= l


--00032555b2f29c370a0479437924-- From William.Walker at Sun.COM Tue Dec 1 06:59:20 2009 From: William.Walker at Sun.COM (Willie Walker) Date: Tue, 01 Dec 2009 09:59:20 -0500 Subject: [Libva] Video Hackfest conclusions In-Reply-To: References: Message-ID: <4B152F48.2010702@sun.com> Sorry for the late reply to this. I'm curious how closed captioning and/or subtitles will be rolled into this. Do you video folks have any thoughts? I'm also curious if we might also want to consider some sort of gconf setting that says "give me closed captioning" that any video player can check and honor. Will Benjamin Otte wrote: > Hi, > > As you may be aware, we held a video hackfest last week in Barcelona. > Developers met to discuss how best to improve GPU support for video > applications. See http://gstreamer.freedesktop.org/wiki/VideoHackfest > for more details. In particular, you might be interested in the notes > some people took while the hackfest was going on. These can be found > at http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes > > What follows is the results we arrived at after the hackfest. They are > taken from http://gstreamer.freedesktop.org/wiki/VideoHackfest/Conclusions > but certainly deserve wide circulation. We're interested in any > comments (or questions) you might have about them, so please don't > heistate to reply. > > If you do reply, please make sure to reduce the recipient list appropriately. > > Cheers, > Benjamin, > > on behalf of all hackfest paticipants. > > > == YUV in pixman == > It has been a goal for a while to make video a first-class citizen in > the image stack. A concrete API proposal on how to integrate video > into pixman was reached and reviewed. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/YCbCr_Formats > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/pixman > Actions: > * GStreamer developers to provide a specification of important YUV formats > * Write implementation > > == YUV in Cairo == > To make it easy for applications to use these different formats, the > Cairo API needs to be extended to allow them. A proposal does exist > and has been reviewed, details need to be finalized. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo > Actions: > * Finalize proposal > * Write implementation > > == locking in Cairo == > GStreamer takes a lot of freedom in deciding which threads to schedule > elements in. Most hardware backends however require proper > serialization of commands. The current gst-plugins-cairo and > gst-plugins-gl code provide different, but ugly ways to achieve this. > Cairo's internal thread safety guarantees match these requirements > very well. But the different Cairo backends don't always keep these > guarantees. Interaction with these locking mechanisms from outside > applications is not possible yet either. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo > Actions: > * Improve Cairo backend implementations, in particular X11 and GL > * Expose Cairo's locking API to allow interaction with it > * Write testcases to squash bugs > > == locking in Mesa == > The GLX specification does not allow binding the same GLX context in > multiple threads at the same time. This is a requirement for both > Cairo's and GStreamer's threading model. An extension was proposed and > initial code developed to support this requirement in the same way as > Apple's GL does by default. Windows does not support this and would > require potentially expensive fallback code. > Links: > * http://people.freedesktop.org/~anholt/MESA_multithread_makecurrent.spec > Actions: > * Get review for suggested extension and include it in future Mesa releases > * Make Windows developers investigate the situation > > == switch GStreamer to Cairo as default video transport model == > The current approach to handling video in GStreamer is very outdated. > It does not allow hw-accelerated buffers nor does it provide a unified > API to modify video buffers, which leads to fragmentation and > duplication. It was agreed that using Cairo to provide an abstraction > as a drawing API and abstraction over different backends was a good > idea. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes > * http://cgit.freedesktop.org/~company/gst-plugins-cairo > Actions: > * Rework gst-plugins-cairo to match improvements listed in previous points > * Get more review on API and to avoid regressions > * Merge into gst-plugins-base > * Switch plugins gradually to use new Cairo code > > == gst-plugins-gl == > The general consensus was that gst-plugins-gl is a hack. It was > necessary in the past to get things to work, but is not a good way > forward. However, the functionality or performance provided by the > current elements needs to continue working. Developers shared the > opinion that gst-plugins-cairo with cairo-gl surfaces is the best way > to achieve this. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes > Actions: > * Get review of cairo-gl/gst-plugins-cairo code from gst-plugins-gl developers > * Port gst-plugins-gl elements to use Cairo early to ensure required > features are available > > == XRenderPutImage == > Currently there is no way to upload video data to the X server for > later use. The XV extension is not sufficient for anything more > complicated than a simple video player. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Cairo > Actions: > * Figure out the best way to move YUV data into hw-accelerated Cairo > surfaces (GL vs X) > * Possibly draft an extension to XRender to handle this in the no-GL case > > == JIT in Pixman == > ORC was investigated as a potential JIT for pixman. A lot of talk has > happened, but no clear conclusions were reached. The idea to share a > JIT with Mesa's GLSL stack was also brought up. > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes > Actions: > * Continue investigating JIT options > * Prototype ORC integration into Pixman > > == Video decoding Acceleration == > Hardware video decoding is a feature that everybody is very excited > about and wants to integrate into GStreamer as soon as possible. But > developers feel that the current APIs available - the focus was on > VAAPI and VDPAU - to do hardware acceleration fail to integrate well. > No developer managed to create even demo-quality integration with > gst-plugins-cairo, even though quite a few tried. In particular, both > VDPAU and VAAPI... > > ... do not integrate with existing frameworks > Both libraries fail to use (or allow easy conversion to) existing > objects (GEM handles, GL textures, ...) but only provide access to an > encapsulation. This makes it hard for a flexible framework like > GStreamer to make use of its features without limiting itself. > > ... do not have a clear scope > In particular VDPAU advertises itself as a video playback framework > using hardware acceleration. Unfortunately, they both limit themselves > to only the formats and functionalities supported by the hardware and > see fullscreen video playback as the single usecase. This needlessly > complicates integration with existing frameworks > > ... provide a very complicated API > For decoding video, an API like provided by libtheora, libmpeg2 or > even ffmpeg is very simple and allows easy integration with both the > demuxing and the postprocessing/display side. VAAPI and VDPAU require > complex setups and preprocessing of the data to work properly. > > ... overlap with GL functionality > It was felt that a lot of processing features provided by these > libraries are equally well available using shaders in GL or by > providing GL extensions. It was unclear why it is necessary to use a > separate way to do this. > > Links: > * http://gstreamer.freedesktop.org/wiki/VideoHackfest/Notes > * http://gstreamer.freedesktop.org/wiki/VideoHackfest?action=AttachFile&do=view&target=VAinGST.pdf > Actions: > * Get in contact with developers of the APIs > * Encourage revision of public > * Work closer together in integrating the provided functionality into GStreamer > > = Timeline = > The end goal of all of this is to get the code into users' hands > quickly, but allow a smooth and non-disrupting upgrade. Desired dates > have been put forth to achieve this: > * End of January: release new versions of Cairo and Pixman that > contain the new APIs reuired by GStreamer > * End of March: X server and Mesa releases are due - make sure the > required Mesa extension is part of this. Ideally XrenderPutImage would > be included, too. > * April/May, after next Fedora/Ubuntu releases: Merge Cairo support > into gst-plugins-base and start porting elements to it. Encourage > application developers (browser, Flash players) to make use of the new > APIs > * October: another Fedora/Ubuntu release that switches all users to > the new APIs > _______________________________________________ > desktop-devel-list mailing list > desktop-devel-list at gnome.org > http://mail.gnome.org/mailman/listinfo/desktop-devel-list From gbeauchesne at splitted-desktop.com Mon Dec 14 23:14:40 2009 From: gbeauchesne at splitted-desktop.com (Gwenole Beauchesne) Date: Tue, 15 Dec 2009 08:14:40 +0100 Subject: [Libva] [PATCH] Record extra picture information for VDPAU/MPEG-4 Message-ID: Hi, This patch adds a few extra fields for the VDPAU backend to support MPEG-4 decoding. vop_time_increment_resolution can be placed last in the structure if you want to keep binary compatibility but since there is no official libVA 0.31.0 yet, this can be kept in the middle with other VOP fields, IMHO. Thanks, Gwenole -------------- next part -------------- A non-text attachment was scrubbed... Name: 301_vdpau_mpeg4.patch Type: application/octet-stream Size: 954 bytes Desc: not available Url : http://lists.freedesktop.org/archives/libva/attachments/20091215/1324fb28/attachment.obj -------------- next part -------------- From shengquan.yuan at gmail.com Wed Dec 16 19:17:32 2009 From: shengquan.yuan at gmail.com (Yuan, Shengquan) Date: Thu, 17 Dec 2009 11:17:32 +0800 Subject: [Libva] [PATCH] Record extra picture information for VDPAU/MPEG-4 In-Reply-To: References: Message-ID: On Tue, Dec 15, 2009 at 3:14 PM, Gwenole Beauchesne wrote: > Hi, > > This patch adds a few extra fields for the VDPAU backend to support MPEG-4 > decoding. > > vop_time_increment_resolution can be placed last in the structure if you > want to keep binary compatibility but since there is no official libVA > 0.31.0 yet, this can be kept in the middle with other VOP fields, IMHO. > > Thanks, > Gwenole > > Committed. Austin > > _______________________________________________ > Libva mailing list > Libva at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/libva > >