home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- picturestruct.h
-
- 03/02/08 Xiaohong
- *************************************************************************/
- #ifndef _INCLUDE_PICTURE_STRUCT_H_____________________________________
- #define _INCLUDE_PICTURE_STRUCT_H_____________________________________
-
- /**********************************************************
- PICTURESTRUCT é╠ÉΘî╛
- **********************************************************/
- typedef struct
- {
- unsigned char *pNewFrame[3];
- unsigned char *pOldFrame[3];
- unsigned char *pAuxFrame[3];
- }FRAME_STRUCT;
-
- /* macroblock information */
- typedef struct{
- int mb_type; /* intra/forward/backward/interpolated */
- int motion_type; /* frame/field/16x8/dual_prime */
- int dct_type; /* field/frame DCT */
- int mquant; /* quantization parameter */
- int cbp; /* coded block pattern */
- int skipped; /* skipped macroblock */
- int MV[2][2][2]; /* motion vectors */
- int mv_field_sel[2][2]; /* motion vertical field select */
- int dmvector[2]; /* dual prime vectors */
- double act; /* activity measure */
- int var; /* for debugging */
- }MACROBLOCKINFO;
-
- /* motion data */
- typedef struct motion_data {
- int forw_hor_f_code,forw_vert_f_code; /* vector range */
- int sxf,syf; /* search range */
- int back_hor_f_code,back_vert_f_code;
- int sxb,syb;
- }MOTIONDATA;
-
- class PICTURESTRUCT
- {
- public:
- PICTURESTRUCT();
- ~PICTURESTRUCT();
-
- bool AllocFrames(const int i,const int size);
- bool AllocMotionStruct(const int num);
- bool MakeClippingTable(void);
- bool AllocMacloBlockInfo(const int num);
- bool AllocBlockArray(const int num);
- void Clear(void);
-
- FRAME_STRUCT stReconstructedFrames;
- FRAME_STRUCT stOriginalFrames;
- MACROBLOCKINFO* pstMacroBlockInfo;
- MOTIONDATA* pstMotionData;
- unsigned char* pPredictionFrameArray[3];
- unsigned char uIntraQArray[64];
- unsigned char uInterQArray[64];
- unsigned short uRecipIntraQArray[64];
- unsigned short uRecipInterQArray[64];
- unsigned char uChromIntraQArray[64];
- unsigned char uChromInterQArray[64];
- unsigned char* pRootClippingTable;
- unsigned char* pClippingTable;
- short (*pBlocksArray)[64];
- int nDcDctPredictionArray[3];
- };
-
- #endif