@@ -810,7 +810,7 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
810
810
811
811
/**
812
812
* @defgroup video_pixel_formats Video pixel formats
813
- * The @c | characters separate the pixels, and spaces separate the bytes.
813
+ * The '|' characters separate the pixels or logical blocks , and spaces separate the bytes.
814
814
* The uppercase letter represents the most significant bit.
815
815
* The lowercase letters represent the rest of the bits.
816
816
* @{
@@ -856,38 +856,48 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
856
856
*
857
857
* The full color information is spread over multiple pixels.
858
858
*
859
+ * When the format includes more than 8-bit per pixel, a strategy becomes needed to pack
860
+ * the bits over multiple bytes, as illustrated for each format.
861
+ *
862
+ * The number above the 'R', 'r', 'G', 'g', 'B', 'b' are hints about which pixel number the
863
+ * following bits belong to.
864
+ *
859
865
* @{
860
866
*/
861
867
862
868
/**
863
- * @verbatim
864
- * | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | ...
865
- * | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | ...
866
- * @endverbatim
869
+ * @code{.unparsed}
870
+ * 0 1 2 3
871
+ * | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | ...
872
+ * | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | ...
873
+ * @endcode
867
874
*/
868
875
#define VIDEO_PIX_FMT_BGGR8 VIDEO_FOURCC('B', 'A', '8', '1')
869
876
870
877
/**
871
- * @verbatim
872
- * | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | ...
873
- * | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | ...
874
- * @endverbatim
878
+ * @code{.unparsed}
879
+ * 0 1 2 3
880
+ * | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | ...
881
+ * | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | ...
882
+ * @endcode
875
883
*/
876
884
#define VIDEO_PIX_FMT_GBRG8 VIDEO_FOURCC('G', 'B', 'R', 'G')
877
885
878
886
/**
879
- * @verbatim
880
- * | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | ...
881
- * | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | ...
882
- * @endverbatim
887
+ * @code{.unparsed}
888
+ * 0 1 2 3
889
+ * | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | ...
890
+ * | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | ...
891
+ * @endcode
883
892
*/
884
893
#define VIDEO_PIX_FMT_GRBG8 VIDEO_FOURCC('G', 'R', 'B', 'G')
885
894
886
895
/**
887
- * @verbatim
888
- * | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | ...
889
- * | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | ...
890
- * @endverbatim
896
+ * @code{.unparsed}
897
+ * 0 1 2 3
898
+ * | Rrrrrrrr | Gggggggg | Rrrrrrrr | Gggggggg | ...
899
+ * | Gggggggg | Bbbbbbbb | Gggggggg | Bbbbbbbb | ...
900
+ * @endcode
891
901
*/
892
902
#define VIDEO_PIX_FMT_RGGB8 VIDEO_FOURCC('R', 'G', 'G', 'B')
893
903
@@ -905,30 +915,30 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
905
915
* 5 red bits [15:11], 6 green bits [10:5], 5 blue bits [4:0].
906
916
* This 16-bit integer is then packed in big endian format over two bytes:
907
917
*
908
- * @verbatim
918
+ * @code{.unparsed}
909
919
* 15.....8 7......0
910
920
* | RrrrrGgg gggBbbbb | ...
911
- * @endverbatim
921
+ * @endcode
912
922
*/
913
923
#define VIDEO_PIX_FMT_RGB565X VIDEO_FOURCC('R', 'G', 'B', 'R')
914
924
915
925
/**
916
926
* 5 red bits [15:11], 6 green bits [10:5], 5 blue bits [4:0].
917
927
* This 16-bit integer is then packed in little endian format over two bytes:
918
928
*
919
- * @verbatim
929
+ * @code{.unparsed}
920
930
* 7......0 15.....8
921
931
* | gggBbbbb RrrrrGgg | ...
922
- * @endverbatim
932
+ * @endcode
923
933
*/
924
934
#define VIDEO_PIX_FMT_RGB565 VIDEO_FOURCC('R', 'G', 'B', 'P')
925
935
926
936
/**
927
937
* The first byte is empty (X) for each pixel.
928
938
*
929
- * @verbatim
939
+ * @code{.unparsed}
930
940
* | Xxxxxxxx Rrrrrrrr Gggggggg Bbbbbbbb | ...
931
- * @endverbatim
941
+ * @endcode
932
942
*/
933
943
#define VIDEO_PIX_FMT_XRGB32 VIDEO_FOURCC('B', 'X', '2', '4')
934
944
@@ -946,18 +956,18 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
946
956
* There is either a missing channel per pixel, U or V.
947
957
* The value is to be averaged over 2 pixels to get the value of individual pixel.
948
958
*
949
- * @verbatim
959
+ * @code{.unparsed}
950
960
* | Yyyyyyyy Uuuuuuuu | Yyyyyyyy Vvvvvvvv | ...
951
- * @endverbatim
961
+ * @endcode
952
962
*/
953
963
#define VIDEO_PIX_FMT_YUYV VIDEO_FOURCC('Y', 'U', 'Y', 'V')
954
964
955
965
/**
956
966
* The first byte is empty (X) for each pixel.
957
967
*
958
- * @verbatim
968
+ * @code{.unparsed}
959
969
* | Xxxxxxxx Yyyyyyyy Uuuuuuuu Vvvvvvvv | ...
960
- * @endverbatim
970
+ * @endcode
961
971
*/
962
972
#define VIDEO_PIX_FMT_XYUV32 VIDEO_FOURCC('X', 'Y', 'U', 'V')
963
973
0 commit comments