Skip to content

fix(rendering): preserve chroma at odd frame edges - #2613

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/decode
Oct 18, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/decode

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

videos with an odd width or height lost the last row or column of colour data on the gpu path. the decoder copied the chroma planes using height / 2, the frame slicing did the same, and the gpu upload used width / 2, so for something like 17x9 the bottom and right edge got the wrong colour (a 1x1 frame came out green).

it now uses ffmpeg's own plane heights when copying and rounds up everywhere else, for both yuv420p and nv12, padded strides included. the cpu path already rounds up, so the two agree now. two tests cover it, one checks the copied planes and one compares gpu output against an even sized frame on llvmpipe. both fail on main.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Preserves edge colors in odd-sized YUV420P and NV12 frames.

  • Odd-sized YUV frames keep their edge color through GPU conversion.

No actionable issues found. Tests were reviewed but not run.

Reviews (1) · Last reviewed commit: "fix(rendering): preserve chroma at odd f..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit 3c9135f into CapSoftware:main Oct 18, 2026
43 of 45 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.

2 participants