⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mvmv.h

📁 优化过的xvid1.1.2源代码
💻 H
字号:
#ifndef __MVMV_H__
#define __MVMV_H__

#include "MVGlobal.h"

/*from decoder.c 20070122 wuhaibin */
void __inline validate_vector(VECTOR * mv, unsigned int x_pos, unsigned int y_pos, const DECODER * dec)
{
  int shift = 5 + dec->quarterpel;
  int xborder_high = (int)(dec->mb_width - x_pos) << shift;
  int xborder_low = (-(int)x_pos-1) << shift;
  int yborder_high = (int)(dec->mb_height - y_pos) << shift;
  int yborder_low = (-(int)y_pos-1) << shift;

#define CHECK_MV(mv) \
  do { \
  if ((mv).x > xborder_high) { \
    (mv).x = xborder_high; \
  } else if ((mv).x < xborder_low) { \
    (mv).x = xborder_low; \
  } \
  if ((mv).y > yborder_high) { \
    (mv).y = yborder_high; \
  } else if ((mv).y < yborder_low) { \
    (mv).y = yborder_low; \
  } \
  } while (0)

  CHECK_MV(mv[0]);
  CHECK_MV(mv[1]);
  CHECK_MV(mv[2]);
  CHECK_MV(mv[3]);
}

/*from decoder.c 20070122 wuhaibin */
VECTOR get_pmv2_interlaced(const MACROBLOCK * const mbs,
												   const int mb_width,
												   const int bound,
												   const int x,
												   const int y,
												   const int block);
/*from MbCoding.h 20070122 wuhaibin*/												   
int get_mv(Bitstream * bs, int fcode);
				
/*from Mbprediction.c 20070122 wuhaibin*/												   
VECTOR get_pmv2(const MACROBLOCK * const mbs,
								const int mb_width,
								const int bound,
								const int x,
								const int y,
								const int block);

/*from decoder.h 20070122 wuhaibin*/												   
void get_motion_vector_interlaced(DECODER * dec,
									Bitstream * bs,
									int x,
									int y,
									int k,
									MACROBLOCK *pMB,
									int fcode,
									const int bound);

/*from decoder.h 20070122 wuhaibin*/												   							   
void  get_b_motion_vector(Bitstream * bs,
						  VECTOR * mv,
						  int fcode,
						  const VECTOR pmv,
						  const DECODER * const dec,
						  const int x, const int y);

/*from decoder.c 20070122 wuhaibin*/												   
void get_motion_vector(DECODER * dec,
						Bitstream * bs,
						int x,
						int y,
						int k,
						VECTOR * ret_mv,
						int fcode,
						const int bound);
							   
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -