|
From: John M M. <jo...@us...> - 2002-09-07 07:32:51
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg
In directory usw-pr-cvs1:/tmp/cvs-serv4305/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg
Modified Files:
changesForSqueak.c
Log Message:
1.3 Added logic for clip tables for blue screening and for alpha channel
Index: changesForSqueak.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** changesForSqueak.c 1 Jun 2002 05:23:00 -0000 1.5
--- changesForSqueak.c 7 Sep 2002 07:32:48 -0000 1.6
***************
*** 352,354 ****
--- 352,386 ----
}
+ int mpeg3_get_transparent (mpeg3_t *file, int aStream) {
+ return file->vtrack[aStream]->video->alphaChannelValue;
+ }
+
+ int mpeg3_set_transparent (mpeg3_t *file, int aNumber, int aStream) {
+ file->vtrack[aStream]->video->alphaChannelValue = aNumber & 0xFF;
+ }
+
+ int mpeg3_set_ClipData (mpeg3_t *file, unsigned char *r, unsigned char *g, unsigned char *b,int aStream) {
+ long h;
+
+ memcpy(file->vtrack[aStream]->video->blueScreenMappingR,r,256);
+ memcpy(file->vtrack[aStream]->video->blueScreenMappingG,g,256);
+ memcpy(file->vtrack[aStream]->video->blueScreenMappingB,b,256);
+
+ for(h=-512;h<=512;h++) {
+ file->vtrack[aStream]->video->clipArray_Red[h+512] = r[CLIP(h)];
+ file->vtrack[aStream]->video->clipArray_Green[h+512] = g[CLIP(h)];
+ file->vtrack[aStream]->video->clipArray_Blue[h+512] = b[CLIP(h)];
+ file->vtrack[aStream]->video->clipArray16_Red[h+512]=(r[CLIP(h)] & 0xf8) << 7;
+ file->vtrack[aStream]->video->clipArray16_Green[h+512]=(g[CLIP(h)] & 0xf8) << 2;
+ file->vtrack[aStream]->video->clipArray16_Blue[h+512]=(b[CLIP(h)] & 0xf8) >> 3;
+ }
+
+ }
+
+ int mpeg3_get_ClipData (mpeg3_t *file, unsigned char *r, unsigned char *g, unsigned char *b,int aStream) {
+ memcpy(r,file->vtrack[aStream]->video->blueScreenMappingR,256);
+ memcpy(g,file->vtrack[aStream]->video->blueScreenMappingG,256);
+ memcpy(b,file->vtrack[aStream]->video->blueScreenMappingB,256);
+ }
+
|