[Openchrome-users] Rotating the X...

Thomas Hellström unichrome
Wed Dec 28 12:48:29 PST 2005


> Re: Rotating the X...
>
> Hi again, thanks for your answer!
>
> Once you have confirmed us the lack of rotating support in the chips our
> question is: can we cheat it by changing manually the coordinates?
>
> We have been experimenting with this issue lately but the are some
> problems. As we are reproducing video through mplayer we decided to change
> the way it calculates where to place the "xv area" where   the video is
> drawn. In order to do that, we calculate an offset to make the video fit
> the existing window (quite random :-) ). We also rotate the video via
> (:wink:) software (-vf rotate=whatever).  This work but not always. When
> the window where the video it supposed to appear do not match (any single
> pixel) whith the "xv area" drawn with the mentioned above offset,
> theoreticaly, the driver decide not to draw anything! Result: The video do
> not appear!!
>
> So, we need some help to handle the driver "customization" (our version
> will only work rotated) in differents level of complexity:
> 1.- Is the checking of the mismatching surfaces responsability of the
> driver? If it is, how can we avoid it?
> 2.- What changes are needed to make the driver calculate the coordinates
> correctly? Is it beyond  measure?
> 3.- Give support to handle rotation.. :-)
>
> Apologies for this looong post but we need it! I hope you can help us!
>
> Regards,
>
>       antONIO

Hmm, It might be difficult, but if you can get mplayer to rotate the
picture data it _should_ be possible to tweak the driver to position the
window correctly, but I'm not quite sure how mouch work it is.

There are two main things involved.

1) Look in the file "via_video.c". There are two functions that call lower
layers to display an Xv image: a) viaPutImage and b) viaReputImage. These
functions are handed the position and size of the Xv window. You might
want to try to manipulate those coordinates to see the results.

2) They are also handed a number of cliprect regions that tells the driver
where to paint the color key. The color key is a special color that makes
the Xv data visible. All pixels that are painted with the colorkey and are
above the Xv overlay will show the video data. You might need to have a
look at these cliprects as well.

3) The file via_shadow.c is (I believe) responsible for the rotation
itself. I haven't looked to deeply into this file yet, but the info might
come in handy.

Good luck.
/Thomas







>
> P.S. BTW, our hardware is: CLE266 over VIA EPIA-M
> P.S. Attached the lspci -vvv, ;-)
>
> _______________________________________________
> openchrome-users mailing list
> openchrome-users at openchrome.org
> http://wiki.openchrome.org/mailman/listinfo/openchrome-users
>




More information about the Openchrome-users mailing list