From: Armin Novak Date: Thu, 16 Feb 2017 13:00:25 +0000 (+0100) Subject: Added value comparison for all YCbCr functions. X-Git-Tag: 2.0.0-beta1+android10~32^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c04918d6c2565b5984056baa980a09b17e31ad83;p=platform%2Fupstream%2Ffreerdp.git Added value comparison for all YCbCr functions. --- diff --git a/libfreerdp/primitives/test/TestPrimitivesYCbCr.c b/libfreerdp/primitives/test/TestPrimitivesYCbCr.c index e4c848c..e2f3b3c 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYCbCr.c +++ b/libfreerdp/primitives/test/TestPrimitivesYCbCr.c @@ -2252,6 +2252,7 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s if (cnt[0] || cnt[1] || cnt[2]) { + printf("Summary information yCbCrToRGB_16s8u_P3AC4R\n"); printf("Red Error Dump:\n"); test_bmp_cmp_dump(actual, expected, dstSize, 2, margin); /* red */ printf("Green Error Dump:\n"); @@ -2262,6 +2263,27 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s printf("G: diff: %d (%f%%)\n", cnt[1], err[1]); printf("B: diff: %d (%f%%)\n", cnt[0], err[0]); } + + cnt[2] = test_bmp_cmp_count(actual1, expected, dstSize, 2, margin); /* red */ + err[2] = ((float) cnt[2]) / ((float) dstSize / 4) * 100.0f; + cnt[1] = test_bmp_cmp_count(actual1, expected, dstSize, 1, margin); /* green */ + err[1] = ((float) cnt[1]) / ((float) dstSize / 4) * 100.0f; + cnt[0] = test_bmp_cmp_count(actual1, expected, dstSize, 0, margin); /* blue */ + err[0] = ((float) cnt[0]) / ((float) dstSize / 4) * 100.0f; + + if (cnt[0] || cnt[1] || cnt[2]) + { + printf("Summary information yCbCrToRGB_16s16s_P3P3 & RGBToRGB_16s8u_P3AC4R\n"); + printf("Red Error Dump:\n"); + test_bmp_cmp_dump(actual1, expected, dstSize, 2, margin); /* red */ + printf("Green Error Dump:\n"); + test_bmp_cmp_dump(actual1, expected, dstSize, 1, margin); /* green */ + printf("Blue Error Dump:\n"); + test_bmp_cmp_dump(actual1, expected, dstSize, 0, margin); /* blue */ + printf("R: diff: %d (%f%%)\n", cnt[2], err[2]); + printf("G: diff: %d (%f%%)\n", cnt[1], err[1]); + printf("B: diff: %d (%f%%)\n", cnt[0], err[0]); + } } PROFILER_PRINT_HEADER;