Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename NV12 format #4840

Open
cwfitzgerald opened this issue Dec 6, 2023 · 6 comments
Open

Rename NV12 format #4840

cwfitzgerald opened this issue Dec 6, 2023 · 6 comments
Labels
type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

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

@cwfitzgerald cwfitzgerald added the type: enhancement New feature or request label Dec 6, 2023
@valaphee
Copy link
Contributor

valaphee commented Dec 7, 2023

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

@teoxoy
Copy link
Member

teoxoy commented Dec 7, 2023

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
.
.
.

@valaphee
Copy link
Contributor

valaphee commented Dec 7, 2023

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.

@AdrianEddy
Copy link
Contributor

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

@teoxoy
Copy link
Member

teoxoy commented Dec 7, 2023

Vulkan has a bunch of formats, the scheme I posted above should work for all.

@cwfitzgerald
Copy link
Member Author

The scheme @teoxoy posted sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants