New raw bayer format definitions, fixes
Subsystems (2)
v3 cover New raw bayer format definitions, fixes
Hi all,
This is a third version of the new bayer format patchset. The second version of the set may be found here:
<URL:http://www.spinics.net/lists/linux-media/msg101498.html>
These patches fix and add new raw bayer format definitions. 12-bit packed V4L2 format definition is added as well as definitions of 14-bit media bus codes as well as unpacked and packed V4L2 formats.
No driver uses them right now, yet they're common formats needed by newer devices that use higher bit depths so adding them would make sense.
16-bit pixel formats are added as well, and the 16-bit formats are now expected to have 16 bits of data. 8-bit format documentation is unified.
Since v2:
- Convert documentation changes to ReST
- Use figures and word numerals consistently (3rd patch)
- Change "colour component" -> sample. This makes more sense. (3rd patch as well as the patches adding new formats)
- Unify the documentation of 8 bits per sample formats
- 16 bpp formats now have 16 significant bits. The drivers that use them do not depend on the optionally lower bit depth allowed by the old definition (10th patch)
Despite these changes, I've cunningly kept Hans's acks. I hope that works out well.
Signature · 2 lines
Cheers, Sakari
PATCH v3 1/11 doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats
The 10-bit packed raw bayer format documented that the data of the first pixel of a four-pixel group was found in the first byte and the two highest bits of the fifth byte. This was not entirely correct. The two bits in the fifth byte are the two lowest bits. The second pixel occupies the second byte and third and fourth least significant bits and so on.
--- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +8 -8
@@ -54,8 +54,8 @@ Each cell is one byte. - G\ :sub:`03high` - - B\ :sub:`00low`\ (bits 7--6) G\ :sub:`01low`\ (bits 5--4) - B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0) + - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4) + G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0) - .. row 2
@@ -69,8 +69,8 @@ Each cell is one byte. - R\ :sub:`13high` - - G\ :sub:`10low`\ (bits 7--6) R\ :sub:`11low`\ (bits 5--4) - G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0) + - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4) + R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0) - .. row 3
@@ -84,8 +84,8 @@ Each cell is one byte. - G\ :sub:`23high` - - B\ :sub:`20low`\ (bits 7--6) G\ :sub:`21low`\ (bits 5--4) - B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0) + - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4) + G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0) - .. row 4
@@ -99,5 +99,5 @@ Each cell is one byte. - R\ :sub:`33high` - - G\ :sub:`30low`\ (bits 7--6) R\ :sub:`31low`\ (bits 5--4) - G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0) + - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4) + R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)
Signature · 1 line
2.7.4
PATCH v3 2/11 doc-rst: Fix number of zeroed high order bits in 12-bit raw format defs
In reply to Sakari AilusThe number of high order bits in samples was documented to be 6 for 12-bit data. This is clearly wrong, fix it.
--- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/media/uapi/v4l/pixfmt-srggb12.rst +1 -1
@@ -30,7 +30,7 @@ described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these formats **Byte Order.** -Each cell is one byte, high 6 bits in high bytes are 0. +Each cell is one byte, high 4 bits in high bytes are 0.
Signature · 1 line
2.7.4
PATCH v3 3/11 doc-rst: Clean up raw bayer pixel format definitions
In reply to Sakari Ailus- Explicitly state that the most significant n bits are zeroed on 10 and 12 bpp formats.
- Remove extra comma from the last entry of the format list
- Add a missing colon before a list
- Use figures versus word numerals consistently
--- Documentation/media/uapi/v4l/pixfmt-srggb10.rst | 15 ++++++++------- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 8 ++++---- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 5 +++-- 3 files changed, 15 insertions(+), 13 deletions(-)
Documentation/media/uapi/v4l/pixfmt-srggb10.rst +8 -7
@@ -21,15 +21,16 @@ Description =========== These four pixel formats are raw sRGB / Bayer formats with 10 bits per -colour. Each colour component is stored in a 16-bit word, with 6 unused -high bits filled with zeros. Each n-pixel row contains n/2 green samples -and n/2 blue or red samples, with alternating red and blue rows. Bytes -are stored in memory in little endian order. They are conventionally -described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example -of one of these formats +sample. Each sample is stored in a 16-bit word, with 6 unused +high bits filled with zeros. Each n-pixel row contains n/2 green samples and +n/2 blue or red samples, with alternating red and blue rows. Bytes are +stored in memory in little endian order. They are conventionally described +as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of +these formats: **Byte Order.** -Each cell is one byte, high 6 bits in high bytes are 0. +Each cell is one byte, the 6 most significant bits in the high bytes +are 0.
Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +4 -4
@@ -21,10 +21,10 @@ Description =========== These four pixel formats are packed raw sRGB / Bayer formats with 10 -bits per colour. Every four consecutive colour components are packed -into 5 bytes. Each of the first 4 bytes contain the 8 high order bits of -the pixels, and the fifth byte contains the two least significants bits -of each pixel, in the same order. +bits per sample. Every four consecutive samples are packed into 5 +bytes. Each of the first 4 bytes contain the 8 high order bits +of the pixels, and the 5th byte contains the 2 least significants +bits of each pixel, in the same order. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating green-red and green-blue rows. They are conventionally
Documentation/media/uapi/v4l/pixfmt-srggb12.rst +3 -2
@@ -27,10 +27,11 @@ high bits filled with zeros. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating red and blue rows. Bytes are stored in memory in little endian order. They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example -of one of these formats +of one of these formats: **Byte Order.** -Each cell is one byte, high 4 bits in high bytes are 0. +Each cell is one byte, the 4 most significant bits in the high bytes are +0.
Signature · 1 line
2.7.4
PATCH v3 4/11 doc-rst: Unify documentation of the 8-bit bayer formats
In reply to Sakari AilusThe other raw bayer formats had a single sample depth dependent definition whereas the 8-bit formats had one page for each. Unify the documentation of the 8-bit formats.
--- Documentation/media/uapi/v4l/pixfmt-rgb.rst | 3 - Documentation/media/uapi/v4l/pixfmt-sbggr8.rst | 81 -------------------------- Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst | 81 -------------------------- Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst | 81 -------------------------- Documentation/media/uapi/v4l/pixfmt-srggb8.rst | 41 +++++++------ 5 files changed, 23 insertions(+), 264 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/pixfmt-sbggr8.rst delete mode 100644 Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst delete mode 100644 Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +0 -3
@@ -11,9 +11,6 @@ RGB Formats :maxdepth: 1 pixfmt-packed-rgb - pixfmt-sbggr8 - pixfmt-sgbrg8 - pixfmt-sgrbg8 pixfmt-srggb8 pixfmt-sbggr16 pixfmt-srggb10
Documentation/media/uapi/v4l/pixfmt-sbggr8.rst deleted +0 -81
81 lines not on this page · raw message
Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst deleted +0 -81
81 lines not on this page · raw message
Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst deleted +0 -81
81 lines not on this page · raw message
Documentation/media/uapi/v4l/pixfmt-srggb8.rst +23 -18
88 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 5/11 v4l: Add packed Bayer raw12 pixel formats
In reply to Sakari AilusThese formats are compressed 12-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are
V4L2_PIX_FMT_SBGGR12P V4L2_PIX_FMT_SGBRG12P V4L2_PIX_FMT_SGRBG12P V4L2_PIX_FMT_SRGGB12P
--- Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1 + Documentation/media/uapi/v4l/pixfmt-srggb12p.rst | 108 +++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 12 ++- include/uapi/linux/videodev2.h | 5 ++ 4 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 Documentation/media/uapi/v4l/pixfmt-srggb12p.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +1 -0
@@ -18,3 +18,4 @@ RGB Formats pixfmt-srggb10alaw8 pixfmt-srggb10dpcm8 pixfmt-srggb12 + pixfmt-srggb12p
Documentation/media/uapi/v4l/pixfmt-srggb12p.rst new file +108 -0
108 lines not on this page · raw message
drivers/media/v4l2-core/v4l2-ioctl.c +8 -4
@@ -1213,10 +1213,6 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG10 : descr ="10-bit Bayer GBGB/RGRG" ;break ;case V4L2_PIX_FMT_SGRBG10 : descr ="10-bit Bayer GRGR/BGBG" ;break ;case V4L2_PIX_FMT_SRGGB10 : descr ="10-bit Bayer RGRG/GBGB" ;break ; -case V4L2_PIX_FMT_SBGGR12 : descr ="12-bit Bayer BGBG/GRGR" ;break ; -case V4L2_PIX_FMT_SGBRG12 : descr ="12-bit Bayer GBGB/RGRG" ;break ; -case V4L2_PIX_FMT_SGRBG12 : descr ="12-bit Bayer GRGR/BGBG" ;break ; -case V4L2_PIX_FMT_SRGGB12 : descr ="12-bit Bayer RGRG/GBGB" ;break ;case V4L2_PIX_FMT_SBGGR10P : descr ="10-bit Bayer BGBG/GRGR Packed" ;break ;case V4L2_PIX_FMT_SGBRG10P : descr ="10-bit Bayer GBGB/RGRG Packed" ;break ;case V4L2_PIX_FMT_SGRBG10P : descr ="10-bit Bayer GRGR/BGBG Packed" ;break ;
@@ -1229,6 +1225,14 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG10DPCM8 : descr ="8-bit Bayer GBGB/RGRG (DPCM)" ;break ;case V4L2_PIX_FMT_SGRBG10DPCM8 : descr ="8-bit Bayer GRGR/BGBG (DPCM)" ;break ;case V4L2_PIX_FMT_SRGGB10DPCM8 : descr ="8-bit Bayer RGRG/GBGB (DPCM)" ;break ; +case V4L2_PIX_FMT_SBGGR12 : descr ="12-bit Bayer BGBG/GRGR" ;break ; +case V4L2_PIX_FMT_SGBRG12 : descr ="12-bit Bayer GBGB/RGRG" ;break ; +case V4L2_PIX_FMT_SGRBG12 : descr ="12-bit Bayer GRGR/BGBG" ;break ; +case V4L2_PIX_FMT_SRGGB12 : descr ="12-bit Bayer RGRG/GBGB" ;break ; +case V4L2_PIX_FMT_SBGGR12P : descr ="12-bit Bayer BGBG/GRGR Packed" ;break ; +case V4L2_PIX_FMT_SGBRG12P : descr ="12-bit Bayer GBGB/RGRG Packed" ;break ; +case V4L2_PIX_FMT_SGRBG12P : descr ="12-bit Bayer GRGR/BGBG Packed" ;break ; +case V4L2_PIX_FMT_SRGGB12P : descr ="12-bit Bayer RGRG/GBGB Packed" ;break ;case V4L2_PIX_FMT_SBGGR16 : descr ="16-bit Bayer BGBG/GRGR (Exp.)" ;break ;case V4L2_PIX_FMT_SN9C20X_I420 : descr ="GSPCA SN9C20X I420" ;break ;case V4L2_PIX_FMT_SPCA501 : descr ="GSPCA SPCA501" ;break ;
include/uapi/linux/videodev2.h +5 -0
@@ -578,6 +578,11 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2')/* 12 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')/* 12 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2')/* 12 RGRG.. GBGB.. */ +/* 12bit raw bayer packed, 6 bytes for every 4 pixels */ +#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') +#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') +#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') +#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C')#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')/* 16 BGBG.. GRGR.. */ /* compressed formats */
Signature · 1 line
2.7.4
PATCH v3 5/11 v4l: Add packed Bayer raw12 pixel formats
These formats are compressed 12-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are
V4L2_PIX_FMT_SBGGR12P V4L2_PIX_FMT_SGBRG12P V4L2_PIX_FMT_SGRBG12P V4L2_PIX_FMT_SRGGB12P
---
Fix line start offsets.
Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1 + Documentation/media/uapi/v4l/pixfmt-srggb12p.rst | 108 +++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 12 ++- include/uapi/linux/videodev2.h | 5 ++ 4 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 Documentation/media/uapi/v4l/pixfmt-srggb12p.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +1 -0
@@ -18,3 +18,4 @@ RGB Formats pixfmt-srggb10alaw8 pixfmt-srggb10dpcm8 pixfmt-srggb12 + pixfmt-srggb12p
Documentation/media/uapi/v4l/pixfmt-srggb12p.rst new file +108 -0
108 lines not on this page · raw message
drivers/media/v4l2-core/v4l2-ioctl.c +8 -4
@@ -1213,10 +1213,6 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG10 : descr ="10-bit Bayer GBGB/RGRG" ;break ;case V4L2_PIX_FMT_SGRBG10 : descr ="10-bit Bayer GRGR/BGBG" ;break ;case V4L2_PIX_FMT_SRGGB10 : descr ="10-bit Bayer RGRG/GBGB" ;break ; -case V4L2_PIX_FMT_SBGGR12 : descr ="12-bit Bayer BGBG/GRGR" ;break ; -case V4L2_PIX_FMT_SGBRG12 : descr ="12-bit Bayer GBGB/RGRG" ;break ; -case V4L2_PIX_FMT_SGRBG12 : descr ="12-bit Bayer GRGR/BGBG" ;break ; -case V4L2_PIX_FMT_SRGGB12 : descr ="12-bit Bayer RGRG/GBGB" ;break ;case V4L2_PIX_FMT_SBGGR10P : descr ="10-bit Bayer BGBG/GRGR Packed" ;break ;case V4L2_PIX_FMT_SGBRG10P : descr ="10-bit Bayer GBGB/RGRG Packed" ;break ;case V4L2_PIX_FMT_SGRBG10P : descr ="10-bit Bayer GRGR/BGBG Packed" ;break ;
@@ -1229,6 +1225,14 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG10DPCM8 : descr ="8-bit Bayer GBGB/RGRG (DPCM)" ;break ;case V4L2_PIX_FMT_SGRBG10DPCM8 : descr ="8-bit Bayer GRGR/BGBG (DPCM)" ;break ;case V4L2_PIX_FMT_SRGGB10DPCM8 : descr ="8-bit Bayer RGRG/GBGB (DPCM)" ;break ; +case V4L2_PIX_FMT_SBGGR12 : descr ="12-bit Bayer BGBG/GRGR" ;break ; +case V4L2_PIX_FMT_SGBRG12 : descr ="12-bit Bayer GBGB/RGRG" ;break ; +case V4L2_PIX_FMT_SGRBG12 : descr ="12-bit Bayer GRGR/BGBG" ;break ; +case V4L2_PIX_FMT_SRGGB12 : descr ="12-bit Bayer RGRG/GBGB" ;break ; +case V4L2_PIX_FMT_SBGGR12P : descr ="12-bit Bayer BGBG/GRGR Packed" ;break ; +case V4L2_PIX_FMT_SGBRG12P : descr ="12-bit Bayer GBGB/RGRG Packed" ;break ; +case V4L2_PIX_FMT_SGRBG12P : descr ="12-bit Bayer GRGR/BGBG Packed" ;break ; +case V4L2_PIX_FMT_SRGGB12P : descr ="12-bit Bayer RGRG/GBGB Packed" ;break ;case V4L2_PIX_FMT_SBGGR16 : descr ="16-bit Bayer BGBG/GRGR (Exp.)" ;break ;case V4L2_PIX_FMT_SN9C20X_I420 : descr ="GSPCA SN9C20X I420" ;break ;case V4L2_PIX_FMT_SPCA501 : descr ="GSPCA SPCA501" ;break ;
include/uapi/linux/videodev2.h +5 -0
@@ -578,6 +578,11 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2')/* 12 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')/* 12 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2')/* 12 RGRG.. GBGB.. */ +/* 12bit raw bayer packed, 6 bytes for every 4 pixels */ +#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') +#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') +#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') +#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C')#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')/* 16 BGBG.. GRGR.. */ /* compressed formats */
Signature · 1 line
2.7.4
PATCH v3 6/11 media: Add 1X14 14-bit raw bayer media bus code definitions
In reply to Sakari AilusFrom: Jouni Ukkonen <[email protected]>
The codes will be called:
MEDIA_BUS_FMT_SBGGR14_1X14 MEDIA_BUS_FMT_SGBRG14_1X14 MEDIA_BUS_FMT_SGRBG14_1X14 MEDIA_BUS_FMT_SRGGB14_1X14
--- Documentation/media/uapi/v4l/subdev-formats.rst | 258 +++++++++++++++++++++++- include/uapi/linux/media-bus-format.h | 6 +- 2 files changed, 262 insertions(+), 2 deletions(-)
Documentation/media/uapi/v4l/subdev-formats.rst +257 -1
@@ -2782,7 +2782,7 @@ organization is given as an example for the first pixel only. - Code - - - :cspan:`11` Data organization + - :cspan:`13` Data organization - .. row 2
@@ -2790,6 +2790,10 @@ organization is given as an example for the first pixel only. - - Bit + - 13 + + - 12 + - 11 - 10
@@ -2829,6 +2833,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -2860,6 +2868,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -2891,6 +2903,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -2922,6 +2938,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -2953,6 +2973,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -2984,6 +3008,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3015,6 +3043,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3046,6 +3078,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -3077,6 +3113,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3108,6 +3148,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3139,6 +3183,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3170,6 +3218,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -3201,6 +3253,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - 0 - 0
@@ -3230,6 +3286,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3261,6 +3321,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3290,6 +3354,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - 0 - 0
@@ -3321,6 +3389,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3350,6 +3422,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`1` - b\ :sub:`0`
@@ -3381,6 +3457,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`1` - b\ :sub:`0`
@@ -3410,6 +3490,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3437,6 +3521,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3468,6 +3556,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`9` - g\ :sub:`8`
@@ -3499,6 +3591,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`9` - g\ :sub:`8`
@@ -3530,6 +3626,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`9` - r\ :sub:`8`
@@ -3557,6 +3657,10 @@ organization is given as an example for the first pixel only. - 0x3008 - + - - + + - - + - b\ :sub:`11` - b\ :sub:`10`
@@ -3588,6 +3692,10 @@ organization is given as an example for the first pixel only. - 0x3010 - + - - + + - - + - g\ :sub:`11` - g\ :sub:`10`
@@ -3619,6 +3727,10 @@ organization is given as an example for the first pixel only. - 0x3011 - + - - + + - - + - g\ :sub:`11` - g\ :sub:`10`
@@ -3650,6 +3762,150 @@ organization is given as an example for the first pixel only. - 0x3012 - + - - + + - - + + - r\ :sub:`11` + + - r\ :sub:`10` + + - r\ :sub:`9` + + - r\ :sub:`8` + + - r\ :sub:`7` + + - r\ :sub:`6` + + - r\ :sub:`5` + + - r\ :sub:`4` + + - r\ :sub:`3` + + - r\ :sub:`2` + + - r\ :sub:`1` + + - r\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SBGGR14-1X14: + + - MEDIA_BUS_FMT_SBGGR14_1X14 + + - 0x3019 + + - + - b\ :sub:`13` + + - b\ :sub:`12` + + - b\ :sub:`11` + + - b\ :sub:`10` + + - b\ :sub:`9` + + - b\ :sub:`8` + + - b\ :sub:`7` + + - b\ :sub:`6` + + - b\ :sub:`5` + + - b\ :sub:`4` + + - b\ :sub:`3` + + - b\ :sub:`2` + + - b\ :sub:`1` + + - b\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SGBRG14-1X14: + + - MEDIA_BUS_FMT_SGBRG14_1X14 + + - 0x301a + + - + - g\ :sub:`13` + + - g\ :sub:`12` + + - g\ :sub:`11` + + - g\ :sub:`10` + + - g\ :sub:`9` + + - g\ :sub:`8` + + - g\ :sub:`7` + + - g\ :sub:`6` + + - g\ :sub:`5` + + - g\ :sub:`4` + + - g\ :sub:`3` + + - g\ :sub:`2` + + - g\ :sub:`1` + + - g\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SGRBG14-1X14: + + - MEDIA_BUS_FMT_SGRBG14_1X14 + + - 0x301b + + - + - g\ :sub:`13` + + - g\ :sub:`12` + + - g\ :sub:`11` + + - g\ :sub:`10` + + - g\ :sub:`9` + + - g\ :sub:`8` + + - g\ :sub:`7` + + - g\ :sub:`6` + + - g\ :sub:`5` + + - g\ :sub:`4` + + - g\ :sub:`3` + + - g\ :sub:`2` + + - g\ :sub:`1` + + - g\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SRGGB14-1X14: + + - MEDIA_BUS_FMT_SRGGB14_1X14 + + - 0x301c + + - + - r\ :sub:`13` + + - r\ :sub:`12` + - r\ :sub:`11` - r\ :sub:`10`
include/uapi/linux/media-bus-format.h +5 -1
@@ -97,7 +97,7 @@#define MEDIA_BUS_FMT_YUV10_1X30 0x2016#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 -/* Bayer - next is 0x3019 */ +/* Bayer - next is 0x301d */ #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
@@ -122,6 +122,10 @@#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 +#define MEDIA_BUS_FMT_SBGGR14_1X14 0x3019 +#define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a +#define MEDIA_BUS_FMT_SGRBG14_1X14 0x301b +#define MEDIA_BUS_FMT_SRGGB14_1X14 0x301c/* JPEG compressed formats - next is 0x4002 */ #define MEDIA_BUS_FMT_JPEG_1X8 0x4001
Signature · 1 line
2.7.4
PATCH v3 7/11 doc-rst: Add 14-bit raw bayer pixel format definitions
In reply to Sakari AilusThe formats added by this patch are:
V4L2_PIX_FMT_SBGGR14 V4L2_PIX_FMT_SGBRG14 V4L2_PIX_FMT_SGRBG14 V4L2_PIX_FMT_SRGGB14
--- Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1 + Documentation/media/uapi/v4l/pixfmt-srggb14.rst | 122 ++++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 4 + include/uapi/linux/videodev2.h | 4 + 4 files changed, 131 insertions(+) create mode 100644 Documentation/media/uapi/v4l/pixfmt-srggb14.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +1 -0
@@ -19,3 +19,4 @@ RGB Formats pixfmt-srggb10dpcm8 pixfmt-srggb12 pixfmt-srggb12p + pixfmt-srggb14
Documentation/media/uapi/v4l/pixfmt-srggb14.rst new file +122 -0
122 lines not on this page · raw message
drivers/media/v4l2-core/v4l2-ioctl.c +4 -0
@@ -1233,6 +1233,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG12P : descr ="12-bit Bayer GBGB/RGRG Packed" ;break ;case V4L2_PIX_FMT_SGRBG12P : descr ="12-bit Bayer GRGR/BGBG Packed" ;break ;case V4L2_PIX_FMT_SRGGB12P : descr ="12-bit Bayer RGRG/GBGB Packed" ;break ; +case V4L2_PIX_FMT_SBGGR14 : descr ="14-bit Bayer BGBG/GRGR" ;break ; +case V4L2_PIX_FMT_SGBRG14 : descr ="14-bit Bayer GBGB/RGRG" ;break ; +case V4L2_PIX_FMT_SGRBG14 : descr ="14-bit Bayer GRGR/BGBG" ;break ; +case V4L2_PIX_FMT_SRGGB14 : descr ="14-bit Bayer RGRG/GBGB" ;break ;case V4L2_PIX_FMT_SBGGR16 : descr ="16-bit Bayer BGBG/GRGR (Exp.)" ;break ;case V4L2_PIX_FMT_SN9C20X_I420 : descr ="GSPCA SN9C20X I420" ;break ;case V4L2_PIX_FMT_SPCA501 : descr ="GSPCA SPCA501" ;break ;
include/uapi/linux/videodev2.h +4 -0
@@ -583,6 +583,10 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C')#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C')#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') +#define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4')/* 14 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4')/* 14 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4')/* 14 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4')/* 14 RGRG.. GBGB.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')/* 16 BGBG.. GRGR.. */ /* compressed formats */
Signature · 1 line
2.7.4
PATCH v3 8/11 doc-rst: Add packed Bayer raw14 pixel formats
In reply to Sakari AilusThese formats are compressed 14-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are
V4L2_PIX_FMT_SBGGR14P V4L2_PIX_FMT_SGBRG14P V4L2_PIX_FMT_SGRBG14P V4L2_PIX_FMT_SRGGB14P
--- Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1 + Documentation/media/uapi/v4l/pixfmt-srggb14p.rst | 127 +++++++++++++++++++++++ include/uapi/linux/videodev2.h | 5 + 3 files changed, 133 insertions(+) create mode 100644 Documentation/media/uapi/v4l/pixfmt-srggb14p.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +1 -0
@@ -20,3 +20,4 @@ RGB Formats pixfmt-srggb12 pixfmt-srggb12p pixfmt-srggb14 + pixfmt-srggb14p
Documentation/media/uapi/v4l/pixfmt-srggb14p.rst new file +127 -0
127 lines not on this page · raw message
include/uapi/linux/videodev2.h +5 -0
@@ -587,6 +587,11 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4')/* 14 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4')/* 14 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4')/* 14 RGRG.. GBGB.. */ +/* 14bit raw bayer packed, 7 bytes for every 4 pixels */ +#define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') +#define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') +#define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E') +#define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E')#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')/* 16 BGBG.. GRGR.. */ /* compressed formats */
Signature · 1 line
2.7.4
PATCH v3 9/11 media: Add 1X16 16-bit raw bayer media bus code definitions
In reply to Sakari AilusThe codes will be called:
MEDIA_BUS_FMT_SBGGR16_1X16 MEDIA_BUS_FMT_SGBRG16_1X16 MEDIA_BUS_FMT_SGRBG16_1X16 MEDIA_BUS_FMT_SRGGB16_1X16
--- Documentation/media/uapi/v4l/subdev-formats.rst | 290 +++++++++++++++++++++++- include/uapi/linux/media-bus-format.h | 6 +- 2 files changed, 294 insertions(+), 2 deletions(-)
Documentation/media/uapi/v4l/subdev-formats.rst +289 -1
@@ -2782,7 +2782,7 @@ organization is given as an example for the first pixel only. - Code - - - :cspan:`13` Data organization + - :cspan:`15` Data organization - .. row 2
@@ -2790,6 +2790,10 @@ organization is given as an example for the first pixel only. - - Bit + - 15 + + - 14 + - 13 - 12
@@ -2837,6 +2841,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -2872,6 +2880,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -2907,6 +2919,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -2942,6 +2958,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -2977,6 +2997,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3012,6 +3036,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3047,6 +3075,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3082,6 +3114,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -3117,6 +3153,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3152,6 +3192,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3187,6 +3231,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`7` - g\ :sub:`6`
@@ -3222,6 +3270,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`7` - r\ :sub:`6`
@@ -3257,6 +3309,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - 0 - 0
@@ -3290,6 +3346,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3325,6 +3385,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`7` - b\ :sub:`6`
@@ -3358,6 +3422,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - 0 - 0
@@ -3393,6 +3461,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3426,6 +3498,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`1` - b\ :sub:`0`
@@ -3461,6 +3537,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`1` - b\ :sub:`0`
@@ -3494,6 +3574,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3525,6 +3609,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`9` - b\ :sub:`8`
@@ -3560,6 +3648,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`9` - g\ :sub:`8`
@@ -3595,6 +3687,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`9` - g\ :sub:`8`
@@ -3630,6 +3726,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`9` - r\ :sub:`8`
@@ -3661,6 +3761,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - b\ :sub:`11` - b\ :sub:`10`
@@ -3696,6 +3800,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`11` - g\ :sub:`10`
@@ -3731,6 +3839,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - g\ :sub:`11` - g\ :sub:`10`
@@ -3766,6 +3878,10 @@ organization is given as an example for the first pixel only. - - + - - + + - - + - r\ :sub:`11` - r\ :sub:`10`
@@ -3797,6 +3913,10 @@ organization is given as an example for the first pixel only. - 0x3019 - + - - + + - - + - b\ :sub:`13` - b\ :sub:`12`
@@ -3832,6 +3952,10 @@ organization is given as an example for the first pixel only. - 0x301a - + - - + + - - + - g\ :sub:`13` - g\ :sub:`12`
@@ -3867,6 +3991,10 @@ organization is given as an example for the first pixel only. - 0x301b - + - - + + - - + - g\ :sub:`13` - g\ :sub:`12`
@@ -3902,6 +4030,166 @@ organization is given as an example for the first pixel only. - 0x301c - + - - + + - - + + - r\ :sub:`13` + + - r\ :sub:`12` + + - r\ :sub:`11` + + - r\ :sub:`10` + + - r\ :sub:`9` + + - r\ :sub:`8` + + - r\ :sub:`7` + + - r\ :sub:`6` + + - r\ :sub:`5` + + - r\ :sub:`4` + + - r\ :sub:`3` + + - r\ :sub:`2` + + - r\ :sub:`1` + + - r\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SBGGR16-1X16: + + - MEDIA_BUS_FMT_SBGGR16_1X16 + + - 0x301d + + - + - b\ :sub:`15` + + - b\ :sub:`14` + + - b\ :sub:`13` + + - b\ :sub:`12` + + - b\ :sub:`11` + + - b\ :sub:`10` + + - b\ :sub:`9` + + - b\ :sub:`8` + + - b\ :sub:`7` + + - b\ :sub:`6` + + - b\ :sub:`5` + + - b\ :sub:`4` + + - b\ :sub:`3` + + - b\ :sub:`2` + + - b\ :sub:`1` + + - b\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SGBRG16-1X16: + + - MEDIA_BUS_FMT_SGBRG16_1X16 + + - 0x301e + + - + - g\ :sub:`15` + + - g\ :sub:`14` + + - g\ :sub:`13` + + - g\ :sub:`12` + + - g\ :sub:`11` + + - g\ :sub:`10` + + - g\ :sub:`9` + + - g\ :sub:`8` + + - g\ :sub:`7` + + - g\ :sub:`6` + + - g\ :sub:`5` + + - g\ :sub:`4` + + - g\ :sub:`3` + + - g\ :sub:`2` + + - g\ :sub:`1` + + - g\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SGRBG16-1X16: + + - MEDIA_BUS_FMT_SGRBG16_1X16 + + - 0x301f + + - + - g\ :sub:`15` + + - g\ :sub:`14` + + - g\ :sub:`13` + + - g\ :sub:`12` + + - g\ :sub:`11` + + - g\ :sub:`10` + + - g\ :sub:`9` + + - g\ :sub:`8` + + - g\ :sub:`7` + + - g\ :sub:`6` + + - g\ :sub:`5` + + - g\ :sub:`4` + + - g\ :sub:`3` + + - g\ :sub:`2` + + - g\ :sub:`1` + + - g\ :sub:`0` + + - .. _MEDIA-BUS-FMT-SRGGB16-1X16: + + - MEDIA_BUS_FMT_SRGGB16_1X16 + + - 0x3020 + + - + - r\ :sub:`15` + + - r\ :sub:`14` + - r\ :sub:`13` - r\ :sub:`12`
include/uapi/linux/media-bus-format.h +5 -1
@@ -97,7 +97,7 @@#define MEDIA_BUS_FMT_YUV10_1X30 0x2016#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 -/* Bayer - next is 0x301d */ +/* Bayer - next is 0x3021 */ #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
@@ -126,6 +126,10 @@#define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a#define MEDIA_BUS_FMT_SGRBG14_1X14 0x301b#define MEDIA_BUS_FMT_SRGGB14_1X14 0x301c +#define MEDIA_BUS_FMT_SBGGR16_1X16 0x301d +#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e +#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f +#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020/* JPEG compressed formats - next is 0x4002 */ #define MEDIA_BUS_FMT_JPEG_1X8 0x4001
Signature · 1 line
2.7.4
PATCH v3 10/11 doc-rst: 16-bit BGGR is always 16 bits
In reply to Sakari AilusThe V4L2_PIX_FMT_SBGGR16 format is documented to contain samples of fewer than 16 bits. However, we do have specific definitions for smaller sample sizes. Therefore, this note is redundant from the API point of view.
Currently only two drivers, am437x and davinci, use the V4L2_PIX_FMT_SBGGR16 pixelformat currently. The sampling precision is understood to be 16 bits in all current cases.
Remove the note on sampling precision.
--- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 3 --- 1 file changed, 3 deletions(-)
Documentation/media/uapi/v4l/pixfmt-sbggr16.rst +0 -3
@@ -19,9 +19,6 @@ This format is similar to has a depth of 16 bits. The least significant byte is stored at lower memory addresses (little-endian). -..note:: The actual sampling precision may be lower than 16 bits, - for example 10 bits per pixel with values in tange 0 to 1023. - **Byte Order.** Each cell is one byte.
Signature · 1 line
2.7.4
PATCH v3 11/11 doc-rst: Add 16-bit raw bayer pixel format definitions
In reply to Sakari AilusThe formats added by this patch are:
V4L2_PIX_FMT_SBGGR16 V4L2_PIX_FMT_SGBRG16 V4L2_PIX_FMT_SGRBG16
V4L2_PIX_FMT_SRGGB16 already existed before the patch. Rework the documentation to match that of the other sample depths.
Also align the description of V4L2_PIX_FMT_SRGGB16 to match with other similar formats.
--- Documentation/media/uapi/v4l/pixfmt-rgb.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 111 ---------------------- Documentation/media/uapi/v4l/pixfmt-srggb16.rst | 120 ++++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 5 +- include/uapi/linux/videodev2.h | 3 + 5 files changed, 128 insertions(+), 113 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/pixfmt-sbggr16.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-srggb16.rst
Documentation/media/uapi/v4l/pixfmt-rgb.rst +1 -1
@@ -12,7 +12,6 @@ RGB Formats pixfmt-packed-rgb pixfmt-srggb8 - pixfmt-sbggr16 pixfmt-srggb10 pixfmt-srggb10p pixfmt-srggb10alaw8
@@ -21,3 +20,4 @@ RGB Formats pixfmt-srggb12p pixfmt-srggb14 pixfmt-srggb14p + pixfmt-srggb16
Documentation/media/uapi/v4l/pixfmt-sbggr16.rst deleted +0 -111
111 lines not on this page · raw message
Documentation/media/uapi/v4l/pixfmt-srggb16.rst new file +120 -0
120 lines not on this page · raw message
drivers/media/v4l2-core/v4l2-ioctl.c +4 -1
@@ -1237,7 +1237,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SGBRG14 : descr ="14-bit Bayer GBGB/RGRG" ;break ;case V4L2_PIX_FMT_SGRBG14 : descr ="14-bit Bayer GRGR/BGBG" ;break ;case V4L2_PIX_FMT_SRGGB14 : descr ="14-bit Bayer RGRG/GBGB" ;break ; -case V4L2_PIX_FMT_SBGGR16 : descr ="16-bit Bayer BGBG/GRGR (Exp.)" ;break ; +case V4L2_PIX_FMT_SBGGR16 : descr ="16-bit Bayer BGBG/GRGR" ;break ; +case V4L2_PIX_FMT_SGBRG16 : descr ="16-bit Bayer GBGB/RGRG" ;break ; +case V4L2_PIX_FMT_SGRBG16 : descr ="16-bit Bayer GRGR/BGBG" ;break ; +case V4L2_PIX_FMT_SRGGB16 : descr ="16-bit Bayer RGRG/GBGB" ;break ;case V4L2_PIX_FMT_SN9C20X_I420 : descr ="GSPCA SN9C20X I420" ;break ;case V4L2_PIX_FMT_SPCA501 : descr ="GSPCA SPCA501" ;break ;case V4L2_PIX_FMT_SPCA505 : descr ="GSPCA SPCA505" ;break ;
include/uapi/linux/videodev2.h +3 -0
@@ -593,6 +593,9 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E')#define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E')#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')/* 16 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6')/* 16 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6')/* 16 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6')/* 16 RGRG.. GBGB.. */ /* compressed formats */ #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G')/* Motion-JPEG */
Signature · 1 line
2.7.4
Quoted 11 lines · Sakari Ailus
Hi all,
This is a third version of the new bayer format patchset. The second version of the set may be found here:
<URL:http://www.spinics.net/lists/linux-media/msg101498.html>
These patches fix and add new raw bayer format definitions. 12-bit packed V4L2 format definition is added as well as definitions of 14-bit media bus codes as well as unpacked and packed V4L2 formats.
Quoted 5 lines
No driver uses them right now, yet they're common formats needed by newer devices that use higher bit depths so adding them would make sense.
16-bit pixel formats are added as well, and the 16-bit formats are now expected to have 16 bits of data. 8-bit format documentation is unified.
The HTML documentation can be found here:
<URL:http://salottisipuli.retiisi.org.uk/~sailus/raw14-doc/media/uapi/v4l/pixfmt-rgb.html>
Signature · 2 lines
Sakari Ailus e-mail: [email protected] XMPP: [email protected]