| 1 | /* |
| 2 | * Copyright (c) 2020, Intel Corporation |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice shall be included |
| 12 | * in all copies or substantial portions of the Software. |
| 13 | * |
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 | * OTHER DEALINGS IN THE SOFTWARE. |
| 21 | */ |
| 22 | |
| 23 | #ifndef __MEDIA_COMMON_DEFS_H__ |
| 24 | #define __MEDIA_COMMON_DEFS_H__ |
| 25 | |
| 26 | //! |
| 27 | //! \brief Color Spaces enum |
| 28 | //! |
| 29 | typedef enum _MEDIA_CSPACE |
| 30 | { |
| 31 | CSpace_None = -5 , //!< Unidentified |
| 32 | CSpace_Source = -4 , //!< Current source Color Space |
| 33 | |
| 34 | // Groups of Color Spaces |
| 35 | CSpace_RGB = -3 , //!< sRGB |
| 36 | CSpace_YUV = -2 , //!< YUV BT601 or BT709 - non xvYCC |
| 37 | CSpace_Gray = -1 , //!< Gray scale image with only Y component |
| 38 | CSpace_Any = 0 , //!< Any |
| 39 | |
| 40 | // Specific Color Spaces |
| 41 | CSpace_sRGB , //!< RGB - sRGB - RGB[0,255] |
| 42 | CSpace_stRGB , //!< RGB - stRGB - RGB[16,235] |
| 43 | CSpace_BT601 , //!< YUV BT.601 Y[16,235] UV[16,240] |
| 44 | CSpace_BT601_FullRange , //!< YUV BT.601 Y[0,255] UV[-128,+127] |
| 45 | CSpace_BT709 , //!< YUV BT.709 Y[16,235] UV[16,240] |
| 46 | CSpace_BT709_FullRange , //!< YUV BT.709 Y[0,255] UV[-128,+127] |
| 47 | CSpace_xvYCC601 , //!< xvYCC 601 Y[16,235] UV[16,240] |
| 48 | CSpace_xvYCC709 , //!< xvYCC 709 Y[16,235] UV[16,240] |
| 49 | CSpace_BT601Gray , //!< BT.601 Y[16,235] |
| 50 | CSpace_BT601Gray_FullRange , //!< BT.601 Y[0,255] |
| 51 | CSpace_BT2020 , //!< BT.2020 YUV Limited Range 10bit Y[64, 940] UV[64, 960] |
| 52 | CSpace_BT2020_FullRange , //!< BT.2020 YUV Full Range 10bit [0, 1023] |
| 53 | CSpace_BT2020_RGB , //!< BT.2020 RGB Full Range 10bit [0, 1023] |
| 54 | CSpace_BT2020_stRGB , //!< BT.2020 RGB Studio Range 10bit [64, 940] |
| 55 | CSpace_Count //!< Keep this at the end |
| 56 | } MEDIA_CSPACE; |
| 57 | C_ASSERT(CSpace_Count == 15); //!< When adding, update assert & vphal_solo_scenario.cpp |
| 58 | |
| 59 | //! |
| 60 | //! \brief Rotation Mode enum |
| 61 | //! |
| 62 | typedef enum _MEDIA_ROTATION |
| 63 | { |
| 64 | ROTATION_IDENTITY = 0 , //!< Rotation 0 degrees |
| 65 | ROTATION_90 , //!< Rotation 90 degrees |
| 66 | ROTATION_180 , //!< Rotation 180 degrees |
| 67 | ROTATION_270 , //!< Rotation 270 degrees |
| 68 | ROTATION_MIRROR_HORIZONTAL , //!< Horizontal Mirror |
| 69 | ROTATION_MIRROR_VERTICAL , //!< Vertical Mirror |
| 70 | ROTATION_90_MIRROR_VERTICAL , //!< 90 + V Mirror |
| 71 | ROTATION_90_MIRROR_HORIZONTAL //!< 90 + H Mirror |
| 72 | } MEDIA_ROTATION; |
| 73 | |
| 74 | |
| 75 | #endif // __MEDIA_COMMON_DEFS_H__ |