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
|
$NetBSD: patch-ax,v 1.2 2008/09/18 13:23:03 joerg Exp $
--- avidemux/ADM_videoFilter/ADM_vidParticle.cpp.orig 2008-02-19 09:16:00.000000000 +0100
+++ avidemux/ADM_videoFilter/ADM_vidParticle.cpp 2008-02-19 09:21:40.000000000 +0100
@@ -797,8 +797,13 @@
if (my_outImage)
{
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ uint32_t px = static_cast <uint32_t> (rintf (my_particle.centroidX));
+ uint32_t py = static_cast <uint32_t> (rintf (my_particle.centroidY));
+#else
uint32_t px = static_cast <uint32_t> (nearbyintf (my_particle.centroidX));
uint32_t py = static_cast <uint32_t> (nearbyintf (my_particle.centroidY));
+#endif
if (validPixel (px, py))
outPixel (px, py) = 255;
else
@@ -1157,8 +1162,13 @@
char & pixel_char (vector <string> & grid, int16_t xbase, int16_t ybase,
float cX, float cY, float dX, float dY)
{
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ uint16_t x = static_cast <uint16_t> (rintf (cX + dX));
+ uint16_t y = static_cast <uint16_t> (rintf (cY + dY));
+#else
uint16_t x = static_cast <uint16_t> (nearbyintf (cX + dX));
uint16_t y = static_cast <uint16_t> (nearbyintf (cY + dY));
+#endif
return grid [y - ybase][x - xbase];
}
@@ -1319,8 +1329,13 @@
++plit;
}
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ uint32_t px = static_cast <uint32_t> (rintf (my_particle.centroidX));
+ uint32_t py = static_cast <uint32_t> (rintf (my_particle.centroidY));
+#else
uint32_t px = static_cast <uint32_t> (nearbyintf (my_particle.centroidX));
uint32_t py = static_cast <uint32_t> (nearbyintf (my_particle.centroidY));
+#endif
char & ch = grid [py - ybase][px - xbase];
if (ch == 'x')
ch = 'X';
|