1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Broadcom BCM2835 V4L2 driver 4 * 5 * Copyright © 2013 Raspberry Pi (Trading) Ltd. 6 * 7 * Authors: Vincent Sanders @ Collabora 8 * Dave Stevenson @ Broadcom 9 * (now dave.stevenson@raspberrypi.org) 10 * Simon Mellor @ Broadcom 11 * Luke Diamand @ Broadcom 12 */ 13 #ifndef MMAL_ENCODINGS_H 14 #define MMAL_ENCODINGS_H 15 16 #define MMAL_ENCODING_H264 MMAL_FOURCC('H', '2', '6', '4') 17 #define MMAL_ENCODING_H263 MMAL_FOURCC('H', '2', '6', '3') 18 #define MMAL_ENCODING_MP4V MMAL_FOURCC('M', 'P', '4', 'V') 19 #define MMAL_ENCODING_MP2V MMAL_FOURCC('M', 'P', '2', 'V') 20 #define MMAL_ENCODING_MP1V MMAL_FOURCC('M', 'P', '1', 'V') 21 #define MMAL_ENCODING_WMV3 MMAL_FOURCC('W', 'M', 'V', '3') 22 #define MMAL_ENCODING_WMV2 MMAL_FOURCC('W', 'M', 'V', '2') 23 #define MMAL_ENCODING_WMV1 MMAL_FOURCC('W', 'M', 'V', '1') 24 #define MMAL_ENCODING_WVC1 MMAL_FOURCC('W', 'V', 'C', '1') 25 #define MMAL_ENCODING_VP8 MMAL_FOURCC('V', 'P', '8', ' ') 26 #define MMAL_ENCODING_VP7 MMAL_FOURCC('V', 'P', '7', ' ') 27 #define MMAL_ENCODING_VP6 MMAL_FOURCC('V', 'P', '6', ' ') 28 #define MMAL_ENCODING_THEORA MMAL_FOURCC('T', 'H', 'E', 'O') 29 #define MMAL_ENCODING_SPARK MMAL_FOURCC('S', 'P', 'R', 'K') 30 #define MMAL_ENCODING_MJPEG MMAL_FOURCC('M', 'J', 'P', 'G') 31 32 #define MMAL_ENCODING_JPEG MMAL_FOURCC('J', 'P', 'E', 'G') 33 #define MMAL_ENCODING_GIF MMAL_FOURCC('G', 'I', 'F', ' ') 34 #define MMAL_ENCODING_PNG MMAL_FOURCC('P', 'N', 'G', ' ') 35 #define MMAL_ENCODING_PPM MMAL_FOURCC('P', 'P', 'M', ' ') 36 #define MMAL_ENCODING_TGA MMAL_FOURCC('T', 'G', 'A', ' ') 37 #define MMAL_ENCODING_BMP MMAL_FOURCC('B', 'M', 'P', ' ') 38 39 #define MMAL_ENCODING_I420 MMAL_FOURCC('I', '4', '2', '0') 40 #define MMAL_ENCODING_I420_SLICE MMAL_FOURCC('S', '4', '2', '0') 41 #define MMAL_ENCODING_YV12 MMAL_FOURCC('Y', 'V', '1', '2') 42 #define MMAL_ENCODING_I422 MMAL_FOURCC('I', '4', '2', '2') 43 #define MMAL_ENCODING_I422_SLICE MMAL_FOURCC('S', '4', '2', '2') 44 #define MMAL_ENCODING_YUYV MMAL_FOURCC('Y', 'U', 'Y', 'V') 45 #define MMAL_ENCODING_YVYU MMAL_FOURCC('Y', 'V', 'Y', 'U') 46 #define MMAL_ENCODING_UYVY MMAL_FOURCC('U', 'Y', 'V', 'Y') 47 #define MMAL_ENCODING_VYUY MMAL_FOURCC('V', 'Y', 'U', 'Y') 48 #define MMAL_ENCODING_NV12 MMAL_FOURCC('N', 'V', '1', '2') 49 #define MMAL_ENCODING_NV21 MMAL_FOURCC('N', 'V', '2', '1') 50 #define MMAL_ENCODING_ARGB MMAL_FOURCC('A', 'R', 'G', 'B') 51 #define MMAL_ENCODING_RGBA MMAL_FOURCC('R', 'G', 'B', 'A') 52 #define MMAL_ENCODING_ABGR MMAL_FOURCC('A', 'B', 'G', 'R') 53 #define MMAL_ENCODING_BGRA MMAL_FOURCC('B', 'G', 'R', 'A') 54 #define MMAL_ENCODING_RGB16 MMAL_FOURCC('R', 'G', 'B', '2') 55 #define MMAL_ENCODING_RGB24 MMAL_FOURCC('R', 'G', 'B', '3') 56 #define MMAL_ENCODING_RGB32 MMAL_FOURCC('R', 'G', 'B', '4') 57 #define MMAL_ENCODING_BGR16 MMAL_FOURCC('B', 'G', 'R', '2') 58 #define MMAL_ENCODING_BGR24 MMAL_FOURCC('B', 'G', 'R', '3') 59 #define MMAL_ENCODING_BGR32 MMAL_FOURCC('B', 'G', 'R', '4') 60 61 /** SAND Video (YUVUV128) format, native format understood by VideoCore. 62 * This format is *not* opaque - if requested you will receive full frames 63 * of YUV_UV video. 64 */ 65 #define MMAL_ENCODING_YUVUV128 MMAL_FOURCC('S', 'A', 'N', 'D') 66 67 /** VideoCore opaque image format, image handles are returned to 68 * the host but not the actual image data. 69 */ 70 #define MMAL_ENCODING_OPAQUE MMAL_FOURCC('O', 'P', 'Q', 'V') 71 72 /** An EGL image handle 73 */ 74 #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E', 'G', 'L', 'I') 75 76 /* }@ */ 77 78 /** \name Pre-defined audio encodings */ 79 /* @{ */ 80 #define MMAL_ENCODING_PCM_UNSIGNED_BE MMAL_FOURCC('P', 'C', 'M', 'U') 81 #define MMAL_ENCODING_PCM_UNSIGNED_LE MMAL_FOURCC('p', 'c', 'm', 'u') 82 #define MMAL_ENCODING_PCM_SIGNED_BE MMAL_FOURCC('P', 'C', 'M', 'S') 83 #define MMAL_ENCODING_PCM_SIGNED_LE MMAL_FOURCC('p', 'c', 'm', 's') 84 #define MMAL_ENCODING_PCM_FLOAT_BE MMAL_FOURCC('P', 'C', 'M', 'F') 85 #define MMAL_ENCODING_PCM_FLOAT_LE MMAL_FOURCC('p', 'c', 'm', 'f') 86 87 /* Pre-defined H264 encoding variants */ 88 89 /** ISO 14496-10 Annex B byte stream format */ 90 #define MMAL_ENCODING_VARIANT_H264_DEFAULT 0 91 /** ISO 14496-15 AVC stream format */ 92 #define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A', 'V', 'C', '1') 93 /** Implicitly delineated NAL units without emulation prevention */ 94 #define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R', 'A', 'W', ' ') 95 96 /** \defgroup MmalColorSpace List of pre-defined video color spaces 97 * This defines a list of common color spaces. This list isn't exhaustive and 98 * is only provided as a convenience to avoid clients having to use FourCC 99 * codes directly. However components are allowed to define and use their own 100 * FourCC codes. 101 */ 102 /* @{ */ 103 104 /** Unknown color space */ 105 #define MMAL_COLOR_SPACE_UNKNOWN 0 106 /** ITU-R BT.601-5 [SDTV] */ 107 #define MMAL_COLOR_SPACE_ITUR_BT601 MMAL_FOURCC('Y', '6', '0', '1') 108 /** ITU-R BT.709-3 [HDTV] */ 109 #define MMAL_COLOR_SPACE_ITUR_BT709 MMAL_FOURCC('Y', '7', '0', '9') 110 /** JPEG JFIF */ 111 #define MMAL_COLOR_SPACE_JPEG_JFIF MMAL_FOURCC('Y', 'J', 'F', 'I') 112 /** Title 47 Code of Federal Regulations (2003) 73.682 (a) (20) */ 113 #define MMAL_COLOR_SPACE_FCC MMAL_FOURCC('Y', 'F', 'C', 'C') 114 /** Society of Motion Picture and Television Engineers 240M (1999) */ 115 #define MMAL_COLOR_SPACE_SMPTE240M MMAL_FOURCC('Y', '2', '4', '0') 116 /** ITU-R BT.470-2 System M */ 117 #define MMAL_COLOR_SPACE_BT470_2_M MMAL_FOURCC('Y', '_', '_', 'M') 118 /** ITU-R BT.470-2 System BG */ 119 #define MMAL_COLOR_SPACE_BT470_2_BG MMAL_FOURCC('Y', '_', 'B', 'G') 120 /** JPEG JFIF, but with 16..255 luma */ 121 #define MMAL_COLOR_SPACE_JFIF_Y16_255 MMAL_FOURCC('Y', 'Y', '1', '6') 122 /* @} MmalColorSpace List */ 123 124 #endif /* MMAL_ENCODINGS_H */ 125