[XviD-devel] GME speedup

Antonin Misek tonda.misek at post.cz
Fri Dec 12 09:03:46 CET 2003


Hi Gruel,
it is relic of development :-))) "var" is sufficient.

TonyMi

> -----Original Message-----
> From: xvid-devel-bounces at xvid.org
> [mailto:xvid-devel-bounces at xvid.org]On Behalf Of Christoph Lampert
> Sent: Friday, December 12, 2003 8:41 AM
> To: xvid-devel at xvid.org
> Subject: Re: [XviD-devel] GME speedup
>
>
> On Fri, 12 Dec 2003, Antonin Misek wrote:
> > I studied the function estimation_gmc.c/GlobalMotionEstRefine more and
> > prepared new version. The change is relatively small. Output is
> very similar
> > to original. But it uses about 30% less calls of
> estimation_gmc.c/globalSAD.
> > It is tested with MSVC and ARCH_IS_GENERIC without ProcesorPack
> (I cannot
> > install it, it breaks compilation of my other project).
> >
> > Sorry Gruel for my last mail. I now understand that the specific part of
> > code is not bug but hack.
>
> Hi Toni,
>
> why do you use   ##var  in the macro? Is there any reason simply "var"
> isn't enough?
>
> gruel
>
>
>
> > 	int direction=4096,oldDirection;
> >
> > #define TEST_ONE_CHANGE(var,dir)\
> > 	if ((!direction)&&(dir*2>oldDirection)) break;\
> > 	##var--;\
> > 	if ((gmcSAD = globalSAD(&bestwp, pParam, pMBs, current, pRef, pCurr,
> > GMCblock))<gmcminSAD)\
> > 	{ \
> > 		gmcminSAD = gmcSAD;\
> > 		direction |= dir;\
> > 	} else {\
> > 		##var+=2;\
> > 		if ((gmcSAD = globalSAD(&bestwp, pParam, pMBs,
> current, pRef, pCurr,
> > GMCblock))<gmcminSAD)\
> > 		{ \
> > 			gmcminSAD = gmcSAD;\
> > 			direction |= dir*2;\
> > 		} else {\
> > 			##var--;}\
> > 	}
> >
> > 	do {
> > 		oldDirection=direction;
> > 		direction = 0;
> > 		TEST_ONE_CHANGE(bestwp.duv[0].x,1);
> > 		TEST_ONE_CHANGE(bestwp.duv[0].y,4);
> > 		TEST_ONE_CHANGE(bestwp.duv[1].x,16);
> > 		TEST_ONE_CHANGE(bestwp.duv[1].y,64);
> > 		TEST_ONE_CHANGE(bestwp.duv[2].x,256);
> > 		TEST_ONE_CHANGE(bestwp.duv[2].y,1024);
> > 	} while (direction);
> >
> >
> > _______________________________________________
> > XviD-devel mailing list
> > XviD-devel at xvid.org
> > http://list.xvid.org/mailman/listinfo/xvid-devel
> >
>
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>




More information about the XviD-devel mailing list