[XviD-devel] DiamondSearch broken?

Radek Czyz syskin at ihug.com.au
Sun Oct 3 11:57:33 CEST 2004


Christoph Lampert wrote:
> Hi,
> 
> I didn't contribute much, lately, but when I just checked ME 
> to test some different ideas, I noticed that I don't understand 
> xvid_me_DiamondSearch() anymore (in estimation_common.c).
> It's not used, except for quality==0, I guess, since AdvDiamondSearch does 
> the work, but still, I have the impression it's broken: After only 1 step 
> of the diamond, it will terminate, if the diagonal checks are not 
> successful, although it should of cause continue until a minimum is 
> reached. 
> Or am I just too blind to see?
> 
> If you see the same, I can commit a fix. 

Oh, I haven't touched this code for *ages* now. DiamondSearch is 
reasonably important because it's used in first pass and also in P/B/I 
decision, where catching real motion is the actual goal of the function.

[right here was an explaination why the code looks right to me. I 
deleted it]

Lemme guess, I think I see the problem: loop ends when iDirection==0, 
but iDirection might get set to zero after the first four checks?

If that's the case, AdvDiamond has the same bug... Great >_<

Radek


More information about the XviD-devel mailing list