1 /* 2 * Copyright (c) 2021 Rockchip Electronics Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef __RK_TYPE_H__ 17 #define __RK_TYPE_H__ 18 19 #include <stddef.h> 20 21 #if defined(_WIN32) && !defined(__MINGW32CE__) 22 23 typedef unsigned char RK_U8; 24 typedef unsigned short RK_U16; 25 typedef unsigned int RK_U32; 26 typedef unsigned long RK_ULONG; 27 typedef unsigned __int64 RK_U64; 28 29 typedef signed char RK_S8; 30 typedef signed short RK_S16; 31 typedef signed int RK_S32; 32 typedef signed long RK_LONG; 33 typedef signed __int64 RK_S64; 34 35 #else 36 37 typedef unsigned char RK_U8; 38 typedef unsigned short RK_U16; 39 typedef unsigned int RK_U32; 40 typedef unsigned long RK_ULONG; 41 typedef unsigned long long int RK_U64; 42 43 44 typedef signed char RK_S8; 45 typedef signed short RK_S16; 46 typedef signed int RK_S32; 47 typedef signed long RK_LONG; 48 typedef signed long long int RK_S64; 49 50 #endif 51 52 #ifndef MODULE_TAG 53 #define MODULE_TAG NULL 54 #endif 55 56 /** 57 * @ingroup rk_mpi 58 * @brief The type of mpp context 59 * @details This type is used when calling mpp_init(), which including decoder, 60 * encoder and Image Signal Process(ISP). So far decoder and encoder 61 * are supported perfectly, and ISP will be supported in the future. 62 */ 63 typedef enum { 64 MPP_CTX_DEC, /**< decoder */ 65 MPP_CTX_ENC, /**< encoder */ 66 MPP_CTX_ISP, /**< isp */ 67 MPP_CTX_BUTT, /**< undefined */ 68 } MppCtxType; 69 70 /** 71 * @ingroup rk_mpi 72 * @brief Enumeration used to define the possible video compression codings. 73 * sync with the omx_video.h 74 * 75 * @note This essentially refers to file extensions. If the coding is 76 * being used to specify the ENCODE type, then additional work 77 * must be done to configure the exact flavor of the compression 78 * to be used. For decode cases where the user application can 79 * not differentiate between MPEG-4 and H.264 bit streams, it is 80 * up to the codec to handle this. 81 */ 82 typedef enum { 83 MPP_VIDEO_CodingUnused, /**< Value when coding is N/A */ 84 MPP_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */ 85 MPP_VIDEO_CodingMPEG2, /**< AKA: H.262 */ 86 MPP_VIDEO_CodingH263, /**< H.263 */ 87 MPP_VIDEO_CodingMPEG4, /**< MPEG-4 */ 88 MPP_VIDEO_CodingWMV, /**< Windows Media Video (WMV1,WMV2,WMV3)*/ 89 MPP_VIDEO_CodingRV, /**< all versions of Real Video */ 90 MPP_VIDEO_CodingAVC, /**< H.264/AVC */ 91 MPP_VIDEO_CodingMJPEG, /**< Motion JPEG */ 92 MPP_VIDEO_CodingVP8, /**< VP8 */ 93 MPP_VIDEO_CodingVP9, /**< VP9 */ 94 MPP_VIDEO_CodingVC1 = 0x01000000, /**< Windows Media Video (WMV1,WMV2,WMV3)*/ 95 MPP_VIDEO_CodingFLV1, /**< Sorenson H.263 */ 96 MPP_VIDEO_CodingDIVX3, /**< DIVX3 */ 97 MPP_VIDEO_CodingVP6, 98 MPP_VIDEO_CodingHEVC, /**< H.265/HEVC */ 99 MPP_VIDEO_CodingAVSPLUS, /**< AVS+ */ 100 MPP_VIDEO_CodingAVS, /**< AVS profile=0x20 */ 101 MPP_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 102 MPP_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 103 MPP_VIDEO_CodingMax = 0x7FFFFFFF 104 } MppCodingType; 105 106 /* 107 * All external interface object list here. 108 * The interface object is defined as void * for expandability 109 * The cross include between these objects will introduce extra 110 * compiling difficulty. So we move them together in this header. 111 * 112 * Object interface header list: 113 * 114 * MppCtx - rk_mpi.h 115 * MppParam - rk_mpi.h 116 * 117 * MppFrame - mpp_frame.h 118 * MppPacket - mpp_packet.h 119 * 120 * MppBuffer - mpp_buffer.h 121 * MppBufferGroup - mpp_buffer.h 122 * 123 * MppTask - mpp_task.h 124 * MppMeta - mpp_meta.h 125 */ 126 127 typedef void* MppCtx; 128 typedef void* MppParam; 129 130 typedef void* MppFrame; 131 typedef void* MppPacket; 132 133 typedef void* MppBuffer; 134 typedef void* MppBufferGroup; 135 136 typedef void* MppTask; 137 typedef void* MppMeta; 138 139 #endif /* __RK_TYPE_H__ */