#ifndef _PICINFO_H #define _PICINFO_H #include "frame.h" #include "except.h" #include "bitio.h" const int QCIF_TYPE = 1; const int CIF_TYPE = 2; const int YBLKELEMS = 16; /* 16 rows, 16 cols */ const int YBLKBITS = 4; const int UVBLKELEMS = 8; const int DCQUANT = 8; const int BLKSIZE = 64; const int MBROWS_IN_GOB = 3; const int MBCOLS_IN_GOB = 11; const int MBS_IN_GOB = MBROWS_IN_GOB * MBCOLS_IN_GOB; const int NUM_CIFGBS = 12; const int NUM_CIFMBS = NUM_CIFGBS * MBS_IN_GOB; const int NUM_QCIFGBS = 3; const int NUM_QCIFMBS = NUM_QCIFGBS * MBS_IN_GOB; const int CIF_ROWS = 288; const int CIF_COLS = 352; const int QCIF_ROWS = 144; const int QCIF_COLS = 176; const int CIF_YSIZE = CIF_ROWS * CIF_COLS; const int CIF_USIZE = CIF_YSIZE / 4; const int CIF_VSIZE = CIF_YSIZE / 4; const int QCIF_YSIZE = QCIF_ROWS * QCIF_COLS; const int QCIF_USIZE = QCIF_YSIZE / 4; const int QCIF_VSIZE = QCIF_YSIZE / 4; struct frformat_t { int type; int numgbs; int nummbs; int rows; int cols; int ysize; int usize; int vsize; }; const frformat_t NULL_FORMAT = { 0, 0, 0, 0, 0, 0, 0, 0}; const frformat_t CIF_FORMAT = { CIF_TYPE, NUM_CIFGBS, NUM_CIFMBS, CIF_ROWS, CIF_COLS, CIF_YSIZE, CIF_USIZE, CIF_VSIZE}; const frformat_t QCIF_FORMAT = { QCIF_TYPE, NUM_QCIFGBS, NUM_QCIFMBS, QCIF_ROWS, QCIF_COLS, QCIF_YSIZE, QCIF_USIZE, QCIF_VSIZE}; #define INTRA_FRAME 0x01 class PicInfo { public: int xvecs[NUM_CIFMBS]; int yvecs[NUM_CIFMBS]; int gquant[NUM_CIFGBS]; int mquant[NUM_CIFMBS]; int mbinfo[NUM_CIFMBS]; int framenum; bit_io input; bit_io output; frformat_t frameformat; Frame * pixdata; PicInfo(); PicInfo(frformat_t format); }; #endif