--- encoder.c 2003/11/05 16:15:47 1.95.2.47 +++ encoder.c 2003/11/15 14:43:38 1.95.2.51 @@ -21,7 +21,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: encoder.c,v 1.95.2.47 2003/11/05 16:15:47 edgomez Exp $ + * $Id: encoder.c,v 1.95.2.51 2003/11/15 14:43:38 syskin Exp $ * ****************************************************************************/ @@ -188,7 +188,9 @@ pcreate.zones = pEnc->zones; pcreate.width = pEnc->mbParam.width; pcreate.height = pEnc->mbParam.height; - pcreate.fincr = pEnc->mbParam.fincr; + pcreate.mb_width = pEnc->mbParam.mb_width; + pcreate.mb_height = pEnc->mbParam.mb_height; + pcreate.fincr = pEnc->mbParam.fincr; pcreate.fbase = pEnc->mbParam.fbase; pcreate.param = create->plugins[n].param; @@ -648,6 +650,8 @@ data.mb_height = pEnc->mbParam.mb_height; data.fincr = frame->fincr; data.fbase = pEnc->mbParam.fbase; + data.bquant_ratio = pEnc->mbParam.bquant_ratio; + data.bquant_offset = pEnc->mbParam.bquant_offset; for (i=0; i<3; i++) { data.min_quant[i] = pEnc->mbParam.min_quant[i]; @@ -1498,24 +1502,24 @@ if (current->motion_flags & XVID_ME_GME_REFINE) { gmcval = GlobalMotionEstRefine(¤t->warp, - current->mbs, pParam, - current, reference, - ¤t->image, - &reference->image, - &pEnc->vInterH, - &pEnc->vInterV, - &pEnc->vInterHV); - gmcval += /*current->quant */ 2 * (int)(pParam->mb_width*pParam->mb_height); + current->mbs, pParam, + current, reference, + ¤t->image, + &reference->image, + &pEnc->vInterH, + &pEnc->vInterV, + &pEnc->vInterHV); + } else { + gmcval = globalSAD(¤t->warp, pParam, current->mbs, + current, + &reference->image, + ¤t->image, + pEnc->vGMC.y); } - gmcval = globalSAD(¤t->warp, pParam, current->mbs, - current, - &reference->image, - ¤t->image, - pEnc->vGMC.y); gmcval += /*current->quant*/ 2 * (int)(pParam->mb_width*pParam->mb_height); -/* 1st '3': 3 warpoints, 2nd '3': 16th pel res (2<<3) */ + /* 1st '3': 3 warpoints, 2nd '3': 16th pel res (2<<3) */ generate_GMCparameters( 3, 3, ¤t->warp, pParam->width, pParam->height, ¤t->new_gmc_data); @@ -1913,7 +1917,11 @@ /* decoder ignores mb when refence block is INTER(0,0), CBP=0 */ if (mb->mode == MODE_NOT_CODED) { - /* mb->mvs[0].x = mb->mvs[0].y = mb->cbp = 0; */ + if (pEnc->mbParam.plugin_flags & XVID_REQORIGINAL) { + MBMotionCompensation(mb, x, y, f_ref, NULL, f_ref, NULL, NULL, &frame->image, + NULL, 0, 0, pEnc->mbParam.edged_width, 0, 0, 0); + } + continue; }