summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-11-21 18:44:46 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-11-21 23:08:02 +0100
commit06c7fde8e07958874214c33740f99912c646401d (patch)
tree1d2c4a2101b7d8ade370c1a937b24e06d0d7d5e0 /tests
parent152ffb52d2f85fc358f4c97ad061b4831611666a (diff)
filter: fix semantics of deinterlacing flags.
Fix deinterlacing flags to make more sense. The TFF (top-field-first) flag is meant to specify the organization of reference frames used in advanced deinterlacing modes. Introduce the more explicit flag TOPFIELD to specify that the top-field of the supplied input surface is to be used for deinterlacing. Conversely, if not set, this means that the bottom field of the supplied input surface will be used instead.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-filter.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test-filter.c b/tests/test-filter.c
index a96c0335..7bb6219c 100755
--- a/tests/test-filter.c
+++ b/tests/test-filter.c
@@ -291,7 +291,9 @@ end:
static inline gboolean
parse_deinterlace(const gchar *str, GstVaapiDeinterlaceMethod *deinterlace_ptr)
{
- return parse_enum(str, GST_VAAPI_TYPE_DEINTERLACE_METHOD,
+ g_return_val_if_fail(deinterlace_ptr != NULL, FALSE);
+
+ return str && parse_enum(str, GST_VAAPI_TYPE_DEINTERLACE_METHOD,
GST_VAAPI_DEINTERLACE_METHOD_NONE, (gint *)deinterlace_ptr);
}
@@ -390,7 +392,7 @@ main(int argc, char *argv[])
g_error("failed to set deinterlacing method");
}
else if (deinterlace_flags) {
- if (deinterlace_flags & GST_VAAPI_DEINTERLACE_FLAG_TFF)
+ if (deinterlace_flags & GST_VAAPI_DEINTERLACE_FLAG_TOPFIELD)
filter_flags = GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD;
else
filter_flags = GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD;
@@ -401,7 +403,7 @@ main(int argc, char *argv[])
if (!(deinterlace_flags & GST_VAAPI_DEINTERLACE_FLAG_ONEFIELD))
surface_flags = GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD |
GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD;
- else if (deinterlace_flags & GST_VAAPI_DEINTERLACE_FLAG_TFF)
+ else if (deinterlace_flags & GST_VAAPI_DEINTERLACE_FLAG_TOPFIELD)
surface_flags = GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD;
else
surface_flags = GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD;