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

Handling 10-bit HEVC/VP9/AV1 videos? #21

Open
nyanmisaka opened this issue Apr 25, 2024 · 5 comments
Open

Handling 10-bit HEVC/VP9/AV1 videos? #21

nyanmisaka opened this issue Apr 25, 2024 · 5 comments

Comments

@nyanmisaka
Copy link

Some self-hosted media servers and Youtube/Bilibili can query 10-bit video decode support via HTMLMediaElement: canPlayType() reported by the browser and play 10-bit/HDR directly in Chromium.

If I understand correctly, the current libv4l-rkmpp code base only handles 8-bit video. For 10-bit 4:2:0 videos, the MPP decoded NV15 memory will be displayed as NV12 (corrupted image for sure) since NV15 is a compact version of P010, which is not supported by EGL and Mesa.

IMO the NV15 can be converted to P010 with RGA3 before importing into EGL to avoid loss of precision resulting in color banding, or fallback to using NV12 to ensure compatibility.

So, are there any plans to improve support for 10-bit video (HEVC Main10, VP9 Profile 2 and AV1 Main)? Thanks in advance.

image

@JeffyCN
Copy link
Owner

JeffyCN commented Apr 25, 2024

there's no plane to use rga now, it has too many limits and changes all the time, so i would rather try the gpu(mali ddk supports those formats).

@nyanmisaka
Copy link
Author

there's no plane to use rga now, it has too many limits and changes all the time, so i would rather try the gpu(mali ddk supports those formats).

Either way is fine for me. Could you add support for V4L2_PIX_FMT_NV15 and make use of it in libmali EGL (mali ddk)? Mesa (collabora panthor) may also provide support for NV15 in the future, but that is another story.

@JeffyCN
Copy link
Owner

JeffyCN commented Apr 25, 2024

i'll try to do it next week, maybe try to add rga(using legacy api) as well.

@JeffyCN
Copy link
Owner

JeffyCN commented Apr 25, 2024

btw, could you provide some sample videos for verifying?

@nyanmisaka
Copy link
Author

nyanmisaka commented Apr 25, 2024

https://kodi.wiki/view/Samples#4K_(UltraHD)_Formats
You can grab some from here, which requires you to have access to google drive or mega.nz. Or use some random promos made for TV, which are usually 10-bit (with or without HDR).

I don't know how rockchip handles HDR on Linux. So playing it without tonemapping may result in pale colors. AFAIK Chromium is able to handle this via GPU on some platforms. There is no such concern for 10-bit SDR videos.

@nyanmisaka nyanmisaka changed the title Handing 10-bit HEVC/VP9/AV1 videos? Handling 10-bit HEVC/VP9/AV1 videos? Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants