@@ -97,11 +97,9 @@ const char BAYER_GRBG16[] = "bayer_grbg16";
97
97
// https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-packed-yuv.html#id1
98
98
// fourcc: UYVY
99
99
const char UYVY[] = " uyvy" ;
100
- [[deprecated(" use sensor_msgs::image_encodings::UYVY" )]]
101
100
const char YUV422[] = " yuv422" ; // deprecated
102
101
// fourcc: YUYV
103
102
const char YUYV[] = " yuyv" ;
104
- [[deprecated(" use sensor_msgs::image_encodings::YUYV" )]]
105
103
const char YUV422_YUY2[] = " yuv422_yuy2" ; // deprecated
106
104
107
105
// YUV 4:2:0 encodings with an 8-bit depth
@@ -122,16 +120,13 @@ const std::regex cv_type_regex("(8|16|32|64)(U|S|F)C([0-9]*)");
122
120
// Utility functions for inspecting an encoding string
123
121
static inline bool isColor (const std::string & encoding)
124
122
{
125
- #pragma GCC diagnostic push
126
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
127
123
return encoding == RGB8 || encoding == BGR8 ||
128
124
encoding == RGBA8 || encoding == BGRA8 ||
129
125
encoding == RGB16 || encoding == BGR16 ||
130
126
encoding == RGBA16 || encoding == BGRA16 ||
131
127
encoding == YUV422 || encoding == YUV422_YUY2 ||
132
128
encoding == UYVY || encoding == YUYV ||
133
129
encoding == NV21 || encoding == NV24;
134
- #pragma GCC diagnostic pop
135
130
}
136
131
137
132
static inline bool isMono (const std::string & encoding)
@@ -194,8 +189,6 @@ static inline int numChannels(const std::string & encoding)
194
189
return (m[3 ] == " " ) ? 1 : std::atoi (m[3 ].str ().c_str ());
195
190
}
196
191
197
- #pragma GCC diagnostic push
198
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
199
192
if (encoding == YUV422 ||
200
193
encoding == YUV422_YUY2 ||
201
194
encoding == UYVY ||
@@ -205,7 +198,6 @@ static inline int numChannels(const std::string & encoding)
205
198
{
206
199
return 2 ;
207
200
}
208
- #pragma GCC diagnostic pop
209
201
210
202
throw std::runtime_error (" Unknown encoding " + encoding);
211
203
return -1 ;
@@ -249,8 +241,6 @@ static inline int bitDepth(const std::string & encoding)
249
241
return std::atoi (m[0 ].str ().c_str ());
250
242
}
251
243
252
- #pragma GCC diagnostic push
253
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
254
244
if (encoding == YUV422 ||
255
245
encoding == YUV422_YUY2 ||
256
246
encoding == UYVY ||
@@ -260,7 +250,6 @@ static inline int bitDepth(const std::string & encoding)
260
250
{
261
251
return 8 ;
262
252
}
263
- #pragma GCC diagnostic pop
264
253
265
254
throw std::runtime_error (" Unknown encoding " + encoding);
266
255
return -1 ;
0 commit comments