[PD-cvs] externals/pidip/modules Makefile,1.7,1.8 Makefile.in,1.7,1.8 pdp_fcqt.c,1.1,1.2 pdp_fqt.c,1.2,1.3
sevyves at users.sourceforge.net
sevyves at users.sourceforge.net
Wed Oct 29 03:29:48 CET 2003
Update of /cvsroot/pure-data/externals/pidip/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv3203/pidip/modules
Modified Files:
Makefile Makefile.in pdp_fcqt.c pdp_fqt.c
Log Message:
The Real PiDiP 0.12.10
Index: Makefile
===================================================================
RCS file: /cvsroot/pure-data/externals/pidip/modules/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Makefile 24 Oct 2003 01:40:54 -0000 1.7
--- Makefile 29 Oct 2003 02:29:45 -0000 1.8
***************
*** 16,20 ****
pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \
pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \
! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o
all_modules: $(OBJECTS)
--- 16,21 ----
pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \
pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \
! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \
! pdp_xcanvas.o
all_modules: $(OBJECTS)
Index: Makefile.in
===================================================================
RCS file: /cvsroot/pure-data/externals/pidip/modules/Makefile.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Makefile.in 24 Oct 2003 01:41:12 -0000 1.7
--- Makefile.in 29 Oct 2003 02:29:45 -0000 1.8
***************
*** 15,19 ****
pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \
pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \
! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o
all_modules: $(OBJECTS)
--- 15,20 ----
pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \
pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \
! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \
! pdp_xcanvas.o
all_modules: $(OBJECTS)
Index: pdp_fcqt.c
===================================================================
RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_fcqt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pdp_fcqt.c 24 Oct 2003 01:34:23 -0000 1.1
--- pdp_fcqt.c 29 Oct 2003 02:29:45 -0000 1.2
***************
*** 274,284 ****
if (!(x->initialized)) return;
! length = quicktime_video_length(x->qt,0);
!
! frame = (frame >= length) ? length-1 : frame;
frame = (frame < 0) ? 0 : frame;
// post("pdp_fcqt : frame cold : setting video position to : %d", frame );
! quicktime_set_video_position(x->qt, frame, 0);
}
--- 274,282 ----
if (!(x->initialized)) return;
! frame = (frame >= x->x_length) ? x->x_length-1 : frame;
frame = (frame < 0) ? 0 : frame;
// post("pdp_fcqt : frame cold : setting video position to : %d", frame );
! x->x_current_frame = frame;
}
Index: pdp_fqt.c
===================================================================
RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_fqt.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pdp_fqt.c 24 Oct 2003 01:42:08 -0000 1.2
--- pdp_fqt.c 29 Oct 2003 02:29:45 -0000 1.3
***************
*** 50,60 ****
t_int x_framescount;
! unsigned char * qt_rows[3];
! unsigned char * qt_frame;
quicktime_t *qt;
int qt_cmodel;
! unsigned int** x_frames;
t_int* x_fsizes;
--- 50,60 ----
t_int x_framescount;
! unsigned char *qt_rows[3];
! unsigned char *qt_frame;
quicktime_t *qt;
int qt_cmodel;
! unsigned char **x_frames;
t_int* x_fsizes;
***************
*** 74,78 ****
if ( x->x_frames[fi] ) freebytes( x->x_frames[fi], x->x_fsizes[fi] );
}
! if ( x->x_frames ) freebytes( x->x_frames, x->x_length*sizeof(unsigned int*) );
x->initialized = false;
}
--- 74,78 ----
if ( x->x_frames[fi] ) freebytes( x->x_frames[fi], x->x_fsizes[fi] );
}
! if ( x->x_frames ) freebytes( x->x_frames, x->x_length*sizeof(unsigned char*) );
x->initialized = false;
}
***************
*** 129,133 ****
// read all frames
x->x_current_frame = 0;
! x->x_frames = (unsigned int**) getbytes( x->x_length*sizeof(unsigned int*) );
x->x_fsizes = (t_int*) getbytes( x->x_length*sizeof(t_int) );
x->x_fsize = 0;
--- 129,133 ----
// read all frames
x->x_current_frame = 0;
! x->x_frames = (unsigned char**) getbytes( x->x_length*sizeof(unsigned char*) );
x->x_fsizes = (t_int*) getbytes( x->x_length*sizeof(t_int) );
x->x_fsize = 0;
***************
*** 142,148 ****
for ( fi=0; fi<x->x_length; fi++ )
{
! x->x_fsizes[fi] = ((x->x_size)+(x->x_size>>1))<<1;
x->x_fsize += x->x_fsizes[fi];
! x->x_frames[fi] = (unsigned int*) getbytes( x->x_fsizes[fi] );
if ( !x->x_frames[fi] )
{
--- 142,148 ----
for ( fi=0; fi<x->x_length; fi++ )
{
! x->x_fsizes[fi] = (x->x_size)+((x->x_vwidth>>1)*(x->x_vheight>>1)<<1);
x->x_fsize += x->x_fsizes[fi];
! x->x_frames[fi] = (unsigned char*) getbytes( x->x_fsizes[fi] );
if ( !x->x_frames[fi] )
{
***************
*** 157,162 ****
switch(x->qt_cmodel){
case BC_YUV420P:
! pdp_llconv(x->qt_frame, RIF_YVU__P411_U8, x->x_frames[fi], RIF_YVU__P411_S16,
! x->x_vwidth, x->x_vheight);
break;
--- 157,161 ----
switch(x->qt_cmodel){
case BC_YUV420P:
! memcpy(x->x_frames[fi], x->qt_frame, x->x_fsizes[fi] );
break;
***************
*** 181,204 ****
if (!(x->initialized)){
! //post("pdp_fqt: no qt file opened");
return;
}
! object = pdp_packet_new_image_YCrCb( x->x_vwidth, x->x_vheight );
header = pdp_packet_header(object);
data = (short int *) pdp_packet_data(object);
! header->info.image.encoding = PDP_IMAGE_YV12;
header->info.image.width = x->x_vwidth;
header->info.image.height = x->x_vheight;
! x->x_current_frame = ( x->x_current_frame + 1 ) % x->x_length;
! // post( "pdp_fqt : current frame : %d", x->x_current_frame );
!
memcpy( data, x->x_frames[x->x_current_frame], x->x_fsizes[x->x_current_frame] );
if ( gettimeofday(&etime, NULL) == -1)
{
! post("pdp_fcqt : could not get time" );
}
if ( etime.tv_sec != x->x_cursec )
--- 180,202 ----
if (!(x->initialized)){
! post("pdp_fqt: no qt file opened");
return;
}
! object = pdp_packet_new_bitmap_yv12( x->x_vwidth, x->x_vheight );
header = pdp_packet_header(object);
data = (short int *) pdp_packet_data(object);
! header->info.image.encoding = PDP_BITMAP_YV12;
header->info.image.width = x->x_vwidth;
header->info.image.height = x->x_vheight;
! // post( "pdp_fqt : current frame : %d size : %d",
! // x->x_current_frame, x->x_fsizes[x->x_current_frame] );
memcpy( data, x->x_frames[x->x_current_frame], x->x_fsizes[x->x_current_frame] );
if ( gettimeofday(&etime, NULL) == -1)
{
! post("pdp_fqt : could not get time" );
}
if ( etime.tv_sec != x->x_cursec )
***************
*** 210,213 ****
--- 208,212 ----
x->x_framescount++;
+ x->x_current_frame = ( x->x_current_frame + 1 ) % x->x_length;
outlet_float(x->x_curframe, (float)x->x_current_frame);
pdp_packet_pass_if_valid(x->x_outlet0, &object);
***************
*** 217,233 ****
static void pdp_fqt_frame_cold(t_pdp_fqt *x, t_floatarg frameindex)
{
! int frame = (int)frameindex;
! int length;
!
if (!(x->initialized)) return;
! length = quicktime_video_length(x->qt,0);
!
! frame = (frame >= length) ? length-1 : frame;
frame = (frame < 0) ? 0 : frame;
// post("pdp_fqt : frame cold : setting video position to : %d", frame );
! quicktime_set_video_position(x->qt, frame, 0);
}
--- 216,229 ----
static void pdp_fqt_frame_cold(t_pdp_fqt *x, t_floatarg frameindex)
{
! int frame = (int)frameindex;
if (!(x->initialized)) return;
! frame = (frame >= x->x_length) ? x->x_length-1 : frame;
frame = (frame < 0) ? 0 : frame;
// post("pdp_fqt : frame cold : setting video position to : %d", frame );
! x->x_current_frame = frame;
!
}
More information about the Pd-cvs
mailing list