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

[Request] BGR and GBR support #167

Open
RivenSkaye opened this issue Mar 20, 2024 · 1 comment
Open

[Request] BGR and GBR support #167

RivenSkaye opened this issue Mar 20, 2024 · 1 comment
Milestone

Comments

@RivenSkaye
Copy link

RivenSkaye commented Mar 20, 2024

Platform: Windows 10 (x86_64)
Toolchain: both msvc and gcc
rustc:

rustc 1.78.0-nightly (3cbb93223 2024-03-13)
binary: rustc
commit-hash: 3cbb93223f33024db464a4df27a13c7cce870173
commit-date: 2024-03-13
host: x86_64-pc-windows-msvc
release: 1.78.0-nightly
LLVM version: 18.1.0

Nokhwa version: 0.10.4 (latest on crates)

Currently Nokhwa only supports raw RGB, in that planar order too AFAICT. But some cameras only output in specific orders, as well as some video decoders (zimg, I think ffmpeg's raw format too?), and produce BGR or GBR for some reason. This is causing some... odd effects, to say the least.
Screenshare pushed out as dummy cam:

RawRGB on bgr format:
test-1

I'm also not sure if it's a known (or even related) issue with YUYV422, but uhhh:
test-04

And a clean frame from the same source:
AlterCam_Snapshot 2024-3-20 10-19-57-706

@RivenSkaye
Copy link
Author

RivenSkaye commented Mar 20, 2024

Pushing the data reversed for RGB provides the correct colors and vertical alignment, only horizontally it's still flipped. And that should just be a matter of strides
It entirely fixes it for BGR and I really shouldn't forget to cargo clean in between experimenting

@l1npengtul l1npengtul added this to the 0.11 milestone Oct 12, 2024
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

No branches or pull requests

2 participants