www.pudn.com > wm2.5.zip > global.h


   
/* 
*********************************************************************** 
* COPYRIGHT AND WARRANTY INFORMATION 
* 
* Copyright 2004, Advanced Audio Video Coding Standard, Part II 
* 
* DISCLAIMER OF WARRANTY 
* 
* These software programs are available to the users without any 
* license fee or royalty on an "as is" basis. The AVS disclaims 
* any and all warranties, whether express, implied, or statutory, 
* including any implied warranties of merchantability or of fitness 
* for a particular purpose. In no event shall the contributors or  
* the AVS be liable for any incidental, punitive, or consequential 
* damages of any kind whatsoever arising from the use of this program. 
* 
* This disclaimer of warranty extends to the user of this program 
* and user's customers, employees, agents, transferees, successors, 
* and assigns. 
* 
* The AVS does not represent or warrant that the program furnished 
* hereunder are free of infringement of any third-party patents. 
* Commercial implementations of AVS, including shareware, may be 
* subject to royalty fees to patent holders. Information regarding 
* the AVS patent policy is available from the AVS Web site at 
* http://www.avs.org.cn 
* 
* THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE AVS PATENT POLICY. 
************************************************************************ 
*/ 
 
#ifndef _GLOBAL_H_ 
#define _GLOBAL_H_ 
 
#include "types.h" 
 
 
 
extern const int csiInter_Block_Size[4][2]; 
////////////////////////////////Ref Buf////////////////////////////////////////// 
extern Byte **original_frame[3]			;//[YUV][height][width] 
extern Byte **current_frame[3]			;//[YUV][height][width] 
extern Byte **reference_frame[3][3]			;//[YUV][height][width] 
extern Byte **reference_half_pel_frame[3]	;//[height][width]  
extern Byte **reference_quater_pel_frame[3];//[height][width] 
extern int  **half_pel_frame_tmp[3]        ; 
////////////////////////////////////////////////////////////////////////// 
extern Image		      *pgImage    ; 
extern MacroblockHeader   *pgMbHeader ; 
extern MacroblockData     *pgMbData   ;  
 
///////////////////////////////Sequence Header/////////////////////////////////////////// 
extern Bitstream *pgcurrBitStream; 
extern Bitstream *pgRDStream; 
 
int gTotalBits;//WJP 040903 
#define MAX_SLICE_NR 200 //WJP 050321 
int Position_of_Slice_in_PicBuf[MAX_SLICE_NR];//WJP FOR SLICE 
	 
int iQuadArray[511];  //!< Array containing square values,used for snr computation  */                                         /* Values are limited to 5000 for pixel differences over 70 (sqr(5000)). 
#define quadarr (iQuadArray+255) 
 
int** imgY;   //zhangnan 
int** imgUV[2]; //zhangnan 
 
int imgY1[4][4];      //zhangnan 
int imgUV1[2][4][4];  //zhangnan 
 
int** ipredmode; 
//int** c_ipredmode; //mz 
 
int coeff_cost_4x4[4]; // dongjie 
 
int  **refFrArr;           //!< Array for reference frames of each block 
int  **refFrArr_tmp;           //!< Array for reference frames of each block 
int  **tmp_mv[2];    
  
int  all_mv[4][4][8][2]; 
 
#define ET_SIZE 300      //!< size of error text buffer 
char errortext[ET_SIZE]; //!< buffer for error message for exit with error() 
 
 
Byte **imgY_rec; 
Byte **imgU_rec; 
Byte **imgV_rec; 
 
seq_parameter_set *active_sps; 
pic_parameter_set *active_pps; 
pic_header *picture_header_rbsp; 
 
//cbzhu 12-15 
#ifdef _ISOLATED_REGION_ 
Byte **IREGMap[3];              // indicate distribution of macroblocks of isolated region for reference frame  
Byte **pCurrFrmIREGMap;         // point to the IREGMap of the frame being coded 
int iIREGState;                 // number of macroblocks of IREG 
int iIREGReliableFrmFlag;       // value "1 " show that reference 0  is a reliable IREG frame 
int iIntegerPixFlag;            // for avoiding crashing im ME 
int iSubPixFlag; 
int iSubPixFlag1;               // value "1" indicate that operation ME can't not find best MVs  
								                // because of the effiction of leftover 
int typemap[2][4][4][4];                                
int curr_frm_num;   
int intrambcount; 
#endif // _ISOLATED_REGION_ 
 
int first_mb_nr_in_slice; 
#endif //_GLOBAL_H_