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


/*! 
 *************************************************************************** 
 * \file 
 *     macroblock.h 
 * 
 * \brief 
 *    
 *     
 * 
 * \date 
 *    01. Apr 2005 
 *************************************************************************** 
 */ 
 
 
#ifndef _MACROBLOCK_H_ 
#define _MACROBLOCK_H_ 
 
 
 
const byte QP_SCALE_CR[64]= 
{ 
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 
   10,11,12,13,14,15,16,17,18,19, 
   20,21,22,23,24,25,26,27,28,29, 
   30,31,32,33,34,35,36,37,38,39, 
   40,41,42,42,43,43,44,44,45,45, 
   46,46,47,47,48,48,48,49,49,49, 
   50,50,50,51, 
}; 
 
//! gives CBP value from codeword number, both for intra and inter 
// dongjie 
const byte NCBP[64][2]= 
{ 
	{63,0},{31,4},{15,8},{47,1},{0,2},{61,15},{55,12},{59,5},{51,10},{62,3}, 
	{14,16},{12,13},{13,14},{7,32},{60,7},{11,11},{29,9},{3,6},{16,63},{30,31}, 
	{23,47},{53,48},{10,20},{27,17},{32,24},{28,18},{8,21},{1,36},{48,33},{4,40}, 
	{2,34},{5,26},{19,37},{58,19},{46,28},{21,42},{39,29},{43,23},{26,27},{49,30}, 
	{45,44},{17,53},{44,46},{35,62},{6,35},{9,58},{52,61},{24,45},{50,39},{56,43}, 
	{18,55},{20,59},{42,49},{37,60},{25,52},{36,50},{33,56},{57,51},{22,25},{54,22},{40,38},{34,41},{38,57},{41,54} 
}; 
// end 
 
//! used to control block sizes : Not used/16x16/16x8/8x16/8x8/8x4/4x8/4x4 
const int BLOCK_STEP[8][2]=    //zhangnan 
{ 
  {0,0},{4,4},{4,2},{2,4},{2,2},{2,1},{1,2},{1,1} 
}; 
 
void read_CBP_dquant(); 
void read_luma_chroma_coeffs(); 
void read_mb_type(); 
void read_luma_ipred_modes(int b8);    //qwang 2004-3-9 
void read_chroma_ipred_modes();    //qwang 2004-3-9 
void readReferenceIndex(); 
void readMotionVector(); 
 
#endif