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 \ 30 (gst_video_scale_get_type()) 31 #define GST_VIDEO_SCALE(obj) \ 32 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_SCALE,GstVideoScale)) 33 #define GST_VIDEO_SCALE_CLASS(klass) \ 34 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_SCALE,GstVideoScaleClass)) 35 #define GST_IS_VIDEO_SCALE(obj) \ 36 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_SCALE)) 37 #define GST_IS_VIDEO_SCALE_CLASS(klass) \ 38 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_SCALE)) 39 #define GST_VIDEO_SCALE_CAST(obj) ((GstVideoScale *)(obj)) 40 41 42 /** 43 * GstVideoScaleMethod: 44 * @GST_VIDEO_SCALE_NEAREST: use nearest neighbour scaling (fast and ugly) 45 * @GST_VIDEO_SCALE_BILINEAR: use 2-tap bilinear scaling (slower but prettier). 46 * @GST_VIDEO_SCALE_4TAP: use a 4-tap sinc filter for scaling (slow). 47 * @GST_VIDEO_SCALE_LANCZOS: use a multitap Lanczos filter for scaling (slow). 48 * @GST_VIDEO_SCALE_BILINEAR2: use a multitap bilinear filter 49 * @GST_VIDEO_SCALE_SINC: use a multitap sinc filter 50 * @GST_VIDEO_SCALE_HERMITE: use a multitap bicubic Hermite filter 51 * @GST_VIDEO_SCALE_SPLINE: use a multitap bicubic spline filter 52 * @GST_VIDEO_SCALE_CATROM: use a multitap bicubic Catmull-Rom filter 53 * @GST_VIDEO_SCALE_MITCHELL: use a multitap bicubic Mitchell filter 54 * 55 * The videoscale method to use. 56 */ 57 typedef enum { 58 GST_VIDEO_SCALE_NEAREST, 59 GST_VIDEO_SCALE_BILINEAR, 60 GST_VIDEO_SCALE_4TAP, 61 GST_VIDEO_SCALE_LANCZOS, 62 63 GST_VIDEO_SCALE_BILINEAR2, 64 GST_VIDEO_SCALE_SINC, 65 GST_VIDEO_SCALE_HERMITE, 66 GST_VIDEO_SCALE_SPLINE, 67 GST_VIDEO_SCALE_CATROM, 68 GST_VIDEO_SCALE_MITCHELL 69 } GstVideoScaleMethod; 70 71 typedef struct _GstVideoScale GstVideoScale; 72 typedef struct _GstVideoScaleClass GstVideoScaleClass; 73 74 /** 75 * GstVideoScale: 76 * 77 * Opaque data structure 78 */ 79 struct _GstVideoScale { 80 GstVideoFilter element; 81 82 /* properties */ 83 GstVideoScaleMethod method; 84 gboolean add_borders; 85 double sharpness; 86 double sharpen; 87 gboolean dither; 88 int submethod; 89 double envelope; 90 gboolean gamma_decode; 91 gint n_threads; 92 93 GstVideoConverter *convert; 94 95 gint borders_h; 96 gint borders_w; 97 }; 98 99 struct _GstVideoScaleClass { 100 GstVideoFilterClass parent_class; 101 }; 102 103 G_GNUC_INTERNAL GType gst_video_scale_get_type (void); 104 105 G_END_DECLS 106 107 #endif /* __GST_VIDEO_SCALE_H__ */ 108