• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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 #ifndef __GST_VIDEO_SCALE_H__
21 #define __GST_VIDEO_SCALE_H__
22 
23 #include <gst/gst.h>
24 #include <gst/video/video.h>
25 #include <gst/video/gstvideofilter.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_VIDEO_SCALE (gst_video_scale_get_type())
30 #define GST_VIDEO_SCALE_CAST(obj) ((GstVideoScale *)(obj))
31 G_DECLARE_FINAL_TYPE (GstVideoScale, gst_video_scale, GST, VIDEO_SCALE,
32     GstVideoFilter)
33 
34 
35 /**
36  * GstVideoScaleMethod:
37  * @GST_VIDEO_SCALE_NEAREST: use nearest neighbour scaling (fast and ugly)
38  * @GST_VIDEO_SCALE_BILINEAR: use 2-tap bilinear scaling (slower but prettier).
39  * @GST_VIDEO_SCALE_4TAP: use a 4-tap sinc filter for scaling (slow).
40  * @GST_VIDEO_SCALE_LANCZOS: use a multitap Lanczos filter for scaling (slow).
41  * @GST_VIDEO_SCALE_BILINEAR2: use a multitap bilinear filter
42  * @GST_VIDEO_SCALE_SINC: use a multitap sinc filter
43  * @GST_VIDEO_SCALE_HERMITE: use a multitap bicubic Hermite filter
44  * @GST_VIDEO_SCALE_SPLINE: use a multitap bicubic spline filter
45  * @GST_VIDEO_SCALE_CATROM: use a multitap bicubic Catmull-Rom filter
46  * @GST_VIDEO_SCALE_MITCHELL: use a multitap bicubic Mitchell filter
47  *
48  * The videoscale method to use.
49  */
50 typedef enum {
51   GST_VIDEO_SCALE_NEAREST,
52   GST_VIDEO_SCALE_BILINEAR,
53   GST_VIDEO_SCALE_4TAP,
54   GST_VIDEO_SCALE_LANCZOS,
55 
56   GST_VIDEO_SCALE_BILINEAR2,
57   GST_VIDEO_SCALE_SINC,
58   GST_VIDEO_SCALE_HERMITE,
59   GST_VIDEO_SCALE_SPLINE,
60   GST_VIDEO_SCALE_CATROM,
61   GST_VIDEO_SCALE_MITCHELL
62 } GstVideoScaleMethod;
63 
64 /**
65  * GstVideoScale:
66  *
67  * Opaque data structure
68  */
69 struct _GstVideoScale {
70   GstVideoFilter element;
71 
72   /* properties */
73   GstVideoScaleMethod method;
74   gboolean add_borders;
75   double sharpness;
76   double sharpen;
77   gboolean dither;
78   int submethod;
79   double envelope;
80   gboolean gamma_decode;
81   gint n_threads;
82 
83   GstVideoConverter *convert;
84 
85   gint borders_h;
86   gint borders_w;
87 };
88 
89 GST_ELEMENT_REGISTER_DECLARE (videoscale);
90 
91 G_END_DECLS
92 
93 #endif /* __GST_VIDEO_SCALE_H__ */
94