.....fisrt working dsp video objects !!

Christian Klippel c_klippel at gmx.net
Sat Mar 31 21:10:32 CEST 2001


re all,

my date in munich didnt happen, so im back now.

ok, i just packed together the video objects for jmax that i have made .....
these are meant as a demo/example/... to show why and how i want to use 
the dsp architecture from jmax.

be aware that the current code is a bit messy and not perfect in means of perormance.....

it only works for jmax 2.5.0 (release as of a few days ago.....)

currently these object dont have their own computation part, its done by the
standard dsp scheduler. (in fact, they are standrad dsp objects.....)

this package is divided in two parts, x11video an vobj.
x11video defines the x11 output port and creates the video-window
vobj are the actual video handling objects.

i made 4 objects for now

colour~ : produces a coloured frame, r-g-b-a can be adjusted through faders
tga~ : loads a 160x120 tga picture with 32 bit depth, uncompressed !
vfade~ : fades between two videostreams
valpha~ : combines two videostreams using the alpha chanel.

examples are included, also 3 little pics, so you can start imediatly...;)

there are some restrictions for now :
frame size is fixed 160x120, this should be settable via the .jmaxrc later
the data format that flows through the in/outlets are floats (32 bit) which i
split inside the objects to the needed chanels. this is tied to fts's definition
of a dsp signal, for video that could be changed for example to a 64 bit wide dield,
giving 16 bit for rgb and 15 bit for alpha. now it is 8 bit rgb and 7 bit alpha (the 8th bit is used for frame syncing)

this sync bit is really needed, try this to see :
open the vfade patch, start the dsp. adjust the fader to the middle so that you can see boot images.
now stop the dsp, delete ONE of the tga~ objects and recreate / connect it.
now restart the dsp. you will see that the two pictures are unsynced, the one of the recreated object
has its start not at 0,0 (upper left corner), instead somwhere in the picture.
stop the dsp, and connect the INLET of the recreated tga~ object to the outlet of the other one.
restart dsp. voila, the pic's are in sync now.
the inlet on the tga~ object only reacts to the sync signal and resets its internal pixel counter.
only one object is needed as sync source for all others.

to install them, unpack the archive at http://mamalala.de/files/videofun.tgz
sources and i386 & i686 bins are inluded. install/compile them as needed.
after that, put remarks before any audioport definitions and audiodrivers in .jmaxrc !!! 
instead add three lines in the "when start {" section :

package require x11video
package require vobj
defaultAudio x11videoport

set your sample rate to a nice high value (200000 for example, yes twoohunderedthousand)

now start jmax. examples are in the vobj/examples directory of the package.

on my machine (P III / 600) its possible to mix 3 streams with only ~20% system load at 25 fps !

as said, it uses the standard fts mechanism for now, but im trying to make it an addition to fts
so it has its own dsp graph etc. and can run at a different rate than the audio dsp stuff.

hope this makes it a bit clearer to you all what im trying to do and why i want to tweak fts itself for that.

tell me what you think of it, or ask me if you have questions,

chris

-- 
visit me at http://mamalala.de





More information about the Pd-list mailing list