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

feat(video): reduce branching for faster video render task #89

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Oct 15, 2024

Description

Reduce branching in the video task, and replace some ternary operations with bitwise operations and arithmetic instead.

Motivation and Context

Helps keep the video task performant by reducing the amount of branches that stall the pipeline.

How has this been tested?

Running Super Mario Bros. and a few other roms and letting them auto-play for a little bit to capture the difference repeatably.

Super Mario Bros.

Before

Frames: 1655
FPS: 108.7
Frame Time: [min 2333 us, avg: 9201.9 us, max: 21461 us]

After

Frames: 1704
FPS: 111.3
Frame Time: [min 2427 us, avg: 8983.1 us, max: 20611 us]

Legend of Zelda Links Awakening DX

Before

Frames: 1918
FPS: 78.4
Frame Time: [min 2583 us, avg: 12751.7 us, max: 26477 us]

After

Frames: 1930
FPS: 79.9
Frame Time: [min 2629 us, avg: 12508.3 us, max: 21521 us]

Sonic The Hedeghog (Genesis)

Before

Frames: 1336
FPS: 49.0
Frame Time: [min 9633 us, avg: 20394.7 us, max: 41146 us]

After

Frames: 1336
FPS: 49.4
Frame Time: [min 9545 us, avg: 20255.3 us, max: 42334 us]

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

@finger563 finger563 added enhancement New feature or request video performance labels Oct 15, 2024
@finger563 finger563 self-assigned this Oct 15, 2024
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 2f2e219 into main Oct 15, 2024
3 checks passed
@finger563 finger563 deleted the feat/video-task-reduce-branch branch October 15, 2024 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant