--- mbprediction.h 2002/06/12 20:38:40 1.9 +++ mbprediction.h 2002/06/28 15:14:40 1.10 @@ -26,10 +26,19 @@ * along with this program; if not, write to the xvid_free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: mbprediction.h,v 1.9 2002/06/12 20:38:40 edgomez Exp $ + * $Id: mbprediction.h,v 1.10 2002/06/28 15:14:40 suxen_drol Exp $ * *************************************************************************/ + /****************************************************************************** + * * + * Revision history: * + * * + * 29.06.2002 get_pmvdata() bounding * + * * + ******************************************************************************/ + + #ifndef _MBPREDICTION_H_ #define _MBPREDICTION_H_ @@ -70,7 +79,10 @@ int16_t qcoeff[64], uint32_t current_quant, int32_t iDcScaler, - int16_t predictors[8]); + int16_t predictors[8], + const unsigned int bound_x, + const unsigned int bound_y); + /* get_pmvdata returns the median predictor and nothing else */ @@ -206,7 +218,9 @@ const uint32_t x_dim, const uint32_t block, VECTOR * const pmv, - int32_t * const psad) + int32_t * const psad, + const unsigned int bound_x, + const unsigned int bound_y) { /* @@ -230,8 +244,12 @@ const VECTOR zeroMV = { 0, 0 }; // first row of blocks (special case) - if (y == 0 && (block == 0 || block == 1)) { - if ((x == 0) && (block == 0)) // first column, first block + /* if (y == 0 && (block == 0 || block == 1)) { */ + if (((y == bound_y && x >= bound_x) || (y == bound_y + 1 && x < bound_x)) + && (block == 0 || block == 1)) { + + /* if ((x == 0) && (block == 0)) */ // first column, first block + if ((x == 0 || (y == bound_y && x == bound_x)) && (block == 0)) // first column, first block { pmv[0] = pmv[1] = pmv[2] = pmv[3] = zeroMV; psad[0] = 0;