Forums > Jitter

flip the video without matrix conversion

March 10, 2006 | 2:47 pm

I am working on a patch that needs to be as lean as possible, running on a 700mhz G4 and dealing with video, so the frame rate is sloggy at best.

I have an orange micro Ibot firewire cam bringing the video in and I want to flip it so that the monitor mirrors the action in the cam.

Is there a way to flip a video without using the processing power to convert it to a matrix?


March 10, 2006 | 3:07 pm

render to an openGL plane and move your camera?

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!


March 10, 2006 | 3:19 pm

I’m not sure what you mean by "move the camera"
are you refering to the Ibot or the camera in open GL?

I could just render the video to the plane and flip the plane so the GL camera sees the back…

how much extra work would this give the computer…

my hope here is that there is some jit.flip object out there that does this simple thing all easy like, so that I don’t have to put a lot more work through the already over taxed 700 mhz G4

This may just be a pipe dream…


March 10, 2006 | 3:43 pm

jit.dimmap will do it

or you can do the flip in the jit.qt.grab object, use "@usedstrect 1
@dstrect 0 240 320 0" or something like that to tell it to flip the
image on the way out

cheers,
-ev


March 10, 2006 | 4:56 pm

ah!

this, i think, is the majick key i am looking for.

I won’t be able to test it untill monday.

but I think it will work

thanks


March 10, 2006 | 4:57 pm

On Mar 10, 2006, at 7:19 AM, Chris Kaczmarek wrote:

> I could just render the video to the plane and flip the plane so
> the GL camera sees the back…
>
> how much extra work would this give the computer…

Very little, as the flipping happens on the GPU. Playing as a texture
in UYVY mode is one of the fastest ways to draw video in a window.
Check the tuts.

-Joshua


March 10, 2006 | 5:03 pm

On Mar 10, 2006, at 7:43 AM, evan.raskob wrote:

> jit.dimmap will do it
>
> or you can do the flip in the jit.qt.grab object, use "@usedstrect
> 1 @dstrect 0 240 320 0" or something like that to tell it to flip
> the image on the way out

FWIW, these will both eat CPU. jit.gl.videoplane @colormode uyvy
should be faster.

-Joshua


March 10, 2006 | 5:12 pm

really? faster even than dstrect?
that’s something to know. i thought it might be some ultra-efficient
QT thing going on there. i guess not.

-ev


March 10, 2006 | 5:19 pm

On 10 mars 06, at 18:12, evan.raskob wrote:

> i thought it might be some ultra-efficient QT thing going on
> there. i guess not.

no jit.gl.videoplane will be faster because the transformation will
be calculated by the GPU (the processor unit of your graphic card),
instead of the CPU which is the case with jit.matrix’s dst things.

Best,
ej


March 10, 2006 | 5:21 pm

On Mar 10, 2006, at 9:12 AM, evan.raskob wrote:

> really? faster even than dstrect?
> that’s something to know. i thought it might be some ultra-
> efficient QT thing going on there. i guess not.

Nope. Actually, last I tested, the QT matrix code for scaling/
flipping is slower than using jit.matrix src/dstdim.

-Joshua


March 11, 2006 | 6:25 pm

this would be great, unfortunately the traffic cameras are real
player formated.. .


Viewing 11 posts - 1 through 11 (of 11 total)