File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
sensor_msgs/include/sensor_msgs Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,8 @@ const char YUYV[] = "yuyv";
103
103
const char YUV422_YUY2[] = " yuv422_yuy2" ; // deprecated
104
104
105
105
// YUV 4:2:0 encodings with an 8-bit depth
106
- // NV21: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-yuv-planar.html#nv12-nv21-nv12m-and-nv21m
106
+ // NV12 & NV21: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-yuv-planar.html#nv12-nv21-nv12m-and-nv21m
107
+ const char NV12[] = " nv12" ;
107
108
const char NV21[] = " nv21" ;
108
109
109
110
// YUV 4:4:4 encodings with 8-bit depth
@@ -126,7 +127,8 @@ static inline bool isColor(const std::string & encoding)
126
127
encoding == RGBA16 || encoding == BGRA16 ||
127
128
encoding == YUV422 || encoding == YUV422_YUY2 ||
128
129
encoding == UYVY || encoding == YUYV ||
129
- encoding == NV21 || encoding == NV24;
130
+ encoding == NV12 || encoding == NV21 ||
131
+ encoding == NV24;
130
132
}
131
133
132
134
static inline bool isMono (const std::string & encoding)
@@ -193,6 +195,7 @@ static inline int numChannels(const std::string & encoding)
193
195
encoding == YUV422_YUY2 ||
194
196
encoding == UYVY ||
195
197
encoding == YUYV ||
198
+ encoding == NV12 ||
196
199
encoding == NV21 ||
197
200
encoding == NV24)
198
201
{
@@ -245,6 +248,7 @@ static inline int bitDepth(const std::string & encoding)
245
248
encoding == YUV422_YUY2 ||
246
249
encoding == UYVY ||
247
250
encoding == YUYV ||
251
+ encoding == NV12 ||
248
252
encoding == NV21 ||
249
253
encoding == NV24)
250
254
{
You can’t perform that action at this time.
0 commit comments