-
Notifications
You must be signed in to change notification settings - Fork 7.4k
drivers: video: formats: add most of the raw formats #88138
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
drivers: video: formats: add most of the raw formats #88138
Conversation
include/zephyr/drivers/video.h
Outdated
* | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | ... | ||
* @endverbatim | ||
*/ | ||
#define VIDEO_PIX_FMT_Y8 VIDEO_FOURCC('G', 'R', 'E', 'Y') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems confused between : _PIX_FMT_Y8I and _PIX_FMT_GREY.
I think it should be:
#define VIDEO_PIX_FMT_GREY VIDEO_FOURCC('G', 'R', 'E', 'Y')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sometimes have difficulties making a difference between what Linux status-quo and what Linux tries to move towards. I was borrowing Y8 from media bus.
I added a hint in the documentation that this is nothing special, just following the FOURCC naming.
include/zephyr/drivers/video.h
Outdated
* | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | rrggrrgg | ... | ||
* @endverbatim | ||
*/ | ||
#define VIDEO_PIX_FMT_SBGGR10P VIDEO_FOURCC('p', 'R', 'A', 'A') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOURCC seems wrong, should be:
#define VIDEO_PIX_FMT_SBGGR10P VIDEO_FOURCC('p', 'B', 'A', 'A')
ref : https://elixir.bootlin.com/linux/v6.11.1/source/include/uapi/linux/videodev2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-#define VIDEO_PIX_FMT_SBGGR10P VIDEO_FOURCC('p', 'R', 'A', 'A')
+#define VIDEO_PIX_FMT_SBGGR10P VIDEO_FOURCC('p', 'B', 'A', 'A')
ok
Sorry about that, I think I copy-pasted the RGGB8 etc formats from Zephyr and looked at the documentation (in opposite order) for adding the FOURCC... I could have checked better... Thank you for the extra pair of vigilant eyes. |
Force-push:
|
@verbatim shows the leading comment '*' fence in the output. @code{.unparsed} allows extracting the text only. In some formats, the pixels are also not immediately packed into fixed number of bytes, like YUYV due to chroma subsampling. Disambiguate. Add numbers marks on top to help identify the individual pixels. Signed-off-by: Josuah Demangeon <[email protected]>
In addition to the 8-bit, introduce all the other bayer formats described by MIPI-CSI2 specification. The 8-bit bayer formats description is shortened to just 4 bytes like the other formats, to help intuition while comparing the different formats. Signed-off-by: Josuah Demangeon <[email protected]>
Add the grayscale formats in the same packing as defined by MIPI. The Linux V4L2 naming is preserved. Signed-off-by: Josuah Demangeon <[email protected]>
Sorry one more doc typo! Wrong bit endianness for RAW10's continuation byte: I took this opportunity to dust it a bit. |
Downstream:
This adds the raw formats in the same packing as defined by MIPI, with the naming that follows the Linux Kernel: