[cscore] Add BGRA support (#6365)

This commit is contained in:
Thad House
2024-02-12 23:42:17 -08:00
committed by GitHub
parent fb947fe998
commit 9ed0631ec9
17 changed files with 371 additions and 129 deletions

View File

@@ -21,7 +21,9 @@ public enum PixelFormat {
/** Grayscale, 16 bpp. */
kY16(6),
/** YUV 4:2:2, 16 bpp. */
kUYVY(7);
kUYVY(7),
/** BGRA 8-8-8-8. 32 bpp. */
kBGRA(8);
private final int value;

View File

@@ -55,6 +55,7 @@ enum WPI_PixelFormat {
WPI_PIXFMT_GRAY, // Grayscale, 8 bpp
WPI_PIXFMT_Y16, // Grayscale, 16 bpp
WPI_PIXFMT_UYVY, // YUV 4:2:2, 16 bpp
WPI_PIXFMT_BGRA, // BGRA 8-8-8-8-, 32 bpp
};
// Returns nonzero if the frame data was allocated/reallocated