Skip to content

waydroid-init: select P010 for HEVC Main10 hosts#1

Open
leohearts wants to merge 1 commit into
WayDroid-ATV:mainfrom
leohearts:auto-p010-for-main10
Open

waydroid-init: select P010 for HEVC Main10 hosts#1
leohearts wants to merge 1 commit into
WayDroid-ATV:mainfrom
leohearts:auto-p010-for-main10

Conversation

@leohearts

Copy link
Copy Markdown

Track VAAPI decoder profiles for HEVC Main10, VP9 Profile2 and AV1 Profile0 while building the host codec capability list.

When the normal ffmpeg Codec2 output would be YUV_420 and the host VAAPI decoder supports HEVC Main10, select YUV_420_P010 so Main10 streams can use a 10-bit 4:2:0 output format.

Compute the final pixel format before writing debug.ffmpeg-codec2.pixel_format. WaydroidSettings intentionally protects user-provided values from /data/misc/waydroid_settings, and it also keeps the first auto-generated value for a key. Writing YUV_420 first would prevent the later HEVC Main10 auto-detected P010 value from taking effect.

Test: m -j8 waydroid-init
Test: Booted WayDroid on an Intel VAAPI host and verified debug.ffmpeg-codec2.pixel_format=YUV_420_P010.
Test: Played a 2160p HEVC Main10 sample with Next Player; logcat showed c2.ffmpeg.hevc.decoder, VAAPI hwaccel and HAL_PIXEL_FORMAT_YCBCR_P010 output.

@leohearts

Copy link
Copy Markdown
Author

this contribution contains two(2) prs. the other is here:
WayDroid-ATV/android_external_stagefright-plugins#1

@leohearts

leohearts commented May 21, 2026

Copy link
Copy Markdown
Author

tests passed:
1080p hevc
4k hevc main10 (which was broken in latest release and fixed now)
test environment:
intel N95, fedora 44 in lxc on openwrt, waydroid upstream code main branch

image

this commit also enables av1 and vp9 support (if any), tests will be done later.
av1: significant frame drop
vp9: not working
h264: not working (why?)

fix under way.

Track selected VAAPI decoder profiles while building the host codec capability list:

- HEVC Main10
- VP9 Profile2
- AV1 Profile0

Expose the detected profile list through ro.waydroid.hwcodec_profiles for diagnostics and feature selection by other components.

Do not change debug.ffmpeg-codec2.pixel_format based on these profiles. That property is global to the ffmpeg Codec2 service, so setting it to YUV_420_P010 would also affect 8-bit codecs such as H.264, VP9 and AV1. P010 selection should happen in the media component for streams that actually produce P010 frames.

Test: m -j8 waydroid-init
Test: Booted WayDroid on an Intel VAAPI host and verified debug.ffmpeg-codec2.pixel_format remains YUV_420.

Co-authored-by: OpenAI Codex <codex@openai.com>
@leohearts leohearts force-pushed the auto-p010-for-main10 branch from a07d970 to 7eed485 Compare May 21, 2026 04:45
@leohearts

leohearts commented May 21, 2026

Copy link
Copy Markdown
Author

now confirmed working after this patch:
h264
hevc
hevcmain10 4k hdr
av1 (Youtube)
vp9 (Youtube)
not working:
av1 hdr10 dolby vision profile 5 (only in emby, NextPlayer works on the same file)

@leohearts

leohearts commented May 21, 2026

Copy link
Copy Markdown
Author

known issue: dolby vision (profile 5) not supported, or if you play it, has a wrong color space. working on a conversion.

@supechicken supechicken force-pushed the main branch 5 times, most recently from e1cdb4c to ab3efa9 Compare May 21, 2026 13:39
@leohearts

Copy link
Copy Markdown
Author

major works done. see WayDroid-ATV/android_external_stagefright-plugins#1

@leohearts leohearts marked this pull request as ready for review May 22, 2026 10:29
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

Successfully merging this pull request may close these issues.

1 participant