]> git.sesse.net Git - movit/blobdiff - demo.cpp
Explicitly declare use of round() as an #extension.
[movit] / demo.cpp
index cd9fe9fb9dfb2e29e694d6bf82153b9e157821a2..81d3e5091909e5cae8afe2b36fbd6b6addb3edb3 100644 (file)
--- a/demo.cpp
+++ b/demo.cpp
@@ -21,7 +21,6 @@
 #include <setjmp.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <sys/time.h>
 #include <time.h>
 
@@ -180,6 +179,15 @@ int main(int argc, char **argv)
        init_movit(".", MOVIT_DEBUG_ON);
        printf("GPU texture subpixel precision: about %.1f bits\n",
                log2(1.0f / movit_texel_subpixel_precision));
+       printf("Wrongly rounded x+0.48 or x+0.52 values: %d/510\n",
+               movit_num_wrongly_rounded);
+       if (movit_num_wrongly_rounded > 0) {
+               if (movit_shader_rounding_supported) {
+                       printf("Rounding off in the shader to compensate.\n");
+               } else {
+                       printf("No shader roundoff available; cannot compensate.\n");
+               }
+       }
        
        unsigned img_w, img_h;
        unsigned char *src_img = load_image(argc > 1 ? argv[1] : "blg_wheels_woman_1.jpg", &img_w, &img_h);