Skip to content

perf(preview): decode 8-bit H.264 in software on macOS - #1384

Merged
EtienneLescot merged 1 commit into
mainfrom
pilot/fix-585
Oct 24, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
pilot/fix-585

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Refs #585

On macOS, the live preview now decodes 8-bit H.264 in software, like export already does. HEVC and 10-bit stay on VideoToolbox.

Measured (Mac mini M1, from #585)

4K60 preview VideoToolbox Software
Dropped frames / 1200 50 1
Seek 254 ms 152 ms

At 120 fps in 4K, VideoToolbox can't keep up. The cost: 0.3 to 0.65 of a core and 3 to 5x more memory.

Not covered

  • Battery impact: not measured.
  • Scrubbing feel: the maintainer checks it by hand on the Mac before merging.
  • No unit test: the backend choice sits inline in the FFI open_with path, not in a pure function. OPENSCREEN_MAC_DECODE=videotoolbox still forces the old path.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • H.264 8-bit YUV420P videos now use software decoding in previews as well as exports, providing consistent decoder selection across both workflows. Other video formats continue to use the existing default, and explicit decoder preferences remain respected.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c10a5f41-388b-41f7-9234-33db8e929834
Commits

Reviewing files that changed from the base of the PR and between da6496e and 1762cb5.

Files selected for processing: 1
  • crates/compositor/src/pipeline_macos.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Walkthrough

The macOS decoder now selects software decoding by default for H.264 8-bit YUV420P streams in both preview and export. Explicit environment-variable overrides and the baseline-profile rule retain precedence.

Changes: macOS Decoder Selection

Layer / File(s) Summary
Decoder selection rule
crates/compositor/src/pipeline_macos.rs
The DecodeIntent documentation now describes a shared macOS backend for preview and export. Automatic software decoding now applies to H.264 8-bit YUV420P for both intents. Explicit overrides and the baseline-profile rule retain precedence; other eligible streams default to VideoToolbox.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: songoao25

Merge Risk: Minimal · up to 1762c

No actionable merge-blocking issue is established.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the change, performance measurements, limitations, and testing context. However, it does not follow the required template and omits the Summary, Type of change, Release impact… Update the description to include every required template section. Add the appropriate checkbox selections, retain the issue reference as "Refs #585", and place the testing details in the Testing section. Mark Screenshots / video as not app…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: using software decoding for 8-bit H.264 preview on macOS. It is concise and specific.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, performance measurements, limitations, and testing context. However, it does not follow the required template and omits the Summary, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections.

Resolution

Update the description to include every required template section. Add the appropriate checkbox selections, retain the issue reference as "Refs #585", and place the testing details in the Testing section. Mark Screenshots / video as not applicable if no visual change exists.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.99.0)

Clippy execution failed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot
EtienneLescot merged commit 6388ae7 into main Oct 24, 2026
21 checks passed
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