-
Notifications
You must be signed in to change notification settings - Fork 538
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
[rfc/wip] use v4l2 format info instead #420
base: develop
Are you sure you want to change the base?
[rfc/wip] use v4l2 format info instead #420
Conversation
484ac49
to
1b95bba
Compare
Interesting. |
8b5eb97
to
09f82ec
Compare
is this marked as draft because of the missing formats, or because it failed to build in the CI? |
Missing format info. |
09f82ec
to
7c57445
Compare
@umlaeute it seems I overwritten your commit :) Still a draft. Need to address those missing format info entries. |
There are 147 formats not currently supported by We can shrink supported formats array to contain only supported ones. |
7c57445
to
7cfb7b0
Compare
update: sort probed file paths to ensure a stable list is generated. |
4ea388f
to
48beb94
Compare
Since all known formats are defined, also removed ifdef-endif preprocessor directives from formats array. Signed-off-by: You-Sheng Yang <[email protected]>
71c4331
to
09e112a
Compare
Signed-off-by: You-Sheng Yang <[email protected]>
Signed-off-by: You-Sheng Yang <[email protected]>
In this change we expost formats array originally embedded in v4l2_format_info() as the formats we support. It follows: 1. v4l2l_format can now be purged, 2. while formats is also referenced in v4l2loopback-ctl, it has to adopt a few changes to enable compiling out of kernel, 3. v4l2_format_info() and v4l2_fill_pixfmt() shall be overridden always as it's to reference our own customized formats array. 4. v4l2_format_block_width()/v4l2_format_block_height() was defined in v4l2-commons.c statically, so there is no symbol collision problem, therefore no need to override. Signed-off-by: You-Sheng Yang <[email protected]>
Signed-off-by: You-Sheng Yang <[email protected]>
Update:
|
This is an attempt to remove
struct v4l2l_format
and use in kernelstruct v4l2_format_info
.While moving toward videobuf2 framework, I'd like to reuse more and more already in kernel APIs as possible. This PR is going to change:
how
formats
array is created:formats array used to carry fourcc, bpp info, etc., but it may not be synced with in kernel definitions and it's missing support for multiplane as well. While using videobuf2, we'd like to make sure there is no unexpected mismatch, especially in calculating buffer size. The formats array is now the one originally defined in
v4l2_format_info()
moved to the global namespace with additional entries added.format descriptions:
kernel can help filling format description/flags since v4.2. Use the in kernel helper so that we can have identical names as other V4L2 based drivers do.
supported formats set:
note that following formats from the original set have no corresponding
v4l2_format_info
entry:Note this PR is not yet complete due the the lack of many format info entries in the implementation of
v4l2_format_info
even in current v5.12 kernel source. To be done some time later.