[Disko-devel] Xv / Compositing / Scaling
stefan schwarzer
sschwarzer at diskohq.com
Mon Sep 6 18:48:11 CEST 2010
Hi All,
Disko is now using more hardware acceleration in its X11 backend. In
combination with compiz, it is now possible to separate the video and
the graphics layer.
The video layer can now utilize Xv solely for Video playback. This
enables full hardware supported video scaling from the source to the
target.
The graphics layer now can be created with ARGB as layer pixelformat
which using compiz for compositing. The scaling of the gui in
fullscreen mode is done via the XRender extension. This enables
fullscreen applications with hardware supported alpha blending between
the layers.
This setup is implemented mainly for fullscreen operation because each
layer is handled as separate X11 window.
To configure an application with the application resolution of
1024x576 for fullscreen operation including scaling (in our case the
target had 1366x768), the diskorc.xml looks as follows:
...
<graphics>
<parameter name="fullscreen" value="true" />
<parameter name="xres" value="1024" />
<parameter name="yres" value="576" />
<parameter name="backend" value="x11" />
<parameter name="outputtype" value="xshm" />
<parameter name="videolayerid" value="1" />
<parameter name="videolayerpixelformat" value="YV12" />
<parameter name="videolayeroptions" value="" />
<parameter name="videolayerbuffermode" value="BACKSYSTEM" />
<parameter name="graphicslayerid" value="0" />
<parameter name="graphicslayerpixelformat" value="ARGB" />
<parameter name="graphicslayeroptions" value="" />
<parameter name="graphicslayerbuffermode" value="BACKSYSTEM" />
...
The selection which x11 backend is used for each layer (Xv + MIT Shm
or XImage + MIT Shm) is based on the pixelformat, and works
automatically, so it is well possible to use RGB32 or ARGB as video
layer pixelformat as well. To trigger the right behavior for this
detection, the outputtype for the application must be set to "xshm".
This feature is available via the git head in our disko repository.
The configuration needs to be refined before we can release this
feature as stable, but I would like to encourage anyone who is
interested to test and review this feature.
have fun
Stefan
More information about the Disko-devel
mailing list