mirror of
https://github.com/Droid-VM/crosvm.git
synced 2026-11-17 06:58:03 +00:00
A 4096x2160 hardware decoder holds about 500 MB of the host's memory in its own output buffers, which no guest memory limit bounds: macOS's lock-screen video opened a new 4K session every few seconds without closing the last, and five took 2.5 GB in half a minute until the host's low-memory killer ended the VM. The hardware decoders of the process now share a budget of two 4K pictures (CROSVM_MEDIA_DECODE_MAX_MPX megapixels); a session past it is refused at STREAMON(OUTPUT) with EBUSY, which a guest takes as a decoder it cannot have. A guest's timestamps are its own (macOS's VideoToolbox host sends frame numbers a second apart), so a codec setting its clocks by them read 1 fps and a 4K Main10 stream came out at ~25 fps: KEY_PRIORITY 0 at the highest KEY_OPERATING_RATE, and configure retried without the two keys where a component refuses them. KEY_MAX_INPUT_SIZE is capped at 2 MiB (23 x 6.3 MiB of input dma-buf per 4K HEVC session before); a larger access unit goes in over several buffers as before. |
History
|
|
|---|---|---|
| .. | ||
| src | ||
| Android.bp | ||
| Cargo.toml | ||