xref: /aosp_15_r20/external/intel-media-driver/cmrtlib/agnostic/share/cm_surface_properties.h (revision ba62d9d3abf0e404f2022b4cd7a85e107f48596f)
1 /*
2 * Copyright (c) 2017, 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 CMRTLIB_AGNOSTIC_SHARE_CM_SURFACE_PROPERTIES_H_
24 #define CMRTLIB_AGNOSTIC_SHARE_CM_SURFACE_PROPERTIES_H_
25 
26 #include "cm_include.h"
27 
28 enum CM_ROTATION {
29   CM_ROTATION_IDENTITY = 0,      //!< Rotation 0 degrees
30   CM_ROTATION_90,                //!< Rotation 90 degrees
31   CM_ROTATION_180,               //!< Rotation 180 degrees
32   CM_ROTATION_270,               //!< Rotation 270 degrees
33 };
34 
35 #define    CM_CHROMA_SITING_NONE           0
36 #define    CM_CHROMA_SITING_HORZ_LEFT      1 << 0
37 #define    CM_CHROMA_SITING_HORZ_CENTER    1 << 1
38 #define    CM_CHROMA_SITING_HORZ_RIGHT     1 << 2
39 #define    CM_CHROMA_SITING_VERT_TOP       1 << 4
40 #define    CM_CHROMA_SITING_VERT_CENTER    1 << 5
41 #define    CM_CHROMA_SITING_VERT_BOTTOM    1 << 6
42 
43 // to support new flag with current API
44 // new flag/field could be added to the end of this structure
45 struct CM_FLAG {
CM_FLAGCM_FLAG46   CM_RT_API CM_FLAG(): rotationFlag(CM_ROTATION_IDENTITY),
47                        chromaSiting(0) {};
48 
49   CM_ROTATION rotationFlag;
50   int32_t chromaSiting;
51 };
52 
53 typedef enum _CM_SAMPLER8x8_SURFACE_ {
54   CM_AVS_SURFACE = 0,
55   CM_VA_SURFACE = 1
56 }CM_SAMPLER8x8_SURFACE;
57 
58 typedef enum _CM_SURFACE_ADDRESS_CONTROL_MODE_ {
59   CM_SURFACE_CLAMP = 0,
60   CM_SURFACE_MIRROR = 1
61 } CM_SURFACE_ADDRESS_CONTROL_MODE;
62 
63 #endif  // #ifndef CMRTLIB_AGNOSTIC_SHARE_CM_SURFACE_PROPERTIES_H_
64