[XviD-devel] GMC help

skal skal at planet-d.net
Thu Dec 9 08:08:26 CET 2004


	Tushit,

On Thu, 2004-12-09 at 03:04, Tushit Bharthuar wrote:
> Hi,
> Is the calculation for effective number of warping
> points correct?
> if (nb_pts<2 || (pts->duv[2].x==0 && pts->duv[2].y==0
> && pts->duv[1].x==0 && pts->duv[1].y==0 )) {
>   	if (nb_pts<2 || (pts->duv[1].x==0 &&
> pts->duv[1].y==0)) {
> 	  	if (nb_pts<1 || (pts->duv[0].x==0 &&
> pts->duv[0].y==0)) {
> 		    nb_pts = 0;
>   		}
> 	  	else nb_pts = 1;
>   	}
> 	  else nb_pts = 2;
>   }
> Shouldnot the checking for pts->duv[1].x==0 &&
> pts->duv[1].y==0 not be there in the first statement?

	Why should it? 

	So far the norm is (ugly-ly) designed, nb_pts==3
	with duv[2]={0,0} is *not* equivalent to nb_pts==2.
	Actually, nb_pts==3 can be mapped to nb_pts==2
	only when duv[2].x = -duv[1].y and duv[2].y = duv[1].x
	(notwithstanding the rounding, width and height issues).

	But, code-wise, this simplification does not alleviate 
	the computations. Only the nb_pts==1 is "interesting"(*)
	to simplify.

	bye!
Skal


(*) "interesting" = using a DivX-based metric, of course.
Other people are not "aware" ((C) Jean-Clod)
bwehehe





More information about the XviD-devel mailing list