00001 00013 #ifndef _PARAMS_H_ 00014 #define _PARAMS_H_ 00015 #include "types.h" 00016 #include "vui_params.h" 00017 #include "frame.h" 00018 #include "io_video.h" 00019 00021 struct inp_par_enc 00022 { 00023 int ProfileIDC; 00024 int LevelIDC; 00025 int IntraProfile; 00026 00027 int no_frm_base; 00028 int no_frames; 00029 int qp[2][NUM_SLICE_TYPES]; 00030 int qpsp[2]; 00031 int frame_skip; 00032 int jumpd; 00034 int DisableSubpelME; 00035 int search_range; 00037 int num_ref_frames; 00038 int P_List0_refs; 00039 int B_List0_refs; 00040 int B_List1_refs; 00041 int Log2MaxFNumMinus4; 00042 int Log2MaxPOCLsbMinus4; 00043 00044 // Input/output sequence format related variables 00045 FrameFormat source; 00046 FrameFormat output; 00047 int is_interleaved; 00048 int src_resize; 00049 int src_BitDepthRescale; 00050 int yuv_format; 00051 int intra_upd; 00056 int slice_mode; 00057 int slice_argument; 00058 int UseConstrainedIntraPred; 00059 int SetFirstAsLongTerm; 00060 int infile_header; 00061 int MultiSourceData; 00062 VideoDataFile input_file2; 00063 VideoDataFile input_file3; 00064 00065 VideoDataFile input_file1; 00066 char outfile [FILE_NAME_SIZE]; 00067 char ReconFile [FILE_NAME_SIZE]; 00068 char TraceFile [FILE_NAME_SIZE]; 00069 char StatsFile [FILE_NAME_SIZE]; 00070 char QmatrixFile [FILE_NAME_SIZE]; 00071 int ProcessInput; 00072 int EnableOpenGOP; 00073 int EnableIDRGOP; 00074 int grayscale; 00075 00076 int idr_period; 00077 int intra_period; 00078 int intra_delay; 00079 int adaptive_idr_period; 00080 int adaptive_intra_period; 00081 00082 int start_frame; 00083 00084 int GenerateMultiplePPS; 00085 int GenerateSEIMessage; 00086 char SEIMessageText[INPUT_TEXT_SIZE]; 00087 00088 int ResendSPS; 00089 int ResendPPS; 00090 00091 int SendAUD; 00092 int skip_gl_stats; 00093 00094 // B pictures 00095 int NumberBFrames; 00096 int PReplaceBSlice; 00097 int qpBRSOffset[2]; 00098 int direct_spatial_mv_pred_flag; 00099 int directInferenceFlag; 00100 00101 int BiPredMotionEstimation; 00102 int BiPredSearch[4]; 00103 int BiPredMERefinements; 00104 int BiPredMESearchRange; 00105 int BiPredMESubPel; 00106 00107 // SP/SI Pictures 00108 int sp_periodicity; 00109 00110 int si_frame_indicator; 00111 int sp2_frame_indicator; 00112 int sp_output_indicator; 00113 char sp_output_filename[FILE_NAME_SIZE]; 00114 char sp2_input_filename1[FILE_NAME_SIZE]; 00115 char sp2_input_filename2[FILE_NAME_SIZE]; 00116 00117 // Weighted Prediction 00118 int WeightedPrediction; 00119 int WeightedBiprediction; 00120 int WPMethod; 00121 int WPIterMC; 00122 int WPMCPrecision; 00123 int WPMCPrecFullRef; 00124 int WPMCPrecBSlice; 00125 int EnhancedBWeightSupport; 00126 int ChromaWeightSupport; 00127 int UseWeightedReferenceME; 00128 int RDPictureDecision; 00129 int RDPictureIntra; 00130 int RDPSliceWeightOnly; 00131 int RDPSliceBTest; 00132 int RDBSliceWeightOnly; 00133 int SkipIntraInInterSlices; 00134 int BRefPictures; 00135 int HierarchicalCoding; 00136 int HierarchyLevelQPEnable; 00137 char ExplicitHierarchyFormat[INPUT_TEXT_SIZE]; 00138 // explicit sequence information parameters 00139 int ExplicitSeqCoding; 00140 char ExplicitSeqFile[FILE_NAME_SIZE]; 00141 int ReferenceReorder; 00142 int PocMemoryManagement; 00143 00144 int symbol_mode; 00145 int of_mode; 00146 int partition_mode; 00147 00148 int InterSearch[2][8]; 00149 00150 int DisableIntra4x4; 00151 int DisableIntra16x16; 00152 int FastMDEnable; 00153 int FastIntraMD; 00154 int FastIntra4x4; 00155 int FastIntra16x16; 00156 int FastIntra8x8; 00157 int FastIntraChroma; 00158 00159 int DisableIntraInInter; 00160 int IntraDisableInterOnly; 00161 int Intra4x4ParDisable; 00162 int Intra4x4DiagDisable; 00163 int Intra4x4DirDisable; 00164 int Intra16x16ParDisable; 00165 int Intra16x16PlaneDisable; 00166 int ChromaIntraDisable; 00167 00168 int EnableIPCM; 00169 00170 double FrameRate; 00171 00172 int chroma_qp_index_offset; 00173 int full_search; 00174 int last_frame; 00175 00176 int qp2start; 00177 00178 int rdopt; 00179 int I16rdo; 00180 int subMBCodingState; 00181 int Distortion[TOTAL_DIST_TYPES]; 00182 double VisualResWavPSNR; 00183 int SSIMOverlapSize; 00184 int DistortionYUVtoRGB; 00185 int CtxAdptLagrangeMult; 00186 int FastCrIntraDecision; 00187 int disthres; 00188 int nobskip; 00189 int ForceTrueRateRDO; 00190 00191 #ifdef _LEAKYBUCKET_ 00192 int NumberLeakyBuckets; 00193 char LeakyBucketRateFile[FILE_NAME_SIZE]; 00194 char LeakyBucketParamFile[FILE_NAME_SIZE]; 00195 #endif 00196 00197 int PicInterlace; 00198 int MbInterlace; 00199 int IntraBottom; 00200 00201 // Error resilient RDO parameters 00202 int LossRateA; 00203 int LossRateB; 00204 int LossRateC; 00205 int NoOfDecoders; 00206 int ErrorConcealment; 00207 int RestrictRef; 00208 int NumFramesInELSubSeq; 00209 00210 int RandomIntraMBRefresh; 00211 00212 // Chroma interpolation and buffering 00213 int ChromaMCBuffer; 00214 int ChromaMEEnable; 00215 int ChromaMEWeight; 00216 int MEErrorMetric[3]; 00217 int ModeDecisionMetric; 00218 int SkipDeBlockNonRef; 00219 00220 // Deblocking Filter parameters 00221 int DFSendParameters; 00222 int DFDisableIdc[2][NUM_SLICE_TYPES]; 00223 int DFAlpha [2][NUM_SLICE_TYPES]; 00224 int DFBeta [2][NUM_SLICE_TYPES]; 00225 00226 int SparePictureOption; 00227 int SPDetectionThreshold; 00228 int SPPercentageThreshold; 00229 00230 // FMO 00231 char SliceGroupConfigFileName[FILE_NAME_SIZE]; 00232 int num_slice_groups_minus1; 00233 int slice_group_map_type; 00234 00235 int *top_left; 00236 int *bottom_right; 00237 byte *slice_group_id; 00238 int *run_length_minus1; 00239 00240 int slice_group_change_direction_flag; 00241 int slice_group_change_rate_minus1; 00242 int slice_group_change_cycle; 00243 00244 int redundant_pic_flag; 00245 int pic_order_cnt_type; 00246 00247 int context_init_method; 00248 int model_number; 00249 int Transform8x8Mode; 00250 int ReportFrameStats; 00251 int DisplayEncParams; 00252 int Verbose; 00253 00255 int RCEnable; 00256 int bit_rate; 00257 int SeinitialQP; 00258 unsigned int basicunit; 00259 int channel_type; 00260 int RCUpdateMode; 00261 double RCIoverPRatio; 00262 double RCBoverPRatio; 00263 double RCISliceBitRatio; 00264 double RCBSliceBitRatio[RC_MAX_TEMPORAL_LEVELS]; 00265 int RCMinQP[NUM_SLICE_TYPES]; 00266 int RCMaxQP[NUM_SLICE_TYPES]; 00267 int RCMaxQPChange; 00268 00269 // Motion Estimation related parameters 00270 int UseMVLimits; 00271 int SetMVXLimit; 00272 int SetMVYLimit; 00273 00274 // Search Algorithm 00275 SearchType SearchMode; 00276 00277 // UMHEX related parameters 00278 int UMHexDSR; 00279 int UMHexScale; 00280 00281 // EPZS related parameters 00282 int EPZSPattern; 00283 int EPZSDual; 00284 int EPZSFixed; 00285 int EPZSTemporal; 00286 int EPZSSpatialMem; 00287 int EPZSBlockType; 00288 int EPZSMinThresScale; 00289 int EPZSMaxThresScale; 00290 int EPZSMedThresScale; 00291 int EPZSSubPelGrid; 00292 int EPZSSubPelME; 00293 int EPZSSubPelMEBiPred; 00294 int EPZSSubPelThresScale; 00295 00296 // Lambda Params 00297 int UseExplicitLambdaParams; 00298 int UpdateLambdaChromaME; 00299 double LambdaWeight[6]; 00300 double FixedLambda[6]; 00301 00302 char QOffsetMatrixFile[FILE_NAME_SIZE]; 00303 int OffsetMatrixPresentFlag; 00304 00305 int AdaptiveRounding; 00306 int AdaptRoundingFixed; 00307 int AdaptRndPeriod; 00308 int AdaptRndChroma; 00309 int AdaptRndWFactor [2][NUM_SLICE_TYPES]; 00310 int AdaptRndCrWFactor[2][NUM_SLICE_TYPES]; 00311 00313 // Fidelity Range Extensions 00314 int ScalingMatrixPresentFlag; 00315 int ScalingListPresentFlag[12]; 00316 00317 int cb_qp_index_offset; 00318 int cr_qp_index_offset; 00319 // Lossless Coding 00320 int LosslessCoding; 00321 00322 // Fast Mode Decision 00323 int EarlySkipEnable; 00324 int SelectiveIntraEnable; 00325 int DisposableP; 00326 int DispPQPOffset; 00327 00328 //Redundant picture 00329 int NumRedundantHierarchy; 00330 int PrimaryGOPLength; 00331 int NumRefPrimary; 00332 00333 // tone mapping SEI message 00334 int ToneMappingSEIPresentFlag; 00335 char ToneMappingFile[FILE_NAME_SIZE]; 00336 00337 int separate_colour_plane_flag; 00338 double WeightY; 00339 double WeightCb; 00340 double WeightCr; 00341 int UseRDOQuant; 00342 int RDOQ_DC; 00343 int RDOQ_CR; 00344 int RDOQ_DC_CR; 00345 int RDOQ_QP_Num; 00346 int RDOQ_CP_Mode; 00347 int RDOQ_CP_MV; 00348 int RDOQ_Fast; 00349 00350 int EnableVUISupport; 00351 // VUI parameters 00352 VUIParameters VUI; 00353 // end of VUI parameters 00354 00355 }; 00356 00357 #endif 00358