[PD] Processing Video Data

Frank Barknecht fbar at footils.org
Thu May 10 21:48:03 CEST 2007


Hallo,
raul diaz hat gesagt: // raul diaz wrote:

> But now I have 2 options: to work with tables (reading tables values with
> tabread and manipulating this values) or to work without tables,
> manipulating lists directly to extract each value I need. What's the best
> option in terms of computational effectivity? (I use a lot of data which
> require a lot of cpu, so I need to minimize computational cost). I will use
> this video data for audio synthesis.

Using a table normally is faster, especially if you want to access values by
index (that is, not sequentially). You can do some optimizations, too:
For one, you can get rid of one counter, if you send the RGB-list to: 

 [list]
 |     
 [list split 3]
 |
 [unpack 0 0 0]
 |     |      |
 ... put to tables

Even faster probably is using just one table for all RGB values: Just
do a [list prepend 0] after [pix dump] and send the 0-prepended list
to a sender with your table-name as target. 

You can still access the individual R, G, or B values by adjusting
your index into [tabread] accordingly (use: 3*index + X with X = 0, 1
or 2)

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list