[XviD-devel] DiamondSearch broken?

Christoph Lampert chl at math.uni-bonn.de
Sun Oct 3 12:28:17 CEST 2004


On Sun, 3 Oct 2004, Radek Czyz wrote:
> 
> 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?

Exactly, because iDirection is set to 0 before the diagonals are checked.
It's easy to get rid off, simply not set it to 0, but to 
12 (=4+8) if the diamond step was 1 or 2, or to 3, if the step was 4 or 8.
This might be overwritten by the diagonals, but if not, it's exactly the 
value needed. 

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

I think not, because AdvDiamond doesn't terminal automatically, 
when iDirection is 0 at the end of the loop, but it's "break"ed (sorry, 
"broken" I mean ;-) only when iDirection is 0 after the diamond step 
itself _and_ the subsequent diagonal checks.  

chl



More information about the XviD-devel mailing list