1 /* GStreamer unit tests for the deinterlace element
2 * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 # include "config.h"
22 #endif
23
24 #include <stdio.h>
25 #include <gst/check/gstcheck.h>
26 #include <gst/video/video.h>
27
28 static gboolean
gst_caps_is_interlaced(GstCaps * caps)29 gst_caps_is_interlaced (GstCaps * caps)
30 {
31 GstVideoInfo info;
32
33 fail_unless (gst_caps_is_fixed (caps));
34 fail_unless (gst_video_info_from_caps (&info, caps));
35
36 return GST_VIDEO_INFO_IS_INTERLACED (&info);
37 }
38
GST_START_TEST(test_create_and_unref)39 GST_START_TEST (test_create_and_unref)
40 {
41 GstElement *deinterlace;
42
43 deinterlace = gst_element_factory_make ("deinterlace", NULL);
44 fail_unless (deinterlace != NULL);
45
46 gst_element_set_state (deinterlace, GST_STATE_NULL);
47 gst_object_unref (deinterlace);
48 }
49
50 GST_END_TEST;
51
52 #define CAPS_VIDEO_COMMON \
53 "width=(int)800, height=(int)600, framerate=(fraction)15/1"
54
55 #define CAPS_IMAGE_COMMON \
56 "width=(int)3200, height=(int)3400, framerate=(fraction)0/1"
57
58 #define CAPS_YUY2 \
59 "video/x-raw, " \
60 CAPS_VIDEO_COMMON ", " \
61 "format=(string)YUY2"
62
63 #define CAPS_YUY2_INTERLACED \
64 CAPS_YUY2 ", " \
65 "interlace-mode=interleaved"
66
67 #define CAPS_YVYU \
68 "video/x-raw, " \
69 CAPS_VIDEO_COMMON ", " \
70 "format=(string)YVYU"
71
72 #define CAPS_YVYU_INTERLACED \
73 CAPS_YVYU ", " \
74 "interlace-mode=interleaved"
75
76 #define CAPS_YUY2_IMAGE \
77 "video/x-raw, " \
78 CAPS_IMAGE_COMMON ", " \
79 "format=(string)YUY2"
80
81 #define CAPS_YUY2_INTERLACED_IMAGE \
82 CAPS_YUY2_IMAGE ", " \
83 "interlace-mode=interleaved"
84
85 #define CAPS_YVYU_IMAGE \
86 "video/x-raw, " \
87 CAPS_IMAGE_COMMON ", " \
88 "format=(string)YVYU"
89
90 #define CAPS_YVYU_INTERLACED_IMAGE \
91 CAPS_YVYU_IMAGE ", " \
92 "interlace-mode=interleaved"
93
94 static GstElement *deinterlace;
95 static GstPad *srcpad;
96 static GstPad *sinkpad;
97
98 static GstElement *pipeline;
99
100 /* sets up deinterlace and shortcut pointers to its pads */
101 static void
setup_deinterlace(void)102 setup_deinterlace (void)
103 {
104 deinterlace = gst_element_factory_make ("deinterlace", NULL);
105 fail_unless (deinterlace != NULL);
106
107 sinkpad = gst_element_get_static_pad (deinterlace, "sink");
108 fail_unless (sinkpad != NULL);
109 srcpad = gst_element_get_static_pad (deinterlace, "src");
110 fail_unless (srcpad != NULL);
111 }
112
113 /* sets up a basic test pipeline containing:
114 *
115 * videotestsrc ! capsfilter ! deinterlace ! fakesink
116 *
117 * The parameters set the capsfilter caps and the num-buffers
118 * property of videotestsrc
119 *
120 * It is useful for adding buffer probes to deinterlace pads
121 * and validating inputs/outputs
122 */
123 static void
setup_test_pipeline(gint mode,GstCaps * infiltercaps,GstCaps * outfiltercaps,gint numbuffers)124 setup_test_pipeline (gint mode, GstCaps * infiltercaps, GstCaps * outfiltercaps,
125 gint numbuffers)
126 {
127 GstElement *src;
128 GstElement *infilter;
129 GstElement *outfilter;
130 GstElement *sink;
131
132 setup_deinterlace ();
133
134 pipeline = gst_pipeline_new ("pipeline");
135 src = gst_element_factory_make ("videotestsrc", NULL);
136 infilter = gst_element_factory_make ("capsfilter", "infilter");
137 outfilter = gst_element_factory_make ("capsfilter", "outfilter");
138 sink = gst_element_factory_make ("fakesink", NULL);
139 fail_if (src == NULL);
140 fail_if (infilter == NULL);
141 fail_if (outfilter == NULL);
142 fail_if (sink == NULL);
143
144 fail_unless (gst_bin_add (GST_BIN (pipeline), src));
145 fail_unless (gst_bin_add (GST_BIN (pipeline), infilter));
146 fail_unless (gst_bin_add (GST_BIN (pipeline), deinterlace));
147 fail_unless (gst_bin_add (GST_BIN (pipeline), outfilter));
148 fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
149
150 /* set the properties */
151 g_object_set (deinterlace, "mode", mode, NULL);
152 if (numbuffers > 0)
153 g_object_set (src, "num-buffers", numbuffers, NULL);
154 if (infiltercaps)
155 g_object_set (infilter, "caps", infiltercaps, NULL);
156 if (outfiltercaps)
157 g_object_set (outfilter, "caps", outfiltercaps, NULL);
158
159 fail_unless (gst_element_link_many (src, infilter, deinterlace, outfilter,
160 sink, NULL));
161 if (infiltercaps)
162 gst_caps_unref (infiltercaps);
163 if (outfiltercaps)
164 gst_caps_unref (outfiltercaps);
165 }
166
167 /*
168 * Checks if 2 buffers are equal
169 *
170 * Equals means same data
171 */
172 static gboolean
test_buffer_equals(GstBuffer * buf_a,GstBuffer * buf_b)173 test_buffer_equals (GstBuffer * buf_a, GstBuffer * buf_b)
174 {
175 GstMapInfo m1, m2;
176 gboolean res = FALSE;
177
178 gst_buffer_map (buf_a, &m1, GST_MAP_READ);
179 gst_buffer_map (buf_b, &m2, GST_MAP_READ);
180
181 if (m1.size == m2.size) {
182 res = memcmp (m1.data, m2.data, m1.size) == 0;
183 }
184 gst_buffer_unmap (buf_a, &m1);
185 gst_buffer_unmap (buf_b, &m2);
186
187 return res;
188 }
189
190 static GstPadProbeReturn
sinkpad_enqueue_buffer(GstPad * pad,GstPadProbeInfo * info,gpointer data)191 sinkpad_enqueue_buffer (GstPad * pad, GstPadProbeInfo * info, gpointer data)
192 {
193 GQueue *queue = (GQueue *) data;
194 GstBuffer *buf = GST_PAD_PROBE_INFO_BUFFER (info);
195
196 /* enqueue a copy for being compared later */
197 g_queue_push_tail (queue, gst_buffer_copy (buf));
198
199 return GST_PAD_PROBE_OK;
200 }
201
202 /*
203 * pad buffer probe that compares the buffer with the top one
204 * in the GQueue passed as the user data
205 */
206 static GstPadProbeReturn
srcpad_dequeue_and_compare_buffer(GstPad * pad,GstPadProbeInfo * info,gpointer data)207 srcpad_dequeue_and_compare_buffer (GstPad * pad, GstPadProbeInfo * info,
208 gpointer data)
209 {
210 GQueue *queue = (GQueue *) data;
211 GstBuffer *buf = GST_PAD_PROBE_INFO_BUFFER (info);
212 GstBuffer *queue_buf;
213
214 queue_buf = (GstBuffer *) g_queue_pop_head (queue);
215 fail_if (queue_buf == NULL);
216
217 fail_unless (test_buffer_equals (buf, queue_buf));
218
219 gst_buffer_unref (queue_buf);
220
221 return GST_PAD_PROBE_OK;
222 }
223
224 /*
225 * Utility function that sets up a pipeline with deinterlace for
226 * validating that it operates in passthrough mode when receiving
227 * data with 'infiltercaps' as the input caps and operating in 'mode' mode
228 */
229 static void
deinterlace_check_passthrough(gint mode,const gchar * infiltercaps)230 deinterlace_check_passthrough (gint mode, const gchar * infiltercaps)
231 {
232 GstMessage *msg;
233 GQueue *queue;
234 GstCaps *incaps = NULL;
235
236 if (infiltercaps)
237 incaps = gst_caps_from_string (infiltercaps);
238
239 setup_test_pipeline (mode, incaps, NULL, 20);
240
241 queue = g_queue_new ();
242
243 /* set up probes for testing */
244 gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_BUFFER, sinkpad_enqueue_buffer,
245 queue, NULL);
246 gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BUFFER,
247 srcpad_dequeue_and_compare_buffer, queue, NULL);
248
249 fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING) !=
250 GST_STATE_CHANGE_FAILURE);
251
252 msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline),
253 GST_MESSAGE_ERROR | GST_MESSAGE_EOS, -1);
254 if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
255 GST_ERROR ("ERROR: %" GST_PTR_FORMAT, msg);
256 fail ("Unexpected error message");
257 }
258 gst_message_unref (msg);
259
260 /* queue should be empty */
261 fail_unless (g_queue_is_empty (queue));
262
263 fail_unless (gst_element_set_state (pipeline, GST_STATE_NULL) ==
264 GST_STATE_CHANGE_SUCCESS);
265 gst_object_unref (pipeline);
266 gst_object_unref (sinkpad);
267 gst_object_unref (srcpad);
268 g_queue_free (queue);
269 }
270
271 /*
272 * Sets the caps on deinterlace sinkpad and validates the
273 * caps that is set on the srcpad
274 */
275 static void
deinterlace_set_caps_and_check(GstCaps * input,gboolean must_deinterlace)276 deinterlace_set_caps_and_check (GstCaps * input, gboolean must_deinterlace)
277 {
278 GstCaps *othercaps = NULL;
279 GstSegment segment;
280
281 gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
282 fail_unless (gst_pad_set_caps (sinkpad, input));
283 gst_segment_init (&segment, GST_FORMAT_TIME);
284 gst_pad_send_event (sinkpad, gst_event_new_segment (&segment));
285
286 g_object_get (srcpad, "caps", &othercaps, NULL);
287
288 if (must_deinterlace) {
289 fail_if (gst_caps_is_interlaced (othercaps));
290 } else {
291 GstStructure *s;
292
293 fail_unless (gst_caps_is_interlaced (input) ==
294 gst_caps_is_interlaced (othercaps));
295
296 othercaps = gst_caps_make_writable (othercaps);
297 s = gst_caps_get_structure (othercaps, 0);
298 gst_structure_remove_field (s, "interlace-mode");
299
300 input = gst_caps_make_writable (input);
301 s = gst_caps_get_structure (input, 0);
302 gst_structure_remove_field (s, "interlace-mode");
303
304 fail_unless (gst_caps_is_equal (input, othercaps));
305 }
306 gst_caps_unref (input);
307 gst_caps_unref (othercaps);
308 }
309
310 static void
deinterlace_set_string_caps_and_check(const gchar * input,gboolean must_deinterlace)311 deinterlace_set_string_caps_and_check (const gchar * input,
312 gboolean must_deinterlace)
313 {
314 deinterlace_set_caps_and_check (gst_caps_from_string (input),
315 must_deinterlace);
316 }
317
GST_START_TEST(test_mode_auto_accept_caps)318 GST_START_TEST (test_mode_auto_accept_caps)
319 {
320 setup_deinterlace ();
321
322 /* auto mode */
323 g_object_set (deinterlace, "mode", 0, NULL);
324 fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
325 GST_STATE_CHANGE_SUCCESS);
326
327 /* try to set non interlaced caps */
328 deinterlace_set_string_caps_and_check (CAPS_YVYU, FALSE);
329 deinterlace_set_string_caps_and_check (CAPS_YUY2, FALSE);
330 deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, FALSE);
331 deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, FALSE);
332
333 /* now try to set interlaced caps */
334 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, TRUE);
335 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, TRUE);
336 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, TRUE);
337 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, TRUE);
338
339 /* cleanup */
340 gst_object_unref (sinkpad);
341 gst_object_unref (srcpad);
342 fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
343 GST_STATE_CHANGE_SUCCESS);
344 gst_object_unref (deinterlace);
345 }
346
347 GST_END_TEST;
348
GST_START_TEST(test_mode_forced_accept_caps)349 GST_START_TEST (test_mode_forced_accept_caps)
350 {
351 setup_deinterlace ();
352
353 /* forced mode */
354 g_object_set (deinterlace, "mode", 1, NULL);
355 fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
356 GST_STATE_CHANGE_SUCCESS);
357
358 /* try to set non interlaced caps */
359 deinterlace_set_string_caps_and_check (CAPS_YVYU, TRUE);
360 deinterlace_set_string_caps_and_check (CAPS_YUY2, TRUE);
361 deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, TRUE);
362 deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, TRUE);
363
364 /* now try to set interlaced caps */
365 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, TRUE);
366 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, TRUE);
367 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, TRUE);
368 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, TRUE);
369
370 /* cleanup */
371 gst_object_unref (sinkpad);
372 gst_object_unref (srcpad);
373 fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
374 GST_STATE_CHANGE_SUCCESS);
375 gst_object_unref (deinterlace);
376 }
377
378 GST_END_TEST;
379
GST_START_TEST(test_mode_disabled_accept_caps)380 GST_START_TEST (test_mode_disabled_accept_caps)
381 {
382 setup_deinterlace ();
383
384 /* disabled mode */
385 g_object_set (deinterlace, "mode", 2, NULL);
386 fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
387 GST_STATE_CHANGE_SUCCESS);
388
389 /* try to set non interlaced caps */
390 deinterlace_set_string_caps_and_check (CAPS_YVYU, FALSE);
391 deinterlace_set_string_caps_and_check (CAPS_YUY2, FALSE);
392 deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, FALSE);
393 deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, FALSE);
394
395 /* now try to set interlaced caps */
396 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, FALSE);
397 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, FALSE);
398 deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, FALSE);
399 deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, FALSE);
400
401 /* cleanup */
402 gst_object_unref (sinkpad);
403 gst_object_unref (srcpad);
404 fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
405 GST_STATE_CHANGE_SUCCESS);
406 gst_object_unref (deinterlace);
407 }
408
409 GST_END_TEST;
410
GST_START_TEST(test_mode_disabled_passthrough)411 GST_START_TEST (test_mode_disabled_passthrough)
412 {
413 /* 2 is disabled mode */
414 deinterlace_check_passthrough (2, CAPS_YUY2_INTERLACED);
415 deinterlace_check_passthrough (2, CAPS_YVYU_INTERLACED);
416 deinterlace_check_passthrough (2, CAPS_YUY2);
417 deinterlace_check_passthrough (2, CAPS_YVYU);
418
419 deinterlace_check_passthrough (2, CAPS_YUY2_INTERLACED_IMAGE);
420 deinterlace_check_passthrough (2, CAPS_YVYU_INTERLACED_IMAGE);
421 deinterlace_check_passthrough (2, CAPS_YUY2_IMAGE);
422 deinterlace_check_passthrough (2, CAPS_YVYU_IMAGE);
423 }
424
425 GST_END_TEST;
426
GST_START_TEST(test_mode_auto_deinterlaced_passthrough)427 GST_START_TEST (test_mode_auto_deinterlaced_passthrough)
428 {
429 /* 0 is auto mode */
430 deinterlace_check_passthrough (0, CAPS_YUY2);
431 deinterlace_check_passthrough (0, CAPS_YVYU);
432 deinterlace_check_passthrough (0, CAPS_YUY2_IMAGE);
433 deinterlace_check_passthrough (0, CAPS_YVYU_IMAGE);
434 }
435
436 GST_END_TEST;
437
438 static GstPadProbeReturn
catch_caps_event(GstPad * pad,GstPadProbeInfo * info,gpointer user_data)439 catch_caps_event (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
440 {
441 GstCaps **outcaps = user_data;
442
443 if (GST_EVENT_TYPE (info->data) == GST_EVENT_CAPS) {
444 g_assert (*outcaps == NULL);
445
446 gst_event_parse_caps (GST_EVENT (info->data), outcaps);
447 gst_caps_ref (*outcaps);
448 }
449
450 return GST_PAD_PROBE_OK;
451 }
452
453 static void
deinterlace_set_caps_with_filter_and_check_result(gint mode,gint fields,const gchar * input_caps,const gchar * filter_caps,const gchar * output_caps)454 deinterlace_set_caps_with_filter_and_check_result (gint mode, gint fields,
455 const gchar * input_caps, const gchar * filter_caps,
456 const gchar * output_caps)
457 {
458 GstElement *deinterlace, *capsfilter;
459 GstPad *sinkpad, *srcpad;
460 GstCaps *caps, *outcaps_actual = NULL;
461 GstCaps *outcaps_expected = NULL;
462
463 deinterlace = gst_element_factory_make ("deinterlace", NULL);
464 fail_unless (deinterlace != NULL);
465 g_object_set (deinterlace, "mode", mode, "fields", fields, NULL);
466
467 caps = gst_caps_from_string (filter_caps);
468 fail_unless (caps != NULL);
469 capsfilter = gst_element_factory_make ("capsfilter", NULL);
470 g_object_set (capsfilter, "caps", caps, NULL);
471 gst_caps_unref (caps);
472
473 fail_unless (gst_element_link (deinterlace, capsfilter));
474
475 sinkpad = gst_element_get_static_pad (deinterlace, "sink");
476 fail_unless (sinkpad);
477
478 srcpad = gst_element_get_static_pad (capsfilter, "src");
479 fail_unless (srcpad);
480
481 gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
482 catch_caps_event, &outcaps_actual, NULL);
483
484 if (output_caps) {
485 outcaps_expected = gst_caps_from_string (output_caps);
486 fail_unless (outcaps_expected != NULL);
487 }
488
489 fail_unless (gst_element_set_state (deinterlace,
490 GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
491 fail_unless (gst_element_set_state (capsfilter,
492 GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
493
494 caps = gst_caps_from_string (input_caps);
495 fail_unless (caps != NULL);
496 gst_pad_send_event (sinkpad, gst_event_new_caps (caps));
497 gst_caps_unref (caps);
498
499 if (output_caps) {
500 gchar *actual;
501
502 fail_if (outcaps_actual == NULL, "Expected %s, got no caps", output_caps);
503 actual = gst_caps_to_string (outcaps_actual);
504 fail_unless (gst_caps_is_equal (outcaps_actual, outcaps_expected),
505 "Expected %s, got %s", output_caps, actual);
506 g_free (actual);
507 } else {
508 gchar *actual;
509
510 actual = gst_caps_to_string (outcaps_actual);
511 fail_if (outcaps_actual != NULL, "Expected negotiation failure, got %s",
512 actual);
513 g_free (actual);
514 }
515
516 gst_object_unref (sinkpad);
517 gst_object_unref (srcpad);
518
519 fail_unless (gst_element_set_state (deinterlace,
520 GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
521 fail_unless (gst_element_set_state (capsfilter,
522 GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
523 gst_object_unref (deinterlace);
524 gst_object_unref (capsfilter);
525
526 if (outcaps_expected)
527 gst_caps_unref (outcaps_expected);
528 if (outcaps_actual)
529 gst_caps_unref (outcaps_actual);
530 }
531
GST_START_TEST(test_mode_disabled_expected_caps)532 GST_START_TEST (test_mode_disabled_expected_caps)
533 {
534 deinterlace_set_caps_with_filter_and_check_result (2, 0,
535 "video/x-raw, format=I420, width=320, height=240, "
536 "interlace-mode=progressive, framerate=20/1",
537 "video/x-raw",
538 "video/x-raw, format=I420, width=320, height=240, "
539 "interlace-mode=progressive, framerate=20/1");
540
541 deinterlace_set_caps_with_filter_and_check_result (2, 0,
542 "video/x-raw, format=I420, width=320, height=240, "
543 "interlace-mode=interleaved, framerate=20/1",
544 "video/x-raw",
545 "video/x-raw, format=I420, width=320, height=240, "
546 "interlace-mode=interleaved, framerate=20/1");
547
548 deinterlace_set_caps_with_filter_and_check_result (2, 1,
549 "video/x-raw, format=I420, width=320, height=240, "
550 "interlace-mode=progressive, framerate=20/1",
551 "video/x-raw",
552 "video/x-raw, format=I420, width=320, height=240, "
553 "interlace-mode=progressive, framerate=20/1");
554
555 deinterlace_set_caps_with_filter_and_check_result (2, 1,
556 "video/x-raw, format=I420, width=320, height=240, "
557 "interlace-mode=interleaved, framerate=20/1",
558 "video/x-raw",
559 "video/x-raw, format=I420, width=320, height=240, "
560 "interlace-mode=interleaved, framerate=20/1");
561
562 deinterlace_set_caps_with_filter_and_check_result (2, 0,
563 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
564 "interlace-mode=progressive, framerate=20/1",
565 "video/x-raw(ANY)",
566 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
567 "interlace-mode=progressive, framerate=20/1");
568
569 deinterlace_set_caps_with_filter_and_check_result (2, 0,
570 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
571 "interlace-mode=interleaved, framerate=20/1",
572 "video/x-raw(ANY)",
573 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
574 "interlace-mode=interleaved, framerate=20/1");
575
576 deinterlace_set_caps_with_filter_and_check_result (2, 1,
577 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
578 "interlace-mode=progressive, framerate=20/1",
579 "video/x-raw(ANY)",
580 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
581 "interlace-mode=progressive, framerate=20/1");
582
583 deinterlace_set_caps_with_filter_and_check_result (2, 1,
584 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
585 "interlace-mode=interleaved, framerate=20/1",
586 "video/x-raw(ANY)",
587 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
588 "interlace-mode=interleaved, framerate=20/1");
589
590 deinterlace_set_caps_with_filter_and_check_result (2, 0,
591 "video/x-raw, format=v210, width=320, height=240, "
592 "interlace-mode=progressive, framerate=20/1",
593 "video/x-raw",
594 "video/x-raw, format=v210, width=320, height=240, "
595 "interlace-mode=progressive, framerate=20/1");
596
597 deinterlace_set_caps_with_filter_and_check_result (2, 0,
598 "video/x-raw, format=v210, width=320, height=240, "
599 "interlace-mode=interleaved, framerate=20/1",
600 "video/x-raw",
601 "video/x-raw, format=v210, width=320, height=240, "
602 "interlace-mode=interleaved, framerate=20/1");
603
604 deinterlace_set_caps_with_filter_and_check_result (2, 1,
605 "video/x-raw, format=v210, width=320, height=240, "
606 "interlace-mode=progressive, framerate=20/1",
607 "video/x-raw",
608 "video/x-raw, format=v210, width=320, height=240, "
609 "interlace-mode=progressive, framerate=20/1");
610
611 deinterlace_set_caps_with_filter_and_check_result (2, 1,
612 "video/x-raw, format=v210, width=320, height=240, "
613 "interlace-mode=interleaved, framerate=20/1",
614 "video/x-raw",
615 "video/x-raw, format=v210, width=320, height=240, "
616 "interlace-mode=interleaved, framerate=20/1");
617
618 deinterlace_set_caps_with_filter_and_check_result (2, 0,
619 "video/x-raw, format=I420, width=320, height=240, "
620 "interlace-mode=progressive, framerate=20/1",
621 "video/x-raw, interlace-mode=interleaved", NULL);
622
623 deinterlace_set_caps_with_filter_and_check_result (2, 0,
624 "video/x-raw, format=I420, width=320, height=240, "
625 "interlace-mode=interleaved, framerate=20/1",
626 "video/x-raw, interlace-mode=interleaved",
627 "video/x-raw, format=I420, width=320, height=240, "
628 "interlace-mode=interleaved, framerate=20/1");
629
630 deinterlace_set_caps_with_filter_and_check_result (2, 1,
631 "video/x-raw, format=I420, width=320, height=240, "
632 "interlace-mode=progressive, framerate=20/1",
633 "video/x-raw, interlace-mode=interleaved", NULL);
634
635 deinterlace_set_caps_with_filter_and_check_result (2, 1,
636 "video/x-raw, format=I420, width=320, height=240, "
637 "interlace-mode=interleaved, framerate=20/1",
638 "video/x-raw, interlace-mode=interleaved",
639 "video/x-raw, format=I420, width=320, height=240, "
640 "interlace-mode=interleaved, framerate=20/1");
641 }
642
643 GST_END_TEST;
644
GST_START_TEST(test_mode_interlaced_expected_caps)645 GST_START_TEST (test_mode_interlaced_expected_caps)
646 {
647 deinterlace_set_caps_with_filter_and_check_result (1, 0,
648 "video/x-raw, format=I420, width=320, height=240, "
649 "interlace-mode=progressive, framerate=20/1",
650 "video/x-raw",
651 "video/x-raw, format=I420, width=320, height=240, "
652 "interlace-mode=progressive, framerate=40/1");
653
654 deinterlace_set_caps_with_filter_and_check_result (1, 0,
655 "video/x-raw, format=I420, width=320, height=240, "
656 "interlace-mode=interleaved, framerate=20/1",
657 "video/x-raw",
658 "video/x-raw, format=I420, width=320, height=240, "
659 "interlace-mode=progressive, framerate=40/1");
660
661 deinterlace_set_caps_with_filter_and_check_result (1, 1,
662 "video/x-raw, format=I420, width=320, height=240, "
663 "interlace-mode=progressive, framerate=20/1",
664 "video/x-raw",
665 "video/x-raw, format=I420, width=320, height=240, "
666 "interlace-mode=progressive, framerate=20/1");
667
668 deinterlace_set_caps_with_filter_and_check_result (1, 1,
669 "video/x-raw, format=I420, width=320, height=240, "
670 "interlace-mode=interleaved, framerate=20/1",
671 "video/x-raw",
672 "video/x-raw, format=I420, width=320, height=240, "
673 "interlace-mode=progressive, framerate=20/1");
674
675 deinterlace_set_caps_with_filter_and_check_result (1, 0,
676 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
677 "interlace-mode=progressive, framerate=20/1", "video/x-raw(ANY)", NULL);
678
679 deinterlace_set_caps_with_filter_and_check_result (1, 0,
680 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
681 "interlace-mode=interleaved, framerate=20/1", "video/x-raw(ANY)", NULL);
682
683 deinterlace_set_caps_with_filter_and_check_result (1, 1,
684 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
685 "interlace-mode=progressive, framerate=20/1", "video/x-raw(ANY)", NULL);
686
687 deinterlace_set_caps_with_filter_and_check_result (1, 1,
688 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
689 "interlace-mode=interleaved, framerate=20/1", "video/x-raw(ANY)", NULL);
690
691 deinterlace_set_caps_with_filter_and_check_result (1, 0,
692 "video/x-raw, format=v210, width=320, height=240, "
693 "interlace-mode=progressive, framerate=20/1", "video/x-raw", NULL);
694
695 deinterlace_set_caps_with_filter_and_check_result (1, 0,
696 "video/x-raw, format=v210, width=320, height=240, "
697 "interlace-mode=interleaved, framerate=20/1", "video/x-raw", NULL);
698
699 deinterlace_set_caps_with_filter_and_check_result (1, 1,
700 "video/x-raw, format=v210, width=320, height=240, "
701 "interlace-mode=progressive, framerate=20/1", "video/x-raw", NULL);
702
703 deinterlace_set_caps_with_filter_and_check_result (1, 1,
704 "video/x-raw, format=v210, width=320, height=240, "
705 "interlace-mode=interleaved, framerate=20/1", "video/x-raw", NULL);
706
707 deinterlace_set_caps_with_filter_and_check_result (1, 0,
708 "video/x-raw, format=I420, width=320, height=240, "
709 "interlace-mode=progressive, framerate=20/1",
710 "video/x-raw, interlace-mode=interleaved", NULL);
711
712 deinterlace_set_caps_with_filter_and_check_result (1, 0,
713 "video/x-raw, format=I420, width=320, height=240, "
714 "interlace-mode=interleaved, framerate=20/1",
715 "video/x-raw, interlace-mode=interleaved", NULL);
716
717 deinterlace_set_caps_with_filter_and_check_result (1, 1,
718 "video/x-raw, format=I420, width=320, height=240, "
719 "interlace-mode=progressive, framerate=20/1",
720 "video/x-raw, interlace-mode=interleaved", NULL);
721
722 deinterlace_set_caps_with_filter_and_check_result (1, 1,
723 "video/x-raw, format=I420, width=320, height=240, "
724 "interlace-mode=interleaved, framerate=20/1",
725 "video/x-raw, interlace-mode=interleaved", NULL);
726 }
727
728 GST_END_TEST;
729
GST_START_TEST(test_mode_auto_expected_caps)730 GST_START_TEST (test_mode_auto_expected_caps)
731 {
732 deinterlace_set_caps_with_filter_and_check_result (0, 0,
733 "video/x-raw, format=I420, width=320, height=240, "
734 "interlace-mode=progressive, framerate=20/1",
735 "video/x-raw",
736 "video/x-raw, format=I420, width=320, height=240, "
737 "interlace-mode=progressive, framerate=20/1");
738
739 deinterlace_set_caps_with_filter_and_check_result (0, 0,
740 "video/x-raw, format=I420, width=320, height=240, "
741 "interlace-mode=interleaved, framerate=20/1",
742 "video/x-raw",
743 "video/x-raw, format=I420, width=320, height=240, "
744 "interlace-mode=progressive, framerate=40/1");
745
746 deinterlace_set_caps_with_filter_and_check_result (0, 1,
747 "video/x-raw, format=I420, width=320, height=240, "
748 "interlace-mode=progressive, framerate=20/1",
749 "video/x-raw",
750 "video/x-raw, format=I420, width=320, height=240, "
751 "interlace-mode=progressive, framerate=20/1");
752
753 deinterlace_set_caps_with_filter_and_check_result (0, 1,
754 "video/x-raw, format=I420, width=320, height=240, "
755 "interlace-mode=interleaved, framerate=20/1",
756 "video/x-raw",
757 "video/x-raw, format=I420, width=320, height=240, "
758 "interlace-mode=progressive, framerate=20/1");
759
760 deinterlace_set_caps_with_filter_and_check_result (0, 0,
761 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
762 "interlace-mode=progressive, framerate=20/1",
763 "video/x-raw(ANY)",
764 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
765 "interlace-mode=progressive, framerate=20/1");
766
767 deinterlace_set_caps_with_filter_and_check_result (0, 0,
768 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
769 "interlace-mode=interleaved, framerate=20/1",
770 "video/x-raw(ANY)",
771 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
772 "interlace-mode=interleaved, framerate=20/1");
773
774 deinterlace_set_caps_with_filter_and_check_result (0, 1,
775 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
776 "interlace-mode=progressive, framerate=20/1",
777 "video/x-raw(ANY)",
778 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
779 "interlace-mode=progressive, framerate=20/1");
780
781 deinterlace_set_caps_with_filter_and_check_result (0, 1,
782 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
783 "interlace-mode=interleaved, framerate=20/1",
784 "video/x-raw(ANY)",
785 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
786 "interlace-mode=interleaved, framerate=20/1");
787
788 deinterlace_set_caps_with_filter_and_check_result (0, 0,
789 "video/x-raw, format=v210, width=320, height=240, "
790 "interlace-mode=progressive, framerate=20/1",
791 "video/x-raw",
792 "video/x-raw, format=v210, width=320, height=240, "
793 "interlace-mode=progressive, framerate=20/1");
794
795 deinterlace_set_caps_with_filter_and_check_result (0, 0,
796 "video/x-raw, format=v210, width=320, height=240, "
797 "interlace-mode=interleaved, framerate=20/1",
798 "video/x-raw",
799 "video/x-raw, format=v210, width=320, height=240, "
800 "interlace-mode=interleaved, framerate=20/1");
801
802 deinterlace_set_caps_with_filter_and_check_result (0, 1,
803 "video/x-raw, format=v210, width=320, height=240, "
804 "interlace-mode=progressive, framerate=20/1",
805 "video/x-raw",
806 "video/x-raw, format=v210, width=320, height=240, "
807 "interlace-mode=progressive, framerate=20/1");
808
809 deinterlace_set_caps_with_filter_and_check_result (0, 1,
810 "video/x-raw, format=v210, width=320, height=240, "
811 "interlace-mode=interleaved, framerate=20/1",
812 "video/x-raw",
813 "video/x-raw, format=v210, width=320, height=240, "
814 "interlace-mode=interleaved, framerate=20/1");
815
816 deinterlace_set_caps_with_filter_and_check_result (0, 0,
817 "video/x-raw, format=I420, width=320, height=240, "
818 "interlace-mode=progressive, framerate=20/1",
819 "video/x-raw, interlace-mode=interleaved", NULL);
820
821 deinterlace_set_caps_with_filter_and_check_result (0, 0,
822 "video/x-raw, format=I420, width=320, height=240, "
823 "interlace-mode=interleaved, framerate=20/1",
824 "video/x-raw, interlace-mode=interleaved",
825 "video/x-raw, format=I420, width=320, height=240, "
826 "interlace-mode=interleaved, framerate=20/1");
827
828 deinterlace_set_caps_with_filter_and_check_result (0, 1,
829 "video/x-raw, format=I420, width=320, height=240, "
830 "interlace-mode=progressive, framerate=20/1",
831 "video/x-raw, interlace-mode=interleaved", NULL);
832
833 deinterlace_set_caps_with_filter_and_check_result (0, 1,
834 "video/x-raw, format=I420, width=320, height=240, "
835 "interlace-mode=interleaved, framerate=20/1",
836 "video/x-raw, interlace-mode=interleaved",
837 "video/x-raw, format=I420, width=320, height=240, "
838 "interlace-mode=interleaved, framerate=20/1");
839
840 deinterlace_set_caps_with_filter_and_check_result (0, 0,
841 "video/x-raw, format=v210, width=320, height=240, "
842 "interlace-mode=progressive, framerate=20/1",
843 "video/x-raw, interlace-mode=interleaved", NULL);
844
845 deinterlace_set_caps_with_filter_and_check_result (0, 0,
846 "video/x-raw, format=v210, width=320, height=240, "
847 "interlace-mode=interleaved, framerate=20/1",
848 "video/x-raw, interlace-mode=interleaved",
849 "video/x-raw, format=v210, width=320, height=240, "
850 "interlace-mode=interleaved, framerate=20/1");
851
852 deinterlace_set_caps_with_filter_and_check_result (0, 1,
853 "video/x-raw, format=v210, width=320, height=240, "
854 "interlace-mode=progressive, framerate=20/1",
855 "video/x-raw, interlace-mode=interleaved", NULL);
856
857 deinterlace_set_caps_with_filter_and_check_result (0, 1,
858 "video/x-raw, format=v210, width=320, height=240, "
859 "interlace-mode=interleaved, framerate=20/1",
860 "video/x-raw, interlace-mode=interleaved",
861 "video/x-raw, format=v210, width=320, height=240, "
862 "interlace-mode=interleaved, framerate=20/1");
863 }
864
865 GST_END_TEST;
866
GST_START_TEST(test_mode_auto_strict_expected_caps)867 GST_START_TEST (test_mode_auto_strict_expected_caps)
868 {
869 deinterlace_set_caps_with_filter_and_check_result (3, 0,
870 "video/x-raw, format=I420, width=320, height=240, "
871 "interlace-mode=progressive, framerate=20/1",
872 "video/x-raw",
873 "video/x-raw, format=I420, width=320, height=240, "
874 "interlace-mode=progressive, framerate=20/1");
875
876 deinterlace_set_caps_with_filter_and_check_result (3, 0,
877 "video/x-raw, format=I420, width=320, height=240, "
878 "interlace-mode=interleaved, framerate=20/1",
879 "video/x-raw",
880 "video/x-raw, format=I420, width=320, height=240, "
881 "interlace-mode=progressive, framerate=40/1");
882
883 deinterlace_set_caps_with_filter_and_check_result (3, 1,
884 "video/x-raw, format=I420, width=320, height=240, "
885 "interlace-mode=progressive, framerate=20/1",
886 "video/x-raw",
887 "video/x-raw, format=I420, width=320, height=240, "
888 "interlace-mode=progressive, framerate=20/1");
889
890 deinterlace_set_caps_with_filter_and_check_result (3, 1,
891 "video/x-raw, format=I420, width=320, height=240, "
892 "interlace-mode=interleaved, framerate=20/1",
893 "video/x-raw",
894 "video/x-raw, format=I420, width=320, height=240, "
895 "interlace-mode=progressive, framerate=20/1");
896
897 deinterlace_set_caps_with_filter_and_check_result (3, 0,
898 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
899 "interlace-mode=progressive, framerate=20/1",
900 "video/x-raw(ANY)",
901 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
902 "interlace-mode=progressive, framerate=20/1");
903
904 deinterlace_set_caps_with_filter_and_check_result (3, 0,
905 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
906 "interlace-mode=interleaved, framerate=20/1", "video/x-raw(ANY)", NULL);
907
908 deinterlace_set_caps_with_filter_and_check_result (3, 1,
909 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
910 "interlace-mode=progressive, framerate=20/1",
911 "video/x-raw(ANY)",
912 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
913 "interlace-mode=progressive, framerate=20/1");
914
915 deinterlace_set_caps_with_filter_and_check_result (3, 1,
916 "video/x-raw(memory:SomeMemory), format=I420, width=320, height=240, "
917 "interlace-mode=interleaved, framerate=20/1", "video/x-raw(ANY)", NULL);
918
919 deinterlace_set_caps_with_filter_and_check_result (3, 0,
920 "video/x-raw, format=v210, width=320, height=240, "
921 "interlace-mode=progressive, framerate=20/1",
922 "video/x-raw",
923 "video/x-raw, format=v210, width=320, height=240, "
924 "interlace-mode=progressive, framerate=20/1");
925
926 deinterlace_set_caps_with_filter_and_check_result (3, 0,
927 "video/x-raw, format=v210, width=320, height=240, "
928 "interlace-mode=interleaved, framerate=20/1", "video/x-raw", NULL);
929
930 deinterlace_set_caps_with_filter_and_check_result (3, 1,
931 "video/x-raw, format=v210, width=320, height=240, "
932 "interlace-mode=progressive, framerate=20/1",
933 "video/x-raw",
934 "video/x-raw, format=v210, width=320, height=240, "
935 "interlace-mode=progressive, framerate=20/1");
936
937 deinterlace_set_caps_with_filter_and_check_result (3, 1,
938 "video/x-raw, format=v210, width=320, height=240, "
939 "interlace-mode=interleaved, framerate=20/1", "video/x-raw", NULL);
940
941 deinterlace_set_caps_with_filter_and_check_result (3, 0,
942 "video/x-raw, format=I420, width=320, height=240, "
943 "interlace-mode=progressive, framerate=20/1",
944 "video/x-raw, interlace-mode=interleaved", NULL);
945
946 deinterlace_set_caps_with_filter_and_check_result (3, 0,
947 "video/x-raw, format=I420, width=320, height=240, "
948 "interlace-mode=interleaved, framerate=20/1",
949 "video/x-raw, interlace-mode=interleaved",
950 "video/x-raw, format=I420, width=320, height=240, "
951 "interlace-mode=interleaved, framerate=20/1");
952
953 deinterlace_set_caps_with_filter_and_check_result (3, 1,
954 "video/x-raw, format=I420, width=320, height=240, "
955 "interlace-mode=progressive, framerate=20/1",
956 "video/x-raw, interlace-mode=interleaved", NULL);
957
958 deinterlace_set_caps_with_filter_and_check_result (3, 1,
959 "video/x-raw, format=I420, width=320, height=240, "
960 "interlace-mode=interleaved, framerate=20/1",
961 "video/x-raw, interlace-mode=interleaved",
962 "video/x-raw, format=I420, width=320, height=240, "
963 "interlace-mode=interleaved, framerate=20/1");
964
965 deinterlace_set_caps_with_filter_and_check_result (3, 0,
966 "video/x-raw, format=v210, width=320, height=240, "
967 "interlace-mode=progressive, framerate=20/1",
968 "video/x-raw, interlace-mode=interleaved", NULL);
969
970 deinterlace_set_caps_with_filter_and_check_result (3, 0,
971 "video/x-raw, format=v210, width=320, height=240, "
972 "interlace-mode=interleaved, framerate=20/1",
973 "video/x-raw, interlace-mode=interleaved", NULL);
974
975 deinterlace_set_caps_with_filter_and_check_result (3, 1,
976 "video/x-raw, format=v210, width=320, height=240, "
977 "interlace-mode=progressive, framerate=20/1",
978 "video/x-raw, interlace-mode=interleaved", NULL);
979
980 deinterlace_set_caps_with_filter_and_check_result (3, 1,
981 "video/x-raw, format=v210, width=320, height=240, "
982 "interlace-mode=interleaved, framerate=20/1",
983 "video/x-raw, interlace-mode=interleaved", NULL);
984 }
985
986 GST_END_TEST;
987
GST_START_TEST(test_fields_auto_expected_caps)988 GST_START_TEST (test_fields_auto_expected_caps)
989 {
990 deinterlace_set_caps_with_filter_and_check_result (0, 3,
991 "video/x-raw, format=I420, width=320, height=240, "
992 "interlace-mode=interleaved, framerate=20/1",
993 "video/x-raw, interlace-mode=progressive, framerate=20/1",
994 "video/x-raw, format=I420, width=320, height=240, "
995 "interlace-mode=progressive, framerate=20/1");
996
997 deinterlace_set_caps_with_filter_and_check_result (0, 3,
998 "video/x-raw, format=I420, width=320, height=240, "
999 "interlace-mode=interleaved, framerate=20/1",
1000 "video/x-raw, interlace-mode=progressive, framerate=40/1",
1001 "video/x-raw, format=I420, width=320, height=240, "
1002 "interlace-mode=progressive, framerate=40/1");
1003
1004 deinterlace_set_caps_with_filter_and_check_result (0, 3,
1005 "video/x-raw, format=I420, width=320, height=240, "
1006 "interlace-mode=interleaved, framerate=20/1",
1007 "video/x-raw, interlace-mode=progressive",
1008 "video/x-raw, format=I420, width=320, height=240, "
1009 "interlace-mode=progressive, framerate=40/1");
1010
1011 deinterlace_set_caps_with_filter_and_check_result (0, 3,
1012 "video/x-raw, format=I420, width=320, height=240, "
1013 "interlace-mode=interleaved, framerate=20/1",
1014 "video/x-raw, interlace-mode=progressive, framerate=15/1", NULL);
1015 }
1016
1017 GST_END_TEST;
1018
1019
1020
1021 static Suite *
deinterlace_suite(void)1022 deinterlace_suite (void)
1023 {
1024 Suite *s = suite_create ("deinterlace");
1025 TCase *tc_chain = tcase_create ("general");
1026
1027 suite_add_tcase (s, tc_chain);
1028 tcase_set_timeout (tc_chain, 180);
1029
1030 if (!gst_registry_check_feature_version (gst_registry_get (), "deinterlace",
1031 GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO)) {
1032 GST_ERROR ("FIXME: port deinterlace element");
1033 return s;
1034 }
1035
1036 tcase_add_test (tc_chain, test_create_and_unref);
1037 tcase_add_test (tc_chain, test_mode_auto_accept_caps);
1038 tcase_add_test (tc_chain, test_mode_forced_accept_caps);
1039 tcase_add_test (tc_chain, test_mode_disabled_accept_caps);
1040 tcase_add_test (tc_chain, test_mode_disabled_passthrough);
1041 tcase_add_test (tc_chain, test_mode_auto_deinterlaced_passthrough);
1042
1043 tcase_add_test (tc_chain, test_mode_disabled_expected_caps);
1044 tcase_add_test (tc_chain, test_mode_interlaced_expected_caps);
1045 tcase_add_test (tc_chain, test_mode_auto_expected_caps);
1046 tcase_add_test (tc_chain, test_mode_auto_strict_expected_caps);
1047 tcase_add_test (tc_chain, test_fields_auto_expected_caps);
1048
1049 return s;
1050 }
1051
1052 GST_CHECK_MAIN (deinterlace);
1053