📄 mpeg2encoder_params.h
字号:
/*////////////////////////////////////////////////////////////////////////////////// INTEL CORPORATION PROPRIETARY INFORMATION// This software is supplied under the terms of a license agreement or// nondisclosure agreement with Intel Corporation and may not be copied// or disclosed except in accordance with the terms of that agreement.// Copyright(c) 2005 Intel Corporation. All Rights Reserved.//*/#ifndef MPEG2_PARAMS_H_#define MPEG2_PARAMS_H_#include "vm_event.h"/* picture type */enum{ I_TYPE = 1, P_TYPE = 2, B_TYPE = 3,};/* chroma_format */#define CHROMA420 1#define CHROMA422 2#define CHROMA444 3/* debug defines */#define PSNR_LOG 1#define FRAME_SIZE_LOG 2#define MVS_LOG 4#define QUANT_LOG 8#define LOG_SAVE_BMP 16/* ///////////////////////////////////////////////////////////////// The following enumerator defines a status of MPEG2 operations// Negative value means error.*/typedef enum { /* Errors */ MPEG2_StsErr = -1, /* Unspecified error */ /* Ok */ MPEG2_StsOk = 0, /* No error, it's OK */ /* Warnings */ MPEG2_StsWarn = 1 /* Unspecified warning */} MPEG2_Status;#define MPEG2_Ok MPEG2_StsOk// maximum string length in parameter file#define PAR_STRLEN 256// used to specify motion estimation ranges for different types of picturestypedef struct _MotionData // motion data{ int forw_hor_f_code; // vector range horizontal, forward int forw_vert_f_code; // vector range vertical, forward int SearchWidthF; // search range horizontal, forward int SearchHeightF; // search range vertical, forward int back_hor_f_code; // vector range horizontal, backward int back_vert_f_code; // vector range vertical, backward int SearchWidthB; // search range horizontal, backward int SearchHeightB; // search range vertical, backward int f_forw_hor; //(1 << (forw_hor_f_code - 1) int f_forw_ver; //(1 << (forw_ver_f_code - 1) int f_back_hor; //(1 << (back_hor_f_code - 1) int f_back_ver; //(1 << (back_ver_f_code - 1)} MotionData;class ippMPEG2EncoderParams //: public VideoEncoderParams{public: int src_width; int src_height; int dst_width; int dst_height; int numStartFrame; int numFramesToEncode; int numEncodedFrames; double FrameRate; int BitRate; ippMPEG2EncoderParams(); ~ippMPEG2EncoderParams(); void ippMPEG2EncoderParams::operator=(ippMPEG2EncoderParams &p); MPEG2_Status ReadParamFile(vm_char *FileName); // opens and reads MSSG standard par-file MPEG2_Status ReadOldParamFile(vm_char *FileName); // opens and reads cutted par-file (obsolete) MPEG2_Status ReadQMatrices(); MPEG2_Status Profile_and_Level_Checks(); MPEG2_Status RelationChecks(); //!!!!!!!!IF CHANGE STRUCTURE OF MEMBERS PLEASE BE CAREFUL!!!! //!!!!!!!!!!!!!!!!!!WITH MEMSETS IN CONSTRUCTOR!!!!!!!!!!!!!!! vm_char err_warn_message[256]; vm_char SrcFName[PAR_STRLEN]; vm_char IntraQMatrixFName[PAR_STRLEN]; vm_char NonIntraQMatrixFName[PAR_STRLEN]; vm_char TemplateLogFile[PAR_STRLEN]; VM_ALIGN16_DECL(Ipp16s) IntraQMatrix[64]; VM_ALIGN16_DECL(Ipp16s) NonIntraQMatrix[64]; MotionData *pMotionData; // motion estimation ranges for P, B0, B1, ... int prog_seq; // progressive sequence int progressive_frame; // progressive frame int LogMask; int CustomIntraQMatrix; int CustomNonIntraQMatrix; int IPDistance; // distance between key-frames int gopSize; // size of GOP int frame_rate_code; // code for values, specified in standard int aspectRatio; int ProfileID; int LevelID; int chroma_format; int repeat_first_field; int top_field_first; // display top field first int intra_dc_precision; int FieldPicture; // field or frame picture (if progframe=> frame) int VBV_BufferSize; int low_delay; int nonLinearQScale[3]; // sets of params for I,P,B int frame_pred_frame_dct[3]; // int intraVLCFormat[3]; // int mpeg1; // 1 - mpeg1, 0 - mpeg2 vm_char idStr[PAR_STRLEN]; // user data to put to each sequence int lFlags; // Flags of the encoding. int numThreads; // not tested, use 1 double performance; double encode_time; int me_alg_num; // added for standard parameter file int inputtype; // format of input raw data int constrparms; // used only with mpeg1 // sequence display extension // also uses dst_ from base clas int video_format, color_primaries, transfer_characteristics; int matrix_coefficients; // these fields are currently ignored int conceal_tab[3], altscan_tab[3];};#ifdef MPEG2_DEBUG_CODEint mpeg2_write_bmp(char *file_name, int width, int height, int pitch, Ipp8u *r, Ipp8u *g, Ipp8u *b);#endif#endif /* MPEG2_PARAMS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -