tests/tiny_psnr: Make the search range extend both sides from the specified shift...
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Apr 2015 13:28:15 +0000 (15:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 17 Apr 2015 19:22:27 +0000 (21:22 +0200)
This is what one would expect from the help text

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tests/tiny_psnr.c

index b35ed81..e09f394 100644 (file)
@@ -273,6 +273,9 @@ int main(int argc, char *argv[])
     int max_psnr   = -1;
     int max_psnr_shift = 0;
 
+    if (shift_last > shift_first)
+        shift_first -= shift_last - shift_first;
+
     if (argc > 3) {
         if (!strcmp(argv[3], "u8")) {
             len = 1;