Repository navigation
media: apple: prores: per-profile rate control - #840
Merged
Merged
Conversation
Every profile used one rate-control setting, so the engine drove all of them to the same frame size. Give each profile its own starting quantiser and byte budget, as macOS does: the 422 HQ budget for the picture size (fixed steps up to 2.36 Mpixel, then half a byte per pixel) scaled by the profile (Proxy 13/63, LT 13/28, 422 2/3, 4444 3/2, 4444 XQ 9/4), with a target of eight ninths and a maximum of nine eighths of the target. The engine takes both as bytes per macroblock after the frame and slice headers, in the two words the driver had filled with the picture size in macroblocks. At 1920x1080 this gives targets of 45, 102, 147, 220, 330 and 495 Mbit/s at 30 fps, Apple's published ProRes data rates. KUnit checks the budgets and descriptor words for 1080p and 2160p in every profile. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
notmysegv
pushed a commit
to notmysegv/linux
that referenced
this pull request
Nov 4, 2026
…tion/aurora Bring integration/aurora up to aurora-wip e1524e6, the source of 7.3.0-aurora-fleet14l, promoted on all four machines on 2026-11-02. The range also covers the fleet14i, fleet14j and fleet14k sources (a8fa302, d67eece, ce900d1). It adds aurora-silicon#822, aurora-silicon#823, aurora-silicon#824, aurora-silicon#827, aurora-silicon#829, aurora-silicon#834, aurora-silicon#835, aurora-silicon#836, aurora-silicon#838, aurora-silicon#840 and aurora-silicon#839. No conflicts. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ProRes per-profile rate control (Neo)
Every profile used one rate-control setting, so the engine drove them all to the same frame size (about 125 KB at 1080p). This gives each profile its own starting quantiser and byte budget as macOS does: the 422 HQ budget for the picture size, scaled by profile (Proxy 13/63, LT 13/28, 422 2/3, HQ 1, 4444 3/2, 4444 XQ 9/4), with a target of 8/9 and a maximum of 9/8 of the target, given to the engine as Q3 bytes per macroblock after the header and slice table. At 1080p30 the targets are 45, 102, 147, 220, 330 and 495 Mbit/s, Apple's published rates. KUnit checks the budgets and both descriptor words for 1080p and 2160p in every profile.
Tested on the Neo, same input on both OSes (FFmpeg testsrc2, 8 frames cycled)
Linux: 7.3.0-aurora-fleet14k-codec3, boot 9633c867. macOS 26.6.2, VideoToolbox hardware encoder, same boot session.
Frame sizes match macOS to within its 7 to 8 bytes of trailing padding, in all six profiles and at 2160p too (for example 4K HQ 1,310,095 vs 1,310,100).
At 2160p Linux runs at about 60% of macOS (422: 260-267 vs 420-425 fps; 4444: 170-173 vs 282 fps). macOS raises the ProRes SoC performance vote (PRORES-SOC-VMAX) while encoding; that vote is a separate follow-up, like the AVE performance request.
Same boot: v4l2-compliance 48/48, no DART faults, H.264 163.9 fps / HEVC 155.1 fps (no regression), KUnit 9/9, W=1 clean.
🤖 Generated with Claude Code