Package: gem / 1:0.93.3-7

avoid_imagecopy.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
Author: IOhannes m zmölnig
Description: avoid 'bogus pointer' warnings in [pix_rtx]
Applied-Upstream: 0.93.4
--- gem.orig/src/Pixes/pix_rtx.cpp
+++ gem/src/Pixes/pix_rtx.cpp
@@ -20,7 +20,7 @@
 // pix_rtx
 //
 // this the RealTimeX - transformator, that does  a kind of swapping the time and the x axis
-// of a video (or any series of pictures) ON THE FLY 
+// of a video (or any series of pictures) ON THE FLY
 //
 // for more information, on how this works, look at
 // http://umlaeute.mur.at/rtx
@@ -49,7 +49,7 @@
 //
 /////////////////////////////////////////////////////////
 pix_rtx :: pix_rtx()
-{ 
+{
    imageStruct image;
 
    image.xsize  = image.ysize = 64;
@@ -78,7 +78,7 @@
 // CreateBuffer
 //
 /////////////////////////////////////////////////////////
-void pix_rtx :: create_buffer(imageStruct image)
+void pix_rtx :: create_buffer(const imageStruct&image)
 {
    size_t dataSize = image.xsize * image.xsize * image.ysize * image.csize * sizeof(unsigned char); // only 1 channel !!, to keep data-size handy
 
@@ -127,7 +127,7 @@
    size_t pixsize = image.ysize * image.xsize;
    int cols=image.xsize, c=0, c1=0;
    int rows=image.ysize, r=0;
-   
+
    unsigned char *pixels = image.data;
    unsigned char *wp;			// write pointer
    unsigned char *rp;			// read pointer
@@ -136,7 +136,7 @@
    if (!set_buffer) {
      wp = buffer.data + pixsize * buffer.csize * bufcount;
      memcpy(wp, pixels, pixsize * buffer.csize * sizeof(unsigned char));
-   } else { 
+   } else {
      // fill the buffer with the current frame
      // this might be useful to prevent the black screen in the beginning.
      // "set" message
@@ -158,7 +158,7 @@
        while (r < rows) {
 	 rp = buffer.data + buffer.csize * (buffer.xsize * buffer.ysize * c + buffer.xsize * r + (bufcount - c + cols) % cols );
 	 pixels = image.data + image.csize * (image.xsize * r + cols - c1);
-	 
+
 	 *pixels   = *rp;
 	 r++;
        }
@@ -172,7 +172,7 @@
        while (r < rows) {
 	 rp = buffer.data + buffer.csize * (buffer.xsize * buffer.ysize * c + buffer.xsize * r + (bufcount - c + cols) % cols );
 	 pixels = image.data + image.csize * (image.xsize * r + cols - c1);
-	 
+
 	 pixels[0]  = rp[0];
 	 pixels[1]  = rp[1];
 	 r++;
@@ -187,12 +187,12 @@
        while (r < rows) {
 	 rp = buffer.data + buffer.csize * (buffer.xsize * buffer.ysize * c + buffer.xsize * r + (bufcount - c + cols) % cols );
 	 pixels = image.data + image.csize * (image.xsize * r + cols - c1);
-	 
+
 	 pixels[chRed]   = rp[chRed];
 	 pixels[chBlue]  = rp[chBlue];
 	 pixels[chGreen] = rp[chGreen];
 	 pixels[chAlpha] = rp[chAlpha];
-	 
+
 	 r++;
        }
        r=0;
--- gem.orig/src/Pixes/pix_rtx.h
+++ gem/src/Pixes/pix_rtx.h
@@ -3,7 +3,7 @@
 GEM - Graphics Environment for Multimedia
 
   Change rtx-transform a series of images (eg: a video or a film)
-  
+
     Copyright (c) 1997-1999 Mark Danks. mark@danks.org
     Copyright (c) Günther Geiger. geiger@epy.co.at
     Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
@@ -14,15 +14,15 @@
 
   rtx-transform a series of pictures (especially movies, videos,...)
   you have to use pix_film instead of pix_movie to make this work with prerecorded videos
-  
+
   2803:forum::für::umläute:2000
   0409:forum::für::umläute:2000
   1801:forum::für::umläute:2001  added the second mode
   IOhannes m zmoelnig
   mailto:zmoelnig@iem.kug.ac.at
-	
+
   this code is published under the Gnu GeneralPublicLicense that should be distributed with gem & pd
-	  
+
 -----------------------------------------------------------------*/
 
 #ifndef _INCLUDE__GEM_PIXES_PIX_RTX_H_
@@ -37,47 +37,47 @@
 
   KEYWORDS
   pix
-  
+
 	DESCRIPTION
-	
+
 -----------------------------------------------------------------*/
 class GEM_EXTERN pix_rtx : public GemPixObj
 {
     CPPEXTERN_HEADER(pix_rtx, GemPixObj);
-		
+
 public:
-	
+
 	//////////
 	// Constructor
 	pix_rtx();
-	
+
 protected:
-	
+
 	//////////
 	// Destructor
 	virtual ~pix_rtx();
-	
+
 	//////////
 	// create a buffer that fits to the current imageSize
-	virtual void   create_buffer(imageStruct image);
-	
+	virtual void   create_buffer(const imageStruct&image);
+
 	//////////
 	// delete the buffer
 	virtual void   delete_buffer();
-	
+
 	//////////
 	// clear the buffer
 	virtual void   clear_buffer();
-	
+
 	//////////
 	// Do the processing
 	virtual void 	processImage(imageStruct &image);
-	
+
 	//////////
 	// the huge double buffer and other tx-formation
 	imageStruct    buffer;
 	int            bufcount;    // where to read/write
-	
+
 	//////////
 	// the rtx-mode
 	bool			 mode;
@@ -85,13 +85,13 @@
 	//////////
 	// fill buffer with current pixbuff ?
 	bool                     set_buffer;
-	
+
 	//////////
 	// the methods
 	static void modeMessCallback(void *data, t_floatarg newmode);
 	static void clearMessCallback(void *data);
 	static void setMessCallback(void *data);
-	
+
 };
 
 #endif	// for header file