[XviD-devel] SAD vs MSE for ME (warning! acronym overflow!)

Michael Niedermayer xvid-devel@xvid.org
Sat, 7 Sep 2002 15:19:19 +0200


Hi

On Friday 06 September 2002 13:59, Michael Niedermayer wrote:
> Hi
>
> On Friday 06 September 2002 13:03, skal wrote:
> > Hi Michael,
> >
> > On Fri, 2002-09-06 at 13:05, Michael Niedermayer wrote:
> > > perhaps u want to take a look at motion_est.c in ffmpeg CVS it does
> > > halfpel search with only 4 instead of 8 checks
> > >
> > > its based upon one assumtation:
> > > that the score of the comparissions can be well approximated by axy +
> > > bx^2 + cy^2 + dx + ey + f(type)
> > > type is the interpolation type (none, horizontal, vertical, both)
> >
> > 	this looks pretty nice. What do you use as 'score()' function?
> > 	SAD or SSD? SSD would maybe fit better the 2nd order 	approximation
> > since it is quadratic itself...
>
> we use SAD currently ...
>
> > 	And does it extend to qpel search? Do you need additional
> > 	check points to ensure good error bounds?
>
> i didnt try qpel yet, ffmpeg doesnt support qpel encoding yet ...
... allthough i think it should be easy to use this on qpel too, for example 
the first level of checks is just like halfpel, so the same halfpel method 
could be used, allthough because of the more "correct" filtering used it 
might be possible to use even fewer checks, one possibility would be to 
calculate the coefficients of the approximation poly from a few (6 at least) 
fullpel points and assume that f(type) is a constant for the halfpel 
positions and then perhaps evaluate the polynomial at all 8 points and check 
the n best ones (n is some choosen threshold) the next level (which actually 
checks the qpel positions) could use this too or what would perhaps be better 
to check at least one of every filtering type (none, horizontal, vertical, 
both)

[...]

Michael