www.pudn.com > henclib263.rar > mot_est.h
/*
* mot_est.h
*
* interface of functions which is used for motion estimation.
*
* Copyright (c) 2002-2004 Li Chun-lin(li_chunlin@263.net)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef MOT_EST_H
#define MOT_EST_H
#include "HEnc.h"
#ifdef __cplusplus
extern "C" {
#endif
//! interpolate lum picture
void interpolate_lum(H263VencStatus *encoder);
//! grab vector
void grabVec(H263VencStatus *encoder, MCParam *MC, int BACKWARD);
//! FS search
void mv_search_fs(H263VencStatus *encoder, MCParam *MC, int x, int y, int blocksize, int BACKWARD);
//! MVFAST search
void mv_search_dmd(H263VencStatus *encoder, MCParam *MC, int x, int y, int blocksize, int BACKWARD);
//! Find half pel values of MV
void findhalfpel(H263VencStatus *encoder, MCParam *MC, int x, int y, int blocksize, int BACKWARD);
//! Set MV to zero
void zeroVec(MotionVector *MV);
//! compute SAD
int me_sad_a(int lx1, int lx2, int x1, int y1, int x2, int y2, unsigned char *P1, unsigned char *P2,
int sad_last, int blocksize);
//! compute SAD
int me_sad_b(int lx1, int lx2, int x1, int y1, int x2, int y2, unsigned char *P1, unsigned char *P2,
int sad_last, int blocksize);
//! choose mode
void choose_mode(H263VencStatus *encoder, MCParam *MC, int x, int y);
//! if the MV is zero
int ZeroVector(MotionVector *mv);
//! find neighbour MV
void FindNbrMV(MotionVector *MV[6][MBR+1][MBC+2], int block, int index,
int mb_x, int mb_y, int *vec_x, int *vec_y, int BACKWARD);
//! print all mv data for a macroblock
void printmv(H263VencStatus *encoder, MCParam *MC, int r, int c, int BACKWARD);
//! save vectors for the use of following B frames
void saveVec(MCParam *MC, int pels, int lines);
#ifdef __cplusplus
}
#endif
#endif