[FFmpeg-devel] [PATCH] tests/tiny_psnr: Make the search range extend both sides from the specified shift value

Michael Niedermayer michaelni at gmx.at
Sun Apr 12 15:28:15 CEST 2015


This is what one would expect from the help text

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 tests/tiny_psnr.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index b35ed81..e09f394 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -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;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list