mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix SAD calculation to return correct value in non-overlapping case.
This commit is contained in:
parent
68aa70a49a
commit
ea30bf0126
|
@ -57,7 +57,7 @@ unsigned get_block_sad(picture *pic, picture *ref,
|
|||
int width = pic->width;
|
||||
int height = pic->height;
|
||||
|
||||
unsigned result = 1; // Start from 1 so result is never 0.
|
||||
unsigned result = 0;
|
||||
|
||||
// 0 means invalid, for now.
|
||||
if (!IN_FRAME(ref_x, ref_y, width, height, block_width, block_height)) return 0;
|
||||
|
|
Loading…
Reference in a new issue