pinterf / mvtools

mvtools plugin for avisynth
153 stars 17 forks source link

Possible bug in CrossSearch #56

Closed adworacz closed 5 months ago

adworacz commented 1 year ago

https://github.com/pinterf/mvtools/blob/d8bdff7e02c15a28dcc6e9ef2ebeaa9d16cc1f56/Sources/PlaneOfBlocks.cpp#L1583-L1584

This might be a very old bug.

Shouldn't this code be using a - j and a + j, similar to the - i and + i right above it? It would make sense, to search both directions of a cross, instead of the same direction twice.

I think this bug can be found in both this mvtools, but also both Vapoursynth plugins as well.

Looking at the same code in x264 would suggest that the search should be done in both directions: https://github.com/mirror/x264/blob/master/encoder/me.c#L171-L174

pinterf commented 5 months ago

Good catch, thank you for checking this.