Open cwfitzgerald opened 11 months ago
I would suggest Yuv8Uint420
, as it emphasizes that it uses Y luma and uv chroma information, which are expressed as 8 bit unsigned integers (I guess) and uses 4:2:0 chroma subsampling
I think that sounds good, but we should also specify the number of planes.
Yuyv8Unorm_422
Uyvy8Unorm_422
Yuyv16Unorm_422
Uyvy16Unorm_422
Yuv8Unorm_420_2Plane = NV12
Yuv8Unorm_420_3Plane
Yuv16Unorm_420_2Plane
Yuv16Unorm_420_3Plane
.
.
.
Shouldn't 4:2:0 imply that there are two planes? 1 Plane full-width and height for luma, and 1 plane half-width and height for chroma, at least as far as I understand.
Shouldn't 4:2:0 imply that there are two planes?
No, there's NV12 (2 planes, Y and UV) and YUV420 (3 planes, Y, U and V), both are 4:2:0
btw, once NV12 is settled, I'll be preparing a PR to add P010 format (same as NV12 but 10-bit) and probably a few others, including 4:2:2 ones (P210) and possibly some 4:4:4
Vulkan has a bunch of formats, the scheme I posted above should work for all.
The scheme @teoxoy posted sounds good!
The NV12 name isn't a very wgpu-ey name. I don't know what exactly it should be, but some options:
R8gb8Planar420
P0r8Hp1gb8
R8Plane0gb8HalfPlane1
Suggestions welcome