Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add fix that strips unexpected padding for NV12 frames #556

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

hexbabe
Copy link
Contributor

@hexbabe hexbabe commented Feb 28, 2024

On macOS Sonoma, using the Logitech C922 Pro webcam, NV12 frames seem to come with a default min amount of padding for smaller resolutions e.g. 160x90. This would result in smaller resolution NV12 images outputting like this:

videoframe_16623 my upside down forehead

This change crops the data—making sure it is packed tightly—so that the decodeNV12 precondition can be preserved.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.63%. Comparing base (68df5b3) to head (7bc72ac).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #556   +/-   ##
=======================================
  Coverage   58.63%   58.63%           
=======================================
  Files          63       63           
  Lines        3885     3885           
=======================================
  Hits         2278     2278           
  Misses       1473     1473           
  Partials      134      134           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hexbabe hexbabe changed the title Add fix that strips padding for NV12 frames Add fix that strips unexpected padding for NV12 frames Feb 28, 2024
Copy link
Member

@edaniels edaniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for this fix!

@edaniels edaniels merged commit a9046e6 into pion:master Mar 1, 2024
8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants