--- motion.h 2002/09/25 21:28:48 1.13.2.2 +++ motion.h 2002/12/08 06:43:34 1.13.2.7 @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: motion.h,v 1.13.2.2 2002/09/25 21:28:48 Isibaar Exp $ + * $Id: motion.h,v 1.13.2.7 2002/12/08 06:43:34 suxen_drol Exp $ * ***************************************************************************/ @@ -42,16 +42,28 @@ #define MVzero(A) ( ((A).x)==(0) && ((A).y)==(0) ) #define MVequal(A,B) ( ((A).x)==((B).x) && ((A).y)==((B).y) ) +static const uint32_t roundtab[16] = + { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; + +/* + * modified rounding tables + * original tables see ISO spec tables 7-6 -> 7-9 + */ + +/* K = 4 */ +static const uint32_t roundtab_76[16] = { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1 }; +/* K = 2 */ +static const uint32_t roundtab_78[8] = { 0, 0, 1, 1, 0, 0, 0, 1 }; +/* K = 1 */ +static const uint32_t roundtab_79[4] = { 0, 1, 0, 0 }; + + /* * getref: calculate reference image pointer * the decision to use interpolation h/v/hv or the normal image is * based on dx & dy. */ -static const uint32_t roundtab[16] = - { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; - - static __inline const uint8_t * get_ref(const uint8_t * const refn, const uint8_t * const refh, @@ -129,7 +141,7 @@ const IMAGE * const f_refV, const IMAGE * const f_refHV, // backward (future) reference - const MACROBLOCK * const b_mbs, + const FRAMEINFO * const b_reference, const IMAGE * const b_ref, const IMAGE * const b_refH, const IMAGE * const b_refV, @@ -160,10 +172,16 @@ int MEanalysis( const IMAGE * const pRef, - const IMAGE * const pCurrent, + FRAMEINFO * const Current, MBParam * const pParam, - MACROBLOCK * const pMBs, - const uint32_t iFcode); + int maxIntra, + int intraCount, + int bCount); + +int +FindFcode( const MBParam * const pParam, + const FRAMEINFO * const current); + #endif /* _MOTION_H_ */