X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Ftest4.C;h=de94fad8d709e1c24304b8ef9660d2f2296d3dbf;hp=a878a19d01c82179b02cb4f3eb5f58189b136510;hb=463702f1b724c43a1cb7951ce7d71986f9715d5f;hpb=9f917bc27389ebc36568a1f465b42208f7e8e46a diff --git a/cinelerra-5.1/guicast/test4.C b/cinelerra-5.1/guicast/test4.C index a878a19d..de94fad8 100644 --- a/cinelerra-5.1/guicast/test4.C +++ b/cinelerra-5.1/guicast/test4.C @@ -11,9 +11,10 @@ #include #include +#include "bcwindowbase.h" #include "bcwindow.h" #include "bcsignals.h" -#include "colors.h" +#include "bccolors.h" #include "fonts.h" #include "thread.h" #include "vframe.h" @@ -81,7 +82,7 @@ const char *cmdl[] = { "yuv422p", "rgb888", "rgba8888", "rgb161616", "rgba16161616", "yuv888", "yuva8888", "yuv161616", "yuva16161616", "yuv411p", "uvy422", "yuv422", "argb8888", "abgr8888", "a8", "a16", "yuv101010", "vyu888", "uyva8888", "yuv444p", "yuv410p", "rgb_float", "rgba_float", "a_float", - "rgb_floatp", "rgba_floatp", "yuv420pi", + "rgb_floatp", "rgba_floatp", "yuv420pi", "ayuv16161616", "grey8", "grey16", "gbrp", }; void write_pgm(uint8_t *tp, int w, int h, const char *fmt, ...) @@ -106,8 +107,34 @@ void write_ppm(uint8_t *tp, int w, int h, const char *fmt, ...) if( fp ) { fprintf(fp,"P6\n%d %d\n255\n",w,h); fwrite(tp,3*w,h,fp); - fclose(fp); + if( fp != stdout ) fclose(fp); + } +} + +int64_t tm = 0, tn = 0; + +static int diff_vframe(VFrame &afrm, VFrame &bfrm) +{ + int n = 0, m = 0; + int w = afrm.get_w(), h = afrm.get_h(); + uint8_t **arows = afrm.get_rows(); + uint8_t **brows = bfrm.get_rows(); + + for( int y=0; y