flip the video without matrix conversion

Mar 10, 2006 at 2:47pm

flip the video without matrix conversion

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?

#24818
Mar 10, 2006 at 3:07pm

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!

#72341
Mar 10, 2006 at 3:19pm

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…

#72342
Mar 10, 2006 at 3:43pm

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

#72343
Mar 10, 2006 at 4:56pm

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

#72344
Mar 10, 2006 at 4:57pm

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

#72345
Mar 10, 2006 at 5:03pm

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

#72346
Mar 10, 2006 at 5:12pm

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

#72347
Mar 10, 2006 at 5:19pm

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

#72348
Mar 10, 2006 at 5:21pm

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

#72349
Mar 11, 2006 at 6:25pm

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

#72350

You must be logged in to reply to this topic.