From c2b66cafdf020856f6981d03efd9f2706d5f0156 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 5 Sep 2016 08:44:34 -0300 Subject: [media] v4l: doc: Remove row numbers from tables Shorten the tables by removing row numbers in comments, allowing for later insertion of rows with minimal diffs. All changes have been generated by the following script. import io import re import sys def process_table(fname, data): if fname.endswith('hist-v4l2.rst'): data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE) data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE) else: data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE) data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE) data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE) data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE) return data def process_file(fname, data): buf = io.StringIO(data) output = '' in_table = False table_separator = 0 for line in buf.readlines(): if line.find('.. flat-table::') != -1: in_table = True table = '' elif in_table and not re.match('^[\t\n]|( )', line): in_table = False output += process_table(fname, table) if in_table: table += line else: output += line if in_table: in_table = False output += process_table(fname, table) return output fname = sys.argv[1] data = file(fname, 'rb').read().decode('utf-8') data = process_file(fname, data) file(fname, 'wb').write(data.encode('utf-8')) Signed-off-by: Laurent Pinchart --- Documentation/media/uapi/v4l/pixfmt-reserved.rst | 539 +++++++++-------------- 1 file changed, 215 insertions(+), 324 deletions(-) (limited to 'Documentation/media/uapi/v4l/pixfmt-reserved.rst') diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst b/Documentation/media/uapi/v4l/pixfmt-reserved.rst index 0dd2f7fe096f..bd7bf3dae6af 100644 --- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst +++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst @@ -26,318 +26,214 @@ please make a proposal on the linux-media mailing list. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - Identifier - - - Code - - - Details - - - .. _V4L2-PIX-FMT-DV: - - - ``V4L2_PIX_FMT_DV`` - - - 'dvsd' - - - unknown - - - .. _V4L2-PIX-FMT-ET61X251: - - - ``V4L2_PIX_FMT_ET61X251`` - - - 'E625' - - - Compressed format of the ET61X251 driver. - - - .. _V4L2-PIX-FMT-HI240: - - - ``V4L2_PIX_FMT_HI240`` - - - 'HI24' - - - 8 bit RGB format used by the BTTV driver. - - - .. _V4L2-PIX-FMT-HM12: - - - ``V4L2_PIX_FMT_HM12`` - - - 'HM12' - - - YUV 4:2:0 format used by the IVTV driver, - `http://www.ivtvdriver.org/ `__ - - The format is documented in the kernel sources in the file - ``Documentation/video4linux/cx2341x/README.hm12`` - - - .. _V4L2-PIX-FMT-CPIA1: - - - ``V4L2_PIX_FMT_CPIA1`` - - - 'CPIA' - - - YUV format used by the gspca cpia1 driver. - - - .. _V4L2-PIX-FMT-JPGL: - - - ``V4L2_PIX_FMT_JPGL`` - - - 'JPGL' - - - JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW - 80x. - - - .. _V4L2-PIX-FMT-SPCA501: - - - ``V4L2_PIX_FMT_SPCA501`` - - - 'S501' - - - YUYV per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA505: - - - ``V4L2_PIX_FMT_SPCA505`` - - - 'S505' - - - YYUV per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA508: - - - ``V4L2_PIX_FMT_SPCA508`` - - - 'S508' - - - YUVY per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA561: - - - ``V4L2_PIX_FMT_SPCA561`` - - - 'S561' - - - Compressed GBRG Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-PAC207: - - - ``V4L2_PIX_FMT_PAC207`` - - - 'P207' - - - Compressed BGGR Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-MR97310A: - - - ``V4L2_PIX_FMT_MR97310A`` - - - 'M310' - - - Compressed BGGR Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-JL2005BCD: - - - ``V4L2_PIX_FMT_JL2005BCD`` - - - 'JL20' - - - JPEG compressed RGGB Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-OV511: - - - ``V4L2_PIX_FMT_OV511`` - - - 'O511' - - - OV511 JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-OV518: - - - ``V4L2_PIX_FMT_OV518`` - - - 'O518' - - - OV518 JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-PJPG: - - - ``V4L2_PIX_FMT_PJPG`` - - - 'PJPG' - - - Pixart 73xx JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-SE401: - - - ``V4L2_PIX_FMT_SE401`` - - - 'S401' - - - Compressed RGB format used by the gspca se401 driver - - - .. _V4L2-PIX-FMT-SQ905C: - - - ``V4L2_PIX_FMT_SQ905C`` - - - '905C' - - - Compressed RGGB bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-MJPEG: - - - ``V4L2_PIX_FMT_MJPEG`` - - - 'MJPG' - - - Compressed format used by the Zoran driver - - - .. _V4L2-PIX-FMT-PWC1: - - - ``V4L2_PIX_FMT_PWC1`` - - - 'PWC1' - - - Compressed format of the PWC driver. - - - .. _V4L2-PIX-FMT-PWC2: - - - ``V4L2_PIX_FMT_PWC2`` - - - 'PWC2' - - - Compressed format of the PWC driver. - - - .. _V4L2-PIX-FMT-SN9C10X: - - - ``V4L2_PIX_FMT_SN9C10X`` - - - 'S910' - - - Compressed format of the SN9C102 driver. - - - .. _V4L2-PIX-FMT-SN9C20X-I420: - - - ``V4L2_PIX_FMT_SN9C20X_I420`` - - - 'S920' - - - YUV 4:2:0 format of the gspca sn9c20x driver. - - - .. _V4L2-PIX-FMT-SN9C2028: - - - ``V4L2_PIX_FMT_SN9C2028`` - - - 'SONX' - - - Compressed GBRG bayer format of the gspca sn9c2028 driver. - - - .. _V4L2-PIX-FMT-STV0680: - - - ``V4L2_PIX_FMT_STV0680`` - - - 'S680' - - - Bayer format of the gspca stv0680 driver. - - - .. _V4L2-PIX-FMT-WNVA: - - - ``V4L2_PIX_FMT_WNVA`` - - - 'WNVA' - - - Used by the Winnov Videum driver, - `http://www.thedirks.org/winnov/ `__ - - - .. _V4L2-PIX-FMT-TM6000: - - - ``V4L2_PIX_FMT_TM6000`` - - - 'TM60' - - - Used by Trident tm6000 - - - .. _V4L2-PIX-FMT-CIT-YYVYUY: - - - ``V4L2_PIX_FMT_CIT_YYVYUY`` - - - 'CITV' - - - Used by xirlink CIT, found at IBM webcams. - - Uses one line of Y then 1 line of VYUY - - - .. _V4L2-PIX-FMT-KONICA420: - - - ``V4L2_PIX_FMT_KONICA420`` - - - 'KONI' - - - Used by Konica webcams. - - YUV420 planar in blocks of 256 pixels. - - - .. _V4L2-PIX-FMT-YYUV: - - - ``V4L2_PIX_FMT_YYUV`` - - - 'YYUV' - - - unknown - - - .. _V4L2-PIX-FMT-Y4: - - - ``V4L2_PIX_FMT_Y4`` - - - 'Y04 ' - - - Old 4-bit greyscale format. Only the most significant 4 bits of - each byte are used, the other bits are set to 0. - - - .. _V4L2-PIX-FMT-Y6: - - - ``V4L2_PIX_FMT_Y6`` - - - 'Y06 ' - - - Old 6-bit greyscale format. Only the most significant 6 bits of - each byte are used, the other bits are set to 0. - - - .. _V4L2-PIX-FMT-S5C-UYVY-JPG: - - - ``V4L2_PIX_FMT_S5C_UYVY_JPG`` - - - 'S5CI' - - - Two-planar format used by Samsung S5C73MX cameras. The first plane - contains interleaved JPEG and UYVY image data, followed by meta - data in form of an array of offsets to the UYVY data blocks. The - actual pointer array follows immediately the interleaved JPEG/UYVY - data, the number of entries in this array equals the height of the - UYVY image. Each entry is a 4-byte unsigned integer in big endian - order and it's an offset to a single pixel line of the UYVY image. - The first plane can start either with JPEG or UYVY data chunk. The - size of a single UYVY block equals the UYVY image's width - multiplied by 2. The size of a JPEG chunk depends on the image and - can vary with each line. - - The second plane, at an offset of 4084 bytes, contains a 4-byte - offset to the pointer array in the first plane. This offset is - followed by a 4-byte value indicating size of the pointer array. - All numbers in the second plane are also in big endian order. - Remaining data in the second plane is undefined. The information - in the second plane allows to easily find location of the pointer - array, which can be different for each frame. The size of the - pointer array is constant for given UYVY image height. - - In order to extract UYVY and JPEG frames an application can - initially set a data pointer to the start of first plane and then - add an offset from the first entry of the pointers table. Such a - pointer indicates start of an UYVY image pixel line. Whole UYVY - line can be copied to a separate buffer. These steps should be - repeated for each line, i.e. the number of entries in the pointer - array. Anything what's in between the UYVY lines is JPEG data and - should be concatenated to form the JPEG stream. + * - Identifier + - Code + - Details + * .. _V4L2-PIX-FMT-DV: + + - ``V4L2_PIX_FMT_DV`` + - 'dvsd' + - unknown + * .. _V4L2-PIX-FMT-ET61X251: + + - ``V4L2_PIX_FMT_ET61X251`` + - 'E625' + - Compressed format of the ET61X251 driver. + * .. _V4L2-PIX-FMT-HI240: + + - ``V4L2_PIX_FMT_HI240`` + - 'HI24' + - 8 bit RGB format used by the BTTV driver. + * .. _V4L2-PIX-FMT-HM12: + + - ``V4L2_PIX_FMT_HM12`` + - 'HM12' + - YUV 4:2:0 format used by the IVTV driver, + `http://www.ivtvdriver.org/ `__ + + The format is documented in the kernel sources in the file + ``Documentation/video4linux/cx2341x/README.hm12`` + * .. _V4L2-PIX-FMT-CPIA1: + + - ``V4L2_PIX_FMT_CPIA1`` + - 'CPIA' + - YUV format used by the gspca cpia1 driver. + * .. _V4L2-PIX-FMT-JPGL: + + - ``V4L2_PIX_FMT_JPGL`` + - 'JPGL' + - JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW + 80x. + * .. _V4L2-PIX-FMT-SPCA501: + + - ``V4L2_PIX_FMT_SPCA501`` + - 'S501' + - YUYV per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA505: + + - ``V4L2_PIX_FMT_SPCA505`` + - 'S505' + - YYUV per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA508: + + - ``V4L2_PIX_FMT_SPCA508`` + - 'S508' + - YUVY per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA561: + + - ``V4L2_PIX_FMT_SPCA561`` + - 'S561' + - Compressed GBRG Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-PAC207: + + - ``V4L2_PIX_FMT_PAC207`` + - 'P207' + - Compressed BGGR Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-MR97310A: + + - ``V4L2_PIX_FMT_MR97310A`` + - 'M310' + - Compressed BGGR Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-JL2005BCD: + + - ``V4L2_PIX_FMT_JL2005BCD`` + - 'JL20' + - JPEG compressed RGGB Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-OV511: + + - ``V4L2_PIX_FMT_OV511`` + - 'O511' + - OV511 JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-OV518: + + - ``V4L2_PIX_FMT_OV518`` + - 'O518' + - OV518 JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-PJPG: + + - ``V4L2_PIX_FMT_PJPG`` + - 'PJPG' + - Pixart 73xx JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-SE401: + + - ``V4L2_PIX_FMT_SE401`` + - 'S401' + - Compressed RGB format used by the gspca se401 driver + * .. _V4L2-PIX-FMT-SQ905C: + + - ``V4L2_PIX_FMT_SQ905C`` + - '905C' + - Compressed RGGB bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-MJPEG: + + - ``V4L2_PIX_FMT_MJPEG`` + - 'MJPG' + - Compressed format used by the Zoran driver + * .. _V4L2-PIX-FMT-PWC1: + + - ``V4L2_PIX_FMT_PWC1`` + - 'PWC1' + - Compressed format of the PWC driver. + * .. _V4L2-PIX-FMT-PWC2: + + - ``V4L2_PIX_FMT_PWC2`` + - 'PWC2' + - Compressed format of the PWC driver. + * .. _V4L2-PIX-FMT-SN9C10X: + + - ``V4L2_PIX_FMT_SN9C10X`` + - 'S910' + - Compressed format of the SN9C102 driver. + * .. _V4L2-PIX-FMT-SN9C20X-I420: + + - ``V4L2_PIX_FMT_SN9C20X_I420`` + - 'S920' + - YUV 4:2:0 format of the gspca sn9c20x driver. + * .. _V4L2-PIX-FMT-SN9C2028: + + - ``V4L2_PIX_FMT_SN9C2028`` + - 'SONX' + - Compressed GBRG bayer format of the gspca sn9c2028 driver. + * .. _V4L2-PIX-FMT-STV0680: + + - ``V4L2_PIX_FMT_STV0680`` + - 'S680' + - Bayer format of the gspca stv0680 driver. + * .. _V4L2-PIX-FMT-WNVA: + + - ``V4L2_PIX_FMT_WNVA`` + - 'WNVA' + - Used by the Winnov Videum driver, + `http://www.thedirks.org/winnov/ `__ + * .. _V4L2-PIX-FMT-TM6000: + + - ``V4L2_PIX_FMT_TM6000`` + - 'TM60' + - Used by Trident tm6000 + * .. _V4L2-PIX-FMT-CIT-YYVYUY: + + - ``V4L2_PIX_FMT_CIT_YYVYUY`` + - 'CITV' + - Used by xirlink CIT, found at IBM webcams. + + Uses one line of Y then 1 line of VYUY + * .. _V4L2-PIX-FMT-KONICA420: + + - ``V4L2_PIX_FMT_KONICA420`` + - 'KONI' + - Used by Konica webcams. + + YUV420 planar in blocks of 256 pixels. + * .. _V4L2-PIX-FMT-YYUV: + + - ``V4L2_PIX_FMT_YYUV`` + - 'YYUV' + - unknown + * .. _V4L2-PIX-FMT-Y4: + + - ``V4L2_PIX_FMT_Y4`` + - 'Y04 ' + - Old 4-bit greyscale format. Only the most significant 4 bits of + each byte are used, the other bits are set to 0. + * .. _V4L2-PIX-FMT-Y6: + + - ``V4L2_PIX_FMT_Y6`` + - 'Y06 ' + - Old 6-bit greyscale format. Only the most significant 6 bits of + each byte are used, the other bits are set to 0. + * .. _V4L2-PIX-FMT-S5C-UYVY-JPG: + + - ``V4L2_PIX_FMT_S5C_UYVY_JPG`` + - 'S5CI' + - Two-planar format used by Samsung S5C73MX cameras. The first plane + contains interleaved JPEG and UYVY image data, followed by meta + data in form of an array of offsets to the UYVY data blocks. The + actual pointer array follows immediately the interleaved JPEG/UYVY + data, the number of entries in this array equals the height of the + UYVY image. Each entry is a 4-byte unsigned integer in big endian + order and it's an offset to a single pixel line of the UYVY image. + The first plane can start either with JPEG or UYVY data chunk. The + size of a single UYVY block equals the UYVY image's width + multiplied by 2. The size of a JPEG chunk depends on the image and + can vary with each line. + + The second plane, at an offset of 4084 bytes, contains a 4-byte + offset to the pointer array in the first plane. This offset is + followed by a 4-byte value indicating size of the pointer array. + All numbers in the second plane are also in big endian order. + Remaining data in the second plane is undefined. The information + in the second plane allows to easily find location of the pointer + array, which can be different for each frame. The size of the + pointer array is constant for given UYVY image height. + + In order to extract UYVY and JPEG frames an application can + initially set a data pointer to the start of first plane and then + add an offset from the first entry of the pointers table. Such a + pointer indicates start of an UYVY image pixel line. Whole UYVY + line can be copied to a separate buffer. These steps should be + repeated for each line, i.e. the number of entries in the pointer + array. Anything what's in between the UYVY lines is JPEG data and + should be concatenated to form the JPEG stream. @@ -350,15 +246,10 @@ please make a proposal on the linux-media mailing list. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA`` - - - 0x00000001 - - - The color values are premultiplied by the alpha channel value. For - example, if a light blue pixel with 50% transparency was described - by RGBA values (128, 192, 255, 128), the same pixel described with - premultiplied colors would be described by RGBA values (64, 96, - 128, 128) + * - ``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA`` + - 0x00000001 + - The color values are premultiplied by the alpha channel value. For + example, if a light blue pixel with 50% transparency was described + by RGBA values (128, 192, 255, 128), the same pixel described with + premultiplied colors would be described by RGBA values (64, 96, + 128, 128) -- cgit v1.2.3