summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-25 20:52:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-25 20:52:10 +0000
commit5c6bfd5ea55f965669e0bb511e0527bddec81d94 (patch)
tree0a8e145e4d07edd190689345da07aeea88bf53fc /nuttx
parent3ca39c6dd89da3f6a4e6066ebb2e554955085987 (diff)
downloadpx4-nuttx-5c6bfd5ea55f965669e0bb511e0527bddec81d94.tar.gz
px4-nuttx-5c6bfd5ea55f965669e0bb511e0527bddec81d94.tar.bz2
px4-nuttx-5c6bfd5ea55f965669e0bb511e0527bddec81d94.zip
Distinguish differenc RGB16 types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1303 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/sim/src/up_framebuffer.c4
-rw-r--r--nuttx/include/nuttx/fb.h106
2 files changed, 56 insertions, 54 deletions
diff --git a/nuttx/arch/sim/src/up_framebuffer.c b/nuttx/arch/sim/src/up_framebuffer.c
index e98de5611..da4261ee2 100644
--- a/nuttx/arch/sim/src/up_framebuffer.c
+++ b/nuttx/arch/sim/src/up_framebuffer.c
@@ -71,7 +71,7 @@
#elif CONFIG_SIM_FBBPP == 8
# define FB_FMT FB_FMT_RGB8
#elif CONFIG_SIM_FBBPP == 16
-# define FB_FMT FB_FMT_RGB16
+# define FB_FMT FB_FMT_RGB16_565
#elif CONFIG_SIM_FBBPP == 24
# define FB_FMT FB_FMT_RGB24
#elif CONFIG_SIM_FBBPP == 32
@@ -184,7 +184,7 @@ struct fb_vtable_s g_fbobject =
****************************************************************************/
/****************************************************************************
- * Name:
+ * Name: up_getvideoinfo
****************************************************************************/
static int up_getvideoinfo(FAR struct fb_vtable_s *vtable,
diff --git a/nuttx/include/nuttx/fb.h b/nuttx/include/nuttx/fb.h
index 8a5146887..f8d9eb9f3 100644
--- a/nuttx/include/nuttx/fb.h
+++ b/nuttx/include/nuttx/fb.h
@@ -67,93 +67,94 @@
#define FB_FMT_RGB1 2 /* BPP=1 */
#define FB_FMT_RGB4 3 /* BPP=4 */
#define FB_FMT_RGB8 4 /* BPP=8 */
-#define FB_FMT_RGB16 5 /* BPP=16 */
-#define FB_FMT_RGB24 6 /* BPP=24 */
-#define FB_FMT_RGB32 7 /* BPP=32 */
+#define FB_FMT_RGB16_555 5 /* BPP=16 R=5, G=5, B=5 (1 unused bit) */
+#define FB_FMT_RGB16_565 6 /* BPP=16 R=6, G=6, B=5 */
+#define FB_FMT_RGB24 7 /* BPP=24 */
+#define FB_FMT_RGB32 8 /* BPP=32 */
/* Run length encoded RGB */
-#define FB_FMT_RGBRLE4 8 /* BPP=4 */
-#define FB_FMT_RGBRLE8 9 /* BPP=8 */
+#define FB_FMT_RGBRLE4 9 /* BPP=4 */
+#define FB_FMT_RGBRLE8 10 /* BPP=8 */
/* Raw RGB */
-#define FB_FMT_RGBRAW 10 /* BPP=? */
+#define FB_FMT_RGBRAW 11 /* BPP=? */
/* Raw RGB with arbitrary sample packing within a pixel. Packing and precision
* ov R, G and B components is determined by bit masks for each.
*/
-#define FB_FMT_RGBBTFLD16 11 /* BPP=16 */
-#define FB_FMT_RGBBTFLD24 12 /* BPP=24 */
-#define FB_FMT_RGBBTFLD24 13 /* BPP=32 */
-#define FB_FMT_RGBA16 14 /* BPP=16 Raw RGB with alpha */
-#define FB_FMT_RGBA32 15 /* BPP=32 Raw RGB with alpha */
+#define FB_FMT_RGBBTFLD16 12 /* BPP=16 */
+#define FB_FMT_RGBBTFLD24 13 /* BPP=24 */
+#define FB_FMT_RGBBTFLD24 14 /* BPP=32 */
+#define FB_FMT_RGBA16 15 /* BPP=16 Raw RGB with alpha */
+#define FB_FMT_RGBA32 16 /* BPP=32 Raw RGB with alpha */
/* Raw RGB with a transparency field. Layout is as for stanadard RGB at 16 and
* 32 bits per pixel but the msb in each pixel indicates whether the pixel is
* transparent or not.
*/
-#define FB_FMT_RGBT16 16 /* BPP=16 */
-#define FB_FMT_RGBT32 17 /* BPP=32 */
+#define FB_FMT_RGBT16 17 /* BPP=16 */
+#define FB_FMT_RGBT32 18 /* BPP=32 */
#define FB_ISRGB(f) ((f) >= FB_FMT_RGB1) && (f) <= FB_FMT_RGBT32)
/* Packed YUV Formats *******************************************************/
-#define FB_FMT_AYUV 18 /* BPP=32 Combined YUV and alpha */
-#define FB_FMT_CLJR 19 /* BPP=8 4 pixels packed into a uint32.
+#define FB_FMT_AYUV 19 /* BPP=32 Combined YUV and alpha */
+#define FB_FMT_CLJR 20 /* BPP=8 4 pixels packed into a uint32.
* YUV 4:1:1 with l< 8 bits per YUV sample */
-#define FB_FMT_CYUV 20 /* BPP=16 UYVY except that height is reversed */
-#define FB_FMT_IRAW 21 /* BPP=? Intel uncompressed YUV.
-#define FB_FMT_IUYV 22 /* BPP=16 Interlaced UYVY (line order
+#define FB_FMT_CYUV 21 /* BPP=16 UYVY except that height is reversed */
+#define FB_FMT_IRAW 22 /* BPP=? Intel uncompressed YUV.
+#define FB_FMT_IUYV 23 /* BPP=16 Interlaced UYVY (line order
* 0,2,4,.., 1,3,5...)
-#define FB_FMT_IY41 23 /* BPP=12 Interlaced Y41P (line order
+#define FB_FMT_IY41 24 /* BPP=12 Interlaced Y41P (line order
* 0,2,4,.., 1,3,5...)
-#define FB_FMT_IYU2 24 /* BPP=24 */
-#define FB_FMT_HDYC 25 /* BPP=16 UYVY except uses the BT709 color space */
-#define FB_FMT_UYVP 26 /* BPP=24? YCbCr 4:2:2, 10-bits per component in U0Y0V0Y1 order */
-#define FB_FMT_UYVY 27 /* BPP=16 YUV 4:2:2 */
+#define FB_FMT_IYU2 25 /* BPP=24 */
+#define FB_FMT_HDYC 26 /* BPP=16 UYVY except uses the BT709 color space */
+#define FB_FMT_UYVP 27 /* BPP=24? YCbCr 4:2:2, 10-bits per component in U0Y0V0Y1 order */
+#define FB_FMT_UYVY 28 /* BPP=16 YUV 4:2:2 */
#define FB_FMT_UYNV FB_FMT_UYVY /* BPP=16 */
#define FB_FMT_Y422 FB_FMT_UYVY /* BPP=16 */
-#define FB_FMT_V210 28 /* BPP=32 10-bit 4:2:2 YCrCb */
-#define FB_FMT_V422 29 /* BPP=16 Upside down version of UYVY.
-#define FB_FMT_V655 30 /* BPP=16? 16-bit YUV 4:2:2 */
-#define FB_FMT_VYUY 31 /* BPP=? ATI Packed YUV Data
-#define FB_FMT_YUYV 32 /* BPP=16 YUV 4:2:2 */
+#define FB_FMT_V210 29 /* BPP=32 10-bit 4:2:2 YCrCb */
+#define FB_FMT_V422 30 /* BPP=16 Upside down version of UYVY.
+#define FB_FMT_V655 31 /* BPP=16? 16-bit YUV 4:2:2 */
+#define FB_FMT_VYUY 32 /* BPP=? ATI Packed YUV Data
+#define FB_FMT_YUYV 33 /* BPP=16 YUV 4:2:2 */
#define FB_FMT_YUY2 FB_FMT_YUYV /* BPP=16 YUV 4:2:2 */
#define FB_FMT_YUNV FB_FMT_YUYV /* BPP=16 YUV 4:2:2 */
-#define FB_FMT_YVYU 33 /* BPP=16 YUV 4:2:2 */
-#define FB_FMT_Y41P 34 /* BPP=12 YUV 4:1:1 */
-#define FB_FMT_Y411 35 /* BPP=12 YUV 4:1:1 */
-#define FB_FMT_Y211 36 /* BPP=8 */
-#define FB_FMT_Y41T 37 /* BPP=12 Y41P LSB for transparency */
-#define FB_FMT_Y42T 38 /* BPP=16 UYVY LSB for transparency */
-#define FB_FMT_YUVP 39 /* BPP=24? YCbCr 4:2:2 Y0U0Y1V0 order */
+#define FB_FMT_YVYU 34 /* BPP=16 YUV 4:2:2 */
+#define FB_FMT_Y41P 35 /* BPP=12 YUV 4:1:1 */
+#define FB_FMT_Y411 36 /* BPP=12 YUV 4:1:1 */
+#define FB_FMT_Y211 37 /* BPP=8 */
+#define FB_FMT_Y41T 38 /* BPP=12 Y41P LSB for transparency */
+#define FB_FMT_Y42T 39 /* BPP=16 UYVY LSB for transparency */
+#define FB_FMT_YUVP 40 /* BPP=24? YCbCr 4:2:2 Y0U0Y1V0 order */
#define FB_ISYUVPACKED(f) ((f) >= FB_FMT_AYUV) && (f) <= FB_FMT_YUVP)
/* Packed Planar YUV Formats ************************************************/
-#define FB_FMT_YVU9 40 /* BPP=9 8-bit Y followed by 8-bit 4x4 VU */
-#define FB_FMT_YUV9 41 /* BPP=9? */
-#define FB_FMT_IF09 42 /* BPP=9.5 YVU9 + 4x4 plane of delta relative to tframe. */
-#define FB_FMT_YV16 43 /* BPP=16 8-bit Y followed by 8-bit 2x1 VU */
-#define FB_FMT_YV12 44 /* BPP=12 8-bit Y followed by 8-bit 2x2 VU */
-#define FB_FMT_I420 45 /* BPP=12 8-bit Y followed by 8-bit 2x2 UV */
+#define FB_FMT_YVU9 41 /* BPP=9 8-bit Y followed by 8-bit 4x4 VU */
+#define FB_FMT_YUV9 42 /* BPP=9? */
+#define FB_FMT_IF09 43 /* BPP=9.5 YVU9 + 4x4 plane of delta relative to tframe. */
+#define FB_FMT_YV16 44 /* BPP=16 8-bit Y followed by 8-bit 2x1 VU */
+#define FB_FMT_YV12 45 /* BPP=12 8-bit Y followed by 8-bit 2x2 VU */
+#define FB_FMT_I420 46 /* BPP=12 8-bit Y followed by 8-bit 2x2 UV */
#define FB_FMT_IYUV FB_FMT_I420 /* BPP=12 */
-#define FB_FMT_NV12 46 /* BPP=12 8-bit Y followed by an interleaved 2x2 UV */
-#define FB_FMT_NV21 47 /* BPP=12 NV12 with UV reversed */
-#define FB_FMT_IMC1 48 /* BPP=12 YV12 except UV planes ame stride as Y */
-#define FB_FMT_IMC2 49 /* BPP=12 IMC1 except UV lines interleaved at half stride boundaries */
-#define FB_FMT_IMC3 50 /* BPP=12 As IMC1 except that UV swapped */
-#define FB_FMT_IMC4 51 /* BPP=12 As IMC2 except that UV swapped */
-#define FB_FMT_CLPL 52 /* BPP=12 YV12 but including a level of indirection. */
-#define FB_FMT_Y41B 53 /* BPP=12? 4:1:1 planar. */
-#define FB_FMT_Y42B 54 /* BPP=16? YUV 4:2:2 planar. */
-#define FB_FMT_CXY1 55 /* BPP=12 */
-#define FB_FMT_CXY2 56 /* BPP=16 */
+#define FB_FMT_NV12 47 /* BPP=12 8-bit Y followed by an interleaved 2x2 UV */
+#define FB_FMT_NV21 48 /* BPP=12 NV12 with UV reversed */
+#define FB_FMT_IMC1 49 /* BPP=12 YV12 except UV planes ame stride as Y */
+#define FB_FMT_IMC2 50 /* BPP=12 IMC1 except UV lines interleaved at half stride boundaries */
+#define FB_FMT_IMC3 51 /* BPP=12 As IMC1 except that UV swapped */
+#define FB_FMT_IMC4 52 /* BPP=12 As IMC2 except that UV swapped */
+#define FB_FMT_CLPL 53 /* BPP=12 YV12 but including a level of indirection. */
+#define FB_FMT_Y41B 54 /* BPP=12? 4:1:1 planar. */
+#define FB_FMT_Y42B 55 /* BPP=16? YUV 4:2:2 planar. */
+#define FB_FMT_CXY1 56 /* BPP=12 */
+#define FB_FMT_CXY2 57 /* BPP=16 */
#define FB_ISYUVPLANAR(f) ((f) >= FB_FMT_AYUV) && (f) <= FB_FMT_YUVP)
#define FB_ISYUV(f) (FB_ISYUVPACKED(f) || FB_ISYUVPLANAR(f))
@@ -309,4 +310,5 @@ struct fb_vtable_s
int (*setcursor)(FAR struct fb_vtable_s *vtable, FAR struct fb_setcursor_s *setttings);
#endif
};
+
#endif /* _INCLUDE_NUTTX_FB_H */