[Sumover-dev] [svn commit] r4189 - vic/branches/cc/video
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed Jun 25 19:52:48 BST 2008
Author: soohyunc
Date: Wed Jun 25 19:52:47 2008
New Revision: 4189
Modified:
vic/branches/cc/video/grabber-still.cpp
Log:
(this commit made by Piers O'Hanlon)
Fixed colour decoding - it wasn't copying enough of the frame into the encode
buffer. The framesize_ member variable is only the number of pixels - not the
number of bytes - the number of bytes is 1.5*framesize_
Modified: vic/branches/cc/video/grabber-still.cpp
==============================================================================
--- vic/branches/cc/video/grabber-still.cpp (original)
+++ vic/branches/cc/video/grabber-still.cpp Wed Jun 25 19:52:47 2008
@@ -60,7 +60,8 @@
#include "transmitter.h"
#include "module.h"
-#define DEBUG 1
+//#define DEBUG 1
+#undef DEBUG
class StillGrabber : public Grabber {
public:
@@ -336,7 +337,11 @@
#endif
int frc=0; //SV-XXX: gcc4 warns for initialisation
- memcpy(frame_, still_device.frame_ + num_frame_, framesize_);
+ // "framesize_" is just the number of pixels,
+ // so the number of bytes becomes "3 * 2 * framesize_"
+ memcpy (frame_,
+ still_device.frame_ + num_frame_,
+ framesize_ + (framesize_ >> 1));
if ((num_frame_ += framesize_) < still_device.len_) {
} else {
More information about the Sumover-dev
mailing list