mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[dead code] remove some unused code
also fix some parts no longer compiling after enabling it again
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
static const BYTE TEST_BELLS_DATA[] = "for.whom.the.bell.tolls,.the.bell.tolls.for.thee!";
|
||||
|
||||
static const BYTE TEST_BELLS_DATA_XCRUSH[] =
|
||||
"\x12\x00\x66\x6f\x72\x2e\x77\x68\x6f\x6d\x2e\x74\x68\x65\x2e\x62"
|
||||
"\x66\x6f\x72\x2e\x77\x68\x6f\x6d\x2e\x74\x68\x65\x2e\x62"
|
||||
"\x65\x6c\x6c\x2e\x74\x6f\x6c\x6c\x73\x2c\x2e\x74\x68\x65\x2e\x62"
|
||||
"\x65\x6c\x6c\x2e\x74\x6f\x6c\x6c\x73\x2e\x66\x6f\x72\x2e\x74\x68"
|
||||
"\x65";
|
||||
"\x65\x65\x21";
|
||||
|
||||
static const BYTE TEST_ISLAND_DATA[] = "No man is an island entire of itself; every man "
|
||||
"is a piece of the continent, a part of the main; "
|
||||
@@ -48,9 +48,9 @@ static void test_dump(const char* fkt, const void* generated, size_t generated_s
|
||||
printf("[%s] output size mismatch: Actual: %" PRIuz ", Expected: %" PRIuz "\n", fkt,
|
||||
generated_size, expected_size);
|
||||
printf("[%s] Actual\n", fkt);
|
||||
BitDump(fkt, WLOG_INFO, generated, generated_size * 8ull, 0);
|
||||
winpr_HexDump(fkt, WLOG_INFO, generated, generated_size);
|
||||
printf("[%s] Expected\n", fkt);
|
||||
BitDump(fkt, WLOG_INFO, expected, expected_size * 8ull, 0);
|
||||
winpr_HexDump(fkt, WLOG_INFO, expected, expected_size);
|
||||
}
|
||||
|
||||
static BOOL test_compare(const char* fkt, const void* generated, size_t generated_size,
|
||||
@@ -104,11 +104,9 @@ struct test_argument
|
||||
|
||||
static const struct test_argument tests[] = {
|
||||
{ "XCrushCompressIsland", TEST_ISLAND_DATA, sizeof(TEST_ISLAND_DATA) - 1,
|
||||
TEST_ISLAND_DATA_XCRUSH, sizeof(TEST_ISLAND_DATA_XCRUSH) - 1 }
|
||||
#if 0
|
||||
,{ "XCrushCompressBells", TEST_BELLS_DATA, sizeof(TEST_BELLS_DATA) - 1, TEST_BELLS_DATA_XCRUSH,
|
||||
TEST_ISLAND_DATA_XCRUSH, sizeof(TEST_ISLAND_DATA_XCRUSH) - 1 },
|
||||
{ "XCrushCompressBells", TEST_BELLS_DATA, sizeof(TEST_BELLS_DATA) - 1, TEST_BELLS_DATA_XCRUSH,
|
||||
sizeof(TEST_BELLS_DATA_XCRUSH) - 1 }
|
||||
#endif
|
||||
};
|
||||
|
||||
int TestFreeRDPCodecXCrush(int argc, char* argv[])
|
||||
|
||||
@@ -216,13 +216,6 @@ static BOOL test_layouts(DWORD types)
|
||||
cur->code);
|
||||
goto fail;
|
||||
}
|
||||
#if 0 // TODO: Should these always match?
|
||||
if (strcmp(name, cur->name) != 0) {
|
||||
(void)fprintf(stderr, "freerdp_keyboard_get_layouts(type: %" PRIu32 ") -> %" PRIuz " elements, failed:\n", types, count);
|
||||
(void)fprintf(stderr, "[%" PRIuz "]: freerdp_keyboard_get_layouts(%" PRIu32 ") -> %s != %s\n", x, cur->code, name, cur->name);
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
const DWORD id = freerdp_keyboard_get_layout_id_from_name(cur->name);
|
||||
// if (id != cur->code) {
|
||||
|
||||
@@ -44,23 +44,9 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_func(prim_size_t roi, DWORD DstFormat)
|
||||
if (!r || !g || !b || !out1 || !out2)
|
||||
goto fail;
|
||||
|
||||
#if 0
|
||||
{
|
||||
for (UINT32 y = 0; y < roi.height; y++)
|
||||
{
|
||||
for (UINT32 x = 0; x < roi.width; x++)
|
||||
{
|
||||
r[y * roi.width + x] = 0x01;
|
||||
g[y * roi.width + x] = 0x02;
|
||||
b[y * roi.width + x] = 0x04;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
winpr_RAND(r, 1ULL * rgbStride * roi.height);
|
||||
winpr_RAND(g, 1ULL * rgbStride * roi.height);
|
||||
winpr_RAND(b, 1ULL * rgbStride * roi.height);
|
||||
#endif
|
||||
ptrs[0] = r;
|
||||
ptrs[1] = g;
|
||||
ptrs[2] = b;
|
||||
@@ -96,7 +82,7 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_func(prim_size_t roi, DWORD DstFormat)
|
||||
}
|
||||
}
|
||||
|
||||
printf("Results for %" PRIu32 "x%" PRIu32 " [%s]", roi.width, roi.height,
|
||||
printf("Results for %" PRIu32 "x%" PRIu32 " [%s]\n", roi.width, roi.height,
|
||||
FreeRDPGetColorFormatName(DstFormat));
|
||||
PROFILER_PRINT_HEADER
|
||||
PROFILER_PRINT(genericProf)
|
||||
@@ -276,8 +262,6 @@ int TestPrimitivesColors(int argc, char* argv[])
|
||||
if (!test_RGBToRGB_16s8u_P3AC4R_func(roi, formats[x]))
|
||||
return 1;
|
||||
|
||||
#if 0
|
||||
|
||||
if (g_TestPrimitivesPerformance)
|
||||
{
|
||||
if (!test_RGBToRGB_16s8u_P3AC4R_speed())
|
||||
@@ -292,8 +276,6 @@ int TestPrimitivesColors(int argc, char* argv[])
|
||||
if (!test_yCbCrToRGB_16s16s_P3P3_speed())
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -245,21 +245,25 @@ int TestPrimitivesCopy(int argc, char* argv[])
|
||||
FREERDP_KEEP_DST_ALPHA,
|
||||
FREERDP_FLIP_HORIZONTAL,
|
||||
FREERDP_KEEP_DST_ALPHA | FREERDP_FLIP_HORIZONTAL,
|
||||
#if 0
|
||||
FREERDP_FLIP_VERTICAL,
|
||||
FREERDP_FLIP_VERTICAL | FREERDP_FLIP_HORIZONTAL,
|
||||
FREERDP_KEEP_DST_ALPHA | FREERDP_FLIP_VERTICAL,
|
||||
FREERDP_KEEP_DST_ALPHA | FREERDP_FLIP_VERTICAL | FREERDP_FLIP_HORIZONTAL
|
||||
#if defined(TEST_ALL_FLAGS)
|
||||
FREERDP_FLIP_VERTICAL,
|
||||
FREERDP_FLIP_VERTICAL | FREERDP_FLIP_HORIZONTAL,
|
||||
FREERDP_KEEP_DST_ALPHA | FREERDP_FLIP_VERTICAL,
|
||||
FREERDP_KEEP_DST_ALPHA | FREERDP_FLIP_VERTICAL | FREERDP_FLIP_HORIZONTAL
|
||||
#endif
|
||||
};
|
||||
const UINT32 formats[] = {
|
||||
PIXEL_FORMAT_BGRA32,
|
||||
PIXEL_FORMAT_BGRX32,
|
||||
PIXEL_FORMAT_BGR24
|
||||
#if 0 /* Only the previous 3 have SIMD optimizations, so skip the rest */
|
||||
, PIXEL_FORMAT_RGB24,
|
||||
PIXEL_FORMAT_ABGR32, PIXEL_FORMAT_ARGB32, PIXEL_FORMAT_XBGR32,
|
||||
PIXEL_FORMAT_XRGB32, PIXEL_FORMAT_RGBA32, PIXEL_FORMAT_RGBX32
|
||||
const UINT32 formats[] = { PIXEL_FORMAT_BGRA32,
|
||||
PIXEL_FORMAT_BGRX32,
|
||||
PIXEL_FORMAT_BGR24
|
||||
#if defined(TEST_ALL_FLAGS) /* Only the previous 3 have SIMD optimizations, so skip the rest */
|
||||
,
|
||||
PIXEL_FORMAT_RGB24,
|
||||
PIXEL_FORMAT_ABGR32,
|
||||
PIXEL_FORMAT_ARGB32,
|
||||
PIXEL_FORMAT_XBGR32,
|
||||
PIXEL_FORMAT_XRGB32,
|
||||
PIXEL_FORMAT_RGBA32,
|
||||
PIXEL_FORMAT_RGBX32
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -111,9 +111,7 @@ fail:
|
||||
* CloseThreadpoolWork ! calling the CloseThreadpoolCleanupGroupMembers function releases
|
||||
* the work, wait, and timer objects associated with the cleanup group.
|
||||
*/
|
||||
#if 0
|
||||
CloseThreadpoolWork(work); // this would segfault, see comment above. */
|
||||
#endif
|
||||
// CloseThreadpoolWork(work); // this would segfault, see comment above. */
|
||||
}
|
||||
|
||||
CloseThreadpool(pool);
|
||||
|
||||
Reference in New Issue
Block a user