home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / dctm.lzh / DCTM / source.lzh / source / picturestruct.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-08  |  2.3 KB  |  72 lines

  1. /*************************************************************************
  2.     picturestruct.h
  3.  
  4.     03/02/08    Xiaohong
  5. *************************************************************************/
  6. #ifndef _INCLUDE_PICTURE_STRUCT_H_____________________________________
  7. #define _INCLUDE_PICTURE_STRUCT_H_____________________________________
  8.  
  9. /**********************************************************
  10.     PICTURESTRUCT é╠ÉΘî╛
  11. **********************************************************/
  12. typedef struct
  13. {
  14.     unsigned char *pNewFrame[3];
  15.     unsigned char *pOldFrame[3];
  16.     unsigned char *pAuxFrame[3];
  17. }FRAME_STRUCT;
  18.  
  19. /* macroblock information */
  20. typedef struct{
  21.   int mb_type;            /* intra/forward/backward/interpolated */
  22.   int motion_type;        /* frame/field/16x8/dual_prime */
  23.   int dct_type;           /* field/frame DCT */
  24.   int mquant;             /* quantization parameter */
  25.   int cbp;                /* coded block pattern */
  26.   int skipped;            /* skipped macroblock */
  27.   int MV[2][2][2];        /* motion vectors */
  28.   int mv_field_sel[2][2]; /* motion vertical field select */
  29.   int dmvector[2];        /* dual prime vectors */
  30.   double act;             /* activity measure */
  31.   int var;                /* for debugging */
  32. }MACROBLOCKINFO;
  33.  
  34. /* motion data */
  35. typedef struct motion_data {
  36.   int forw_hor_f_code,forw_vert_f_code; /* vector range */
  37.   int sxf,syf;                          /* search range */
  38.   int back_hor_f_code,back_vert_f_code;
  39.   int sxb,syb;
  40. }MOTIONDATA;
  41.  
  42. class PICTURESTRUCT
  43. {
  44. public:
  45.     PICTURESTRUCT();
  46.     ~PICTURESTRUCT();
  47.  
  48.     bool AllocFrames(const int i,const int size);
  49.     bool AllocMotionStruct(const int num);
  50.     bool MakeClippingTable(void);
  51.     bool AllocMacloBlockInfo(const int num);
  52.     bool AllocBlockArray(const int num);
  53.     void Clear(void);
  54.  
  55.     FRAME_STRUCT stReconstructedFrames;
  56.     FRAME_STRUCT stOriginalFrames;
  57.     MACROBLOCKINFO* pstMacroBlockInfo;
  58.     MOTIONDATA* pstMotionData;
  59.     unsigned char* pPredictionFrameArray[3];
  60.     unsigned char uIntraQArray[64];
  61.     unsigned char uInterQArray[64];
  62.     unsigned short uRecipIntraQArray[64];
  63.     unsigned short uRecipInterQArray[64];
  64.     unsigned char uChromIntraQArray[64];
  65.     unsigned char uChromInterQArray[64];
  66.     unsigned char* pRootClippingTable;
  67.     unsigned char* pClippingTable;
  68.     short (*pBlocksArray)[64];
  69.     int nDcDctPredictionArray[3];
  70. };
  71.  
  72. #endif