brintos

brintos / linux-shallow public Read only

0
0
Text · 7.5 KiB · d4c1d99 Raw
187 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/*3 * Media Bus API header4 *5 * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>6 *7 * This program is free software; you can redistribute it and/or modify8 * it under the terms of the GNU General Public License version 2 as9 * published by the Free Software Foundation.10 */11 12#ifndef __LINUX_MEDIA_BUS_FORMAT_H13#define __LINUX_MEDIA_BUS_FORMAT_H14 15/*16 * These bus formats uniquely identify data formats on the data bus. Format 017 * is reserved, MEDIA_BUS_FMT_FIXED shall be used by host-client pairs, where18 * the data format is fixed. Additionally, "2X8" means that one pixel is19 * transferred in two 8-bit samples, "BE" or "LE" specify in which order those20 * samples are transferred over the bus: "LE" means that the least significant21 * bits are transferred first, "BE" means that the most significant bits are22 * transferred first, and "PADHI" and "PADLO" define which bits - low or high,23 * in the incomplete high byte, are filled with padding bits.24 *25 * The bus formats are grouped by type, bus_width, bits per component, samples26 * per pixel and order of subsamples. Numerical values are sorted using generic27 * numerical sort order (8 thus comes before 10).28 *29 * As their value can't change when a new bus format is inserted in the30 * enumeration, the bus formats are explicitly given a numerical value. The next31 * free values for each category are listed below, update them when inserting32 * new pixel codes.33 */34 35#define MEDIA_BUS_FMT_FIXED			0x000136 37/* RGB - next is	0x1026 */38#define MEDIA_BUS_FMT_RGB444_1X12		0x101639#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x100140#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x100241#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE	0x100342#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE	0x100443#define MEDIA_BUS_FMT_RGB565_1X16		0x101744#define MEDIA_BUS_FMT_BGR565_2X8_BE		0x100545#define MEDIA_BUS_FMT_BGR565_2X8_LE		0x100646#define MEDIA_BUS_FMT_RGB565_2X8_BE		0x100747#define MEDIA_BUS_FMT_RGB565_2X8_LE		0x100848#define MEDIA_BUS_FMT_RGB666_1X18		0x100949#define MEDIA_BUS_FMT_RGB666_2X9_BE		0x102550#define MEDIA_BUS_FMT_BGR666_1X18		0x102351#define MEDIA_BUS_FMT_RBG888_1X24		0x100e52#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI	0x101553#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI	0x102454#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI	0x102255#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG		0x101056#define MEDIA_BUS_FMT_BGR888_1X24		0x101357#define MEDIA_BUS_FMT_BGR888_3X8		0x101b58#define MEDIA_BUS_FMT_GBR888_1X24		0x101459#define MEDIA_BUS_FMT_RGB888_1X24		0x100a60#define MEDIA_BUS_FMT_RGB888_2X12_BE		0x100b61#define MEDIA_BUS_FMT_RGB888_2X12_LE		0x100c62#define MEDIA_BUS_FMT_RGB888_3X8		0x101c63#define MEDIA_BUS_FMT_RGB888_3X8_DELTA		0x101d64#define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG		0x101165#define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA	0x101266#define MEDIA_BUS_FMT_RGB666_1X30_CPADLO	0x101e67#define MEDIA_BUS_FMT_RGB888_1X30_CPADLO	0x101f68#define MEDIA_BUS_FMT_ARGB8888_1X32		0x100d69#define MEDIA_BUS_FMT_RGB888_1X32_PADHI		0x100f70#define MEDIA_BUS_FMT_RGB101010_1X30		0x101871#define MEDIA_BUS_FMT_RGB666_1X36_CPADLO	0x102072#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO	0x102173#define MEDIA_BUS_FMT_RGB121212_1X36		0x101974#define MEDIA_BUS_FMT_RGB161616_1X48		0x101a75 76/* YUV (including grey) - next is	0x202f */77#define MEDIA_BUS_FMT_Y8_1X8			0x200178#define MEDIA_BUS_FMT_UV8_1X8			0x201579#define MEDIA_BUS_FMT_UYVY8_1_5X8		0x200280#define MEDIA_BUS_FMT_VYUY8_1_5X8		0x200381#define MEDIA_BUS_FMT_YUYV8_1_5X8		0x200482#define MEDIA_BUS_FMT_YVYU8_1_5X8		0x200583#define MEDIA_BUS_FMT_UYVY8_2X8			0x200684#define MEDIA_BUS_FMT_VYUY8_2X8			0x200785#define MEDIA_BUS_FMT_YUYV8_2X8			0x200886#define MEDIA_BUS_FMT_YVYU8_2X8			0x200987#define MEDIA_BUS_FMT_Y10_1X10			0x200a88#define MEDIA_BUS_FMT_Y10_2X8_PADHI_LE		0x202c89#define MEDIA_BUS_FMT_UYVY10_2X10		0x201890#define MEDIA_BUS_FMT_VYUY10_2X10		0x201991#define MEDIA_BUS_FMT_YUYV10_2X10		0x200b92#define MEDIA_BUS_FMT_YVYU10_2X10		0x200c93#define MEDIA_BUS_FMT_Y12_1X12			0x201394#define MEDIA_BUS_FMT_UYVY12_2X12		0x201c95#define MEDIA_BUS_FMT_VYUY12_2X12		0x201d96#define MEDIA_BUS_FMT_YUYV12_2X12		0x201e97#define MEDIA_BUS_FMT_YVYU12_2X12		0x201f98#define MEDIA_BUS_FMT_Y14_1X14			0x202d99#define MEDIA_BUS_FMT_Y16_1X16			0x202e100#define MEDIA_BUS_FMT_UYVY8_1X16		0x200f101#define MEDIA_BUS_FMT_VYUY8_1X16		0x2010102#define MEDIA_BUS_FMT_YUYV8_1X16		0x2011103#define MEDIA_BUS_FMT_YVYU8_1X16		0x2012104#define MEDIA_BUS_FMT_YDYUYDYV8_1X16		0x2014105#define MEDIA_BUS_FMT_UYVY10_1X20		0x201a106#define MEDIA_BUS_FMT_VYUY10_1X20		0x201b107#define MEDIA_BUS_FMT_YUYV10_1X20		0x200d108#define MEDIA_BUS_FMT_YVYU10_1X20		0x200e109#define MEDIA_BUS_FMT_VUY8_1X24			0x2024110#define MEDIA_BUS_FMT_YUV8_1X24			0x2025111#define MEDIA_BUS_FMT_UYYVYY8_0_5X24		0x2026112#define MEDIA_BUS_FMT_UYVY12_1X24		0x2020113#define MEDIA_BUS_FMT_VYUY12_1X24		0x2021114#define MEDIA_BUS_FMT_YUYV12_1X24		0x2022115#define MEDIA_BUS_FMT_YVYU12_1X24		0x2023116#define MEDIA_BUS_FMT_YUV10_1X30		0x2016117#define MEDIA_BUS_FMT_UYYVYY10_0_5X30		0x2027118#define MEDIA_BUS_FMT_AYUV8_1X32		0x2017119#define MEDIA_BUS_FMT_UYYVYY12_0_5X36		0x2028120#define MEDIA_BUS_FMT_YUV12_1X36		0x2029121#define MEDIA_BUS_FMT_YUV16_1X48		0x202a122#define MEDIA_BUS_FMT_UYYVYY16_0_5X48		0x202b123 124/* Bayer - next is	0x3021 */125#define MEDIA_BUS_FMT_SBGGR8_1X8		0x3001126#define MEDIA_BUS_FMT_SGBRG8_1X8		0x3013127#define MEDIA_BUS_FMT_SGRBG8_1X8		0x3002128#define MEDIA_BUS_FMT_SRGGB8_1X8		0x3014129#define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8		0x3015130#define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8		0x3016131#define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8		0x3017132#define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8		0x3018133#define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8		0x300b134#define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8		0x300c135#define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8		0x3009136#define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8		0x300d137#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE	0x3003138#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE	0x3004139#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE	0x3005140#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE	0x3006141#define MEDIA_BUS_FMT_SBGGR10_1X10		0x3007142#define MEDIA_BUS_FMT_SGBRG10_1X10		0x300e143#define MEDIA_BUS_FMT_SGRBG10_1X10		0x300a144#define MEDIA_BUS_FMT_SRGGB10_1X10		0x300f145#define MEDIA_BUS_FMT_SBGGR12_1X12		0x3008146#define MEDIA_BUS_FMT_SGBRG12_1X12		0x3010147#define MEDIA_BUS_FMT_SGRBG12_1X12		0x3011148#define MEDIA_BUS_FMT_SRGGB12_1X12		0x3012149#define MEDIA_BUS_FMT_SBGGR14_1X14		0x3019150#define MEDIA_BUS_FMT_SGBRG14_1X14		0x301a151#define MEDIA_BUS_FMT_SGRBG14_1X14		0x301b152#define MEDIA_BUS_FMT_SRGGB14_1X14		0x301c153#define MEDIA_BUS_FMT_SBGGR16_1X16		0x301d154#define MEDIA_BUS_FMT_SGBRG16_1X16		0x301e155#define MEDIA_BUS_FMT_SGRBG16_1X16		0x301f156#define MEDIA_BUS_FMT_SRGGB16_1X16		0x3020157 158/* JPEG compressed formats - next is	0x4002 */159#define MEDIA_BUS_FMT_JPEG_1X8			0x4001160 161/* Vendor specific formats - next is	0x5002 */162 163/* S5C73M3 sensor specific interleaved UYVY and JPEG */164#define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8		0x5001165 166/* HSV - next is	0x6002 */167#define MEDIA_BUS_FMT_AHSV8888_1X32		0x6001168 169/*170 * This format should be used when the same driver handles171 * both sides of the link and the bus format is a fixed172 * metadata format that is not configurable from userspace.173 * Width and height will be set to 0 for this format.174 */175#define MEDIA_BUS_FMT_METADATA_FIXED		0x7001176 177/* Generic line based metadata formats for serial buses. Next is 0x8008. */178#define MEDIA_BUS_FMT_META_8			0x8001179#define MEDIA_BUS_FMT_META_10			0x8002180#define MEDIA_BUS_FMT_META_12			0x8003181#define MEDIA_BUS_FMT_META_14			0x8004182#define MEDIA_BUS_FMT_META_16			0x8005183#define MEDIA_BUS_FMT_META_20			0x8006184#define MEDIA_BUS_FMT_META_24			0x8007185 186#endif /* __LINUX_MEDIA_BUS_FORMAT_H */187