File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -718,6 +718,46 @@ namespace klib::usb::video {
718718 };
719719
720720 static_assert (sizeof (video_mjpeg_frame<continuous_frame_intervals>) == 0x26 , " Video mjpeg frame descriptor size is wrong" );
721+
722+ /* *
723+ * @brief Video color format descriptor
724+ *
725+ */
726+ struct color_format {
727+ // header of the descriptor
728+ const detail::vs_header<color_format, detail::streaming_subtype::colorformat> header;
729+
730+ // color primaries
731+ // 0x00 = unspecified
732+ // 0x01 = BT.709, sRGB
733+ // 0x02 = BT.470-2 (M)
734+ // 0x03 = BT.470-2 (B, G)
735+ // 0x04 = BT.SMPTE 170M
736+ // 0x05 = BT.SMPTE 240M
737+ uint8_t bColorPrimaries;
738+
739+ // optoelectronic transfer characteristic of the source picture also called the gamma function
740+ // 0x00 = unspecified
741+ // 0x01 = BT.709, sRGB
742+ // 0x02 = BT.470-2 (M)
743+ // 0x03 = BT.470-2 (B, G)
744+ // 0x04 = BT.SMPTE 170M
745+ // 0x05 = BT.SMPTE 240M
746+ // 0x06 = Linear (V = LC)
747+ // 0x07 = sRGB
748+ uint8_t bTransferCharacteristics;
749+
750+ // Matrix used to compute luma and chroma values from the color primaries.
751+ // 0x00 = unspecified
752+ // 0x01 = BT.709,
753+ // 0x02 = FCC
754+ // 0x03 = BT.470-2 (B, G)
755+ // 0x04 = SMPTE 170M
756+ // 0x05 = SMPTE 240M
757+ uint8_t bMatrixCoefficients;
758+ };
759+
760+ static_assert (sizeof (color_format) == 0x06 , " Color format descriptor size is wrong" );
721761}
722762
723763namespace klib ::usb::video {
You can’t perform that action at this time.
0 commit comments