[Wavelet-commit] Wavelet ColorBuffer.cc, 1.9, 1.10 ColorImage.cc, 1.11, 1.12 ColorVideo.cc, 1.16, 1
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2009-04-13 02:15:29
|
Update of /cvsroot/wavelet/Wavelet In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15459 Modified Files: ColorBuffer.cc ColorImage.cc ColorVideo.cc Log Message: Fixed critical bug in ColorImage, ColorVideo, ColorBuffer: the size (rows * cols) was not always initialised properly, this could lead to crashes in some cases. Index: ColorBuffer.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/ColorBuffer.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ColorBuffer.cc 7 Aug 2007 17:00:58 -0000 1.9 --- ColorBuffer.cc 13 Apr 2009 01:35:47 -0000 1.10 *************** *** 28,33 **** ! ColorBuffer::ColorBuffer (int colors, clrmodel cmodel) { m_colors = 0; m_images = NULL; --- 28,34 ---- ! ColorBuffer::ColorBuffer (int xysize, int colors, clrmodel cmodel) { + this->m_xysize = xysize; m_colors = 0; m_images = NULL; Index: ColorImage.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/ColorImage.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ColorImage.cc 12 Apr 2009 16:57:53 -0000 1.11 --- ColorImage.cc 13 Apr 2009 01:35:47 -0000 1.12 *************** *** 50,54 **** ColorImage::ColorImage (int colors, clrmodel cmodel, Image **images, bool references, bool isMine) ! : ColorBuffer (colors, cmodel) { init (images, references, isMine); --- 50,54 ---- ColorImage::ColorImage (int colors, clrmodel cmodel, Image **images, bool references, bool isMine) ! : ColorBuffer (images == NULL? 0: images[0]->size (), colors, cmodel) { init (images, references, isMine); *************** *** 56,60 **** ColorImage::ColorImage (int rows, int cols, int colors, clrmodel cmodel) ! : ColorBuffer (colors, cmodel) { for (int i = 0; i < m_colors; i++) --- 56,60 ---- ColorImage::ColorImage (int rows, int cols, int colors, clrmodel cmodel) ! : ColorBuffer (rows * cols, colors, cmodel) { for (int i = 0; i < m_colors; i++) Index: ColorVideo.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/ColorVideo.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ColorVideo.cc 7 Aug 2007 17:00:58 -0000 1.16 --- ColorVideo.cc 13 Apr 2009 01:35:47 -0000 1.17 *************** *** 30,34 **** ColorVideo::ColorVideo (const ColorVideo &cv) ! : ColorBuffer (cv.colors (), cv.colormodel ()) { m_arrays = NULL; --- 30,34 ---- ColorVideo::ColorVideo (const ColorVideo &cv) ! : ColorBuffer (cv.rows () * cv.cols (), cv.colors (), cv.colormodel ()) { m_arrays = NULL; *************** *** 50,54 **** ColorVideo::ColorVideo (int colors, clrmodel colormodel, int rows, int cols, ! int frames) : ColorBuffer (colors, colormodel) { m_frameRate = 0; --- 50,54 ---- ColorVideo::ColorVideo (int colors, clrmodel colormodel, int rows, int cols, ! int frames) : ColorBuffer (rows * cols, colors, colormodel) { m_frameRate = 0; *************** *** 58,62 **** } ! ColorVideo::ColorVideo (void) : ColorBuffer (0, cm_unknown) { m_frameRate = 0; --- 58,62 ---- } ! ColorVideo::ColorVideo (void) : ColorBuffer (0, 0, cm_unknown) { m_frameRate = 0; |