mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-13 19:58:57 +00:00
tests: add some videoscale tests for new Lanczos-based method
Some crash. Others show invalid memory access in valgrind.
This commit is contained in:
parent
63d1316c0f
commit
2b0b1e4ece
1 changed files with 39 additions and 0 deletions
|
@ -280,6 +280,13 @@ GST_START_TEST (test_passthrough_method_2)
|
|||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_passthrough_method_3)
|
||||
{
|
||||
test_passthrough (3);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
#define CREATE_TEST(name,method,src_width,src_height,dest_width,dest_height) \
|
||||
GST_START_TEST (name) \
|
||||
{ \
|
||||
|
@ -307,39 +314,51 @@ GST_END_TEST;
|
|||
CREATE_TEST (test_downscale_640x480_320x240_method_0, 0, 640, 480, 320, 240);
|
||||
CREATE_TEST (test_downscale_640x480_320x240_method_1, 1, 640, 480, 320, 240);
|
||||
CREATE_TEST (test_downscale_640x480_320x240_method_2, 2, 640, 480, 320, 240);
|
||||
CREATE_TEST (test_downscale_640x480_320x240_method_3, 3, 640, 480, 320, 240);
|
||||
CREATE_TEST (test_upscale_320x240_640x480_method_0, 0, 320, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x240_640x480_method_1, 1, 320, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x240_640x480_method_2, 2, 320, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x240_640x480_method_3, 3, 320, 240, 640, 480);
|
||||
CREATE_TEST (test_downscale_640x480_1x1_method_0, 0, 640, 480, 1, 1);
|
||||
CREATE_TEST (test_downscale_640x480_1x1_method_1, 1, 640, 480, 1, 1);
|
||||
CREATE_TEST (test_downscale_640x480_1x1_method_2, 2, 640, 480, 1, 1);
|
||||
CREATE_TEST (test_downscale_640x480_1x1_method_3, 3, 640, 480, 1, 1);
|
||||
CREATE_TEST (test_upscale_1x1_640x480_method_0, 0, 1, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x1_640x480_method_1, 1, 1, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x1_640x480_method_2, 2, 1, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x1_640x480_method_3, 3, 1, 1, 640, 480);
|
||||
CREATE_TEST (test_downscale_641x481_111x30_method_0, 0, 641, 481, 111, 30);
|
||||
CREATE_TEST (test_downscale_641x481_111x30_method_1, 1, 641, 481, 111, 30);
|
||||
CREATE_TEST (test_downscale_641x481_111x30_method_2, 2, 641, 481, 111, 30);
|
||||
CREATE_TEST (test_downscale_641x481_111x30_method_3, 3, 641, 481, 111, 30);
|
||||
CREATE_TEST (test_upscale_111x30_641x481_method_0, 0, 111, 30, 641, 481);
|
||||
CREATE_TEST (test_upscale_111x30_641x481_method_1, 1, 111, 30, 641, 481);
|
||||
CREATE_TEST (test_upscale_111x30_641x481_method_2, 2, 111, 30, 641, 481);
|
||||
CREATE_TEST (test_upscale_111x30_641x481_method_3, 2, 111, 30, 641, 481);
|
||||
CREATE_TEST (test_downscale_641x481_30x111_method_0, 0, 641, 481, 30, 111);
|
||||
CREATE_TEST (test_downscale_641x481_30x111_method_1, 1, 641, 481, 30, 111);
|
||||
CREATE_TEST (test_downscale_641x481_30x111_method_2, 2, 641, 481, 30, 111);
|
||||
CREATE_TEST (test_downscale_641x481_30x111_method_3, 3, 641, 481, 30, 111);
|
||||
CREATE_TEST (test_upscale_30x111_641x481_method_0, 0, 30, 111, 641, 481);
|
||||
CREATE_TEST (test_upscale_30x111_641x481_method_1, 1, 30, 111, 641, 481);
|
||||
CREATE_TEST (test_upscale_30x111_641x481_method_2, 2, 30, 111, 641, 481);
|
||||
CREATE_TEST (test_upscale_30x111_641x481_method_3, 3, 30, 111, 641, 481);
|
||||
CREATE_TEST (test_downscale_640x480_320x1_method_0, 0, 640, 480, 320, 1);
|
||||
CREATE_TEST (test_downscale_640x480_320x1_method_1, 1, 640, 480, 320, 1);
|
||||
CREATE_TEST (test_downscale_640x480_320x1_method_2, 2, 640, 480, 320, 1);
|
||||
CREATE_TEST (test_downscale_640x480_320x1_method_3, 3, 640, 480, 320, 1);
|
||||
CREATE_TEST (test_upscale_320x1_640x480_method_0, 0, 320, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x1_640x480_method_1, 1, 320, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x1_640x480_method_2, 2, 320, 1, 640, 480);
|
||||
CREATE_TEST (test_upscale_320x1_640x480_method_3, 3, 320, 1, 640, 480);
|
||||
CREATE_TEST (test_downscale_640x480_1x240_method_0, 0, 640, 480, 1, 240);
|
||||
CREATE_TEST (test_downscale_640x480_1x240_method_1, 1, 640, 480, 1, 240);
|
||||
CREATE_TEST (test_downscale_640x480_1x240_method_2, 2, 640, 480, 1, 240);
|
||||
CREATE_TEST (test_downscale_640x480_1x240_method_3, 3, 640, 480, 1, 240);
|
||||
CREATE_TEST (test_upscale_1x240_640x480_method_0, 0, 1, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x240_640x480_method_1, 1, 1, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x240_640x480_method_2, 2, 1, 240, 640, 480);
|
||||
CREATE_TEST (test_upscale_1x240_640x480_method_3, 3, 1, 240, 640, 480);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -828,6 +847,13 @@ GST_START_TEST (test_basetransform_negotiation)
|
|||
|
||||
GST_END_TEST;
|
||||
|
||||
#ifndef tcase_skip_broken_test
|
||||
#define tcase_skip_broken_test(chain,test_func) \
|
||||
if (0) { tcase_add_test(chain,test_func); } else { \
|
||||
GST_ERROR ("FIXME: skipping test %s because it's broken.", G_STRINGIFY (test_func)); \
|
||||
}
|
||||
#endif
|
||||
|
||||
static Suite *
|
||||
videoscale_suite (void)
|
||||
{
|
||||
|
@ -839,42 +865,55 @@ videoscale_suite (void)
|
|||
tcase_add_test (tc_chain, test_passthrough_method_0);
|
||||
tcase_add_test (tc_chain, test_passthrough_method_1);
|
||||
tcase_add_test (tc_chain, test_passthrough_method_2);
|
||||
tcase_add_test (tc_chain, test_passthrough_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_2);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_320x240_640x480_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_320x240_640x480_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_320x240_640x480_method_2);
|
||||
tcase_add_test (tc_chain, test_upscale_320x240_640x480_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x1_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x1_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x1_method_2);
|
||||
tcase_skip_broken_test (tc_chain, test_downscale_640x480_1x1_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_1x1_640x480_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_1x1_640x480_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_1x1_640x480_method_2);
|
||||
tcase_add_test (tc_chain, test_upscale_1x1_640x480_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_111x30_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_111x30_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_111x30_method_2);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_111x30_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_111x30_641x481_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_111x30_641x481_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_111x30_641x481_method_2);
|
||||
tcase_add_test (tc_chain, test_upscale_111x30_641x481_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_30x111_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_30x111_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_30x111_method_2);
|
||||
tcase_add_test (tc_chain, test_downscale_641x481_30x111_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_30x111_641x481_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_30x111_641x481_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_30x111_641x481_method_2);
|
||||
tcase_add_test (tc_chain, test_upscale_30x111_641x481_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x1_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x1_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_320x1_method_2);
|
||||
tcase_skip_broken_test (tc_chain, test_downscale_640x480_320x1_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_320x1_640x480_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_320x1_640x480_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_320x1_640x480_method_2);
|
||||
tcase_skip_broken_test (tc_chain, test_upscale_320x1_640x480_method_3);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x240_method_0);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x240_method_1);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x240_method_2);
|
||||
tcase_add_test (tc_chain, test_downscale_640x480_1x240_method_3);
|
||||
tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_0);
|
||||
tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_1);
|
||||
tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_2);
|
||||
tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_3);
|
||||
tcase_add_test (tc_chain, test_negotiation);
|
||||
tcase_add_test (tc_chain, test_reverse_negotiation);
|
||||
tcase_add_test (tc_chain, test_basetransform_negotiation);
|
||||
|
|
Loading…
Reference in a new issue