www.pudn.com > wm2.5.zip > interpred.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 _INTERPRED_H_ #define _INTERPRED_H_ void Init_Inter_Sequence(void); void Find_SkipMode_MotionVector(void); void Save_Motion_Vector(int blocktype); void Save_Subblk_Motion_Vector(int subblktype,int b8); void Save_Subblk_Motion_Vector_RDO(int subblktype, int b8, int ref); void Save_Motion_Vector_RDO(int blocktype, int ref); void Restore_Motion_Vector(int blocktype); int Block_Motion_Search(int, int, int ,int, int, int ); int Subblock_Motion_Search(int, int, int, int, int, int, int, int, int); //qwang 2004-3-20 int Inter_Modes_Decision(void); int Subblk_Inter_Modes_Decision(int, int, int, int, int ); //qwang 2004-3-20 void Set_Motion_Vector_Predictor_yuan(int ,int ); void SetMotionVectorPredictor(int[], /*int, int,*/ int, int, int, int, int); int Get_SkipCostMB(int, int ,int ,int, int, int ); short sInter_MV [4][4][2]; //qwang 2004-3-20 short sInter_Pred_MV[4][4][2]; //qwang 2004-3-20 short blk_MV [5][4][4][2]; //qwang 2004-3-20 short blk_Pred_MV[5][4][4][2]; //qwang 2004-3-20 short subblk_MV [5][2][4][4][2]; //[subblktype][ref] short subblk_Pred_MV[5][2][4][4][2]; //qwang 2004-3-20 short sInter_MV_ref [4][4][2]; //qwang 2004-3-20 short sInter_Pred_MV_ref[4][4][2]; //qwang 2004-3-20 short sInter_Ref[5][4][4]; //ref for one macroblock sw 4.25 short sResidual_MV[2]; short sInteger_MV[2]; short sSkip_MV[2]; short *gMV_Bits; #define MVPRED_MEDIAN 0 #define MVPRED_L 1 #define MVPRED_U 2 #define MVPRED_UR 3 #define INTEGER_CENTER_OFFSET 16 #define HALF_CENTER_OFFSET 3 #define QUARTER_CENTER_OFFSET 3 #define HALF_SEARCH_RANGE 9 #define QUARTER_SEARCH_RANGE 9 #define LAMBDA_ACCURACY_BITS 16 #define LAMBDA_FACTOR(lambda) ((int)((double)(1<>LAMBDA_ACCURACY_BITS) #define MV_COST(f,deltax,deltay) (WEIGHTED_COST(f,gMV_Bits[deltax]+gMV_Bits[deltay])) #define MODE_COST(f,bits) (WEIGHTED_COST(f,bits)) //qwang 2004-3-24 #endif //_INTERPRED_H_