Skip to contentSkip to conversation

doc-rst: Specify raw bayer format variant used in the examples

PATCH In review Sakari Ailus 4 participants 5 messages Nov 15, 2016 – Nov 23, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc-rst: Specify raw bayer format variant used in the examples

The documentation simply mentioned that one of the four pixel orders was used in the example. Now specify the exact pixelformat instead.

for i in pixfmt-s*.rst; do i=$i perl -i -pe '

	my $foo=$ENV{i};
	$foo =~ s/pixfmt-[a-z]+([0-9].*).rst/$1/;
	$foo = uc $foo;
	s/one of these formats/a small V4L2_PIX_FMT_SBGGR$foo image/' $i;

done

---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb12.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb16.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb8.rst   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +1 -1
index 9a41c8d..b6d426c 100644
@@ -28,7 +28,7 @@ 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
 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
-of one of these formats:
+of a small V4L2_PIX_FMT_SBGGR10P image:
 
 **Byte Order.**
 Each cell is one byte.
Documentation/media/uapi/v4l/pixfmt-srggb12.rst +1 -1
index a50ee14..15041e5 100644
@@ -26,7 +26,7 @@ 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 a small V4L2_PIX_FMT_SBGGR12 image:
 
 **Byte Order.**
 Each cell is one byte, the 4 most significant bits in the high bytes are
Documentation/media/uapi/v4l/pixfmt-srggb16.rst +1 -1
index 06facc9..d407b2b 100644
@@ -22,7 +22,7 @@ sample. Each sample is stored in a 16-bit word. 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:
+an example of a small V4L2_PIX_FMT_SBGGR16 image:
 
 **Byte Order.**
 Each cell is one byte.
Documentation/media/uapi/v4l/pixfmt-srggb8.rst +1 -1
index a3987d2..5ac25a6 100644
@@ -20,7 +20,7 @@ These four pixel formats are raw sRGB / Bayer formats with 8 bits per
 sample. Each sample is stored in a byte. Each n-pixel row contains n/2
 green samples and n/2 blue or red samples, with alternating red and
 blue rows. They are conventionally described as GRGR... BGBG...,
-RGRG... GBGB..., etc. Below is an example of one of these formats:
+RGRG... GBGB..., etc. Below is an example of a small V4L2_PIX_FMT_SBGGR8 image:
 
 **Byte Order.**
 Each cell is one byte.
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 9 lines · On Tuesday 15 Nov 2016 23:49:43 Sakari Ailus wrote:

The documentation simply mentioned that one of the four pixel orders was used in the example. Now specify the exact pixelformat instead.

for i in pixfmt-s*.rst; do i=$i perl -i -pe '

	my $foo=$ENV{i};
	$foo =~ s/pixfmt-[a-z]+([0-9].*).rst/$1/;
	$foo = uc $foo;
	s/one of these formats/a small V4L2_PIX_FMT_SBGGR$foo image/' $i;

done

Do we really need this in the commit message ? :-)

Quoted 1 line

As the patch applies on top of another one I took in my tree for the uvcvideo driver I've applied this one there as well.

Quoted 64 lines
---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb12.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb16.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb8.rst   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst index 9a41c8d..b6d426c 100644

Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +1 -1
@@ -28,7 +28,7 @@ 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
 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
-of one of these formats:
+of a small V4L2_PIX_FMT_SBGGR10P image:
 
 **Byte Order.**
 Each cell is one byte.
(quoted diff) +0 -0

b/Documentation/media/uapi/v4l/pixfmt-srggb12.rst index a50ee14..15041e5 100644

Documentation/media/uapi/v4l/pixfmt-srggb12.rst +0 -0
@@ -26,7 +26,7 @@ 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:

Documentation/media/uapi/v4l/pixfmt-srggb12.rst +1 -0
+of a small V4L2_PIX_FMT_SBGGR12 image:
 
 **Byte Order.**
 Each cell is one byte, the 4 most significant bits in the high bytes are
(quoted diff) +0 -0

b/Documentation/media/uapi/v4l/pixfmt-srggb16.rst index 06facc9..d407b2b 100644

Documentation/media/uapi/v4l/pixfmt-srggb16.rst +0 -0
@@ -22,7 +22,7 @@ sample. Each sample is stored in a 16-bit word. 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:

Documentation/media/uapi/v4l/pixfmt-srggb16.rst +1 -0
+an example of a small V4L2_PIX_FMT_SBGGR16 image:
 
 **Byte Order.**
 Each cell is one byte.
(quoted diff) +0 -0

b/Documentation/media/uapi/v4l/pixfmt-srggb8.rst index a3987d2..5ac25a6 100644

Documentation/media/uapi/v4l/pixfmt-srggb8.rst +0 -0
@@ -20,7 +20,7 @@ These four pixel formats are raw sRGB / Bayer formats with

8 bits per sample. Each sample is stored in a byte. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating red and blue rows. They are conventionally described as GRGR... BGBG...,

Documentation/media/uapi/v4l/pixfmt-srggb8.rst +1 -1
-RGRG... GBGB..., etc. Below is an example of one of these formats:
+RGRG... GBGB..., etc. Below is an example of a small V4L2_PIX_FMT_SBGGR8

image:

**Byte Order.**
Each cell is one byte.

Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw

Hi Laurent,

Quoted 8 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 3 lines · On Tuesday 15 Nov 2016 23:49:43 Sakari Ailus wrote:

The documentation simply mentioned that one of the four pixel orders was used in the example. Now specify the exact pixelformat instead.

Quoted 8 lines
Quoted 6 lines

for i in pixfmt-s*.rst; do i=$i perl -i -pe '

	my $foo=$ENV{i};
	$foo =~ s/pixfmt-[a-z]+([0-9].*).rst/$1/;
	$foo = uc $foo;
	s/one of these formats/a small V4L2_PIX_FMT_SBGGR$foo image/' $i;

done

Do we really need this in the commit message ? :-)

Feel free to remove it if you like. I put it there to avoid forgetting it as I'll still need to convert other patches. Perhaps it might be better placed elsewhere. :-)

Quoted 7 lines
Quoted 2 lines

As the patch applies on top of another one I took in my tree for the uvcvideo driver I've applied this one there as well.

Thanks!

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#3 lore raw
In reply to Sakari Ailus

Em Tue, 15 Nov 2016 23:49:43 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 9 lines

The documentation simply mentioned that one of the four pixel orders was used in the example. Now specify the exact pixelformat instead.

for i in pixfmt-s*.rst; do i=$i perl -i -pe '

	my $foo=$ENV{i};
	$foo =~ s/pixfmt-[a-z]+([0-9].*).rst/$1/;
	$foo = uc $foo;
	s/one of these formats/a small V4L2_PIX_FMT_SBGGR$foo image/' $i;

done

Patch is nice, except that it doesn't apply :-)

If it depends on some other patch, please send it together with its dependency or at least mention it at the patch, after the -- line.

Thanks,
Mauro

$ quilt push -f --merge
Applying patch patches/lmml_38129_1_1_doc_rst_specify_raw_bayer_format_variant_used_in_the_examples.patch
patching file Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
patching file Documentation/media/uapi/v4l/pixfmt-srggb12.rst
can't find file to patch at input line 62
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb16.rst b/Documentation/media/uapi/v4l/pixfmt-srggb16.rst
|index 06facc9..d407b2b 100644
|--- a/Documentation/media/uapi/v4l/pixfmt-srggb16.rst
|+++ b/Documentation/media/uapi/v4l/pixfmt-srggb16.rst
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file Documentation/media/uapi/v4l/pixfmt-srggb8.rst

Regards,
Mauro
Thanks,
Mauro

#4 lore raw

Hi Mauro,

Quoted 11 lines · On Tuesday 22 Nov 2016 16:27:29 Mauro Carvalho Chehab wrote:

Em Tue, 15 Nov 2016 23:49:43 +0200 Sakari Ailus escreveu:

Quoted 9 lines

The documentation simply mentioned that one of the four pixel orders was used in the example. Now specify the exact pixelformat instead.

for i in pixfmt-s*.rst; do i=$i perl -i -pe '

	my $foo=$ENV{i};
	$foo =~ s/pixfmt-[a-z]+([0-9].*).rst/$1/;
	$foo = uc $foo;
	s/one of these formats/a small V4L2_PIX_FMT_SBGGR$foo image/' $i;

done

Quoted 5 lines

Patch is nice, except that it doesn't apply :-)

If it depends on some other patch, please send it together with its dependency or at least mention it at the patch, after the -- line.

It depends on "v4l: Add 16-bit raw bayer pixel formats". I have that one in my tree in an UVC branch and will send you a pull request that will include this patch very shortly.

Signature · 3 lines
Regards,

Laurent Pinchart