Commit fa74e95
authored
Enhance NV12 and NV21 Support in sensor_msgs::image_encodings (#264)
- Redefine numChannels for NV12 and NV21 from 2 to 1 to accurately reflect their planar YUV 4:2:0 format.
- Add isPlanar function to determine if an encoding is planar (e.g., NV12, NV21, NV24).
- Introduce getHeightScaling function to provide height scaling factors for planar encodings.
- Improve code consistency and add documentation for new utility functions.
Signed-off-by: Zhaoyuan Cheng <zycczyby@gmail.com>1 parent d236966 commit fa74e95
File tree
2 files changed
+45
-2
lines changed- sensor_msgs
- include/sensor_msgs
- test
2 files changed
+45
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
194 | 204 | | |
195 | 205 | | |
196 | 206 | | |
197 | 207 | | |
198 | | - | |
199 | | - | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
258 | 266 | | |
259 | 267 | | |
260 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
261 | 282 | | |
262 | 283 | | |
263 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
0 commit comments