Skip to content

Add NV12 support (V4L2 needs work) - #133

Merged
kekyo merged 9 commits into
kekyo:developfrom
Muny:main
Apr 10, 2024
Merged

Add NV12 support (V4L2 needs work)#133
kekyo merged 9 commits into
kekyo:developfrom
Muny:main

Conversation

@Muny

@Muny Muny commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

Spurred by #132

This is my first attempt at adding NV12 support.

Tested on Win11 with .NET 8.0 with an Elgato CamLink 4K.

image

I couldn't quite figure out the code generator for the V4L2 native methods, so that will need support. I'm willing to help test that on x86_64 Linux once that's working.

To make it easier to support new frame formats in the future, it may be wise to make some use of a library like libyuv (just a suggestion, I know you want to keep the number of dependencies low)

@kekyo

kekyo commented Feb 7, 2024

Copy link
Copy Markdown
Owner

Excellent, thanks for the improvement!

The reason why NV12 symbols are not enumerated in V4L2 is because there are no hard-coded symbols in the following code in the Generator:

"V4L2_PIX_FMT_ABGR32",

We can update it by adding NV12 here and running the generator on each platform, but this will be painstaking as it needs to be supported on all platforms :)
Minor platforms may take some time to prepare, but I will take care of this task. It will probably take several days.

@kekyo

kekyo commented Apr 10, 2024

Copy link
Copy Markdown
Owner

@Muny I'm continuing these works, could you please rebase on current devel?

@kekyo

kekyo commented Apr 10, 2024

Copy link
Copy Markdown
Owner

@kakulukiya45t654645 We are working on this issue to update the V4L2 interoperability code, we also need to update and verify in the loongarch64 environment, but I do not have the environment. Could you please update it when we are ready?

What we need is to re-run the script dumper.sh, make the necessary adjustments to the build (perhaps a few lines need to be hacked to success compilation), and confirm that it works in a real environment (try with WinForms or Avalonia sample code).

@Muny
Muny changed the base branch from main to develop April 10, 2024 03:17
@kekyo
kekyo merged commit 1e60f4f into kekyo:develop Apr 10, 2024
@kekyo

kekyo commented Apr 10, 2024

Copy link
Copy Markdown
Owner

@Muny Sorry later thanks! I merged temporary and will create new branch for remaining works.

kekyo added a commit that referenced this pull request Apr 10, 2024
This was referenced Apr 10, 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

Successfully merging this pull request may close these issues.

2 participants