View | Details | Raw Unified | Return to bug 69453
Collapse All | Expand All

(-)/usr/ports/multimedia/y4mscaler/files/patch-gcc34 (+158 lines)
Line 0 Link Here
1
--- graphics.H.orig	Thu Jul 22 20:50:55 2004
2
+++ graphics.H	Thu Jul 22 21:00:44 2004
3
@@ -338,7 +338,7 @@
4
   ysRatioPoint effective_sample_offset(Field field, Plane plane) const;
5
 
6
   const char *mode_to_string() const;
7
-  void log_info(enum log_level_t level, const char *prefix) const;
8
+  void log_info(const log_level_t level, const char *prefix) const;
9
 
10
   int parse_mode(const char *s);
11
 };
12
--- kernels.C.orig	Thu Jul 22 21:03:47 2004
13
+++ kernels.C	Thu Jul 22 21:03:59 2004
14
@@ -316,7 +316,7 @@
15
 
16
 ysKernelFactory::ysKernelFactory()
17
 {
18
-  _kernel_list = new (ysKernel*)[20];
19
+  _kernel_list = new ysKernel* [20];
20
   _count = 0;
21
   _kernel_list[_count++] = new BoxKernel;
22
   _kernel_list[_count++] = new LinearKernel;
23
--- scaler-matto.C.orig	Thu Jul 22 21:02:35 2004
24
+++ scaler-matto.C	Thu Jul 22 21:03:40 2004
25
@@ -334,7 +334,7 @@
26
   DBG("setup kernel cache\n");
27
   DBG("  scale %f  p0 %f\n", scale, p0);
28
 
29
-  KS = new (mattoScaler::kernelSet)[Dsize];
30
+  KS = new mattoScaler::kernelSet [Dsize];
31
   minspot = Smax + 1;
32
   maxspot = Smin - 1;
33
 
34
@@ -348,7 +348,7 @@
35
 
36
     int spot0 = (int)floor(Pq) - supp;
37
     int spot1 = (int)floor(Pq) + supp + 1;
38
-    KS[q].K = new (int)[spot1 - spot0 + 1];
39
+    KS[q].K = new int [spot1 - spot0 + 1];
40
     KS[q].offset = 0;
41
     KS[q].width = 0;
42
     int valsum = 0;
43
@@ -477,7 +477,7 @@
44
   } else {
45
     TframeX = Dx;
46
     TframeY = _Ymaxspot - _Yminspot + 1;
47
-    tempo = new (int)[TframeX * TframeY];
48
+    tempo = new int [TframeX * TframeY];
49
     scaling_function = &mattoScaler::scale_x_then_y;
50
   }
51
 
52
@@ -573,7 +573,7 @@
53
   } else {
54
     TframeY = Dy;
55
     TframeX = _Xmaxspot - _Xminspot + 1;
56
-    tempo = new (int)[TframeY * TframeX];
57
+    tempo = new int [TframeY * TframeX];
58
     scaling_function = &mattoScaler::scale_y_then_x;
59
   }
60
 }
61
--- ysScaling.C.orig	Thu Jul 22 21:04:17 2004
62
+++ ysScaling.C	Thu Jul 22 21:06:24 2004
63
@@ -246,7 +246,7 @@
64
     _scaler_count = 1;
65
   else
66
     _scaler_count = 3;
67
-  _scalers = new (ysScaler *)[_scaler_count];
68
+  _scalers = new ysScaler *[_scaler_count];
69
   for (int i = 0; i < _scaler_count; i++)
70
     _scalers[i] = _factory->new_scaler();
71
 
72
@@ -310,7 +310,7 @@
73
     _scaler_count = 1;
74
   else
75
     _scaler_count = 5;
76
-  _scalers = new (ysScaler *)[_scaler_count];
77
+  _scalers = new ysScaler *[_scaler_count];
78
   for (int i = 0; i < _scaler_count; i++)
79
     _scalers[i] = _factory->new_scaler();
80
 
81
@@ -464,8 +464,8 @@
82
   y4m_init_frame_info(&frameinfo);
83
 
84
   for (int i = 0; i < 3; i++) {
85
-    in_frame[i] = new (uint8_t)[source.stream().framedim(i).area()];
86
-    out_frame[i] = new (uint8_t)[target.stream().framedim(i).area()];
87
+    in_frame[i] = new uint8_t[source.stream().framedim(i).area()];
88
+    out_frame[i] = new uint8_t[target.stream().framedim(i).area()];
89
     if (_mono && (i != 0)) {
90
       memset(out_frame[i], 128,
91
 	     target.stream().framedim(i).area());
92
@@ -530,9 +530,9 @@
93
 
94
   y4m_init_frame_info(&frameinfo);
95
 
96
-  out_field_top[0] = new (uint8_t)[target.stream().fielddim(0).area()];
97
-  out_field_top[1] = new (uint8_t)[target.stream().fielddim(1).area()];
98
-  out_field_bottom[0] = new (uint8_t)[target.stream().fielddim(0).area()];
99
+  out_field_top[0] = new uint8_t[target.stream().fielddim(0).area()];
100
+  out_field_top[1] = new uint8_t[target.stream().fielddim(1).area()];
101
+  out_field_bottom[0] = new uint8_t[target.stream().fielddim(0).area()];
102
   memset(out_field_top[0],
103
 	 target.bgcolor().Y, target.stream().fielddim(0).area());
104
   memset(out_field_bottom[0],
105
@@ -543,9 +543,9 @@
106
     out_field_bottom[2] = out_field_top[1];
107
     memset(out_field_top[1], 128, target.stream().fielddim(1).area());
108
   } else {
109
-    out_field_top[2] = new (uint8_t)[target.stream().fielddim(2).area()];
110
-    out_field_bottom[1] = new (uint8_t)[target.stream().fielddim(1).area()];
111
-    out_field_bottom[2] = new (uint8_t)[target.stream().fielddim(2).area()];
112
+    out_field_top[2] = new uint8_t[target.stream().fielddim(2).area()];
113
+    out_field_bottom[1] = new uint8_t[target.stream().fielddim(1).area()];
114
+    out_field_bottom[2] = new uint8_t[target.stream().fielddim(2).area()];
115
     memset(out_field_top[1],
116
            target.bgcolor().Cb, target.stream().fielddim(1).area());
117
     memset(out_field_bottom[1],
118
@@ -556,14 +556,14 @@
119
            target.bgcolor().Cr, target.stream().fielddim(2).area());
120
   }
121
 
122
-  in_field_top = new (uint8_t *)[3];
123
-  in_field_bottom = new (uint8_t *)[3];
124
-  in_field_other = new (uint8_t *)[3];
125
+  in_field_top = new uint8_t *[3];
126
+  in_field_bottom = new uint8_t *[3];
127
+  in_field_other = new uint8_t *[3];
128
 
129
   for (int i = 0; i < 3; i++) {
130
-    in_field_top[i] = new (uint8_t)[source.stream().fielddim(i).area()];
131
-    in_field_bottom[i] = new (uint8_t)[source.stream().fielddim(i).area()];
132
-    in_field_other[i] = new (uint8_t)[source.stream().fielddim(i).area()];
133
+    in_field_top[i] = new uint8_t[source.stream().fielddim(i).area()];
134
+    in_field_bottom[i] = new uint8_t[source.stream().fielddim(i).area()];
135
+    in_field_other[i] = new uint8_t[source.stream().fielddim(i).area()];
136
   }
137
 
138
 
139
--- ysStreamInfo.H.orig	Thu Jul 22 21:01:43 2004
140
+++ ysStreamInfo.H	Thu Jul 22 21:02:25 2004
141
@@ -86,7 +86,7 @@
142
   /* basic methods */
143
   int read_stream_header(int fdin);
144
   int write_stream_header(int fdout);
145
-  void log_info(enum log_level_t level, const char *prefix) const;
146
+  void log_info(const log_level_t level, const char *prefix) const;
147
 
148
   /* derivative methods */
149
   int parse_dimensions(const char *s);
150
@@ -97,7 +97,7 @@
151
 const char *ilace_to_string(int i);
152
 
153
 
154
-inline void ysStreamInfo::log_info(enum log_level_t level,
155
+inline void ysStreamInfo::log_info(const log_level_t level,
156
 				   const char *prefix) const
157
 {
158
   y4m_log_stream_info(level, prefix, &_streaminfo);

Return to bug 69453