Update of /cvsroot/playerstage/code/player/server/drivers/blobfinder/cmvision
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10946/server/drivers/blobfinder/cmvision

Modified Files:
        .cvsignore P2CMV.cc 
Log Message:
applied Toby's patch to replace fixed-size arrays

Index: P2CMV.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blobfinder/cmvision/P2CMV.cc,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** P2CMV.cc    24 Oct 2007 22:32:03 -0000      1.30
--- P2CMV.cc    1 Nov 2007 22:16:17 -0000       1.31
***************
*** 152,155 ****
--- 152,156 ----
  
      player_blobfinder_data_t   mData;
+     unsigned int     allocated_blobs;
  
      player_devaddr_t mCameraAddr;
***************
*** 244,247 ****
--- 245,249 ----
    // clean our data
    memset(&mData,0,sizeof(mData));
+   allocated_blobs = 0;
    puts("done.");
  
***************
*** 323,326 ****
--- 325,329 ----
      }
  
+     
      mData.blobs_count = 0;
      for (int ch = 0; ch < CMV_MAX_COLORS; ++ch)
***************
*** 334,339 ****
        for (r = mVision->getRegions(ch); r != NULL; r = r->next)
        {
!         if (mData.blobs_count >= PLAYER_BLOBFINDER_MAX_BLOBS)
!           break;
  
          player_blobfinder_blob_t *blob;
--- 337,345 ----
        for (r = mVision->getRegions(ch); r != NULL; r = r->next)
        {
!         if (mData.blobs_count >= allocated_blobs)
!         {
!           mData.blobs = 
(player_blobfinder_blob_t*)realloc(mData.blobs,sizeof(mData.blobs[0])*mData.blobs_count+1);
!           allocated_blobs = mData.blobs_count+1;
!         }
  
          player_blobfinder_blob_t *blob;
***************
*** 458,462 ****
  #if HAVE_JPEGLIB_H 
        jpeg_decompress((unsigned char*)mTmp, 
!                               PLAYER_CAMERA_IMAGE_SIZE,
                          camera_data->image,
                          camera_data->image_count
--- 464,468 ----
  #if HAVE_JPEGLIB_H 
        jpeg_decompress((unsigned char*)mTmp, 
!                       mWidth*mHeight*3,
                          camera_data->image,
                          camera_data->image_count

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blobfinder/cmvision/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** .cvsignore  17 Sep 2007 02:18:52 -0000      1.3
--- .cvsignore  1 Nov 2007 22:16:17 -0000       1.4
***************
*** 4,5 ****
--- 4,7 ----
  *.la
  *.a
+ .libs
+ *.lo


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to