[gephex-devel] gephex--main--0.4--patch-1814
gephex at sonnenland.kexbox.org
gephex at sonnenland.kexbox.org
Mon Nov 8 19:29:08 CET 2004
Archive: gephex at gephex.org--2004
New revision: gephex--main--0.4--patch-1814
--
Revision: gephex--main--0.4--patch-1814
Archive: gephex at gephex.org--2004
Creator: GePhex <gephex at gephex.org>
Date: Mon Nov 8 19:28:17 CET 2004
Standard-date: 2004-11-08 18:28:17 GMT
New-files: modules/src/capturemodule/.arch-ids/v4l2capturedriver.cpp.id
modules/src/capturemodule/.arch-ids/v4l2capturedriver.h.id
modules/src/capturemodule/v4l2capturedriver.cpp
modules/src/capturemodule/v4l2capturedriver.h
modules/src/pongmodule/.arch-ids/=id
modules/src/pongmodule/.arch-ids/Makefile.am.id
modules/src/pongmodule/.arch-ids/pongmodule.cpp.id
modules/src/pongmodule/.arch-ids/pongmodule.spec.id
modules/src/pongmodule/.arch-ids/pongmodule.xpm.id
modules/src/pongmodule/Makefile.am
modules/src/pongmodule/pongmodule.cpp
modules/src/pongmodule/pongmodule.spec
modules/src/pongmodule/pongmodule.xpm
New-directories: modules/src/pongmodule
modules/src/pongmodule/.arch-ids
Modified-files: configure.ac modules/src/Makefile.am
modules/src/capturemodule/Makefile.am
modules/src/capturemodule/capturemodule.cpp
modules/src/ifsmodule/Makefile.am
modules/src/ifsmodule/ifsmodule.cpp
modules/src/ifsmodule/ifsmodule.spec
New-patches: georg at gephex.org--2004-piksel/gephex--v4l2--0.4--patch-1
gephex at gephex.org--2004/gephex--main--0.4--patch-1814
martin at gephex.org--2004/gephex--ifsspeedup--0.4--patch-1
martin at gephex.org--2004/gephex--piksel04--0.4--base-0
martin at gephex.org--2004/gephex--piksel04--0.4--patch-1
martin at gephex.org--2004/gephex--pong--0.4--patch-1
martin at gephex.org--2004/gephex--pong--0.4--patch-2
martin at gephex.org--2004/gephex--pong--0.4--patch-3
Summary: changes made during piksel04: v4l2 support, ifs speedup, ogl driver fix, pong module
Keywords:
Patches applied:
* georg at gephex.org--2004-piksel/gephex--v4l2--0.4--patch-1
initial v4l2 support
* martin at gephex.org--2004/gephex--ifsspeedup--0.4--patch-1
interface changes and some speedup stuff
* martin at gephex.org--2004/gephex--piksel04--0.4--base-0
tag of gephex at gephex.org--2004/gephex--main--0.4--patch-1811
* martin at gephex.org--2004/gephex--piksel04--0.4--patch-1
first version for piksel04
* martin at gephex.org--2004/gephex--pong--0.4--patch-1
the game of pong initial version
* martin at gephex.org--2004/gephex--pong--0.4--patch-2
and now the files
* martin at gephex.org--2004/gephex--pong--0.4--patch-3
new pong stuff
* added directories
modules/src/pongmodule
modules/src/pongmodule/.arch-ids
{arch}/gephex/gephex--ifsspeedup
{arch}/gephex/gephex--ifsspeedup/gephex--ifsspeedup--0.4
{arch}/gephex/gephex--ifsspeedup/gephex--ifsspeedup--0.4/martin at gephex.org--2004
{arch}/gephex/gephex--ifsspeedup/gephex--ifsspeedup--0.4/martin at gephex.org--2004/patch-log
{arch}/gephex/gephex--piksel04
{arch}/gephex/gephex--piksel04/gephex--piksel04--0.4
{arch}/gephex/gephex--piksel04/gephex--piksel04--0.4/martin at gephex.org--2004
{arch}/gephex/gephex--piksel04/gephex--piksel04--0.4/martin at gephex.org--2004/patch-log
{arch}/gephex/gephex--pong
{arch}/gephex/gephex--pong/gephex--pong--0.4
{arch}/gephex/gephex--pong/gephex--pong--0.4/martin at gephex.org--2004
{arch}/gephex/gephex--pong/gephex--pong--0.4/martin at gephex.org--2004/patch-log
{arch}/gephex/gephex--v4l2
{arch}/gephex/gephex--v4l2/gephex--v4l2--0.4
{arch}/gephex/gephex--v4l2/gephex--v4l2--0.4/georg at gephex.org--2004-piksel
{arch}/gephex/gephex--v4l2/gephex--v4l2--0.4/georg at gephex.org--2004-piksel/patch-log
* added files
modules/src/capturemodule/.arch-ids/v4l2capturedriver.cpp.id
modules/src/capturemodule/.arch-ids/v4l2capturedriver.h.id
modules/src/capturemodule/v4l2capturedriver.cpp
modules/src/capturemodule/v4l2capturedriver.h
modules/src/pongmodule/.arch-ids/=id
modules/src/pongmodule/.arch-ids/Makefile.am.id
modules/src/pongmodule/.arch-ids/pongmodule.cpp.id
modules/src/pongmodule/.arch-ids/pongmodule.spec.id
modules/src/pongmodule/.arch-ids/pongmodule.xpm.id
modules/src/pongmodule/Makefile.am
modules/src/pongmodule/pongmodule.cpp
modules/src/pongmodule/pongmodule.spec
modules/src/pongmodule/pongmodule.xpm
{arch}/gephex/gephex--ifsspeedup/gephex--ifsspeedup--0.4/martin at gephex.org--2004/patch-log/patch-1
{arch}/gephex/gephex--main/gephex--main--0.4/gephex at gephex.org--2004/patch-log/patch-1814
{arch}/gephex/gephex--piksel04/gephex--piksel04--0.4/martin at gephex.org--2004/patch-log/base-0
{arch}/gephex/gephex--piksel04/gephex--piksel04--0.4/martin at gephex.org--2004/patch-log/patch-1
{arch}/gephex/gephex--pong/gephex--pong--0.4/martin at gephex.org--2004/patch-log/patch-1
{arch}/gephex/gephex--pong/gephex--pong--0.4/martin at gephex.org--2004/patch-log/patch-2
{arch}/gephex/gephex--pong/gephex--pong--0.4/martin at gephex.org--2004/patch-log/patch-3
{arch}/gephex/gephex--v4l2/gephex--v4l2--0.4/georg at gephex.org--2004-piksel/patch-log/patch-1
* modified files
--- orig/configure.ac
+++ mod/configure.ac
@@ -457,6 +457,7 @@
modules/src/pixelizemodule/Makefile
modules/src/planemodule/Makefile
modules/src/plasmamodule/Makefile
+modules/src/pongmodule/Makefile
modules/src/posnummodule/Makefile
modules/src/rangeconvertmodule/Makefile
modules/src/resultmodule/Makefile
--- orig/modules/src/Makefile.am
+++ mod/modules/src/Makefile.am
@@ -75,6 +75,7 @@
pixelizemodule \
planemodule \
plasmamodule \
+ pongmodule \
posnummodule \
rangeconvertmodule \
resultmodule \
--- orig/modules/src/capturemodule/Makefile.am
+++ mod/modules/src/capturemodule/Makefile.am
@@ -19,6 +19,8 @@
capturedriver.h \
v4lcapturedriver.cpp \
v4lcapturedriver.h \
+ v4l2capturedriver.cpp \
+ v4l2capturedriver.h \
v4l1.h \
v4l1.cpp \
videodev.h
--- orig/modules/src/capturemodule/capturemodule.cpp
+++ mod/modules/src/capturemodule/capturemodule.cpp
@@ -32,6 +32,7 @@
#if defined(OS_POSIX)
#include "v4lcapturedriver.h"
+#include "v4l2capturedriver.h"
#elif defined(OS_WIN32)
#include "dshowcapturedriver.h"
#endif
@@ -41,7 +42,7 @@
CaptureDriver* create_driver()
{
#if defined(OS_POSIX)
- return new V4LCaptureDriver();
+ return new V4L2CaptureDriver();
#elif defined(OS_WIN32)
return new DSHOWCaptureDriver();
#endif
@@ -168,7 +169,8 @@
int device_num = trim_int(inst->in_device->number, 0, MAX_DEVICES-1);
//check if device changed
- if (my->device_num != device_num)
+ if (my->device_num != device_num || my->drv == 0 ||
+ !my->drv->is_open())
{
try
{
--- orig/modules/src/ifsmodule/Makefile.am
+++ mod/modules/src/ifsmodule/Makefile.am
@@ -21,6 +21,7 @@
INCLUDES = -I at srcdir@/../../../engine/src/engine \
-I at srcdir@/../../../util/include \
+ -I at srcdir@/../../../util/src/misc \
-I at srcdir@/../../../types/src/framebuffertype \
-I at srcdir@/../../../types/src/ifstype \
-I at srcdir@/../../../types/src/numbertype
--- orig/modules/src/ifsmodule/ifsmodule.cpp
+++ mod/modules/src/ifsmodule/ifsmodule.cpp
@@ -26,6 +26,8 @@
#include <cstdlib>
#include <cassert>
+#include "crandgen.h"
+
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
@@ -41,7 +43,7 @@
typedef struct _MyInstance {
- uint_32* frameBuffer;
+ uint_8* frameBuffer;
int xSize;
int ySize;
} MyInstance, *MyInstancePtr;
@@ -90,15 +92,19 @@
};
};
+uint_32 val2ch(uint_8 val)
+{
+ uint8_t gw= val << 4;
+
+ return gw | (gw << 8) | (gw << 16);
+}
void update(void* instance)
{
InstancePtr inst = (InstancePtr) instance;
MyInstancePtr my = inst->my;
- int numDots = trim_int(inst->in_num_dot->number,1,10000000);
- int recursionDeep = trim_int(inst->in_num_rec->number,0,40);
- int amount = (int) (trim_double(inst->in_amount->number,0,1) * 255 + .5);
+ int numDots = trim_int(inst->in_num_dot->number,1,100000000);
uint_32 pal[256];
for (int i=0;i!=256;++i)
@@ -127,7 +133,7 @@
delete[] my->frameBuffer;
my->xSize=inst->out_out->xsize;
my->ySize=inst->out_out->ysize;
- my->frameBuffer= new uint_32[my->xSize*my->ySize];
+ my->frameBuffer= new uint_8[my->xSize*my->ySize];
}
@@ -138,36 +144,41 @@
&(my->frameBuffer[my->xSize*my->ySize]),
0);
- for (int i=0;i!=numDots;++i)
+ double x = 0.0;
+ double y = 0.0;
+
+ if (inst->in_ifs->numfun != 0)
+ for ( int i = 0; i != numDots; ++i )
{
- double x = 0.0;
- double y = 0.0;
+ // random chose in [0..numFuns-1]
+ int fun=static_cast<int>((rnd_lcg1()>>16)%inst->in_ifs->numfun);
+
+ double xn=inst->in_ifs->ifs[0][fun]*x + inst->in_ifs->ifs[1][fun]*y
+ + inst->in_ifs->ifs[4][fun];
- for (int j=0;j!=recursionDeep;++j)
- {
- // random chose in [0..numFuns-1]
- int fun=static_cast<int>((static_cast<double>(rand())/RAND_MAX)*inst->in_ifs->numfun);
- double xn=inst->in_ifs->ifs[0][fun]*x+inst->in_ifs->ifs[1][fun]*y+inst->in_ifs->ifs[4][fun];
- double yn=inst->in_ifs->ifs[2][fun]*x+inst->in_ifs->ifs[3][fun]*y+inst->in_ifs->ifs[5][fun];
- x=xn;y=yn;
- }
+ double yn=inst->in_ifs->ifs[2][fun]*x + inst->in_ifs->ifs[3][fun]*y
+ + inst->in_ifs->ifs[5][fun];
+ x=xn;y=yn;
+
// hm there needs to be some aspect correction
int x_pos=(int)((x+1.0)*my->xSize/2);
int y_pos=(int)((y+1.0)*my->ySize/2);
// clipping
if((x_pos>0)&&(x_pos<my->xSize)&&(y_pos>0)&&(y_pos<my->ySize))
- {
- // increase lightness
- my->frameBuffer[x_pos+y_pos*my->xSize]+=amount;
- }
+ {
+ // increase lightness
+ uint8_t* pix = my->frameBuffer+(x_pos+y_pos*my->xSize);
+ if ((*pix) != 15)
+ ++(*pix);
+ }
}
// copy in the output frame
// and replace intensities with palette entry
std::transform(my->frameBuffer,
&(my->frameBuffer[my->xSize*my->ySize]),
- inst->out_out->framebuffer,Val2Pal(pal));
+ inst->out_out->framebuffer,val2ch);
}
--- orig/modules/src/ifsmodule/ifsmodule.spec
+++ mod/modules/src/ifsmodule/ifsmodule.spec
@@ -22,7 +22,7 @@
hidden = true
widget_type = number_selector
lower_bound = 0
- higher_bound = 1024
+ higher_bound = 2048
default = 0
step_size = 1
help = Wenn x_size und y_size > 0, wird das bild auf xsize x ysize skaliert
@@ -37,7 +37,7 @@
hidden = true
widget_type = number_selector
lower_bound = 0
- higher_bound = 1024
+ higher_bound = 2048
default = 0
step_size = 1
help = Wenn x_size und y_size > 0, wird das bild auf xsize x ysize skaliert
@@ -55,21 +55,6 @@
help = try something 5000 - 100000
}
- amount
- {
- name = lightness
- type = typ_NumberType
- const = true
- strong_dependency = true
- hidden = true
- widget_type = number_selector
- lower_bound = 0
- higher_bound = 1
- step_size = 0.01
- default = 0.2
- help = lightness
- }
-
ifs
{
name = ifsin
@@ -78,19 +63,6 @@
strong_dependency = true
}
- num_rec
- {
- name = recdeep
- type = typ_NumberType
- const = true
- strong_dependency = true
- hidden = true
- widget_type = number_selector
- lower_bound = 0
- higher_bound = 255
- default = 5
- help = puh
- }
}
outputs
More information about the gephex-devel
mailing list