1 /*! 2 ************************************************************************ 3 * \file 4 * types.h 5 * 6 * \brief 7 * type definitions. 8 * 9 * \author 10 * Main contributors (see contributors.h for copyright, address and affiliation details) 11 * 12 ************************************************************************ 13 */ 14 #ifndef _TYPES_H_ 15 #define _TYPES_H_ 16 17 /*********************************************************************** 18 * T y p e d e f i n i t i o n s f o r T M L 19 *********************************************************************** 20 */ 21 22 typedef enum 23 { 24 // YUV 25 PLANE_Y = 0, // PLANE_Y 26 PLANE_U = 1, // PLANE_Cb 27 PLANE_V = 2, // PLANE_Cr 28 // RGB 29 PLANE_G = 0, 30 PLANE_B = 1, 31 PLANE_R = 2 32 } ColorPlane; 33 34 enum { 35 LIST_0 = 0, 36 LIST_1 = 1, 37 BI_PRED = 2, 38 BI_PRED_L0 = 3, 39 BI_PRED_L1 = 4 40 }; 41 42 enum { 43 ERROR_SAD = 0, 44 ERROR_SSE = 1, 45 ERROR_SATD = 2, 46 ERROR_PSATD = 3 47 }; 48 49 enum { 50 ME_Y_ONLY = 0, 51 ME_YUV_FP = 1, 52 ME_YUV_FP_SP = 2 53 }; 54 55 56 enum { 57 DISTORTION_MSE = 0 58 }; 59 60 61 //! Data Partitioning Modes 62 typedef enum 63 { 64 PAR_DP_1, //!< no data partitioning is supported 65 PAR_DP_3 //!< data partitioning with 3 partitions 66 } PAR_DP_TYPE; 67 68 69 //! Output File Types 70 typedef enum 71 { 72 PAR_OF_ANNEXB, //!< Annex B byte stream format 73 PAR_OF_RTP //!< RTP packets in outfile 74 } PAR_OF_TYPE; 75 76 //! Field Coding Types 77 typedef enum 78 { 79 FRAME_CODING = 0, 80 FIELD_CODING = 1, 81 ADAPTIVE_CODING = 2, 82 FRAME_MB_PAIR_CODING = 3 83 } CodingType; 84 85 86 //! definition of H.264 syntax elements 87 typedef enum 88 { 89 SE_HEADER, 90 SE_PTYPE, 91 SE_MBTYPE, 92 SE_REFFRAME, 93 SE_INTRAPREDMODE, 94 SE_MVD, 95 SE_CBP, 96 SE_LUM_DC_INTRA, 97 SE_CHR_DC_INTRA, 98 SE_LUM_AC_INTRA, 99 SE_CHR_AC_INTRA, 100 SE_LUM_DC_INTER, 101 SE_CHR_DC_INTER, 102 SE_LUM_AC_INTER, 103 SE_CHR_AC_INTER, 104 SE_DELTA_QUANT, 105 SE_BFRAME, 106 SE_EOS, 107 SE_MAX_ELEMENTS = 20 //!< number of maximum syntax elements 108 } SE_type; // substituting the definitions in elements.h 109 110 111 typedef enum 112 { 113 NO_SLICES, 114 FIXED_MB, 115 FIXED_RATE, 116 CALL_BACK 117 } SliceMode; 118 119 120 typedef enum 121 { 122 CAVLC, 123 CABAC 124 } SymbolMode; 125 126 typedef enum 127 { 128 FULL_SEARCH = -1, 129 FAST_FULL_SEARCH = 0, 130 UM_HEX = 1, 131 UM_HEX_SIMPLE = 2, 132 EPZS = 3 133 } SearchType; 134 135 136 typedef enum 137 { 138 FRAME, 139 TOP_FIELD, 140 BOTTOM_FIELD 141 } PictureStructure; //!< New enum for field processing 142 143 typedef enum 144 { 145 P_SLICE = 0, 146 B_SLICE = 1, 147 I_SLICE = 2, 148 SP_SLICE = 3, 149 SI_SLICE = 4, 150 NUM_SLICE_TYPES = 5 151 } SliceType; 152 153 //Motion Estimation levels 154 typedef enum 155 { 156 F_PEL, //!< Full Pel refinement 157 H_PEL, //!< Half Pel refinement 158 Q_PEL //!< Quarter Pel refinement 159 } MELevel; 160 161 typedef enum 162 { 163 FAST_ACCESS = 0, //!< Fast/safe reference access 164 UMV_ACCESS = 1 //!< unconstrained reference access 165 } REF_ACCESS_TYPE; 166 167 typedef enum 168 { 169 IS_LUMA = 0, 170 IS_CHROMA = 1 171 } Component_Type; 172 173 typedef enum 174 { 175 RC_MODE_0 = 0, 176 RC_MODE_1 = 1, 177 RC_MODE_2 = 2, 178 RC_MODE_3 = 3 179 } RCModeType; 180 181 182 typedef enum { 183 SSE = 0, 184 SSE_RGB = 1, 185 PSNR = 2, 186 PSNR_RGB = 3, 187 SSIM = 4, 188 SSIM_RGB = 5, 189 MS_SSIM = 6, 190 MS_SSIM_RGB = 7, 191 TOTAL_DIST_TYPES = 8 192 } distortion_types; 193 194 typedef enum { 195 WP_MCPREC_PLUS0 = 4, 196 WP_MCPREC_PLUS1 = 5, 197 WP_MCPREC_MINUS0 = 6, 198 WP_MCPREC_MINUS1 = 7, 199 WP_MCPREC_MINUS_PLUS0 = 8, 200 WP_REGULAR = 9 201 } weighted_prediction_types; 202 203 #endif 204