From: Armin Novak Date: Thu, 8 Nov 2018 16:41:56 +0000 (+0100) Subject: Fixed profiler naming in tests. X-Git-Tag: 2.0.0-rc4~22^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf8bc72dc46217caf853c08bbd15fee25858f038;p=platform%2Fupstream%2Ffreerdp.git Fixed profiler naming in tests. --- diff --git a/libfreerdp/codec/test/TestFreeRDPCodecInterleaved.c b/libfreerdp/codec/test/TestFreeRDPCodecInterleaved.c index da7a105..727009c 100644 --- a/libfreerdp/codec/test/TestFreeRDPCodecInterleaved.c +++ b/libfreerdp/codec/test/TestFreeRDPCodecInterleaved.c @@ -48,7 +48,7 @@ static BOOL run_encode_decode_single(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* enc goto fail; PROFILER_ENTER(profiler_comp); - rc = interleaved_compress(decoder, tmp, &DstSize, w, h, pSrcData, + rc = interleaved_compress(encoder, tmp, &DstSize, w, h, pSrcData, format, step, x, y, NULL, bpp); PROFILER_EXIT(profiler_comp); @@ -56,7 +56,7 @@ static BOOL run_encode_decode_single(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* enc goto fail; PROFILER_ENTER(profiler_decomp); - rc = interleaved_decompress(encoder, tmp, DstSize, w, h, bpp, pDstData, + rc = interleaved_decompress(decoder, tmp, DstSize, w, h, bpp, pDstData, format, step, x, y, w, h, NULL); PROFILER_EXIT(profiler_decomp); @@ -95,6 +95,33 @@ fail: return rc2; } +static const char* get_profiler_name(BOOL encode, UINT16 bpp) +{ + switch (bpp) + { + case 24: + if (encode) + return "interleaved_compress 24bpp"; + else + return "interleaved_decompress 24bpp"; + + case 16: + if (encode) + return "interleaved_compress 16bpp"; + else + return "interleaved_decompress 16bpp"; + + case 15: + if (encode) + return "interleaved_compress 15bpp"; + else + return "interleaved_decompress 15bpp"; + + default: + return "configuration error!"; + } +} + static BOOL run_encode_decode(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* encoder, BITMAP_INTERLEAVED_CONTEXT* decoder) { @@ -102,10 +129,10 @@ static BOOL run_encode_decode(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* encoder, UINT32 x; PROFILER_DEFINE(profiler_comp); PROFILER_DEFINE(profiler_decomp); - PROFILER_CREATE(profiler_comp, "interleaved_compress") - PROFILER_CREATE(profiler_decomp, "interleaved_decompress") + PROFILER_CREATE(profiler_comp, get_profiler_name(TRUE, bpp)) + PROFILER_CREATE(profiler_decomp, get_profiler_name(FALSE, bpp)) - for (x = 0; x < 100; x++) + for (x = 0; x < 500; x++) { if (!run_encode_decode_single(bpp, encoder, decoder #if defined(WITH_PROFILER)