2 * gstvaapipostproc.h - VA-API video post processing
4 * Copyright (C) 2012 Intel Corporation
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef GST_VAAPIPOSTPROC_H
23 #define GST_VAAPIPOSTPROC_H
26 #include <gst/vaapi/gstvaapidisplay.h>
27 #include <gst/vaapi/gstvaapisurface.h>
28 #include <gst/vaapi/gstvaapisurfacepool.h>
29 #include <gst/vaapi/gstvaapivideobuffer.h>
33 #define GST_TYPE_VAAPIPOSTPROC \
34 (gst_vaapipostproc_get_type())
36 #define GST_VAAPIPOSTPROC(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
38 GST_TYPE_VAAPIPOSTPROC, \
41 #define GST_VAAPIPOSTPROC_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_CAST((klass), \
43 GST_TYPE_VAAPIPOSTPROC, \
44 GstVaapiPostprocClass))
46 #define GST_IS_VAAPIPOSTPROC(obj) \
47 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPIPOSTPROC))
49 #define GST_IS_VAAPIPOSTPROC_CLASS(klass) \
50 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VAAPIPOSTPROC))
52 #define GST_VAAPIPOSTPROC_GET_CLASS(obj) \
53 (G_TYPE_INSTANCE_GET_CLASS((obj), \
54 GST_TYPE_VAAPIPOSTPROC, \
55 GstVaapiPostprocClass))
57 typedef struct _GstVaapiPostproc GstVaapiPostproc;
58 typedef struct _GstVaapiPostprocClass GstVaapiPostprocClass;
60 typedef enum _GstVaapiDeinterlaceMode GstVaapiDeinterlaceMode;
61 typedef enum _GstVaapiDeinterlaceMethod GstVaapiDeinterlaceMethod;
64 * GstVaapiDeinterlaceMode:
65 * @GST_VAAPI_DEINTERLACE_MODE_AUTO: Auto detect needs for deinterlacing.
66 * @GST_VAAPI_DEINTERLACE_MODE_INTERLACED: Force deinterlacing.
67 * @GST_VAAPI_DEINTERLACE_MODE_DISABLED: Never perform deinterlacing.
69 enum _GstVaapiDeinterlaceMode {
70 GST_VAAPI_DEINTERLACE_MODE_AUTO = 0,
71 GST_VAAPI_DEINTERLACE_MODE_INTERLACED,
72 GST_VAAPI_DEINTERLACE_MODE_DISABLED,
76 * GstVaapiDeinterlaceMethod:
77 * @GST_VAAPI_DEINTERLACE_METHOD_BOB: Basic bob deinterlacing algorithm.
78 * @GST_VAAPI_DEINTERLACE_METHOD_WEAVE: Weave deinterlacing algorithm.
79 * @GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE: Motion adaptive deinterlacing algorithm.
80 * @GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED: Motion compensated deinterlacing algorithm.
82 enum _GstVaapiDeinterlaceMethod {
83 GST_VAAPI_DEINTERLACE_METHOD_BOB = 1,
84 GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
85 GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
86 GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
89 struct _GstVaapiPostproc {
91 GstElement parent_instance;
94 GstCaps *sinkpad_caps;
97 GstCaps *allowed_caps;
98 GstCaps *postproc_caps;
100 GstVaapiDisplay *display;
102 guint surface_height;
105 gboolean deinterlace;
106 GstVaapiDeinterlaceMode deinterlace_mode;
107 GstVaapiDeinterlaceMethod deinterlace_method;
108 GstClockTime field_duration;
113 struct _GstVaapiPostprocClass {
115 GstElementClass parent_class;
119 gst_vaapipostproc_get_type(void) G_GNUC_CONST;
123 #endif /* GST_VAAPIPOSTPROC_H */