[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] camera module: yuv, hsb, controllers and poc game
- To: pygame-users@xxxxxxxx
- Subject: [pygame] camera module: yuv, hsb, controllers and poc game
- From: el lauwer <el.lauwer@xxxxxxxxx>
- Date: Wed, 5 Aug 2009 13:24:44 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 05 Aug 2009 07:24:50 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=KY6KMSa3UOnjXBcCt9fyF0fJfdUuQIoSymQXbGi8Rk0=; b=BBCMAiKXigSJpkyV0aGXb/7/1nyr6ypXSU9v6fPvFP/A6l+dnEcTeOI+N3bMM6WiT1 f5hAQeocpqDc3Gtkn/PKmIsWeYqufQn66uzCe3YIYOwja+c0Nhgk8D6wnV0k7vLthZz0 QjpQIn3zjbXWFwnVSHI5h0I7WVjf2iQ/kH2SU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=KlP9/ziQ78daMNxTFeRDf9YNtjiVL+LgEWIdPj6taX31t85yRUjQFI+v7jrEzhb9PW oohIj7G0hWd5kKGRy97lh/Xk6dDTRyIl9IBTGjH+ubtvflNI/7v/vQdLh4YEqMVwwLTi 9dYvb/rVJ3q5vHdWhkv9SbP/ox8v+icUP8V90=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello,
Since, GSOX is drawing into a close I though I post an other update on
my progress.
First of all, I have added support for yuv and hsb color output with
different color depths by using the color transform functions.
I have looked into the flip controller, and the only function I could
find in the Quicktime API that should be able to do this is
SGSetChannelMatrix(channel, matrix) [0]. However when I try to set an
mirror matrix (a scale + translate matrix) it return an error that
indicates that the transformation matrix isn't supported.
Here is the code sniped:
MatrixRecord matrix;
Fixed minusOne = Long2Fix(-1L);
Fixed PlusOne = Long2Fix(1L);
Fixed zero = Long2Fix(0L);
ScaleMatrix(matrix, fixed1, minusOne, 0, 0);
TranslateMatrix(matrix, Long2Fix(self->boundsRect.right), 0);
SGSetChannelMatrix(self->channel, &matrix);
You can find more context in the file src/camera_mac.m:133
Nirav, since you joined Apple, maybe you can ask the good people in
Cupertino, how they intended this to be done :P
In case there is no way that qt support this controller, should I just
keep them out and use transform.flip instead?
I have been testing the camera games by nirav (bouncy bal,
pointillism, reflectionrejection), pointillism runs very slow, about
2,5 frames a second, and the other don't display an image frame. I
haven't found the problem yet.
[0] http://developer.apple.com/documentation/QuickTime/Reference/QTRef_SequenceGrabber/Reference/reference.html#/
/apple_ref/c/func/SGSetChannelMatrix
Grtz