X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Ftest4.C;h=114ed49aff9baae38090522778c360d73a849928;hb=20002b54e92573aafc97cbc3a85ec529b35bb191;hp=6e9d27f72261b62ce374af58dd43e8434dcad708;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/test4.C b/cinelerra-5.1/guicast/test4.C index 6e9d27f7..114ed49a 100644 --- a/cinelerra-5.1/guicast/test4.C +++ b/cinelerra-5.1/guicast/test4.C @@ -1,5 +1,5 @@ -//c++ -g -I../guicast testwindow.C ../guicast/x86_64/libguicast.a \ +//c++ -g -I../guicast test4.C ../guicast/x86_64/libguicast.a \ // -DHAVE_GL -DHAVE_XFT -I/usr/include/freetype2 -lGL -lX11 -lXext \ // -lXinerama -lXv -lpng -lfontconfig -lfreetype -lXft -pthread @@ -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", + "rgb_floatp", "rgba_floatp", "yuv420pi", "ayuv16161616", "grey8", "grey16", "gbrp", }; void write_pgm(uint8_t *tp, int w, int h, const char *fmt, ...) @@ -110,6 +111,32 @@ void write_ppm(uint8_t *tp, int w, int h, const char *fmt, ...) } } +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