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


  
/* 
*********************************************************************** 
* 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. 
************************************************************************ 
*/ 
 
 
#include "types.h" 
#include "define.h" 
#include "global.h" 
////////////////////////////////Ref Buf////////////////////////////////////////// 
// Byte   *pgBitstream;               //coded bitstream buffer 
Byte  **current_frame[3];             //reconstruction frame buffer 
Byte  **original_frame[3]; 
Byte  **reference_frame[3][3];           //refrence frame buffer 
Byte  **reference_half_pel_frame[3];     //half pel reference buffer 
int   **half_pel_frame_tmp[3];			  //half pel reference buffer 
Byte  **reference_quater_pel_frame[3];   //quater pel reference buffer 
 
////////////////////////////////////////////////////////////////////////// 
Image				image    , *pgImage    = &image ; 
MacroblockHeader    MbHeader , *pgMbHeader = &MbHeader; 
MacroblockData      MbData   , *pgMbData   = &MbData;   
 
///////////////////////////////Sequence Header/////////////////////////////////////////// 
Bitstream Stream,*pgcurrBitStream=&Stream; 
Bitstream RDStream, *pgRDStream=&RDStream; 
 
 
 
//cbzhu 041221 
 
 
//int gTotalBits; 
//extern int Position_of_Slice_in_PicBuf[MAX_SLICE_NR];//WJP FOR SLICE 
 
Mapping Map[] = { 
  {"IntraPeriod",              &input.intra_period,            0}, 
  {"FramesToBeEncoded",        &input.no_frames,               0}, 
  {"QPFirstFrame",             &input.qp0,                     0}, 
  {"QPRemainingFrame",         &input.qpN,                     0}, 
  {"FrameSkip",                &input.jumpd,                   0}, 
  {"SPframe",                  &input.spframe,                 0}, 
  {"UseHadamard",              &input.hadamard,                0}, 
  {"SearchRange",              &input.search_range,            0}, 
  {"NumberReferenceFrames",    &input.num_reference_frames,    0}, 
  {"SourceWidth",              &input.img_width,               0}, 
  {"SourceHeight",             &input.img_height,              0}, 
  {"InputFile",                &input.infile,                  1}, 
  {"OutputFile",               &input.outfile,                 1}, 
  {"ReconFile",                &input.ReconFile,               1}, 
  {"RDOptimization",           &input.rdopt,                   0}, 
  {"ABT",                      &input.ABT,                     0},   
  {"ABT_RDO",                  &input.ABT_RDO,                 0},//WJP 040824N   
  {"Slice_Enable",             &input.slice,                   0},//WJP FOR SLICE  
  {"Slice_Parameter",          &input.slice_parameter,         0},//WJP FOR SLICE  
   
  ////////////////////////////////////////////////////////////////////////////// 
  {"PictureRate",              &input.PictureRate,         0}, 
  {"RateControlEnable",        &input.RCEnable,            0}, 
  {"Bitrate",                  &input.bit_rate,            0}, 
  {"InitialQP",                &input.SeinitialQP,         0}, 
  {"ChannelType",              &input.channel_type,        0},   // LX  
  ////////////////////////////////////////////////////////////////////////////// 
   {"HalfPixelMVEnable",        &input.HalfPixelMVEnable,       0},   
 
	//cbzhu 12-15 
#ifdef _ISOLATED_REGION_ 
  {"IREGEnable",               &input.IREGEnable,          0}, 
  {"IREGEvolutionRate",        &input.IREGRate,            0}, 
  {"LoopfilterMode",           &input.LfMode,              0},   
#endif // _ISOLATED_REGION_ 
  {NULL,                       NULL,                          -1} 
};